‎2008 Jul 14 10:49 AM
Hi all,
I am using FP_FUNCTION_MODULE_NAME fm to get a fm name of a Interactive/PDF form.
I want to know that when i get this FM name how to call it dynamically.
Points will be sured for valuable answers.
Thanks
Sanket sethi
‎2008 Jul 14 10:52 AM
use
call function fm_name
where fm_name will be the function module name u got
‎2008 Jul 14 11:03 AM
But i don't call FM name at runtime meanwhile we can get fm
Name into a variable so that we can use any other palce.
Suggst where we can call this one.
‎2008 Jul 14 11:09 AM
Hi,
Check this:
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = pa_form
IMPORTING
e_funcname = fm_name.Call function module FP_FUNCTION_MODULE_NAME and pass the form
name to it. You will receive parameter e__funcname, which will contain the name
of the generated function module.
Parameter fm_name will automatically contain the name of the appropriate generated function module.Since this generated function module is always called dynamically, no changes in the application program are necessary.
Regards
Adil
‎2008 Jul 14 11:17 AM
Step 1
Execute your Adobe Form in SFP transaction, there it will give the function module, take that function name.
now in your Driver program first call the function FP_FUNCTION_MODULE_NAME for this pass the formname, you will get the function name.
step2
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = form_name
IMPORTING
e_funcname = lv_function.
step3
now call the function using the pattern with the name from step1.
pass all required parameters.
‎2008 Jul 14 1:42 PM
Data: LV_FORM_NAME TYPE FPWBFORMNAME,
LV_FM_NAME TYPE RS38L_FNAM,
FP_TEST_DUMMY TYPE FPINTERFACETYPE.
Now pass the form name in LV_FORM_NAME .
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
I_NAME = LV_FORM_NAME
IMPORTING
E_FUNCNAME = LV_FM_NAME
E_INTERFACE_TYPE = FP_TEST_DUMMY.
U'll get the FM name in LV_FM_NAME.
Now
GS_DOCPARAMS-LANGU = 'E'.
GS_DOCPARAMS-COUNTRY = 'US'.
CALL FUNCTION LV_FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = GS_DOCPARAMS
LFA1 = LFA1
MBMFKTO_PDF = GT_MFKTO_PDF
IMPORTING
/1BCDWB/FORMOUTPUT = FP_RESULT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4.
Hope this might give answer to U.
Regards
Hemendra.