© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
*
From a technical point of view, a table in an SAP Smart Form is filled by processing a specific table
called an internal table on a line-by-line basis. This is referred to as a loop. The respective lines can
be copied into a work area that has the same structure as the table. The internal table must be filled
in the application program (which is the regular case) or in the form.The data is normally taken from
database tables. If the data is read in the application program, the internal table must be defined in
the interface of the SAP Smart Form.
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
After defining the table design on the Table tab, you determine how the table should be processed.
You do this on the Data tab.
Select the Internal tablecheckbox and enter a name for the table and for the work area. Both the internal table and the work area must be known in the form. This means they must have been defined through the interface or as a global field. If you do not set the Internal table indicator, no loop
processing takes place.
Possible assignment types are intoand assigning. If you use into, the lines are copied from the table into the work area. If you want to use tables with header lines, enter the name of the table as the work area.
It is possible to process only a specific line range of the internal table. To do this, specify the lines in the fields Line ... to...
You can also use logical conditions to determine which lines of the internal table should be processed.
This corresponds to the WHERE clause of the ABAP command LOOP AT <itab>.
Enter the name of a fields of the work area, a relational operator and the comparison value. You can use all relational operators that you know from normal selection screens: With/without pattern, Equal to, Not equal to, Greater than or equal to, Greater, Less than or equal to, Less. If you do not enter an operator, Equal to is used automatically. You link several conditions with and; you can also use the OR pushbutton.
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
,
1. In order to output text in tables, you must create a text node as a subnode of the table. Table text nodes are
"normal" text nodes. You can choose text type (text element, text module, or include text) and you can select New paragraph or New lineon the General attributes tab to determine that the text should be written into a new text line.
2. Output options tab, you determine the text output in table lines:
Option New line:
This option allows you to select one of the line types for this table line that you defined on the Table tab. If you do not select a line type, the system automatically uses the line type marked as the default type.
Option New Cell:
If you select New cell, the text is output in the next cell of the line type. If the line type has no more cells for the system to go to, an error message is issued during program execution. You can also skip several cells. If you select New line, the text is automatically output in the first cell of the line type selected unless you want to skip cells.
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
1. You can sort the internal table within the form. To do this, enter the name of the fields as the Sort criteria to use. The order of the fields in this list determines the sort order. You can change the sort order later by placing your cursor on a field and moving it up or down one line by clicking one of the two black triangles displayed above the sort criteria. Two radio buttons to the right of each field allow you to determine whether the table should be sorted in ascending or descending order.
2. For technical reasons, the system cannot recognize whether the internal table has already been sorted (for example, in the data retrieval program). Hence you must enter the sort criteria and select the Already sorted checkbox. (Otherwise, the table will be sorted again.)
3. Sorting is mainly required for subtotals and subheadings.
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
!
Frequently, tables are not output in exactly the same structure in which they are filled. For example,
it should be possible to group data records and to output subheadings or subtotals. Grouped data
records that have certain identical values are called control levels. SAP Smart Forms allow you to
create any number of control levels in a table. In the above example, there is one control level for
airline carriers and another for the respective flight connections.
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India
!!
© Deloitte Consulting 2004, Smart forms, Arunachalam, India
© Deloitte Consulting 2004, Smart form, India