Application Development 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: 

functional module

Former Member
0 Kudos

hi everybody

my problem is like this

after activating my smartform i got a functional module

'/1BCDWB/SF00000108' and i passed this functional module to LF_FMNAME. but when i tried to call this functional module going to pattern and give the name of FM like LF_FMNAME i am getting message like FM not found.

could u plz how to correct this error.

i wrote the following code.

DATA:BEGIN OF GT_EQUI OCCURS 0,

EQUNR LIKE EQUI-EQUNR,

END OF GT_EQUI.

DATA:LF_FMNAME TYPE RS38L_FNAM VALUE '/1BCDWB/SF00000108'.

PARAMETERS: p_equnr TYPE equi-equnr

SELECT EQUNR

FROM EQUI

INTO TABLE GT_EQUI

WHERE EQUNR EQ p_EQUNR.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSAMPLE1'

IMPORTING

FM_NAME = LF_FMNAME

regards

hridhayanjili.

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

Do not use pattern function.

DATA:BEGIN OF GT_EQUI OCCURS 0,

EQUNR LIKE EQUI-EQUNR,

END OF GT_EQUI.

DATA:LF_FMNAME TYPE RS38L_FNAM VALUE '/1BCDWB/SF00000108'.

PARAMETERS: p_equnr TYPE equi-equnr

SELECT EQUNR

FROM EQUI

INTO TABLE GT_EQUI

WHERE EQUNR EQ p_EQUNR.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSAMPLE1'

IMPORTING

FM_NAME = LF_FMNAME.

call function LF_FMNAME

exporting....

importing..

tables..

Regards,

Ravi

amit_khare
Active Contributor
0 Kudos

Hi.

Please dont pass any value to LF_FNAME.

The function will itself assign it the value.

Use it like this.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = p_sfname

IMPORTING

fm_name = LF_FNAME

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

where, p_sfname id the forms name

and LF_FNAMe is the returning function name.

Regards,

Amit

Former Member
0 Kudos

Is ZSAMPLE1 the name of your smartform?

Also, it is not necessary to specify a value on your lf_fmname variable. This value is determined by the function module.

The function module name will be generated in each SAP environment so it is not guaranteed to be '/1BCDWB/SF00000108' in every system.

Former Member
0 Kudos

Hello,

U have use like this.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSAMPLE1'

IMPORTING

FM_NAME = LF_FMNAME

Then

<b>CALL FUNCTION LF_FMNAME

EXPORTING

.....

IMPORTING

.......</b>

If useful reward.

Vasanth

0 Kudos

hi Vasanth and Cristopher my solved

thanx

hridhayanjili