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

Loop from second row in internal table...

Former Member
0 Likes
5,100

Hi,

I have to loop into internal table and condition is that looping should be done from second row and sno of this table should be matched with sno of another table.

something like this ....

loop at it_tab1 where sno = it_tab2-sno and index = 2.

How to do that??

4 REPLIES 4
Read only

Former Member
0 Likes
2,095

loop at it_tab1 where sno = it_tab2-sno .

if sy-tabix = 2.

*your code ...

endif.

endloop.

Read only

Former Member
0 Likes
2,095

Hi,

give sy-tabix = '2' at your loop statement and check.

Read only

Former Member
0 Likes
2,095

Hi,

You can use if condition in the loop endloop.

loop at it_tab1 .

if sy-tabix > 1.

write: / it_tab1-mandt,it_tab1-matnr .

endif.

endloop.

This skips the first record and you can continue the execution of the statements in the loop.

Reward points if helpful.

Thanks and regards.

Read only

Former Member
0 Likes
2,095

another idea

loop

at first

continue.

endat

endloop