Hi all,
I am having a performance issue.
it_coepd1 is having around 50000 records with condition abwst = '09' and for every record of this Outer loop there are Twice the No of Records in the Inner loop for both it_coepd & it_coep i.e 1,00,000 records.
We need to delete the Records matching the condition...
Kindly tell me which of the blow code gives better performance..
1)
LOOP AT it_coepd1 INTO w_coepd where abwst EQ '09'.
loop at it_coepd where kokrs = w_coepd-kokrs and
belnr = w_coepd-belnr and
buzei = w_coepd-buzei.
delete it_coepd.
endloop.
loop at it_coep where kokrs = w_coepd-kokrs and
belnr = w_coepd-belnr and
buzei = w_coepd-buzei.
delete it_coep.
endloop.
Endloop.
2)
LOOP AT it_coepd1 INTO w_coepd where abwst EQ '09'.
DELETE it_coepd WHERE kokrs = w_coepd-kokrs
AND belnr = w_coepd-belnr
AND buzei = w_coepd-buzei.
DELETE it_coep WHERE kokrs = w_coepd-kokrs
AND belnr = w_coepd-belnr
AND buzei = w_coepd-buzei.
Endloop.
Moderator message - The correct response was to try it before asking the forum - thread locked
Edited by: Rob Burbank on Jun 10, 2009 9:39 AM