01-28-2008 10:14 AM
Hi all,
I have selected some data from WITH_ITEM table into internal table t_with_item.
Now i want to delete those record where t_with_item-belnr EQ t_with_item-augbl .
Please suggest how to do this.
Regards,
Amit.
01-28-2008 10:16 AM
Hello,
Do like this.
loop at t_with_item.
if t_with_item-belnr EQ t_with_item-augbl.
delete t_with_item.
endif.
Hope this code will helps you.
Regards,
Vasanth
01-28-2008 10:18 AM
Hi,
loop at t_with_item.
delete t_with_item
where augbl eq with_item-belnr.
endloop.
regards
NIcole
01-28-2008 10:21 AM
Hi Amit,
Try this one.Follow the below logic ok,
loop at with_item.
delete table with_item where t_with_item-belnr EQ t_with_item-augbl.
endloop.
or
loop at with_item where t_with_item-belnr EQ t_with_item-augbl.
delete table with_item index sy-tabix.
endloop.
Reward points if helpful
Kiran Kumar.G.A
01-28-2008 10:22 AM
Hi,
Try it
loop at t_with_item.
if t_with_item-belnr EQ t_with_item-augbl.
delete t_with_item.
endif.
endloop.
L.Velu
01-28-2008 10:26 AM
Hi Amit,
instead deleting internal table.. why can't you put cond. in SELECT statment itself..
SELECT <fld1> <fld2>... INTO CORRESPONDING FILEDS OF TABLE t_with_item
FROM WITH_ITEM
WHERE <cond> AND
belnr NE augbl.
01-29-2008 6:24 AM