Addition of rows can be done either by using append or insert command.
You can copy one or more rows of an internal table into another internal table by using the statement INSERT LINES OF or APPEND LINES OF.
APPEND is used to add entries to end of the internal table. Append will not work for Hashed tables.
example : APPEND WA_KNA1 TO IT_KNA1.
APPEND LINES OF can be used to Copies the contents of several rows of an internal table to another internal table Which is having same structure.
example : Append lines of IT_KNA1 TO IT2_KNA1.
INSERT is used to add entries to internal table in the index(row Number) specified.
example: INSERT WA_KNA1 INTO IT_KNA1 INDEX 8.
INSERT LINES OF can be used to copy another internal table contents having same structure to the internal table.
example: INSERT LINES OF IT_KNA1 INTO TABLE IT2_KNA1 INDEX 8.
No comments:
Post a Comment