Ansicht
Dokumentation
ABENAPPEND_LINES_ABEXA - APPEND LINES ABEXA
BAL_S_LOG - Application Log: Log header data PERFORM Short ReferenceThis documentation is copyright by SAP AG.
- Appending Lines
This example demonstrates how lines can be appended to internal tables.
Source Code
Description
The example has three parts:
- In the first part, the internal table wa_tab is created with two columns and filled in the loop DO. In each pass of the loop, a line with initial values is appended, then a structure of the line type is constructed and appended from the loop index and the square of the loop index.
- In the second part, two internal tables tab1 and tab2 are created. tab2 has a deep structure, since the second component of the line type has the data type of the table tab1. Structures of the line type line1 are appended to tab1. After this, a structure with the line type line2 is constructed and appended to tab2. After tab1 has been initialized using the statement CLEAR, the same process is repeated.
- In the final part, two lines of the internal table jtab are appended to the internal table itab using the statement APPEND and the addition LINES OF.
Note
It could be better to use the value operator VALUE for internal tables instead of using APPEND VALUE #( ... ) shown here.
General Data in Customer Master ABAP Short Reference
This documentation is copyright by SAP AG.
Length: 1609 Date: 20240328 Time: 115930 sap01-206 ( 34 ms )