Application Development 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: 

How to create T-Code for Smart Form

Former Member
0 Kudos

Hi ABAP Guru's,

Please can you tell me, how to create T-code for Smart Forms?

Thank you

-Anil Roy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi anil,

check the driver program name for the smartform.

goto se 93 and create a tcode giving the program name!

keerthi

9 REPLIES 9

Former Member
0 Kudos

Hi,

If u have a print program for that smartform, go to transaction se93 & create your own transaction by specifying the program name.

Or if u do not have a print program, open your smartform, click on Environment (menu bar), get the function module name, now go to se37 & display that function module, check the program for that function module in attributes & now use this program name to create your transaction.

Cheers,

Former Member
0 Kudos

the tcode to create smartforms is SMARTFORMS....

Regards,

Pavan P.

Former Member
0 Kudos

Hi anil,

check the driver program name for the smartform.

goto se 93 and create a tcode giving the program name!

keerthi

Former Member
0 Kudos

Hi Anil,

We cannot create transaction code for smartforms.Create transaction code for the driver program of the Smartform.When you will execute this transactuion code your driver program will be executed and in turn your Smartform will be executed.

Mukesh kumar

Former Member
0 Kudos

Hi,

Most of the Times we create and execute the Smartforms from the Std Transactions only.

for example: ME22N/23N for PO and VA02/03 for Sales orders and VF02/03 for Invoice etc.

Basically these smartforms outputs we generate for the Outgoing documents of the orgn, which have Std transaction codes. we develop them only by copying the existing smartform and do the changes.

So creation of New code for your Smartform rarely comes.

If at all you designed your Own custom Smartform and Driver program, you attach a ZtCode for your driver program and use it.

Regards,

Anji

Former Member
0 Kudos

Thank you every ABAP Guru,

I got my answer.

Many Thanks

Regards,

Anil Roy

Former Member
0 Kudos

Hi,

You cannot assign a tcode to the custome develoepd smartforms.

You can call the FM generated by smartforms in a print program and then assign a tcode to that.

Regards

Subramanian

Former Member
0 Kudos

hi anil roy,

just try this,

if u have driver program(se38 report) to ur 'smartforms' FM then u just take that report name,

go to t.code se93->,

provide ur report name at the Transaction code input->,

create->,

provide descriiption->,

and select radio button program and selection screen(report transaction)->,

enter->,

provide proram name once agin->,

then save,activate and excute.

if u dont have driver program,

take ur smartforms FM name and go to t.code se37 ->,

provide ur FM name and display->,

select attributes tab->,

take the progame name from here->,

go to t.code se93,

agin follow as above mentioned from here.

regards...

seshu.

Swetabh
Explorer
0 Kudos

A few days ago in some other section i wrote something about smart forms

See the thread :

*********************************************************************************************************************************************************************

We use SAP Smart Forms to create and maintain forms for mass printing in SAP Systems. SmartForms are easier to develop, maintain and transport than SAP Script.

As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generated XML output).In addition to the tool, SAP delivers a selection of forms for central business processes like forms in the applications SD,FI, HR and CRM of the R/3 Release.

**********************************************************************************************************

Now we create Smartforms using transaction code <b>smartforms</b>

Here we can use various windows etc as per our requirement and create the output layout to be displayed.

Now after creating the smartform, a function module is also generated. We can see the name of this function module in menu <b>Environment -> Function module name</b>.

It will be like <b>'/1BCDWB/SF00000020'</b>

Whatever we need to pass to smartforms(internal tables etc) is defined in the <b>Form Interface</b> of the <b>smartform</b>.

We generally create a report and pass internal table etc to be displayed in smartform layout. For this we use theform interface we defined.

We just call the <b>function module name of the smartform</b> in the report and pass all the tables etc there as parameters or tables.

Here we can create transaction code(using SE93) for this function module , since we know the name of FM. But its not of much use for us.

In real scenario we develop the smartform on server somewhere else and test somewhere else and finally use somewhere else . So <b>the smartform remains same everywhere</b> but the f<b>unction module name changes with change in system</b>.

So in real scenario we dont directly call the smartform using its function module name.

In place of this we call a Function module which takes the smartform as input and gives the function module name as output. So there is no affect of change of system on the smartform function module name. This is taken care by the FM we are calling.

Suppose name of smart form is <b>zswetabh_form</b>

DATA: FM_NAME TYPE RS38L_FNAM.

call function <b>'SSF_FUNCTION_MODULE_NAME'</b>

exporting

formname = 'ZSWETABH_FORM'

  • 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.

<b>

Now we can call the function module FM_NAME</b>

CALL FUNCTION FM_NAME

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

sf_po =

  • IV_SENDER =

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • EV_SENDER =

  • 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.

<b>So at last i think we should not look so deep into creating transaction code for a individual smartform, Since in real scenario the FM will not be same.

Please do reward points if its helpful to some extent</b>