Get Example source ABAP code based on a different SAP table
• REF TO CREATE DATA
CREATE DATA>, REF TO> Short Reference >
ABAP_SYNTAX CREATE DATA dref> $[ area_handle>$]> TYPE REF TO ${type$|(name)$}.>
What does it do? The addition TYPE REF TO> is used by the statement CREATE DATA > to create a reference variable. The static type of the reference variable can be specified either directly as type> or dynamically in name>. When type> is specified, the same rules apply as to the definition of reference types using the statement TYPES>>. For data reference variables, either the generic type data> or a completely specified data type can be specified. For object reference variables, either a class or an interface can be specified. For name>, a character-like field can be specified that must 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 specified as an absolute type name>.
Latest notes: Object types in name> can also be specified dynamically in lowercase letters. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 Creation of an anonymous data object as reference variable of the static type of a class. The dereferenced reference variable can be used to create an object of the class and to access its components. ABEXA 00161 ABAP_EXAMPLE_END