Skip to end of metadata
Go to start of metadata

Initially, form and interface must created from SFP

You can call the Form from a Simple Program.

Simple Program to call the Adobe Form from SE38.


* Data Declarations--
DATA: fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams,
it_table TYPE ztable. "Declare the DB Table for the data to be fetched

* Calling Function Module to initiate parameters--
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.

IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

* Query the data required from theDBtable--
SELECT * FROM  ztable INTO TABLE it_table
UP TO 30 ROWS.

* Get name of Function Module corresponding to the Adobe form
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'YDEMO_SFP_TEST'
IMPORTING
e_funcname = fm_name.

* Generate Adobe output
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
it_table = ztable
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.

IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

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

IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.


Output of the report will be in Adobe Form as per the Design done Previously from SFP.

 

 

Thanks and Regards,

Karthik Sridhar