OOPS ABAP REPORT ON DOCKING CONTAINER

*&---------------------------------------------------------------------*
*& Report  ZDOCKING
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

**************************************************************************
"Docking Container allows us to attach a control to any of the four edges of a screen as a resizable screen area. You can also detach it so that it becomes an independent modal dialog box. Class: CL_GUI_DOCKING_CONTAINER 
********************************************************************************
 

REPORT ZDOCKING.

DATADOCK_CONTAINER TYPE REF TO CL_GUI_DOCKING_CONTAINER" DECLRARTION FOR CONTAINER
      DISPLAY TYPE REF TO CL_GUI_ALV_GRID"DECLARATION FOR DISPLAY
      IT_MKPF TYPE TABLE OF MKPF" INTRNAL TABLE FOR MKPF

START-OF-SELECTION.
" USING SCREEN 529 CREATE A DOCKING CONTAINER AND
" ASSIGN NAME AS DOCK_CONTAINER
CALL SCREEN 529.

 
*&---------------------------------------------------------------------*
*&      Module  STATUS_0529  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0529 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.
PERFORM CREATE_OBJECTS" OBJECTS CREATION
PERFORM GET_MKPF.       " FETCHING DATA FROM MKPF
PERFORM DISPLAY_MKPF.   " DISPLAYING MKPF DATA
ENDMODULE.                 " STATUS_0529  OUTPUT
*&---------------------------------------------------------------------*
*&      Form  CREATE_OBJECTS
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM create_objects .
  CREATE OBJECT dock_container
    EXPORTING
*      parent                      =
*      repid                       =
      dynnr                       '529'
      side                        DOCK_CONTAINER->DOCK_AT_RIGHT
      extension                   400
*      style                       =
*      lifetime                    = lifetime_default
*      caption                     =
*      metric                      = 0
*      ratio                       =
*      no_autodef_progid_dynnr     =
*      name                        =
*    EXCEPTIONS
*      cntl_error                  = 1
*      cntl_system_error           = 2
*      create_error                = 3
*      lifetime_error              = 4
*      lifetime_dynpro_dynpro_link = 5
*      others                      = 6
      .
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CREATE OBJECT display
    EXPORTING
*      i_shellstyle      = 0
*      i_lifetime        =
      i_parent          DOCK_CONTAINER " CONTAINER NAME
*      i_appl_events     = space
*      i_parentdbg       =
*      i_applogparent    =
*      i_graphicsparent  =
*      i_name            =
*      i_fcat_complete   = SPACE
*    EXCEPTIONS
*      error_cntl_create = 1
*      error_cntl_init   = 2
*      error_cntl_link   = 3
*      error_dp_create   = 4
*      others            = 5
      .
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.



ENDFORM.                    " CREATE_OBJECTS
*&---------------------------------------------------------------------*
*&      Form  GET_MKPF
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM get_mkpf .
SELECT FROM MKPF
  INTO TABLE IT_MKPF UP TO 500 ROWS.
ENDFORM.                    " GET_MKPF
*&---------------------------------------------------------------------*
*&      Form  DISPLAY_MKPF
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM display_mkpf .
 CALL METHOD display->set_table_for_first_display
   EXPORTING
*     i_buffer_active               =
*     i_bypassing_buffer            =
*     i_consistency_check           =
     i_structure_name              'MKPF'
*     is_variant                    =
*     i_save                        =
*     i_default                     = 'X'
*     is_layout                     =
*     is_print                      =
*     it_special_groups             =
*     it_toolbar_excluding          =
*     it_hyperlink                  =
*     it_alv_graphics               =
*     it_except_qinfo               =
*     ir_salv_adapter               =
   CHANGING
     it_outtab                     IT_MKPF
*     it_fieldcatalog               =
*     it_sort                       =
*     it_filter                     =
*   EXCEPTIONS
*     invalid_parameter_combination = 1
*     program_error                 = 2
*     too_many_lines                = 3
*     others                        = 4
         .
 IF sy-subrc <> 0.
*  Implement suitable error handling here
 ENDIF.


ENDFORM.                    " DISPLAY_MKPF



OUTPUT: