Dummy

DATA: fp_outputparams TYPE sfpoutputparams,
fm_name         TYPE rs38l_fnam,
fp_docparams    TYPE sfpdocparams,
fp_form_output  TYPE fpformoutput,
ls_itab         TYPE /rb9f/fps_s_credit_pdf.

ls_itab = get_itab( ).

fp_outputparams–device    = ‘PRINTER’.
fp_outputparams–preview   = ‘X’.

* Sets the output parameters and opens the spool job
CALL FUNCTION ‘FP_JOB_OPEN’                   “& Form Processing: Call Form
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel          = 1
usage_error     = 2
system_error    = 3
internal_error  = 4
OTHERS          = 5.
IF sy–subrc <> 0.
*     <error handling>
ENDIF.

TRY .
*&—- Get the name of the generated function module
CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME’   “& Form Processing Generation
EXPORTING
i_name     = ‘/RB9F/FPS_AF_CS_PTNA’
IMPORTING
e_funcname = fm_name.

CATCH cx_fp_api_usage.
CATCH cx_fp_api_internal.
CATCH cx_fp_api_repository.
ENDTRY.

fp_docparams–langu   = ‘E’.
fp_docparams–country = ‘US’.
*  &— Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams  = fp_docparams
is_itab            = ls_itab
IMPORTING
/1bcdwb/formoutput = fp_form_output
EXCEPTIONS
usage_error        = 1
system_error       = 2
internal_error     = 3.
IF sy–subrc <> 0.
*    <error handling>
ENDIF.

*&—- Close the spool job
CALL FUNCTION ‘FP_JOB_CLOSE’
EXCEPTIONS
usage_error    = 1
system_error   = 2
internal_error = 3
OTHERS         = 4.
IF sy–subrc <> 0.
*   <error handling>
ENDIF.