Ansicht
Dokumentation

ABENOO_OBS_ITAB_INSERT_2 - OO OBS ITAB INSERT 2

ABENOO_OBS_ITAB_INSERT_2 - OO OBS ITAB INSERT 2

Vendor Master (General Section)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Compatible Line Types When Using the INSERT INTO TABLE Statement

When you insert lines from one internal table in another, in ABAP Objects, the line types must be compatible.

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.






ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 1690 Date: 20240423 Time: 210934     sap01-206 ( 22 ms )