12-04-2007 4:32 AM
Hi ,
based on some condion on one internal table i have to delete records in another internal table so how it is possible pls tellme.
if one record is i can use READ but i have to check with multiple records.
pls help me
12-04-2007 4:39 AM
hi,
Loop (internal table2 which has many records)
read each record coming inside the loop for the condition to satisfy in the other internal table1
if sy-subrc = 0.
delete the content of the internal table1 .
endif.
endloop.
regards,
karthik
12-04-2007 4:35 AM
hi,
ex : consider ITAB & ITAB1 having a field PERNR.
if u want to delete the ITAB1-Pernr, who are all there in ITAB..
<b> Loop at ITAB.
DELETE ITAB1 WHERE PERNR EQ ITAB-PERNR.
Endloop.</b>
With Rgds,
S.Barani
12-04-2007 4:39 AM
hi,
Loop (internal table2 which has many records)
read each record coming inside the loop for the condition to satisfy in the other internal table1
if sy-subrc = 0.
delete the content of the internal table1 .
endif.
endloop.
regards,
karthik
12-04-2007 4:43 AM
Hi,
Loop at itab1 where <condn>. ( if condn exists, it will come inside the inner
loop).
Loop at itab2.
delete itab2 where <cond> = <itab1->.
endloop.
endloop.
Regards,
Vani.
12-04-2007 12:15 PM
try this.
loop at itab1.
if (ur condition in itab1).
delete itab2[] where (ur condition).
endif.
endloop.
hope this gives some idea.
12-04-2007 12:18 PM
Hi,
Do like this.
Loop at itab1 itno wa1.
read tbale itab2 into wa2 with key <conditions>
if sy-subrc eq 0 .
delete itab1 from wa1.
endif.
endloop.
Regards,
Prashant