ABAP: Append one internal table to another internal table

You can easily append all lines of one table to another table.

Append at the end

The APPEND LINES command adds the lines at the end

APPEND LINES OF lt_tab1 TO lt_tab2.
1

Add lines at the beginning

With INSERT LINES and an INDEX you can add the lines at the beginning.

INSERT LINES OF lt_tab1 TO lt_tab2 INDEX 1.
1

Multiple tabs with VALUE operator

if you have multiple tabs and wants to have a certain order, you can use new VALUE operator

DATA(lt_tab1) = VALUE stringtab( ( |1| ) ( |1| ) ( |1| ) ).
DATA(lt_tab2) = VALUE stringtab( ( |2| ) ( |2| ) ( |2| ) ).
DATA(lt_tab3) = VALUE stringtab( ( |3| ) ( |3| ) ( |3| ) ).

DATA(lt_final_tab) = VALUE stringtab(   ( LINES OF lt_tab3 )
                                        ( LINES OF lt_tab1 )
                                        ( LINES OF lt_tab2 )
                                    ).
"result: 3, 3, 3, 1, 1, 1, 2, 2, 2
1
2
3
4
5
6
7
8
9