"Transfer from http://blog.chinaunix.net/uid-7982817-id-91999.html"
Append Usage Summary 2008-11-14 11:42:19
Classification:
Syntax
APPEND {WA
| {INITIAL Line}
| {LINES of Jtab [from idx1] [to IDX2]}}
To Itab [SORTED by comp]
[{assigning <fs> [CASTING]} | {REFERENCE into dref}].Effect
Appends rows to an internal table itab.AdditionsWA
Appends a Workarea WA.
INITIAL Line
Appends an initial row.
Append initialization rowsLINES of Jtab [from idx1] [to IDX2]
Appends the rows from idx1 to idx2 of the internal table Jtab.this statement alike:
Append inner table row
To attach part or all of the inner table to another inner table, use the APPEND statement, as follows:
Grammar
APPEND LINES of <itab1> [from <n1>] [to <n2>] to <itab2>.
If there is no from and to options, the statement attaches the entire table ITAB1 to ITAB2. If you use these options, you can index <n1>
Or <n2> specify the first or last line to append in the ITAB1.Notice
The speed of attaching a table row to another table in this way is 3 to 4 times times faster than the line-by-row in the loop.
After the APPEND statement, the System field Sy-tabix contains the index of the last row that is attached. SORTED by Comp
Creates a ranking, which is sorted by the row component comp in descending order.
Create a queue, sorted in descending orderassigning <fs> [CASTING]
Assigns an appended row to a field symbol <fs> and a casting can thus is carried out.
REFERENCE into Dref
Sets a data reference dref to an appended row.
ABAP Append Usage