Professional Documents
Culture Documents
Smart Forms Demo
Smart Forms Demo
6 To print a form, you need a program for data retrieval and a Smart
Form that contains the entire form logic. When activating the Smart
Form, the system automatically generates a function module.
6 You design a form using the graphical Form Painter and the
graphical Table Painter. The form logic is represented by a hierarchy
structure (tree structure) that consists of individual nodes, such as
nodes for global settings, nodes for texts, nodes for output tables, or
nodes for graphics.
6 You can insert static and dynamic tables. This includes line feeds
in individual table cells, triggering events for table headings and
subtotals, and sorting data before output.
6 SAP Smart Forms allow you to include graphics, which you can
display either as part of the form or as background graphics.
General =oncepts on Form Printing
Global settings
Global definition apply for the entire form. We can use any
object defined there in all nodes of the tree.
We can initialize the global data before we start processing
the start page. Within the form routines we cannot access any
global data unless we explicitly pass them to the form routine
interface.
Global Definition
Structure of Form
On a page there are two different types of output areas for text
and data:- the Main window and the Sub window.
Nodes
Nodes in Smartforms
6 w
6
6
6
6
6
6
6
6
6
6
6 w
Nodal Flow
The numbering of the nodes also shows the sequence in which they are
processed (from top to bottom). The first node is the p . The p of
a node are all nodes included directly under this node in the hierarchy. For node 5
these are the nodes 6 to 9 (direct successors are only the nodes of the next
hierarchy level, that is 6, 7, and 9).
- v v
E
!
!
"
#
w
- vv
ð t t
t
t
t
F=t
t
t
t
= $t
t
tt
t t t
ð$
F $ðt
ft
t
Nodes - Overv e
Other Nodes
Node t e es r t o oss e d re t s essors
ð
6 Form Painter
6 Table Painter
6 P= Editor
6 Navigation Tree
Form Painter
h
ð
6 Design area with ruler, cursor with help lines, and he grid
and main grid.
6 Display of the cursor position in the ruler, which can be
suppressed and set.
6 Two level grid with engage function which can be
customized.
6 When creating, changing and moving a window, the
window size appears in the ruler.
6 Detachable toolbar containing the most important
functions.
Form Painter
ð
ë
Header data containing the default values of a Smart Style
Paragraph formats including indents and spacing, font
attributes, tabs, and outline and numbering
=haracter formats including effects (superscript,
subscript), bar-code and font attributes
=olors and underlines for a paragraph or character format
Preview
FIELD LIST :
The field list displays the following data in the form a tree structure:
6 All tables, fields and structures passed via the form interface.
6 System fields and the fields that are defined in the global
definitions.
This allows one to check whether a correct field name has been
entered or not and that the form knows the field or not. To display the
field list, in the form builder choose field list On/Off.
ERROR LIST:
The error list contains the list of errors and warnings displayed at the
bottom of the maintenance screen. That is when we check the smart
forms and if any error occurs, it will be displayed at the bottom of the
maintenance screen.
Field List & Error List
!
There are two tools to migrate the SAP scripts to Smart forms
Individual Migration.
Mass Migration
R
!
Form Migration
Go to SAP Smartforms initial screen and enter the smart form name you want to create
in the Form field.
Enter the name and the language of the Source form (SAP script).
=hoose Enter.
Now change the design of the form and of the form logic. To activate the Smart form choose
Activate
!
Style Migration
Enter the name of the name of the SAP script style you want to convert.
=hoose Enter.
=hoose Back . Now change the style as you wanted and activate the style you have created
!
!
Select the names and the language of the SAP script forms and choose
The system creates the Smart forms under the names of the SAP script forms plus the
extension _SF.
To change and adapt the form , go to transaction SMARTFORMS. Then activate the
changed smart form.
È È
Test Scenario
Report YINVOI=E is
developed for this.
Based on the
selection screen
invoice number, this
program will select
invoice / Partner /
Material details from
VBRK / VBRP / VBPA /
MAKT and pass the
details in the form of
variables / internal
table to the Smart
form
Test Scenario
Program« =ontinued
Test Scenario
SMARTFORM - YINVOI=E
Global Definitions
All ³=reate/insert´ options are available on right click. For example if we need to insert
Graphic in a window, mouse right click by keeping the cursor position on the window!!
Test Scenario
Text node is inserted (by right click option) and the text ³INVOI=E DETAILS´ is entered
Test Scenario
As per our required format, the text should get displayed with under line. For that purpose a
smartstyle YINVOI=E is created. Different paragraphs are created in that (for plain text, bold
text, bold and under line, small letters, etc)
For displaying Invoice Details with under line, the paragraph format P3 can be used.
Test Scenario
Once the style is mentioned, the ³General attributes´ tab will get the styles described in
YINVOI=E smartstyle. Selecting the P3 format for displaying this text
The alternate evaluates the condition whether the variable v_adrnr_bp is not equal to
space and if true, the code logic under the true node will be executed, otherwise the code
logic under the false node will be executed
Test Scenario
The variables needed for getting the information to be declared in Global Definitions and
also to be passed as Input Parameters and Output Parameters in the code logic as
marked above
The select statement fetches the address details from ADR= using the variable
v_adrnr_bp. The text elements Name, Street and =ity are created to print the Bill to
address
Test Scenario
Similarly for Ship to Address also, a window is created. An alternate like bill to address is
created which evaluates the variable v_adrnr_sh and if true the code logic under true node
is executed, otherwise false node is executed. The text elements Name1, Street1 and =ity1
are used to display the Ship to address
Test Scenario
A table has been created with columns for and the line type is %LTYPE1.Table consists of a header,
Main area and footer portion
Test Scenario
In the Data tab, in the loop section, the internal table to be specified. The looping action takes
place in the internal table and the line items are printed in the main area.
Test Scenario
A row has to be created in the header portion of the table so as to print the headings of the
columns in the table. The line type to be specified when creating a row
When a row is created with the line type %LTYPE1 then four cells or columns are
automatically created in the row. Under the =ell1 the Material text element is created
for printing the heading Material. Similarly for Description, Quantity and Price text
elements are created under the =ell2, =ell3 and =ell4 for printing those headings.
Test Scenario
A row has been created in the main area with line type %LTYPE1. Under the =ell1 the text
element for printing material number is created. Similarly for Description, Quantity and
Price text elements are also created for printing those data under =ell2, =ell3 and =ell4.
The looping action takes place in the main area. All line items in the internal table is
printed. The field name specified in the text element as &i_inv-matnr& which is the field
name in the internal table
Test Scenario
In the footer portion of the table any texts or any footer data can be printed. A row can be
created with the line type %LTYPE1 and text elements can be created in each cell.
Test Scenario
A window is created with the name reference and a template is created under the window
Test Scenario
Rows and columns are created in the template using the pencil pointer of the template.
The template has 2 lines and 2 columns
Test Scenario
The text element Dated is printed in Line 1 and column 2 of the template. Similarly the
corresponding data of the reference and date is configured to print in line 2, column 1
and column 2 of the template.
Test Scenario
A window named Footeraddress is created and under the window an address node is
created.
Test Scenario
In the General Attributes tab, tick Go to New Page and determine the new page using the
list box next to the check box. The output of main window will continue in new page