SAP CREATE OBJECT PARA TABLES ABAP Statements
Get Example source ABAP code based on a different SAP table
CREATE OBJECT -
• PARAMETER-TABLE CREATE OBJECT
• EXCEPTION-TABLE CREATE OBJECT
ABAP Syntax
[EXCEPTION-TABLE etab].
What does it do? The
These additions can be used only if the instantiated class is specified dynamically in
The syntax and semantics are the same as those that apply to dynamic method calls using the statement
Example ABAP Coding
The following example illustrates how a dialog box of
exc_ref TYPE REF TO cx_root.
DATA: class TYPE string VALUE `CL_GUI_DIALOGBOX_CONTAINER`,
ptab TYPE abap_parmbind_tab.
ptab = VALUE #( ( name = 'PARENT'
kind = cl_abap_objectdescr=>exporting
value = REF #( cl_gui_container=>desktop ) )
( name = 'WIDTH'
kind = cl_abap_objectdescr=>exporting
value = REF #( 1000 ) )
( name = 'HEIGHT'
kind = cl_abap_objectdescr=>exporting
value = REF #( 300 ) ) ).
TRY.
CREATE OBJECT container TYPE (class)
PARAMETER-TABLE ptab.
CATCH cx_sy_create_object_error INTO exc_ref.
MESSAGE exc_ref->get_text( ) TYPE 'I'.
ENDTRY.
Return to menu