SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Creating Objects and Values → CREATE OBJECT →
CREATE OBJECT oref
Syntax
CREATE OBJECT oref [area_handle] [parameter_list].
Effect
If the TYPE addition is not specified, the oref
object must be a class reference variable. An instance of the class is created that is the static type of the object reference variables. The static type of the class reference variables must not be an
abstract class, and in particular must not be the root class object .
Example
Creation of an instance of a c1 class using an implicit reference to the static type of the reference variables.
CLASS c1 DEFINITION.
...
ENDCLASS.
...
DATA oref TYPE REF TO c1.
...
CREATE OBJECT oref.