Call adobe form in Report

 To integrate the adobe form in the program, we can use 3 function modules.

    1. FP_JOB_OPEN -- This function module is used to open the job. We can set the default parameter values and pass them to this function module.

    2. FP_FUNCTION_MODULE_NAME -- This function module is used to get the function module name of adobe form.

    3.  FP_JOB_CLOSE -- This function module is used to close the job. 


                                Refer adobe form -  Adobe to print PO details

    1. Goto T-code SE38.

    2. Give program name click on create.

    3. Write code.

         REPORT yr_ab_call_adobe_po_details.


    DATA: lr_outparam TYPE sfpoutputparams,
          lr_result   TYPE sfpjoboutput,
          lf_funcname TYPE funcname.
    PARAMETERS: p_ebeln TYPE ebeln.

    lr_outparam-preview = 'X'. "User restricts preview button
    lr_outparam-nodialog = 'X'. "User restricts dialog box


    CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
            ie_outputparams = lr_outparam
        EXCEPTIONS
            cancel          = 1
            usage_error     = 2
            system_error    = 3
            internal_error  = 4
            OTHERS          = 5.

    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
            i_name     = 'YL_AB_PURCHASE_ORDER'
        IMPORTING
            e_funcname = lf_funcname.

    CALL FUNCTION lf_funcname
        EXPORTING
            p_ebeln        = p_ebeln
        EXCEPTIONS
            usage_error    = 1
            system_error   = 2
            internal_error = 3
            OTHERS         = 4.


    CALL FUNCTION 'FP_JOB_CLOSE'
        IMPORTING
            e_result       = lr_result
        EXCEPTIONS
            usage_error    = 1
            system_error   = 2
            internal_error = 3
            OTHERS         = 4.

Input



Output


*********************************Thank You******************************

Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Add custom tab to me51n at item level in ABAP