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

SMARTFORMS

Former Member
0 Likes
780

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
755

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

7 REPLIES 7
Read only

kiran_k8
Active Contributor
0 Likes
755

Vinod,

Check the table TNAPR.

K.Kiran.

Read only

Former Member
0 Likes
755

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.

Read only

Former Member
0 Likes
755

Please go through the below link here you will find good examples for smartforns

http://abapcode.blogspot.com/search/label/Smart%20Form

Read only

Former Member
0 Likes
756

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&#61664; environment&#61664;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

Read only

Former Member
0 Likes
755

THANKZ 2 ALL

REGARDS

VINU

Read only

Former Member
0 Likes
755

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

Read only

Former Member
0 Likes
755

Hi,

Goto your smartform -->Environment -->Function Module name.Copy that name and check it in SE37.

Thanks,

Sunanda K.