‎2008 Mar 20 7:46 AM
Hi,
please check below code...
loop at tab_ep.
if tab_ep-mwskz = '0' .
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
my requirement is whenever in tab_ep-mwskz contains 0 in any position, line should be deleted but this IF condition is not working....
is there any other way to fulfill my requirement....
Thanks..
Amit.
‎2008 Mar 20 7:48 AM
hi,
do this way
loop at tab_ep.
if tab_ep-mwskz cp '0' .
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
‎2008 Mar 20 7:48 AM
hi,
do this way
loop at tab_ep.
if tab_ep-mwskz cp '0' .
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
‎2008 Mar 20 7:50 AM
hello Jonny-
i dont think if condition is necessary for your requirement.
Find the logic below....
loop at tab_ep.
delete table tab_ep where mwskz = '0'.
ENDLOOP
‎2008 Mar 20 7:51 AM
Hi,
I can sugesst an alternative.
data : v_mwskz(10) type c.
loop at tab_ep.
move tab_ep-mwskz to v_mwskz.
search v_mwskz for 0.( Please check the syntax)
if sy-subrc = 0.
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
Reward if helpful.
Regards
Sourabh Verma
‎2008 Mar 20 7:58 AM
Hi Jony.
code like this -
loop at tab_ep where mwskz CP '0'.
delete tab_ep
endloop.
regards,
pankaj
‎2008 Mar 20 7:59 AM
Hi,
loop at tab_ep.
if tab_ep-mwskz = '0' .
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
Or
loop at tab_ep.
if tab_ep-mwskz ca '0' .
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
Reward if helpful.
Regards,
Kumar
‎2008 Mar 20 7:59 AM
hi,
try like this
loop at tab_ep.
if tab_ep-mwskz CS ' 0'.
delete tab_ep index sy-tabix.
ENDIF.
ENDLOOP.
‎2008 Mar 20 8:01 AM
Hey.
This will do it:
delete tab_ep where mwskz cs '0'.
You don't have to write anything else.
Please reward if helpfull.
Rebeka