cancel
Showing results for 
Search instead for 
Did you mean: 

call function module

Former Member
0 Kudos

After using Fm 'SSF_FUNCTION_MODULE_NAME, how to call fuction using variable what i get from this fm i.e FM name.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

call function FMNAME

exporting.

...

instead of typing all export inport and tables parameters., you can call your FM, using the pattern, first... and then replace function module name with FMNAME

Former Member
0 Kudos

so we can call the fm directly, if we call like this what is the use

Former Member
0 Kudos

When you transport to other systems the name of the generated FM may be different, so you want to use the following:

* Get the Function Module Name
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
            FORMNAME           = V_FORM_NAME
       IMPORTING
            FM_NAME            = V_FM_NAME
       EXCEPTIONS
            NO_FORM            = 1
            NO_FUNCTION_MODULE = 2
            OTHERS             = 3.
  IF SY-SUBRC <> 0.
    V_RETCODE = 1.
  ENDIF.

* Call the Smartform's Function Module
  CALL FUNCTION V_FM_NAME
       EXPORTING

Former Member
0 Kudos

ok, thank you