Smart Forms in SAP ABAP
Smart Forms in SAP ABAP
SAP Smart Forms is used to create and maintain forms for mass printing in
SAP Systems.As output medium SAP Smart Forms support a printer, a fax, e-
mail, or the Internet (by using the generated XML output).
Smartforms Guide
Lets go through it in SAP system-
Global Data Declarations : The Data defined here can be used throughout the
smartform for coding purposes.
Form Interface : Here all the data which will be passed to the smartform from
the Print program is defined.
Right-Clicking on the Pages will allow creation of New Page, Window, Graphic
or Address.
Printing will take place on the basis of 'next page' field.
For background picture and graphics you can pick up either black and white
or color bitmap images and are stored in the form of standard texts. You may
take a detour from the smartform screen and open Form Graphics screen.
Transaction code: Se78
1. Main
2. Secondary
You cannot have more than 1 main window in a page. You can have
multiple secondary windows
Whatever you print in secondary window...it has to be static. (If u have 20
lines in a PO and there is page constraint the lines get carried forward to
next page in the main window. i.e. In a predecessor and successor type of
content, they will be printed in sequence in main window. This is not
allowed in Secondary windows.
Inside the main window we can add text as introduction to customize the
form output.
The Output options on each window determine the Line size, Width, Colors
and background to be put.
Smartforms gives the option of giving the address number which is maintained
in the central address management. The address will be directly taken from
ADRC table and will be populated in the form.
The two different editors are available in Smartforms viz. Normal Editor
In Table painter, you can draw the format as per client requirement (e.g.
Heading, Sub Heading, Item, Sub Total, Grand Total etc.)
After the form design is complete, the form needs to be activated before it can
be tested or accessed by the print programs.Activating the form initiates the
generation of a function module that handles all of the form's processing.
In case of smart forms, we use 2 function modules for the processing of the
smart form. To the first function module , we pass the name of the smart form
as the import parameter. This then returns the name of the dynamically
generated function module which will actually call the smartform.
This will return the Function module name of the smartform which is
referenced.
The Print program will be calling the FM 'SSF_FUNCTION_MODULE_NAME' to
get the Function module name at Runtime. Therafter it will call the Function
module thus obtained to execute the smartform.
Templates
Template can be used when you know the exact size of the output or the
output is in a fixed format.
E.g. Tax form/ cheques /airline form/railway ticket: all these use templates.
The big between table and template is that in a Table the height changes
dynamically.We call a row a 'line' in template.
SMART Styles