‎2006 Dec 21 8:31 AM
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..
‎2006 Dec 21 8:35 AM
‎2006 Dec 21 8:35 AM
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
‎2006 Dec 21 8:38 AM
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