Ansicht
Dokumentation

ABAPDATA_ITAB - DATA ITAB

ABAPDATA_ITAB - DATA ITAB

BAL Application Log Documentation   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

DATA, TABLE OF

Short Reference



DATA itab ${ ${TYPE $[STANDARD$]$|SORTED$|HASHED TABLE OF $[REF TO$] type$}
          $| ${LIKE $[STANDARD$]$|SORTED$|HASHED TABLE OF dobj$} $}
          $[tabkeys$]
          $[INITIAL SIZE n$]
          $[VALUE IS INITIAL$]
          $[READ-ONLY$].

Effect

This statement defines an internal table. The definition of the line type, the table category (STANDARD TABLE, SORTED TABLE, or HASHED TABLE), and the initial memory requirement INITIAL SIZE matches the definition of table categories in the section TYPES - TABLE OF exactly. Using DATA, these additions create a bound table type. The generic types ANY TABLE and INDEX TABLE cannot be used with DATA.

tabkeys is used to define the table keys of the internal table, which, unlike data types, cannot be generic.

Notes

  • When an internal table is created as a data object, only the administrative entry of an internal table is generated. The actual table lines are only inserted at runtime.
  • When an internal table is defined, the start value after the addition VALUE must be IS INITIAL.

Example

Declaration of an internal hashed table. The line type corresponds to the structure of the database table SPFLI. Two key fields are defined for the primary table key. The other statements demonstrate the filling of the table with lines from the DDIC database table SPFLI and how a line is read.






Fill RESBD Structure from EBP Component Structure   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 4206 Date: 20240614 Time: 053654     sap01-206 ( 50 ms )