Ansicht
Dokumentation

ABENNESTED_INTERNAL_TABLES_ABEXA - NESTED INTERNAL TABLES ABEXA

ABENNESTED_INTERNAL_TABLES_ABEXA - NESTED INTERNAL TABLES ABEXA

Vendor Master (General Section)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

- Nested Tables

This example demonstrates how nested internal tables are declared and used.

Source Code

Execute

Description

The example shows the declaration of two internal tables, t_address_tab and company_tab, where t_address_tab is contained in company_tab. For this, t_address_tab is defined as the table type. The component addresses of the company structure is declared with this type. The data type of company is used as the line type for the tables company_tab and company_sorted_tab.

The internal table is filled using the value operator VALUE.

A line from company_tab is assigned to the field symbol <fs> using READ and its table-like component addresses is processed in a LOOP. The content of the line is assigned to the structure address. Since addresses is an index table, sy-tabix can be evaluated.

To change the content of the component street of a line of the inner table addresses, the index of the required line is determined using a READ statement and it is then used in MODIFY. To make the changes effective in the corresponding line of the outer hashed table as well, the key access of the MODIFY statement is used.

Finally, the hashed table is assigned a sorted table with the same line type. In this way, the entries are automatically sorted according to the table key name. The entries of the inner standard table, on the other hand, are sorted using the SORT statement.






General Data in Customer Master   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 2136 Date: 20240418 Time: 163423     sap01-206 ( 56 ms )