ABAP Keyword Documentation → ABAP − Short Reference
CREATE DATA - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
CREATE DATA dref [ AREA HANDLE handle ]
[ TYPE { {abap_type|(name)
[LENGTH len] [DECIMALS dec]}
| {[LINE OF] type|(name)}
| {REF TO type|(name)}
| { {{[STANDARD] TABLE}
| {SORTED TABLE}
|{HASHED TABLE}}
OF [REF TO] {type|(name)}
[ {WITH [UNIQUE|NON-UNIQUE]
{KEY {comp1 comp2 ...}|(keytab)}|{DEFAULT KEY}}
| {WITH EMPTY KEY} ]
[INITIAL SIZE n]}
| {HANDLE handle} } ]
| [LIKE { {[LINE OF] dobj}
| {REF TO dobj}
| { {{[STANDARD] TABLE}
| {SORTED TABLE}
|{HASHED TABLE}}
OF dobj
[ {WITH [UNIQUE|NON-UNIQUE]
{KEY {comp1 comp2 ...}|(keytab)}|{DEFAULT KEY}}
| {WITH EMPTY KEY} ]
[INITIAL SIZE n]} } ].
Effect
Creates an anonymous
data object and sets the data reference in dref
to the data object. If
no TYPE
or LIKE
addition is specified, dref
has to be completely typed and this type is used for the data object.
Additions
-
AREA HANDLE handle
Creates a shared object, whereby a reference to an area handle has to be specified inhandle
. -
TYPE
Defines the type by referring to a data type. -
LIKE
Defines the type by referring to a data object. -
abap_type|(name) [LENGTH len] [DECIMALS dec]
Specifies statically or dynamically a predefined elementary data type and defines the length and the number of the fractional portions. -
[LINE OF] type|(name)
Specifies statically or dynamically an already defined data type, andLINE OF
can be used to refer to the row type of an internal table. -
REF TO
Creates a reference variable. -
{[STANDARD] TABLE}|{SORTED TABLE}|{HASHED TABLE}
Creates an internal table, seeDATA
. -
WITH {[UNIQUE|NON-UNIQUE] KEY {comp1 comp2 ...}|(keytab) }|{DEFAULT KEY}
Defines the primary table key, components can be dynamically specified in an internal tablekeytab
. -
WITH EMPTY KEY
Defines an empty primary table key. -
INITIAL SIZE n
Defines the initial memory usage, seeDATA
. -
HANDLE handle
Specifies the data type using ahandle
reference to an RTTS type description object.