Calling the ADOBE FORM IN SAP ABAP Programming
REPORT zcall_adobe_form.
&-----------------------------------------------------------------------&
*& Author : P Surjith Kumar
*& Purpose : Call the Adobe form in the ABAP Program
*&------------------------------------------------------------------------
DATA: fm_name TYPE rs38l_fnam, " CHAR
30
0
Name of Function Module
fp_docparams TYPE sfpdocparams, " Structure SFPDOCPARAMS Short Description Form Parameters
for
Form Processing
fp_outputparams TYPE sfpoutputparams, " Structure SFPOUTPUTPARAMS Short Description Form Processing Output Parameter
it_mari TYPE zmari_tbl. " Table Type ZMARI_TBL MARI Table Tyoe
* 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.
*&---- Get the name of the generated function module
CALL FUNCTION
'FP_FUNCTION_MODULE_NAME'
"& Form Processing Generation
EXPORTING
i_name =
'ZSUR_ADOBE_FORM'
IMPORTING
e_funcname = fm_name.
IF sy-subrc <>
0
.
* <error handling>
ENDIF.
*-- Fetch the Data and store it in the Internal Table
SELECT * FROM mari INTO TABLE it_mari UP TO
15
ROWS.
* Language and country setting (here US as an example)
fp_docparams-langu =
'E'
.
fp_docparams-country =
'US'
.
*&--- Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
zmari = it_mari
* IMPORTING
* /1BCDWB/FORMOUTPUT =
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'
* IMPORTING
* E_RESULT =
EXCEPTIONS
usage_error =
1
system_error =
2
internal_error =
3
OTHERS =
4
.
IF sy-subrc <>
0
.
* <error handling>
ENDIF.
********************************ROHINI KUMAR********************************* Please support my work : sap.rohini988@gmail.com LinkedIn Link : https://www.linkedin.com/in/rohini-kumar-14647a13a/
********************************************************************************
Comments
Post a Comment