Application Development 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: 

sy-tabix

Former Member
0 Kudos

hi guys ..

my requirement is i shud onli get item numbers 20 and 30

when iam writing the following logic iam getting 10 and 20

this is the logic

LOOP AT lt_bomitem WHERE item_categ = 'N'.

IF sy-tabix GT 2.

DELETE lt_bomitem.

ENDIF.

ENDLOOP.

    • item category L = solution

LOOP AT lt_bomitem WHERE item_categ = 'L'.

IF sy-tabix GT 1 .

DELETE lt_bomitem.

ENDIF.

ENDLOOP.

how can i get it...plz advise

thanks

1 ACCEPTED SOLUTION

former_member583013
Active Contributor
0 Kudos

DATA: GS_TABIX TYPE SY-TABIX.

LOOP AT lt_bomitem WHERE item_categ = 'N'.
GS_TABIX = SY-TABIX.
IF GS_TABIX GT 2.
DELETE lt_bomitem index GS_TABIX.
ENDIF.
ENDLOOP.

Greetings,

Blag.

1 REPLY 1

former_member583013
Active Contributor
0 Kudos

DATA: GS_TABIX TYPE SY-TABIX.

LOOP AT lt_bomitem WHERE item_categ = 'N'.
GS_TABIX = SY-TABIX.
IF GS_TABIX GT 2.
DELETE lt_bomitem index GS_TABIX.
ENDIF.
ENDLOOP.

Greetings,

Blag.