*======================================================================* * Selection Screen *======================================================================* PARAMETERS : p_flag TYPE char1. *======================================================================* * Data Objects *======================================================================*
DATA: gv_fm_name TYPE rs38l_fnam, " FM Name gs_fp_docparams TYPE sfpdocparams, gs_fp_outputparams TYPE sfpoutputparams, gv_text1 type char255, gv_text2 type char255.
*======================================================================* * Constants *======================================================================* CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM10'.
gv_text1 = 'Welcome to Adobe form tutorial'. gv_text2 = 'Welcome to SAP ABAP'. *======================================================================* * START of Calling the Form *======================================================================* *&---------------------------------------------------------------------* **&&~~ Form Processing: Call Form - Open * CALL FUNCTION 'FP_JOB_OPEN' CHANGING ie_outputparams = gs_fp_outputparams EXCEPTIONS cancel = 1 usage_error = 2 system_error = 3 internal_error = 4 OTHERS = 5. IF sy-subrc <> 0. " Suitable Error Handling ENDIF. *&---------------------------------------------------------------------* **&&~~ Get the Function module name based on Form Name * CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' EXPORTING i_name = gv_form_name IMPORTING e_funcname = gv_fm_name. IF sy-subrc <> 0. " Suitable Error Handling ENDIF. *&---------------------------------------------------------------------* **&&~~ Take the FM name by execuing the form - by using Pattern- **&&~~ call that FM and replace the FM Name by gv_fm_name **&&~~ Call the Generated FM