on 02-02-2007 6:02 AM
Hi ,
iam having doubt in smartforn .. when we activate smartform automaticai will generate function module no or otherwise we call smartform by using SSF_FUNCTION_MODULE_NAME.
My doubt is what is diffrenece between them ... in real time we have to use which one ?
Regs ,
Murthy
Hi,
It is a good programming to use "SSF_FUNCTION_MODULE_NAME" this function module, it will return the function modulte generated for the smart form you created. You can directly call the function module created for the form, but every time you makes changes and activate the function module name will be different, so you need to hard code every time.
so by this "SSF_FUNCTION_MODULE_NAME" it will return the actual fm name generated when you make changes.
You use that returned parameter call the smart form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you activate your Smartform, SAP generates the actual function module and will assign it a name with some crazy numbers like /1BCDWB/SF00000033.
You could hard code this into your print program, but you shouldn't.
The reason is that when you transport your Smartform to your test or production environments the FM will be generated in the new environment and the name will probably change.
So you want to call SSF_FUNCTION_MODULE_NAME passing the name that you gave your Smartform. This will return the name that SAP gave to the smartform function module.
* Get the Function Module Name
V_FORM_NAME = 'Z_MY_SMARTFORM'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORM_NAME
IMPORTING
FM_NAME = V_FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
V_RETCODE = 1.
ENDIF.
* Call the Smartform's Function Module
CALL FUNCTION V_FM_NAME
EXPORTING
.......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.