‎2007 Sep 26 11:11 AM
hi all,
what is step loop? how to create ? give me sample program?
‎2007 Sep 26 11:14 AM
Hi
STEP LOOPS
Step Loops are type of screen table . Step loops are repeated blocks of field in a screen. Each block contains one or more fields and these blocks are repeated. Step loops arent like actual table. You can scroll vertically but not horizontally. Three steps are associated with creation of step loops:
Creation of step loops on screen, which includes declaring fields on the screen and then defining the step, loops for these fields.
Passing data to the step loop is exactly similar to the passing of data to table controls.
In step loop, you dont need to define the step loop as such in the module pool program but the cursor needs to be defined in the program.
Types of Step Loops
Static Static Step Loop (SSL) have fixed size that cannot be changed during the runtime. If user resizes the window, the size of the static step loop is not changed.
Dynamic Dynamic Step Loop (DSL) is variable in size. When the user resizes the window, the system increases or decreases the number of the step loop blocks.
You can have only one dynamic step loop and can have as many static loops in your transaction.
Programming with the Static and dynamic step loop is exactly same. For the system or for the user it doesnt make any difference whether it is static or dynamic step loop. Only attribute, which you fix during designing of the step loop, is type attribute for step loop F for fixed i.e static and V for variable i.e. dynamic.
Writing code for Step Loop in the flow logic.
PBO.
Loop at itab cursor cl.
Module set.
Endloop.
PAI.
Loop at itab.
Endloop.
Empty loop is must for both table control and step loop
LOOP AT statement for step loops and Table controls is similar. Loop At statement transfers the data to screen table. You need to have the Module to assign the values for the screen table.
In module pool program you need to define the cursor.
Date: CL TYPE i.
Cursor parameter tells which line of step loop display should start.
Module Set in module pool program assigns the values to step loop fields, which is similar to table controls.
Refer to this program DEMO_DYNPRO_STEP_LOOP
reward points
regards,
vijay
‎2007 Sep 26 11:18 AM
Hi
Working with Step Loops
rewards point
‎2007 Sep 26 11:20 AM
hi
or folow like this
Step Loops
Creating a Steploop
Editing a Step Loop
STEP LOOP Coding
We use two flavours of LOOP ... ENDLOOP in screen flow logic to program the step loops.We have to program both in PBO and PAI so that transfer of data can take place between screen and abap program.
1) LOOP
MODULE fill_data
ENDLOOP.
here in PBO a module should be called that will transfer the data to the
screen fields. In PAI the module call is not required only the empty LOOP..ENDLOOP will do or we can call a module to write the data to an internal table.In this method there is no automatic scrolling we have to program it in ABAP.
2) LOOP AT int_table [CURSOR line_number][FROM n1 TO n2]
ENDLOOP.
Here in PBO a module call is not required to fill the step loop screen fields as the data is copied to the workare wa and from there to screen fields in step loop automatically. INTO wa is not required if we use the int_table declared with a header line.
In PAI the addition AT int_table is also required for automatic scrolling.
The parameter CURSOR line_number which is of TYPE I is used to specify
the that will be the first to be displayed,it is filled in the ABAP program.
NOTE:
1) It is preferable to use TABLE CONTROL instead of STEP LOOPS.
2) It is preferable to use LOOP AT int_table instead of plain LOOP..ENDLOOP.