ABAP Keyword Documentation →  ABAP − Reference →  Creating Objects and Values →  CREATE OBJECT → 

CREATE OBJECT - parameter_list

Short Reference

Syntax

... [EXPORTING  p1 = a1 p2 = a2 ...]
    [EXCEPTIONS exc1 = n1 exc2 = n2 ... [OTHERS = n_others]].


Effect

The additions EXPORTING and EXCEPTIONS are used to pass actual parameters to the instance constructor statically or to assign return codes to non-class-based exceptions.

The syntax and semantics are the same as in the parameter list for static method calls.

Example

The following example illustrates how a dialog box of the Control Framework (CFW) is created and how input parameters are passed to the instance constructor of the global class CL_GUI_DIALOGBOX_CONTAINER. The class is defined implicitly using the static type of the reference variable dialog_box.

DATA dialog_box TYPE REF TO cl_gui_dialogbox_container.

CREATE OBJECT dialog_box
       EXPORTING parent = cl_gui_container=>desktop
                 width  = 1000
                 height = 350.