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

Transaction Code for Smartforms...

Former Member
0 Likes
22,233

Hi All,

i have created smartform and now i want to create Transaction code for that..how can i do that, i knew tcode 93 for creating transaction code..but after creating transaction code while executing it is giving error...

Pls help..

Regards,

yunus

4 REPLIES 4
Read only

Former Member
0 Likes
15,065

Smart forms aren't invoked from Tr. code.

Usually you will have a driver program that will make a call to the SMART Form.

And this program is usually configured in NACE transaction so that the subroutine calling the form, is dynamically called.

For your testing purposes, you can write a report program and call the form in it. If you want you can create a transaction code and attach the report to that.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
15,065

Hi,

Every smartform will generate a function module.

U'll get the function module name for ur smartform in 'Environment' menu-->'Function Module Name'.

First create a driver program in SE38, call this function module in ur program.

Now in se93, create a TCode with this program name.

Read only

0 Likes
15,065

Hi Jitendra,

               thank you for your solution...
Its very useful as your solution solved my issue of creating TCODE for my smartform:):):)

Reagrds,

      Gaurav

Read only

anversha_s
Active Contributor
0 Likes
15,065

Hi,

first u create the driver program.

then call the smart from from that driver program. driver program is simply an exceutable report program.

from that use the FM - > SSF_FUCTION_MODULE_NAME

give the t-code for this report program.

eg: code



DATA: FM_NAME TYPE RS38L_FNAM.

call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
<b>FM_NAME = FM_NAME</b>
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.

*at first give the 'Environment' menu-->'Function Module *Name' in the below code and call 'PATTERN'.
*then Remove that number with FM_NAME

call function <b>FM_NAME</b>
* 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
GS_MKPF = INT_MKPF
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.

rgds

Anver

pls mark all hlpful answers