ABAPCREATE_DATA_ITAB - CREATE DATA ITAB

BAL Application Log Documentation   General Material Data  
This documentation is copyright by SAP AG.

CREATE DATA - TABLE OF

Short Reference



Syntax

CREATE DATA dref [area_handle]
                 { {TYPE [STANDARD]|SORTED|HASHED TABLE OF [REF TO] {type|(name)}}
                 | {LIKE [STANDARD]|SORTED|HASHED TABLE OF dobj} }
                 [WITH [UNIQUE|NON-UNIQUE]
                       {KEY {comp1 comp2 ...}|(keytab)}|{DEFAULT KEY}]

                 [INITIAL SIZE n].

Effect

The addition tabkind OF causes the CREATE DATA statement to generate an internal table. The additions have the same meanings as in the declaration of internal tables with theDATA statement. In particular, the explicit definition of the primary table key is only optional when you generate astandard table.

Whereas all the specifications for DATA have to be static, you can use the following dynamic specifications for CREATE DATA:

  • The row type after TYPE or the static type of a row flagged as a reference variable after TYPEREF TO can have a character-like data object called name. In this case, the same rules apply as in the other variants of CREATE DATA.

  • The definition of the primary table key can specify a parenthesized internal table keytab instead of a static component comp1 comp2 ...:


    ... WITH [UNIQUE|NON-UNIQUE] KEY (keytab) ...


Table keytab must have a character-type data type and must contain the name of a valid component in each row or the identifier table_line for the primary table key in a single row.

  • You can specify a numeric data object for n after INITIAL SIZE.

Note

The definition of the table key is subject to the following conditions in comparison to DATA:

Use Run Time Type Creation instead to create dynamic table types with secondary keys.

Example

Refer to Creating tabular data objects.




PERFORM Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.


Length: 4198 Date: 20120522 Time: 042010     triton ( 152 ms )