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: 

Deleting line in a range

Former Member
0 Kudos

Hello.

I want to know if it's possible to delete or update a line in a range ? If yes, what instruction do i use ?

I tried to read it like an internal table but find the line i want but it doesn't work.

Thanks for any help on this !

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Yes..you can do like this...

for example...


LOOP at s_week.
IF s_week-low GT 30. "or you can put condition on s_week-high
s_week-low = '30'.
modify s_week index sy-tabix.
ENDIF.
ENDLOOP.

"OR
LOOP at s_week.
IF s_week-low GT 30.
DELETE s_week.
ENDIF.
ENDLOOP.


Message was edited by:

Perez C

3 REPLIES 3

Former Member
0 Kudos

Yes..you can do like this...

for example...


LOOP at s_week.
IF s_week-low GT 30. "or you can put condition on s_week-high
s_week-low = '30'.
modify s_week index sy-tabix.
ENDIF.
ENDLOOP.

"OR
LOOP at s_week.
IF s_week-low GT 30.
DELETE s_week.
ENDIF.
ENDLOOP.


Message was edited by:

Perez C

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Try this:

Loop at it_range.

if condition.

Delete/modify it_range .

endif.

endloop.

Rgds,

Sandeep

JozsefSzikszai
Active Contributor
0 Kudos

hi Helder,

do like:

READ TABLE range INTO ....

WITH KEY ...

do your modification

MODIFY range FROM ... INDEX sy-tabix.

hope this helps

ec