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

about SAPscripts and smartforms

Former Member
0 Likes
1,439

Hi all,

I am working on SAPscripts and i have one doubt.

I want to know the concepts how data is communicated between SAP scripts and print program.Suppose I am writing one subroutine. Can i write the form statements in the print program of the script or I have to write it in another program.

I want whether SAPscript is calling the print program or vice versa.

Please tell me the same concepts regarding smartforms.

Please experts provide me a vivid idea so that I can get the concepts clear.

With regards,

Abir.

7 REPLIES 7
Read only

Former Member
0 Likes
1,373

Hi,

check this help document setp by step procedure on smart forms..

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

Regards

vijay

Read only

Former Member
0 Likes
1,373

Hi Mukherjee,

the concept of communication is same in both cases.

1. In scripts: when you run the print program. it will call the script windows though the events that you call in print program.

the sequence of calling events is dependup on the way u r calling the events.

scripts are totally dependent on client that u r working.

2. In smartforms: this is totally client independent

when ever you create a smartform it will genrate a functon module.so that u can call this FM like regularFMs

hope this will calrify u r doubt..

best of luck

Regards,

Sunil Y

Read only

Former Member
0 Likes
1,373

HI

GOOD

AS PER YOUR REQUIREMENT HERE I AM GIVING SOME POINTS RELATING TO SAP SCRIPT AND DRIVER PROGRAM

WHEN YOU R CREATING A SAPSCRIPT FORM IT CANT ABLE TO EXECUTE OF ITSELF, FOR EXECUTION IT NEEDS HELP .THAT IS THE REASON YOU R CREATING A DRIVER PROGRAM.

IF YOU GO THROUGH A DRIVER PROGRAM YOU CAN FIND OUT THAT YOU R PASSING THE SAP SCRIPT NAME AS A PARAMTER.SO YOUR DRIVER PROGRAM IS CALLING YOUR SAP SCRIPT FORM.

USING THE DRIVER PROGRAM YOU ARE PASSING THE APPROPRIATE VALUE FOR THE VARIBALE THAT YOU R GOING TO PRINT IN THE SAP SCRIPT FORM.

=============================

SMARTFORM CONCEPT=>

SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).

According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).

1. Create a new smartforms

Transaction code SMARTFORMS

Create new smartforms call ZSMART

2. Define looping process for internal table

Pages and windows

First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)

Here, you can specify your title and page numbering

&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)

Main windows -> TABLE -> DATA

In the Loop section, tick Internal table and fill in

ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2

3. Define table in smartforms

Global settings :

Form interface

Variable name Type assignment Reference type

ITAB1 TYPE Table Structure

Global definitions

Variable name Type assignment Reference type

ITAB2 TYPE Table Structure

4. To display the data in the form

Make used of the Table Painter and declare the Line Type in Tabstrips Table

e.g. HD_GEN for printing header details,

IT_GEN for printing data details.

You have to specify the Line Type in your Text elements in the Tabstrips Output options.

Tick the New Line and specify the Line Type for outputting the data.

Declare your output fields in Text elements

Tabstrips - Output Options

For different fonts use this Style : IDWTCERTSTYLE

For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&

THANKS

MRUTYUN

Read only

Former Member
0 Likes
1,373

Hi abir,

1. Sapscript

A) Program (SE38 program called as DRIVER PROGRAM)

B) Layout (SE71 Layout)

2. The SE71 layout is a DEAD Layout.

3. We control the print,

using the driver program and the

sequence of logic in it.

4. The driver program,

calls the sapscript layout for printing purpose.

5. Any global variables in the driver program,

can be printed in sapascript,

using &VAR1&, &VAR2& etc.

*----


6. Where as in SMARTFORMS,

There is no such FLOW for printing purpose.

The full flow is itself written in the SMART FORM Logic.

7. The smart form is displayed,

using the FUNCTION MODULE (generated by the smartform)

8. We pass the required data in the form of internal tables,

to the FM,

THE Rest care of printing/sequence/logic,

is taken care in the smartform design and coding.

regards,

amit m.

Read only

former_member480923
Active Contributor
0 Likes
1,373

Hi

Please have a look at the program <b>RLE_DELNOTE</b>which is the driver program for a smartform and SAPScript. This wil give u the idea how SAP writes standard driver program

Hope it helps

Anirban

Read only

Former Member
0 Likes
1,373

hi

we cant write in print pgm because script doesn't call print pgm but printprogram calls script

when u need to moidify existing script then u have to write code in another program and call in script.

Regards

sandhya