Wir wachsen stetig und suchen neue Kollegen (m/w/d)! Schauen Sie sich unsere offenen Position an, um eine passende Herausforderung zu finden!
Defining the data type implicitly
1. CREATE DATA dref $[area_handle$].
Defining the data type using built-in ABAP types
2. CREATE DATA dref $[area_handle$]
TYPE ${abap_type$|(name)$}
$[LENGTH len$] $[DECIMALS dec$].
Defining the data type using an existing type
3. CREATE DATA dref $[area_handle$]
${ ${TYPE $[LINE OF$] ${type$|(name)$}$}
$| ${LIKE $[LINE OF$] dobj$} $}.
Creating data with reference to a type description object
4. CREATE DATA dref $[area_handle$]
TYPE HANDLE handle.
Creating reference variables
5. CREATE DATA dref $[area_handle$]
TYPE REF TO ${type$|(name)$}.
Creating internal tables
6. 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$}$}
$| ${WITH EMPTY KEY$} $]
$[INITIAL SIZE n$].
Create data object with BDEF derived types
11. CREATE DATA dref TYPE (der_type).
The statement CREATE DATA creates an anonymous data object and assigns the reference to the data object of the reference variable dref.
By default, the data object is created in the internal session (heap) of the current program and is preserved there for as long as it is required. If no data references and no field symbols point to the data object or to a part of the data object, it is deleted by the Garbage Collector. The data object can be created as a shared object using the addition area_handle.
The reference variable dref must be declared as a data reference variable. The content of a data object created using CREATE DATA can only be accessed using dereferenced data variables or field symbols (see Data Objects in Operand Positions).
The data type of the created data object can be defined using the addition TYPE and a type specification or using the addition LIKE and a data object specification. The syntax allows the dynamic definition of elementary data types, reference types, and table types. The addition HANDLE can be used to refer to any RTTS type description objects. According to the rules in the section Assignments Between Data Reference Variables, the static type of the data reference variable must be more general than the data type of the created data object, or be identical to it.
If a catchable exception is raised when the object is created, the object is not created and the dref data reference variable keeps its previous state.
Catchable Exceptions
Non-Catchable Exceptions
Wir bieten ganzheitliche SAP-Lösungen aus einer Hand, um den digitalen Wandel zu gestalten und neue Geschäftsfelder zu erschließen.
Schweiz
Schaffhausen
Deutschland
Mannheim, Düsseldorf, München
USA
Haverhill
Griechenland
Thessaloniki