Hi,
You can use R/3 Central Basis Development: Application Log
Have a look at program SBAL_DEMO_CONTROL_SIMPLE .
When using CALL FUNCTION 'BAL_CNTL_CREATE' .
You can specify i_container that can be cl_gui_custom_container .
Some code:
FORM at_pbo .
STATICS: control_handle TYPE balcnthndl .
IF ob_gui_custom_container_1 IS INITIAL .
CREATE OBJECT ob_gui_custom_container_1
EXPORTING
container_name = 'OB_GUI_CUSTOM_CONTAINER_1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc NE 0 .
ENDIF.
DATA: st_display_profile TYPE bal_s_prof.
CALL FUNCTION 'BAL_DSP_PROFILE_NO_TREE_GET'
IMPORTING
e_s_display_profile = st_display_profile.
CALL FUNCTION 'BAL_CNTL_CREATE'
EXPORTING
i_container = ob_gui_custom_container_1
i_s_display_profile = st_display_profile
IMPORTING
e_control_handle = control_handle
EXCEPTIONS
profile_inconsistent = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE .
CALL FUNCTION 'BAL_CNTL_REFRESH'
EXPORTING
i_control_handle = control_handle
EXCEPTIONS
control_not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF .
ENDFORM . "at_pbo
Result:
Regards.