‎2008 Dec 26 12:05 PM
Hi guys,
I have a scenario wherein i need to move data from 2 separate internal tables to a third internal table.
How do i go about it.
All 3 internal tables have the same structure.
Thanks and regards,
Frank
‎2008 Dec 26 12:10 PM
Hi,
check this:
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb36c8358411d1829f0000e829fbfe/content.htm
maybe something like:
APPEND LINES OF itab1 TO itab3.
APPEND LINES OF itab2 TO itab3.
Best regards.
‎2008 Dec 26 12:08 PM
‎2008 Dec 26 12:10 PM
Hi,
check this:
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb36c8358411d1829f0000e829fbfe/content.htm
maybe something like:
APPEND LINES OF itab1 TO itab3.
APPEND LINES OF itab2 TO itab3.
Best regards.
‎2008 Dec 26 12:13 PM
Hi frank,
You can do this is in several ways. One of it would be:
data: it_dest type table ...
it_src1 type table ...
it_src2 type table ...
APPEND LINES OF: it_src1 TO it_dest,
it_src2 TO it_dest.
Sencond way would be passing first part of task (coping first internal table) to kernel with statement:
it_dest[] = it_scr1[]. "this passes content of source tab to destination, it will overwrite content of it_dest if not empty
"second step has to remain as above, otherwise we would erase what we have just copied
APPEND LINES OF it_scr2 TO it_dest.
Other way would be looping through the tables and appending/inserting these to destination table, but these two above are sufficient.
Regards
Marcin
‎2008 Dec 26 1:05 PM
HI,
You can transfer the data of tab1 and tab2 to table 3 which are having the same structure in the following way
APPEND LINES OF itab1 TO itab2
APPEND LINES OF itab2 TO itab3
APPEND LINES OF itab1 [FROM n1] [TO n2] TO itab2.
where n1 and n2 specify the indexes of the first and last line of itab1 that you want to appned to itab2.
Regards
Sathish