Skip to content

ABAP Keyword Documentation →  ABAP - Quick Reference 

CREATE OBJECT - Quick reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


CREATE OBJECT oref [AREA HANDLE handle] 
                   [ [TYPE class]
                      [EXPORTING  p1 = a1 p2 = a2 ...]
                      [EXCEPTIONS exc1 = n1 exc2 = n2 ... [OTHERS = n_others]] ]
                 | [ TYPE (name)
                     { [EXPORTING  p1 = a1 p2 = a2 ...]
                      [EXCEPTIONS exc1 = n1 exc2 = n2 ... [OTHERS = n_others]]}
                   | {[PARAMETER-TABLE ptab]
                      [EXCEPTION-TABLE etab]} ].

Effect

Creates an instance of a class and sets the object reference in oref to the object. If the addition TYPE is not specified, oref must be typed with reference to a concrete class and this class is instantiated.

Additions