‎2008 Mar 13 8:52 AM
hi
can anybody help me to get the program for smartform
i have created one smartform.its name is ZSM_09_TNT_FM.
REGARDS
VINU
‎2008 Mar 13 9:06 AM
HI,
Here I am attching a sample code. Give the name of ur smartform in first function module.
For getting the name of second function module
Goto ur smartforms environmentfunction module name (copy from there and use it)
TABLES : LFA1.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: ITAB1 TYPE STANDARD TABLE OF LFA1 WITH HEADER LINE.
SELECT-OPTIONS S_VNCD FOR LFA1-LIFNR.
SELECT LIFNR NAME2 ORT01 LAND1 FROM LFA1 INTO
CORRESPONDING FIELDS OF
table
ITAB1 WHERE LIFNR IN S_VNCD.
APPEND ITAB1.
ENDSELECT.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSM_09_TNT_FM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_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.
CALL FUNCTION '/1BCDWB/SF00000089'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB1 = ITAB1
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.
Reward if it is helpful
‎2008 Mar 13 8:54 AM
‎2008 Mar 13 9:00 AM
Hi,
You can get the program name for relavant smartform by using
TNAPR table. jUst execute and give the form name and ececute. You can get the program name.
reward points,if it is useful.
Regards,
Chandu.
‎2008 Mar 13 9:02 AM
Please go through the below link here you will find good examples for smartforns
‎2008 Mar 13 9:06 AM
HI,
Here I am attching a sample code. Give the name of ur smartform in first function module.
For getting the name of second function module
Goto ur smartforms environmentfunction module name (copy from there and use it)
TABLES : LFA1.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: ITAB1 TYPE STANDARD TABLE OF LFA1 WITH HEADER LINE.
SELECT-OPTIONS S_VNCD FOR LFA1-LIFNR.
SELECT LIFNR NAME2 ORT01 LAND1 FROM LFA1 INTO
CORRESPONDING FIELDS OF
table
ITAB1 WHERE LIFNR IN S_VNCD.
APPEND ITAB1.
ENDSELECT.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSM_09_TNT_FM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_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.
CALL FUNCTION '/1BCDWB/SF00000089'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB1 = ITAB1
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.
Reward if it is helpful
‎2008 Mar 13 9:07 AM
‎2008 Mar 13 9:09 AM
Hi,
If you have created this smartform.Which i suppose is a new smartform then i dont think any program would already be calling this smartforms.
For already functional Smartforms would be called by some print programs but since you have created this program you can write a calling program for the same you cna get some good example of the same in this forum.
If this is for certain specific application like MM or SD then you might have to define this form in place of the original form for that you can take help from the functional people
or you can also look in the table TNAPR or transactions OB00 or Nace.
Regards,
Himanshu
‎2008 Mar 13 9:21 AM
Hi,
Goto your smartform -->Environment -->Function Module name.Copy that name and check it in SE37.
Thanks,
Sunanda K.