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-tabix

Former Member
0 Likes
414

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
Read only

Former Member
0 Likes
377

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.

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 REPLY 1
Read only

Former Member
0 Likes
378

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.