‎2008 Jul 08 7:36 PM
Hi guys,
Iam unable to find the function module Fm_name...When i select the pattern button and try to find this fn. module it says 'Function fm_name not found'.
Could u help me out pls.
Regards,
‎2008 Jul 08 7:39 PM
Hi,
What exactly are you searching for?
There is no func.module called FM_NAME in SAP.
search by partial text and wild cards.
Regards,
Subramanian
‎2008 Jul 08 7:39 PM
Hi,
What exactly are you searching for?
There is no func.module called FM_NAME in SAP.
search by partial text and wild cards.
Regards,
Subramanian
‎2008 Jul 08 7:49 PM
I need to call the function module for the smart form
So, after determining the name of the function module by the FM 'SSF_Function_module_name' I need to get the form triggered for output...
‎2008 Jul 08 7:53 PM
HI
By using "ssf_function_module_name " the user can obtain
the function mudule generated by the Smartform.
The input parameter is the SMARTFORM name
the output parameter is the function module generated .It has to be type RS38L_FNAM.After getting the output parameter .
CALL FUNCTION (output parameter name).
Regards
Pavan
Edited by: Craig Cmehil on Jul 9, 2008 9:01 AM
‎2008 Jul 08 7:56 PM
Hi,
Check the below code. When you execute/generate a smartform, a FM is created. You have to use the FM to trigger the smartform.
*--calling a FM to know the smartform name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lc_formname
IMPORTING
fm_name = l_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN '1'.
MESSAGE e004(ssfcomposer) .
WHEN '2'.
MESSAGE e002(ssfcomposer) .
WHEN OTHERS.
MESSAGE e001(ssfcomposer) .
.
ENDCASE.
ENDIF.
*--passing the FM name for that smartform
*sort as needed by the smart form
SORT gi_outtab_noms BY carrier_name tow_name
idate nomtk nomit.
nom_barges idate nomtk nomit.
CALL FUNCTION l_fmname
EXPORTING
control_parameters = v_ctrl_params
output_options = v_output_options
user_settings = 'X'
i_nom_for_mtb = gi_outtab_noms
IMPORTING
document_output_info = pdf_document_output_info
job_output_info = pdf_job_output_info
job_output_options = pdf_job_output_options.
IF sy-subrc <> 0.
MESSAGE e001(ssfcomposer) .
ENDIF.
Thanks,
Vamshi.
‎2008 Jul 08 7:59 PM
what ever i mentioned in my post exactly we will do the case of Smart form
first we will pass the smartform name to ssf_function and it give the function name
you have call that dynamically the way i mentioned in my post
call function fm_name
importing
....
the interface you can get it from smartform
that you can get from smartform execution
execute the smartform it take you to the Function module
Copy that function module and use it in the pattern
now replace that function name
call FUNCTION '/SADD/DSFSFSF' <=-----remove this and give the variable which is used in ssf function,
‎2008 Jul 08 8:17 PM
*--calling a FM to know the smartform name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lc_formname
IMPORTING
fm_name = l_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc 0.
CASE sy-subrc.
WHEN '1'.
MESSAGE e004(ssfcomposer) .
WHEN '2'.
MESSAGE e002(ssfcomposer) .
WHEN OTHERS.
MESSAGE e001(ssfcomposer) .
.
ENDCASE.
ENDIF.
*--passing the FM name for that smartform
*sort as needed by the smart form
SORT gi_outtab_noms BY carrier_name tow_name
idate nomtk nomit.
nom_barges idate nomtk nomit.
-
>>>>>>>>>>>>>>>>
CALL FUNCTION l_fmname
EXPORTING
control_parameters = v_ctrl_params
output_options = v_output_options
user_settings = 'X'
i_nom_for_mtb = gi_outtab_noms
IMPORTING
document_output_info = pdf_document_output_info
job_output_info = pdf_job_output_info
job_output_options = pdf_job_output_options.
IF sy-subrc 0.
MESSAGE e001(ssfcomposer) .
ENDIF.
-
>>>>>>>>>>>>>>>>
DO I NEED TO WRITE THE ABOVE SELECTED PART WITH ARROWS DIRECTLY OR CAN I CALL THAT USING A PATTERN. IF SO HOW???
‎2008 Jul 08 8:27 PM
Yes.
The part in between the arrows is reqd. The funcmodule generated depends upon the environment.
The first func module SSF.... will generate the function module name for you and the second func.module call will execute the func.module.
Regadrs,
Subramanian
‎2008 Jul 08 8:40 PM
Yes you are right.. I do know that. but what Iam asking is how to call the second function module?
because in the abap editor when i select the pattern button or ctrl+f6 and enter the function module name as 'FM_name' it says the function module is not found.
‎2008 Jul 08 9:07 PM
Haha...ok..I got your problem.
Simple way...Copy the function module that gets generated in your system by executing the smartform for eg: like /1BCDWB/SF00000388.
Now using pattern, insert this fm and get all the import and export parameters.
Now delete the call function '/1BCDWB/SF00000388', and replace it with call function fm_name.
Regadrs,
Subramanian
‎2008 Jul 08 9:27 PM
Thanx Mr. Subramanian
Edited by: anik kiran on Jul 8, 2008 10:27 PM
‎2008 Jul 08 7:39 PM
HI
Which Function module you need exactly and for what purpose could you be more clear may be the function became obsolete.
So what is the issue plz say it
I can Help you
Regards
Pavan
‎2008 Jul 08 7:45 PM
FM_NAME---
i think you just checked the Dynamic function calls
DATA: FM_NAME TYPE .....etc
FM_NAME = 'REUSE_ALV_LIST_DISPLAY'.
CALL FUNCTION FM_NAME
importing..
exporting..
...
FM_NAME is not function, just check your coding, there you can see some where they are passing the Function module name to FM_NAME