Skip to Content
0
Former Member
May 29, 2008 at 08:12 PM

delete a line if string not there

23 Views

Hi friends,

this is not working. I dont know why ?

All what I need to do is deleting lines from itab

if string1 is not appearing in string2.

e.g. delete wa_zehs_prokat_tab because

string2 doesn't have R99 .

string1 = 'R99'
string2 = 'R39/26 R39/27 R39/28 R60 R62'.

LOOP AT it_ZEHS_PROKAT_RES INTO wa_zehs_prokat_tab.
loop at s_rstze.
if  s_rstze-low CA  wa_zehs_prokat_tab-RSATZ.
* do nothing
else.
DELETE TABLE it_ZEHS_PROKAT_RES FROM wa_zehs_prokat_tab.
endif.
endloop.
endloop.

Thanks

sas