SAP CREATE DATA REFERENCE ABAP Statements

Get Example source ABAP code based on a different SAP table
  



CREATE DATA - REF TO

Short Reference
• REF TO CREATE DATA

ABAP_BASIC_FORM_4 CREATE DATA dref [ area_handle]
TYPE REF TO {type|(name)}.

What does it do? With the TYPE REF TO addition, the CREATE DATA statement creates a reference variable. The reference variables can be specified either directly as type or dynamically in name .

The same type rules apply to the type specification as to the definition of reference types with the TYPES statement. For data reference variables, either the generic data type or a completely specified data type can be specified. For object reference variables, either a class or an interface can be sp ecified.

For name a character-type field can be specified, which has to contain the name of a class, an interface, or a data type when the statement is executed. The name of the reference type in name can also be made in the form of an absolute type name.



Latest notes:The dynamic specification of object types in name
can also be made in lowercase letters.



Example ABAP Coding
Refer to creating
reference variables.

Return to menu