Step-loops in Module Pool Programming

By Mansi Maskeri, Capgemini

Step-loops in Module Pool Programming

Step-loops are actually the predecessors to Table Control concepts and from programming point of view they are quite similar. Step loops are objects for screen table display that are added to a screen in the Screen Painter. They are preferred in cases of Radio-frequency applications where ALV displays or table controls pose a hindrance with respect to small displays and navigational issues.

1. Introduction to Step Loops

This article throws light on the concept of Step-loops in Module screen programming. Step-loops are a very old concept and their use has been drastically reduced after the onset of Table control. But in certain applications such as Radio Frequency there is no other alternative than using step-loops.

The pre-requisite to understanding and design of step-loops is to have a fair idea over module pool programming.

Step-loops are of 2 types:

Fixed Step-loops

Incase of Fixed step-loops, the number of lines of records would be fixed as when designed. You can increase the number of records at runtime. Although the number of records can be decreased as per programming logic if number of records in table to be displayed are less than fixed number.


Variable Step-loops

In case of variable step-loops, at runtime we can increase the number of repetitive blocks depending on the size of the screen.

2. Requirement to be designed

We will look into a requirement where we have display records in a step-loop on screen in such a manner that we will keep the step-loop fixed to 5 rows for simplicity and based on the number of records; the records will flow onto the next screens.

Also if there are only 2 records to be displayed then only 2 rows will appear on the screen with no buttons for navigation. So the navigation buttons “Page Up” and “Page Down” would be handling dynamically based on the records to be displayed.

3. How to design Step-loops?

A step loop is defined in the screen painter transaction SE51; these are unlike the table control elements which can be spread over multiple lines and can be combined into one group which would be repeated within the step loop. It is important to note that whichever attributes we assign to the first group are replicated to the entire step loop.

In the screen painter, we can define whether the size of a step loop is fixed or variable. The vertical size of variable step loops changes if the user changes the vertical size of the window. For every screen, any number of fixed step loops can be defined but only one variable step loop. Every vertical size change triggers PAI if a variable step loop is defined on the screen. For fixed step loops the number of repetition groups has to be predefined.

To place step-loops in the module pool screen, we need to place input/output fields for the number of columns required and text-fields for the number of column headers. As described, we would first place the input-output fields and text-fields as per the number of columns to be displayed as shown below:

Later in order to convert these into step-loops, select the input/output fields together for all required columns and follow the steps as shown below in the screenshot with the menu path as Edit -> Grouping -> Step Loop -> Define.

Click here to continue..

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image