on 02-02-2007 12:35 PM
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 Murthy,
When we active smartfrom will autometically generate a func. module for every smartform.
But because it is a standard method, we calls the smartfrom function by using SSF_FUNCTION_MODULE_NAME .
You need to call SSF_FUNCTION_MODULE_NAME before smartform func. module no. In this pass the function module name. it will retun the function mosule no. Store the fucntion module no in a variable.
Now What you need to do is Go for F8 in smartform & copy the func. module no. & call this func module in print program & replace the function module no with the variable.
e.g.:
DATA: v_fun TYPE rs38l_fnam.
*-----Getting the smartfroms function module.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMTF_TEST'
IMPORTING
fm_name = v_fun.
*-----Calling smartform.
CALL FUNCTION v_fun
EXPORTING
control_parameters = x_control_parameters
IMPORTING
job_output_info = x_output_data.
Ashvender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narayana,
Just this code... It may help u..
REPORT ztest_3510 .
TABLES : nast.
DATA : f_name TYPE tdsfname.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTEST_3510'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = f_name.
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&----
*& Form entry_neu
&----
text
----
-->ENT_RETCO text
-->ENT_SCREEN text
----
FORM entry_neu USING ent_retco ent_screen.
DATA : l_head LIKE ekko,
l_item TYPE ztab_ekpo.
SELECT SINGLE * FROM ekko INTO l_head WHERE ebeln = nast-objky.
SELECT * FROM ekpo INTO TABLE l_item WHERE ebeln = nast-objky.
CALL FUNCTION 'f_name'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
l_ekko = l_head
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
l_ekpo = l_item
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "entry_neu
Award if useful..
Thanks
Rajiv
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When u create a smartform, it generates an unique number...
This number varies from each server i.e ur development, quality ..etc will have different numbers,,
Actually inthe print program , u call the function module with the generated number..
Since the number varies from server to server... we use SSF_FUNCTION_MODULE_NAME to get the corresponding FM_NAME in the server....
Hope it is clear...
Award if useful..
Thanks
Rajiv
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Narayana,,
In real Time situation, we will use neither of them.Only what we do is Design a smartform and attach it to a particular Module whereever we need to display a form using NACE transaction.
Whenever u design a smartform and execute it to monitor its display,a dynamic number gets generated and executing further we can see how the form will look like.The related code for the form is written dynamically based on the forms contents where the FM SSF_FUNCTION_MODULE_NAME is called to populate the tables of the form.
In real time we only design a form and attach it...
Cheers..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.