Code: Alles auswählen.
DATA : lo_container TYPE REF TO cl_gui_container,
l_screen LIKE sy-dynnr,
lo_grid TYPE REF TO cl_gui_alv_grid,
lo_control TYPE REF TO cl_gui_custom_container.
CREATE OBJECT lo_control
EXPORTING
* parent =
container_name = 'TEST_CONTAINER'
* STYLE =
* LIFETIME = lifetime_default
* REPID =
* DYNNR =
* NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6
.
l_screen = '0200'.
CREATE OBJECT LO_CONTAINER
EXPORTING
CLSID = SPACE
PARENT = lo_control
* STYLE =
DYNNR = l_screen
REPID = sy-repid
* CONTAINER_NAME =
* LIFETIME = lifetime_default
* AUTOALIGN =
NO_AUTODEF_PROGID_DYNNR = 'X'
* NAME =
* EXCEPTIONS
* CNTL_ERROR = 1
* CNTL_SYSTEM_ERROR = 2
* CREATE_ERROR = 3
* LIFETIME_ERROR = 4
* LIFETIME_DYNPRO_DYNPRO_LINK = 5
* LIFETIME_DYNPRO_ILLEGAL_PARENT = 6
* others = 7
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.