cancel
Showing results for 
Search instead for 
Did you mean: 

calling function modules with in the text editor in form

Former Member
0 Kudos

hi,

can any one tell me the path to call a function module in the text editor of the sap script.

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

U can call only a form, so u can insert your fm in this form:

/: PERFORM CALL_FUNCTION_MODULE IN PROGRAM Z<PROGRAM>

/: USING &PARAM1&

/: USING &PARAM2&

/: ENDFORM

This FORM has to be defined in the program Z<PROAGRAM>.

Max

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

In smartforms you can call function modules in program lines . Thi9s can be done as :

1 . Right click on the object in smartform after which you want to call FM .

2. Create->flow logic->program lines

3. A editor will be displayed . In input parameter mention the variables you want to use as input in that editor and in output parameter you have to use the variables that will changes as the result of processing in the editor .

4. In that editor you can directly call a function module with import parameters specified in input parameters and export parameters specified in output parameters ..

Regards

Former Member
0 Kudos

hi,

You cannot call any FM directly, however, you can call a subroutine from any program in a script. In this subroutine you can call your FM.

/: PERFORM subroutine IN PROGRAM zprog

/: USING &PARAM1&

/: USING &PARAM2&

/: CHANGING &PARAM3&

/: CHANGING &PARAM4&

/: ENDFORM

Hope this helps.

Regards,

Richa

Former Member
0 Kudos

Hi

As Max mentioned, you can call a subroutine defined in a Z program. So if you wish to execute a FM, it should be wrapped in a subroutine and you pass the required inputs to the subroutine which in turn are used in the underlying FM.

Regards,

Raj