2009 May 20 4:50 PM
Hi Friends,
I have an internal table with 2 columns.
In one column i have entries with 3 different field lengths (18, 21, 24). Now my requirement is to delete the rows with the field length 21 and 24. Or delete the rows with field lenght 18 and 24 Or delete the rows with field length 18 and 21.
How to acheive this?
Your suggestions and ideas will be appreciated.
Thanks & Regards,
Raju
Moderator message - Total Posts: 350 Total Questions: 132 (111 unresolved) If you assign po(i)nts and close your old posts, that will encourage people to respond to your new questions.
Edited by: Rob Burbank on May 20, 2009 11:54 AM
2009 May 20 5:55 PM
2009 May 20 4:54 PM
Try something like
loop at itab.
v_length = strlen( itab-field1 ) .
if v_length = 24.
delete itab index sy-tabix.
endif
endloop.
a®
2009 May 20 5:55 PM
2009 May 20 9:25 PM
Thank you both for the responses.
The solutions were helpful to me, however i used the second approach as it doesnt involve the LOOP and definitely has good performance.
Points awarded to both.
Regards,
Raju