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

function module 'FM_NAME'

Former Member
0 Likes
3,086

Hi guys,

Iam unable to find the function module Fm_name...When i select the pattern button and try to find this fn. module it says 'Function fm_name not found'.

Could u help me out pls.

Regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,100

Hi,

What exactly are you searching for?

There is no func.module called FM_NAME in SAP.

search by partial text and wild cards.

Regards,

Subramanian

12 REPLIES 12
Read only

Former Member
0 Likes
2,101

Hi,

What exactly are you searching for?

There is no func.module called FM_NAME in SAP.

search by partial text and wild cards.

Regards,

Subramanian

Read only

0 Likes
2,100

I need to call the function module for the smart form

So, after determining the name of the function module by the FM 'SSF_Function_module_name' I need to get the form triggered for output...

Read only

0 Likes
2,100

HI

By using "ssf_function_module_name " the user can obtain

the function mudule generated by the Smartform.

The input parameter is the SMARTFORM name

the output parameter is the function module generated .It has to be type RS38L_FNAM.After getting the output parameter .

CALL FUNCTION (output parameter name).

Regards

Pavan

Edited by: Craig Cmehil on Jul 9, 2008 9:01 AM

Read only

0 Likes
2,100

Hi,

Check the below code. When you execute/generate a smartform, a FM is created. You have to use the FM to trigger the smartform.

*--calling a FM to know the smartform name

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = lc_formname

IMPORTING

fm_name = l_fmname

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

CASE sy-subrc.

WHEN '1'.

MESSAGE e004(ssfcomposer) .

WHEN '2'.

MESSAGE e002(ssfcomposer) .

WHEN OTHERS.

MESSAGE e001(ssfcomposer) .

.

ENDCASE.

ENDIF.

*--passing the FM name for that smartform

*sort as needed by the smart form

SORT gi_outtab_noms BY carrier_name tow_name

idate nomtk nomit.

  • nom_barges idate nomtk nomit.

CALL FUNCTION l_fmname

EXPORTING

control_parameters = v_ctrl_params

output_options = v_output_options

  • user_settings = 'X'

i_nom_for_mtb = gi_outtab_noms

IMPORTING

document_output_info = pdf_document_output_info

job_output_info = pdf_job_output_info

job_output_options = pdf_job_output_options.

IF sy-subrc <> 0.

MESSAGE e001(ssfcomposer) .

ENDIF.

Thanks,

Vamshi.

Read only

0 Likes
2,100

what ever i mentioned in my post exactly we will do the case of Smart form

first we will pass the smartform name to ssf_function and it give the function name

you have call that dynamically the way i mentioned in my post

call function fm_name

importing

....

the interface you can get it from smartform

that you can get from smartform execution

execute the smartform it take you to the Function module

Copy that function module and use it in the pattern

now replace that function name

call FUNCTION '/SADD/DSFSFSF' <=-----remove this and give the variable which is used in ssf function,

Read only

0 Likes
2,100

*--calling a FM to know the smartform name

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = lc_formname

IMPORTING

fm_name = l_fmname

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc 0.

CASE sy-subrc.

WHEN '1'.

MESSAGE e004(ssfcomposer) .

WHEN '2'.

MESSAGE e002(ssfcomposer) .

WHEN OTHERS.

MESSAGE e001(ssfcomposer) .

.

ENDCASE.

ENDIF.

*--passing the FM name for that smartform

*sort as needed by the smart form

SORT gi_outtab_noms BY carrier_name tow_name

idate nomtk nomit.

nom_barges idate nomtk nomit.

-


>>>>>>>>>>>>>>>>

CALL FUNCTION l_fmname

EXPORTING

control_parameters = v_ctrl_params

output_options = v_output_options

user_settings = 'X'

i_nom_for_mtb = gi_outtab_noms

IMPORTING

document_output_info = pdf_document_output_info

job_output_info = pdf_job_output_info

job_output_options = pdf_job_output_options.

IF sy-subrc 0.

MESSAGE e001(ssfcomposer) .

ENDIF.

-


>>>>>>>>>>>>>>>>

DO I NEED TO WRITE THE ABOVE SELECTED PART WITH ARROWS DIRECTLY OR CAN I CALL THAT USING A PATTERN. IF SO HOW???

Read only

0 Likes
2,100

Yes.

The part in between the arrows is reqd. The funcmodule generated depends upon the environment.

The first func module SSF.... will generate the function module name for you and the second func.module call will execute the func.module.

Regadrs,

Subramanian

Read only

0 Likes
2,100

Yes you are right.. I do know that. but what Iam asking is how to call the second function module?

because in the abap editor when i select the pattern button or ctrl+f6 and enter the function module name as 'FM_name' it says the function module is not found.

Read only

0 Likes
2,100

Haha...ok..I got your problem.

Simple way...Copy the function module that gets generated in your system by executing the smartform for eg: like /1BCDWB/SF00000388.

Now using pattern, insert this fm and get all the import and export parameters.

Now delete the call function '/1BCDWB/SF00000388', and replace it with call function fm_name.

Regadrs,

Subramanian

Read only

0 Likes
2,100

Thanx Mr. Subramanian

Edited by: anik kiran on Jul 8, 2008 10:27 PM

Read only

bpawanchand
Active Contributor
0 Likes
2,100

HI

Which Function module you need exactly and for what purpose could you be more clear may be the function became obsolete.

So what is the issue plz say it

I can Help you

Regards

Pavan

Read only

Former Member
0 Likes
2,100

FM_NAME---

i think you just checked the Dynamic function calls

DATA: FM_NAME TYPE .....etc

FM_NAME = 'REUSE_ALV_LIST_DISPLAY'.

CALL FUNCTION FM_NAME

importing..

exporting..

...

FM_NAME is not function, just check your coding, there you can see some where they are passing the Function module name to FM_NAME