Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SY-STEPL

Former Member
0 Likes
2,932

HI GURUS....

what is the use of system variable

sy-stepl. plz explain with a small example.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,476

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

5 REPLIES 5
Read only

prasanth_kasturi
Active Contributor
0 Likes
1,476

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

Read only

Former Member
0 Likes
1,477

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

Read only

Former Member
0 Likes
1,476

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.

Read only

Former Member
0 Likes
1,476

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

Read only

Former Member
0 Likes
1,476

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.