0% found this document useful (0 votes)
243 views

Achieving Control-Break Statements Functionality in Smart Forms

The document outlines 11 steps to achieve control-break functionality in SAP Smart Forms: 1) Define the smart form, data structure, fields, and variables. 2) Create a loop in the main window to iterate over an internal table. 3) Generate text elements within the loop to display item details. 4) Add events to the loop to sort and sum values by sales document. 5) Sum the net price of all items in each sales document within the sort end event.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
243 views

Achieving Control-Break Statements Functionality in Smart Forms

The document outlines 11 steps to achieve control-break functionality in SAP Smart Forms: 1) Define the smart form, data structure, fields, and variables. 2) Create a loop in the main window to iterate over an internal table. 3) Generate text elements within the loop to display item details. 4) Add events to the loop to sort and sum values by sales document. 5) Sum the net price of all items in each sales document within the sort end event.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Achieving control-break statements functionality in Smart Forms

By Phani Diwakar, YASH Technologies Step1: T-code for smart forms is SMARTFORMS. Provide the name of the smart form.

Step2: we can define user-defined structure in TYPES tab in the Global Definitions.

Step3: Define the field string, internal table and global variables in Global Data tab.

Step4: In the Initialization tab,

Step5: In main window, create the loop as shown below.

Step6: Now Loop the internal table.

Create text element in this loop as show below.

Step7: Execute

the

smart

form,

the

output

would

be

Step8: suppose, if we want to know the item details sales document wise. To achieve this, we have to write the events in the loop as shown below.

And in the event on sort begin,

In the text element,

Step9: Now execute the smart form, the output would be

Step10: Now the requirement is to sum the net price of all items of sales document. To achieve this,

And in the program lines, we have to add the net price.

In the event on sort end,

In program lines,

Step11: Now execute the smart form, the output would be

You might also like