Documentos de Académico
Documentos de Profesional
Documentos de Cultura
SMARTFORMS Training
1. Introduction
6. Text modules
SAP Smart Forms is a tool for the maintenance of forms on which application
data from the SAP system can be output.
Remark: The Smart Form print programs are not the same as SAPScript
programs, and you cannot use a SAPScript print program with a Smart Form
print form.
The main SAP Smart Form interface is the Smart Form Builder.
Call this transaction by entering the transaction code smartforms in the
Command field.
The initial screen allows you to enter the name of the form you want to
modify or copy, or you can create a new form.
Form Painter frame: This frame appears on the right of the screen. If
your Form Painter is not visible on the screen, choose Form Painter.
You can control whether the Form Painter is visible or hidden using this
button.
There are two main groups of elements in the Navigation Menu section.
Global Settings folder: this folder contains the attributes and preferences
of the form.
Furthermore, it is necessary to define parameters, variables, work areas
and tables we want to use in the processing.
Pages and Windows folder: this folder will contain all the designs,
frames, texts, codes, tables and graphics (and more) for the pages
of a Smart Form.
Remark: By default, some parameters are created automatically in tabs Import, Export
and Exceptions.
Each page must indicate the next page that will be processed after
the current one.
There are Main Windows and Secondary Windows. The big difference
between them is that the output of a Main Window could be several pages
Large.
A page is full as soon as all output areas on this page are filled.
Output to all output areas, except the main window, is truncated as
soon as the area is full.
The main window is the only output area whose window contents
can spread over several pages. This is again solved by an automatic
page break. In addition, SAP Smart Forms allows you to set a
dynamic page break in order to start a new draft page (for example,
to print the terms of business as the last page).
It works like ABAP loop. You can define de WHERE conditions in the
same way and Sort Criteria, to Sort the table before the loop
statement.
You have to indicate the Input and Output parameters. Even using
the variables created in the section Global Definitions.
You can also define your local variables and types, and call other
FMs, and use tables of the Master Data.
The output of the main window continues on the new page, starting
with the first directly inferior node of the new draft page. In the main
window, SAP Smart Forms continues printing after the command
node that triggered the page break.
The Graphic node has a condition (conditions tab) to check if the variable is
not equal to the empty string, in order to avoid error messages.
The text node is used to display statics text or variables in the Form.
By default, the format of the text is the same as defined for the
general Form, but it is possible change it.
To use a variable in the output, you have to use a Field. This is the
variable between special character &.
It is static, so you will have to set the number of rows, columns and
their size.
Remark: Be careful with the columns width. If the total lenght for the columns
is not exactly the same that whole table width, it will give an error.
Furthermore, if the text/data is greater than the column, no data will be
displayed.
The table is the other element used to display a table in the Form.
It is not static,.the size of the table depends on how much data the
application program passes to the form at runtime (unlike with
templates, where you specify the number of columns and lines
explicitly). The table can cover one or more pages, depending on the
number of lines. This is why you display tables in the main window.
The output areas Header, Main Area, and Footer are used to print
the table heading, the actual table items, and the results (for
example, a grand total) in the table.
Each time you make a change to your print form in the Smart Form
Builder, the change needs to be activated in the Smart Form Builder
before taking effect in your output.
To see the function module created, just Test (F8) the Form in the
SAP Smart Forms: Initial Screen.
The Smart Form Print Program can be a report where we call the
function module of a Form.
Instead of use a normal text in a Text node, you can use a Text module.
This allows you to easily use texts from one text module in several forms. In
addition, it is not necessary to load the entire form description to maintain
these texts.