ABAPCREATE_DATA - CREATE DATA
TXBHW - Original Tax Base Amount in Local Currency PERFORM Short ReferenceThis documentation is copyright by SAP AG.
CREATE DATA
Syntax Forms
Determine Data Type Implicitly
1. CREATE DATA dref [area_handle].
Determine Data Type using Predefined ABAP Types
2. CREATE DATA dref [area_handle]
TYPE {abap_type|(name)}
[LENGTH len] [DECIMALS dec].
Determine Data Type using Available Type
3. CREATE DATA dref [area_handle]
{ {TYPE [LINE OF] {type|(name)}}
| {LIKE [LINE OF] dobj} }.
Create Data with Reference to a Type Object
4. CREATE DATA dref [area_handle]
TYPE HANDLE handle.
Create Reference Variables
5. CREATE DATA dref [area_handle]
TYPE REF TO {type|(name)}.
Create 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}]
[INITIAL SIZE n].
Effect
The CREATE DATA statement creates an anonymous data object and assigns the reference to the data object of the dref reference variables.
By default, the data object is created in the internal session of the current program and remains there for as long as it is required. If it is no longer referenced by reference variables, it is deleted by thegarbage collector. The data object can be created as asharedobject using the addition area_handle.
The dref reference variable has to be declared as a data reference variable. The content of a data object that is created with CREATE DATA can only be accessed using dereferenced data variables or field symbols (seeData Objects in Operand Positions).
The data type of the data object that is created can be defined using the TYPE addition and atype specification or with the LIKE addition and the specification of a data object. The syntax permits the dynamic definition of elementary data types, reference types and table types. The HANDLE addition can reference anyRTTS type objects. According to the rules in sectionAssignmentsbetween Data Reference Variables, the static type of the data reference variables has to be more general than the data type of the data object created, or be identical with it.
If a treatable exception occurs as the object is being created, the object is not created and the dref data reference variable retains its previous state.
Notes
Unlike the DATAstatement, CREATE DATA creates the data object at execution time. DATA creates declared data objects when the corresponding program unit is loaded.
- The statement CREATE DATA creates an independent data reference.
Exceptions
Catchable Exceptions
- Cause: Illegal value for the DECIMALS addition.
Runtime Error: CREATE_DATA_ILLEGAL_DECIMALS (catchable) - Cause: Illegal value for the INITIAL SIZE addition.
Runtime Error: CREATE_DATA_ILLEGAL_INIT_SIZE (catchable) - Cause: Illegal value for the LENGTH addition.
Runtime Error: CREATE_DATA_ILLEGAL_LENGTH (catchable) - Cause: The LENGTH addition for a type not equal to c, n, x, or p was used.
Runtime Error: CREATE_DATA_LEN_NOT_ALLOWED (catchable) - Cause: The type specified dynamically in TYPE is not typed completely.
Runtime Error: CREATE_DATA_NOT_ALLOWED_TYPE (catchable) - Cause: The type specific in TYPE is not known.
Runtime Error: CREATE_DATA_UNKNOWN_TYPE (catchable)
Non-Catchable Exceptions
- Cause: The dref variable does not have the correct type.
Runtime Error: CREATE_DATA_REFERENCE_EXPECTED
RFUMSV00 - Advance Return for Tax on Sales/Purchases rdisp/max_wprun_time - Maximum work process run time
This documentation is copyright by SAP AG.
Length: 8889 Date: 20120522 Time: 041515 triton ( 232 ms )






