Hi All,
I need to implement some logic that will copy all the records from one internal table to another. The wrinkle is that the records are not compatable, and some logic needs to be done to convert them from the old table format to the new table format. I've written the best logic I could come up with below. Does anyone have any suggestions how to improve the performance or understandability of this logic? Please note that the tables in question are very large, so I'd like to free the memory used by the old table as I add those records to the new table.
WHILE i_old[] IS NOT INITIAL
READ TABLE i_old INTO wa_old INDEX 1.
" <...Logic to convert old record wa_old to new record wa_new...>
APPEND wa_new TO TABLE i_new.
DELETE TABLE i_old INDEX 1.
ENDWHILE.
Thanks,
Alex