Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartforms

Former Member
0 Likes
456

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.

4 REPLIES 4
Read only

Former Member
0 Likes
435

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.

Read only

Former Member
0 Likes
435

FM generated is for internal purpose of SAP. If we execute the FM also nothing happens. U have to execute thru smart forms only.

Read only

Former Member
0 Likes
435

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

Read only

Former Member
0 Likes
435

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