ABAP Keyword Documentation → ABAP - Reference → Creating Objects → CREATE OBJECT
CREATE OBJECT oref
Other versions: 7.31 | 7.40 | 7.54
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.