Hi Uma,
for large mass data, doing anything in the LOOP is much slower than mass processing statements like DELETE WHERE.
Still, I would try adding a deletion flag to each item, set the flag in a LOOP and use DELETE WHERE flag = 'X' at the end of the loop.
Next I would implement a poor man's table index management to benefit from the performance of the DELETE statement. Create a mapping table and work with an index table, i.e. a table containing the index of the entry in the original table. e.g.
Internal Table1 Mapping Index Table
Field1 Index Field
A 3 A 3
B 4 B 4
C 1 C 1
D 2 D 2
The index are chosen in a way that all entries in the reference table have the lowest index.
With this, you can now DELETE WHERE index LE 2, then do the reverse mapping.
I used this once (class LCL_TRACE_INDEX) to benefit from the performance of FIND IN TABLE in pattern matching. You will have to decide if it is worth the effort.
Hope this helps,
JNN