Professional Documents
Culture Documents
Smartform
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or seek
to hold, SAP responsible or liable with respect to the content of this document.
Applies To:
SAP 4.6C - Smartforms
Summary
This document explains how to use Table, Template, Loop, and Command to display the set of records in
Smartforms.
By: J.Jayanthi
Date: 22.08.2005
Table of Contents
Applies To:........................................................................................................................................2
Summary ..........................................................................................................................................2
Procedure .........................................................................................................................................2
Template....................................................................................................................................4
Command ..................................................................................................................................5
Loop...........................................................................................................................................5
Table..........................................................................................................................................6
Code Sample………………………………………………………………………………………………..7
Author Bio………………………………………………………………………………………………….10
Procedure
1. Go to transaction SMARTFORMS.
WA TYPE ZZZ_MAKT
Template
1. Right click Code and create a Loop.
3. Right Click the Loop and Create a Template. In that, design the Template as shown below by selecting
Pattern to display Output.
5. Drag ZMATNR, ZMAKTX and PICK from the Field list and put in the above mentioned Text Elements->
General Attributes respectively.
Command
1. Right Click the Loop and create a Command (say %COMMAND2). Make the Command after Template
(move accordingly). We are making use of Command to page break.
2. In Command->General Attributes, check mark Go to new page and give the page no. (say %PAGE).
3. Then right Click the %CODE1 and create another loop and move it after %COMMAND2.
Loop
1. In Loop->Data, Internal table itab into wa. The settings of Loop->Output options is shown below [Since in
the output, we are going to display a box with border].
2. Create a text element (say %TEXT1) under that Loop and design the Text->General Attributes as below.
3. Create a Command (say %Command1) under %Loop1 and do as we did before for %Command2.
Table
1. Right click %Code1 and Create a Table [say %Table1].
4. Create three Text Element by right clicking %Table1 [say %CELL1, %CELL2, %CELL3].
5. Drag ZMATNR, ZMAKTX, PICK from fieldlist and put in the created text elements.
6. In CELL1->Output Options,
7. Check mark New Line and New Cell and choose the Line type as Line1 which we created in Table-
>Table.
8. For CELL2 and CELL3, check mark New Cell in Output options.
Code Sample
REPORT zzz_jaytest3 .
* Variable Declaration
data : v_form_name TYPE rs38l_fnam.
Author Bio
J.Jayanthi works as Senior Software Engineer at Wipro Technologies.