Skip to Content
Former Member
Jun 15, 2009 at 09:00 AM

Delete from internal table based on records in another internal table.


Hello Everyone,

Please excuse me if i am posting in the wrong forum. But, i think that this is more related to ABAP in general.

I am trying to improve the performance of a piece of my code. I would like to know if the following scenario is possible without looping.

I have an internal table (ITAB1) having fields A, B. And i have another internal table (ITAB2) having fields B, C.

A is the key for ITAB1 and B is the key for ITAB2.

I have already populated the table ITAB2 with filtered values using select. ITAB1 contains all entries of a table.

Is it possible for me to delete records from ITAB1 such that ITAB1-B eq ITAB2-B?? (without using a loop statement)

That is, is it possible for me to delete all irrelevant records from ITAB1 such that i have only records in ITAB1 which satisfy the condition ITAB1-B eq ITAB2-B in a single statement without using loops?

Please Help. Let me know if you need more clarity.

Thanks in Advance,