How to add data to an Internal Table using the Append Statement
To add a single row to a internal table, you can use the append statement. append copies a single row from any work area and places it in the body at the end of the existing rows. The work area can be the header line, or it can be any other field string having the same structure as a row in the body.
Syntax for the append Statement
The following is the syntax for the append statement.
append [wa to] [initial line to] it.
where:
- wa is the name of a work area.
- it is the name of a previously defined internal table.
The following points apply:
- wa must have the same structure as a row of the body.
- wa can be the header line or it can be any field string having the same structure as a row in the body.
- If you do not specify a work area, by default the system uses the header line. In effect, the header line is the default work area.
- After append, sy-tabix is set to the relative row number of the row just appended. For example, after appending the first row, sy-tabix will be set to 1. After appending the second row, sy-tabix will be 2, and so on.
Popularity: 20% [?]






