SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Creating Objects and Values → CREATE DATA →
CREATE DATA - TABLE OF
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}}}
| {EMPTY KEY} ]
[INITIAL SIZE n].
Effect
The statement CREATE DATA uses the addition tabkind OF to create an internal table. The meaning of the additions is the same as when declaring internal tables using the statement DATA, but with special rules for CREATE DATA if dobj is specified after LIKE. The explicit definition of the primary table key is only optional if a standard table is being generated.
Whereas all the specifications for DATA have to be static, the following dynamic specifications can be made for CREATE DATA:
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. The same applies to creating an
empty table key dynamically, since the internal table keytab can only be used to define non-empty keys.
Example
See Creating Tabular Data Objects.