Hi Experts,
A hopefully simple ABAP question: I have a very large internal abap table of line type AA which shall be append to another internal table of line type BB.
Curret implementation is pretty straightforeward:
LOOP AT AA ASSINGING <FA>.
MOVE-CORRESPONDING <FA> TO <FB>.
APPEND <FB> TO BB.
ENDLOOP.
FREE AA.
Issue: AA is a very very big table (> 1.000.000 entries, with a pretty big column size). The table needs ~1.5GB RAM. When using the way above for a very short time ~3GB RAM will be required (which will finally put the process into private mode, causing big performance problems).
Sadly I do not know any way to free the memory of an internal table partially. I've tried to do the following code snipped (which does not work, because DELETE does not free memory).
WHILE AA[] IS NOT INITIAL.
READ TABLE aa assinging <fa> INDEX 1.
MOVE-CORRESPONDING <FA> TO <fB>.
APPEND <FB> TO BB.
DELETE aa INDEX 1.
ENDWHILE.
As I said, this does not work, because DELETE does not shrink the memory extension of a table.
Do you know ANY way to complete the described use case, without having the table two times in RAM?
REgards,
Timo