Académique Documents
Professionnel Documents
Culture Documents
Types
Initialization : In this tab, developer need to write global code which can be
used to work on the data transferred from Driver program.
Input Parameters : Need to define all the input parameters required to
execute code.
Output Parameters : Need to define all the output parameters required to
execute code. Code need to be written in text area , as per below screen
shot.
Address: 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.
Table Painter: In Table painter, you can draw the format as per client requirement
(e.g. Heading, Sub Heading, Item, Sub Total, Grand Total etc.). In simple words
Table = Loop + Template
The Table shows the different line types which will be used in the table. The Line
types define the size of each cell and the number of cells in each line.
Table has 3 sections, HEADER, ITEM, FOOTER the header section will be
executed once and it will loop at the item level, and at the end footer will be
executed.
ails
Sections in table:
- Table: In this section line type is defined. which will be used while
defining sections in Header , Main area and Footer. Details > Field details
section
We need to add Row for Header , Main Area and Footer Area.
In each section we need to provide Line type which need to be displayed in
Template:
it is static
For putting any value in that u have to create text under the template and
mention the position where the text will appear.
In Text we can define in which that data to be displayed. Text > Output
Options > Output Structure > Line and Columns
Main Area: This section is updated dynamically as per the data fetched from
database. Values in main area are dynamic.
Footer Section :This section normally used to display total values , total values
or number of line items. We can add conditions in all the windows, if condition is
satisfied then this section will be displayed or it will not be displayed. Similar to
IF ... END IF Condition.
Secondary window section is used to display address, final total, company logo
or T&Cs.
Final Window: Developer cannot add any other window after final window is
defined on that page.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled
[Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own
exceptions, which you defined in the form interface, using the user_exception
macro
Flow Logic
Alternative : In Alternative, we will give some condition. if the condition is true, only the elements
within true node will be executed if its false only the elements within false node will be executed..
Example :
After creating Alternative your form will look like this
In General Attributes of the alternate give condition COUNTRY = 'IN' as shown below
Right Click on True and create text and write some text in that, likewise create text and write something for
false condition also. Now our screen will appear as shown below
(In this case I have written Alternate Condtion True Country is India for the text in true condition and
Alternate Condtion True Country is India for text in false condition)
Loop : Loop can be used in any window , it is not limited to Main Window alone . Give a descriptive
name to the Loop Description text area.
On the Data tab of the Smartform Loop element, define the loop for each IT_VBAK row as follows.
On every turn of the defined loop, move each loop item into GS_VBAK vbak global structure or VBAK
work area item.
Also set the Row range from 1 to a logical number for example 9999, etc.
Now we will create a data section which will show the SAP sales document number and the detail
items of the VBAK row which maps to SAP VBAP records of the related VBAK header data.
First of all, we will create a text element under the Loop element node.
This text element will display the VBELN sales document number for each record of it_vbak selected
in the loop.
Then we will add a table element in order to display the items of the loop item.
The last Smartform element which we will create on this Smartforms example document is Command
element.
We will use the Command element in order to set page break between two vbak header records.
Below is the screenshot that the SAP Smartform elements of this example Smartforms.
Note that the descriptions of the Smartforms elements are given due to their respective tasks.
Program Lines: In this section developer has to write program lines as per
business requirements.
Developer has to provide input parameters and output parameters, as this fields
are mandatory.
Developers have to write comparison value field and value in condition tab.
6) Alternative: In Alternative, programmer can give some condition. If the condition is true, only the
elements within true node will be executed if its false only the elements within false node will be executed..
7) Commands: Executes special commands.