ABAPDATA_ITAB - DATA ITAB

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.

DATA - TABLE OF

Short Reference



Syntax

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, table kind STANDARD TABLE, SORTED TABLE, or HASHEDTABLE and the initial memory size INITIAL SIZE corresponds exactly to the definition of table kinds in the section TYPES - TABLEOF. Using DATA, these additions generate 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 administration entry for an internal table is generated. The actual table rows are not inserted until runtime.

  • Obsolete declaration variants for standard tables are described underObsoleteDeclarations. In particular, the use of the WITHHEADER LINE and OCCURS additions is now obsolete.

  • When an internal table is defined, the start value after the VALUE addition must be IS INITIAL.


Example

Declaration of an internal hash table. The line type corresponds to the structure of database tableSPFLI. For the primary table key, two key fields are defined. The other statements demonstrate how the table is filled with lines from database tableSPFLI and how a line is read.

DATA: spfli_tab TYPE HASHED TABLE OF spfli
                WITH UNIQUE KEY carrid connid,
      spfli_wa  LIKE LINE OF spfli_tab.

SELECT *
       FROM spfli
       INTO TABLE spfli_tab
       WHERE  carrid = 'LH'.

READ TABLE spfli_tab
           WITH TABLE KEY carrid =  'LH' connid =  '0400'
           INTO spfli_wa.

           ...


Addresses (Business Address Services)   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.


Length: 5131 Date: 20120522 Time: 043532     triton ( 112 ms )