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

sap script - form names

Former Member
0 Likes
563

hi all,

I'm a beginner. Is it good hard-coding values in the export/import parameters that we use? if not, how can we avoid hard-coding the form names in the function modules used in script programs?

In smart forms, there is an automatic generation of function module using

SSF_FUNCTION_MODULE_NAME...is there anything similar happening with SAPscript?

Thanx in advance..

3 REPLIES 3
Read only

Former Member
0 Likes
484
open_form.
write_form.
close_form.
Read only

Former Member
0 Likes
484

Hi,

No nothing happens in Sapscript like smartforms.When you execute a smartforms a FM gets generated.Nothing like this happens in Sapscript.

You can do one thing.Select the form name from TNAPR table and pass this TNAPR-FORM in the OPEN_FORM FM.This is also cannot be used in all the programs because all the entries of form doesnot exist in TNAPR table.You will get SD and MM related forms in TNAPR table FI related forms will be there in T001F table.

Regards,

Mukesh Kumar

Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
484

hi,

You are very right that we should not hardcode but in case of calling function modules it is ok.This is the way a function module is supposed to be called.In case of smartforms the function module name is generated and so we need the

SSF_FUNCTION_MODULE_NAME to get the generated name. Also the framework of sapscript is not similar to smartform and no function module is generated.

Regards,

Sourabh