‎2008 Mar 28 12:29 PM
hi all,
im fresh learn of sap i want to know what is steploops in dialog programind and small idea regarding it needed
regards,
Padma.
‎2008 Mar 28 12:46 PM
Hi,
To simply answer your question..
Step loops is the older version of Table Control.
But now a days nobody is using Step Loops unless the version is older version....
I need to recap again if you want in detail...
Regards,
RSS.
‎2008 Mar 28 1:16 PM
Hi,
A step loop is a repeated series of field-blocks in a screen. Each block can contain one or more fields, and can extend over more than one line on the screen.
Step loops as structures in a screen do not have individual names. The screen can contain more than one step loop, but if so, you must program the LOOP...ENDLOOPs in the flow logic accordingly. The ordering of the LOOP...ENDLOOPs must exactly parallel the order of the step loops in the screen. The ordering tells the system which loop processing to apply to which loop.
Step loops in a screen are ordered primarily by screen row, and secondarily by screen column.
Transaction TZ61 (development class SDWA) implements a step loop version of the table you saw in transaction TZ60.
Screen 200 for TZ61.
If you have a step loop in your screen, you can place the cursor on a particular element in the step loop block. Use the LINE parameter, entering the line of the loop block where you want to place the cursor:
SET CURSOR FIELD <fieldname> LINE <line>.
If you want, you can use the OFFSET and LINE parameters together.
See the TZ61 code for a demonstration of how to use step loops.
Static and Dynamic Step Loops
Step loops fall into two classes: static and dynamic. Static step loops have a fixed size that cannot be changed at runtime. Dynamic step loops are variable in size. If the user re-sizes the window, the system automatically increases or decreases the number of step loop blocks displayed. In any given screen, you can define any number of static step loops, but only a single dynamic one.
You specify the class for a step loop in the Screen Painter. Each loop in a screen has the attributes Looptype (fixed=static, variable=dynamic) and Loopcount. If a loop is fixed, the Loopcount tells the number of loop-blocks displayed for the loop. This number can never change.
Programming with static and dynamic step loops is essentially the same. You can use both the LOOP and LOOP AT statements for both types.
Looping in a Step Loop
When you use LOOP AT <internal-table> with a step loop, the system automatically displays the step loop with vertical scroll bars. The scroll bars, and the updated (scrolled) table display, are managed by the system.
Use the following additional parameters if desired:
FROM <line1> and TO <line2>
These parameters limit the parts of the internal table that can be displayed or processed in the step loop. If you use one or both of these, declare <line1> and <line2> in ABAP with LIKE SY-TABIX. If you dont use them, the system simply uses the beginning and/or end of the internal table as the limit.
CURSOR <scroll-var>
The CURSOR parameter tells which internal table row should be the first in the screen display. <Scroll-var> is a local program variable that can be set either by your program or
automatically by the system. The value of <scroll-var> is absolute with respect to the internal table (that is, not relative to the FROM or TO values).
The CURSOR <scroll-var> parameter is required in the PBO event to tell the system where to
start displaying.
Regards,
Bhaskar