SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Compatible Line Types When Using the INSERT INTO TABLE Statement
In ABAP Objects, the following syntax causes an error message:
DATA: itab TYPE SORTED TABLE OF f
WITH UNIQUE KEY table_line,
jtab TYPE HASHED TABLE OF i
WITH UNIQUE KEY table_line.
INSERT LINES OF itab INTO TABLE jtab.
Correct syntax:
DATA: itab TYPE SORTED TABLE OF f
WITH UNIQUE KEY table_line,
jtab TYPE HASHED TABLE OF f
WITH UNIQUE KEY table_line.
INSERT LINES OF itab INTO TABLE jtab.
Cause:
In any generic insert operation - that is, inserting lines into any type of table -
the lines that are to be inserted must be compatible with the line type of the target table. The above statement has been adapted to fit these semantics.