‎2008 Jun 23 2:45 PM
HI GURUS....
what is the use of system variable
sy-stepl. plz explain with a small example.
‎2008 Jun 23 2:49 PM
Hi,
The system variable SY-STEPL to find out the index of the screen table row that is currently being processed. The system sets this variable each time through the loop. SY-STEPL always has values from 1 to the number of rows currently displayed. This is useful when you are transferring field values back and forth between a screen table and an internal table. You can declare a table-offset variable in your program (often called BASE, and usually initialized with SY-LOOPC) and use it with SY-STEPL to get the internal table row that corresponds to the current screen table row.
**SCREEN FLOW LOGIC**
PROCESS BEFORE OUTPUT.
LOOP.
MODULE READ_INTTAB.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP.
MODULE MODIFY_INTTAB.
ENDLOOP.
**ABAP MODULES**
MODULE READ_INTTAB.
IND = BASE + SY-STEPL - 1.
READ TABLE INTTAB INDEX IND.
ENDMODULE.
MODULE MODIFY_INTTAB.
IND = BASE + SY-STEPL - 1.
MODIFY INTTAB INDEX IND.
ENDMODULE.
Hope this helps..
Regards,
Sharath
‎2008 Jun 23 2:47 PM
hi,
SY-STEPL
Index of current row in a screen table (table control). Is set at every loop pass. Outside a loop, for example during the POV event for a table row, SY-STEPL is not set appropriately.
example in the following link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbacac35c111d1829f0000e829fbfe/content.htm
regards
prasanth
Edited by: prasanth kasturi on Jun 23, 2008 3:49 PM
‎2008 Jun 23 2:49 PM
Hi,
The system variable SY-STEPL to find out the index of the screen table row that is currently being processed. The system sets this variable each time through the loop. SY-STEPL always has values from 1 to the number of rows currently displayed. This is useful when you are transferring field values back and forth between a screen table and an internal table. You can declare a table-offset variable in your program (often called BASE, and usually initialized with SY-LOOPC) and use it with SY-STEPL to get the internal table row that corresponds to the current screen table row.
**SCREEN FLOW LOGIC**
PROCESS BEFORE OUTPUT.
LOOP.
MODULE READ_INTTAB.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP.
MODULE MODIFY_INTTAB.
ENDLOOP.
**ABAP MODULES**
MODULE READ_INTTAB.
IND = BASE + SY-STEPL - 1.
READ TABLE INTTAB INDEX IND.
ENDMODULE.
MODULE MODIFY_INTTAB.
IND = BASE + SY-STEPL - 1.
MODIFY INTTAB INDEX IND.
ENDMODULE.
Hope this helps..
Regards,
Sharath
‎2008 Jun 23 2:50 PM
Diana,
sy-stepl is used in Screen while table control processing to get Index of current table row
please always reward for good answers.
Amit.
‎2008 Jun 23 2:52 PM
Hi,
Index of the current row in a steploop or table control.
It is set at every loop pass.
Reward if found helpful.
Warm Regards,
R Adarsh
‎2008 Jun 23 2:55 PM
Hi,
I
ndex of current row in a screen table (table control). Is set at every loop pass. Outside a loop, for example during the POV event for a table row, SY-STEPL is not set appropriately.
Regards,
Sowmya.