Skip to Content
0
Former Member
Apr 19, 2008 at 12:34 PM

perfomance problem when deleting 20lakh records from internal table

20 Views

LOOP AT itab .

DELETE itab1 WHERE belnr = itab-belnr.

ENDLOOP

there are 20 lakh records in itab as well as itab1. The execution of this loop is taking a lot of time. Can anyone please suggest an efficient and fastest way to acheive the above requirement. Also i have to delete around 19 lakh entires from itab1 and i cannot filter the data using select queires.

I have tried the below logic too but even that is taking a lot time.

loop at itab1.

read table itab with key belnr = itab1-belnr

binary search transporting no fields.

if sy-subrc <> 0.

append itab1 to itab2.

endif.

endloop.

kindly suggest an efficient logic.

Thanks,

Gopi Krishna