‎2008 Mar 12 12:58 PM
after executing form it will create fn module .why we r not using function module.instead of this we r using ssf_function_module_name.what is the reason.
‎2008 Mar 12 1:01 PM
Hi,
The fm ssf_function_module_name return the fm name generated by smart form. After that we have to call the function module return by ssf_function_module_name.
‎2008 Mar 12 1:01 PM
FM generated is for internal purpose of SAP. If we execute the FM also nothing happens. U have to execute thru smart forms only.
‎2008 Mar 12 1:03 PM
Hi,
For Every smartform,There is one Function Module (se37),.This FM, is GENERATED DYNAMICALLY,and the name is also dynamic. IT MEANS, that the FM name will Be DIFFERENT.in DEV, QA and PRD Server.Hence, we CANNOT HARDCODE the fm name.So, to fetch the FM name, given the smartform name,
this fm SSF_FUNCTION_MODULE_NAME is used. After that, we call the FM dynamically,with some specified/pre-defined format
Here is an example
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = ws_c_formname " form name
IMPORTING
fm_name = ws_c_fm_name " FM created for form
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
then call this FM and pass all the variables to the form from the report.
CALL FUNCTION ws_c_fm_name
EXPORTING
all the variables
IMPORTING
document_output_info = wa_document_output_info_p
job_output_info = wa_tab_otf_data
job_output_options = wa_job_output_options_p
TABLES
tables used in form
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Regards,
Chandru
‎2008 Mar 13 4:19 AM
hi,
If u r sure that you will use that in only that client. u can hard code it..and use the function module as well.
For Every smartform,There is one Function Module (se37),.This FM, is GENERATED DYNAMICALLY,and the name is also dynamic. IT MEANS, that the FM name will Be DIFFERENT.in DEV, QA and PRD Server.Hence, we CANNOT HARDCODE the fm name.So, to fetch the FM name, given the smartform name,
this fm SSF_FUNCTION_MODULE_NAME is used. After that, we call the FM dynamically,with some specified/pre-defined format