Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8372

Convert custom container into docking container

$
0
0

Hi All,

 

I have a requirement to convert the existing Custom container which contains ALV GRID  into docking container for resizing the GRID display.

 

.Already a docking container exist  with left position with splitter container -top picture and bottom as Tree .Right side of this docking is our Custom container screen which contains  ALV GRID  and some push buttons and text field above ALV GRID and a subscreen area with 5 tabs beneath the ALV GRID.

 

Now i created docking container as right  with splitter but the push buttons and subscreen how can i call into docking area.

 

Should i create docking within container?

 

I provide the my code below.

 

 

 

CREATE OBJECT g_docking_container

      EXPORTING

        repid                       = sy-repid

        dynnr                       = sy-dynnr

        side                        = cl_gui_docking_container=>dock_at_right

        extension                   = 980


      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 l_splitter

       EXPORTING


         parent            = g_docking_container

         rows              = 2

         columns           = 1

       EXCEPTIONS

         cntl_error        = 1

         cntl_system_error = 2

         OTHERS            = 3

           .

    IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.


    CALL METHOD l_splitter->set_border

      EXPORTING

        border = cl_gui_cfw=>true.

    CALL METHOD l_splitter->set_row_mode

      EXPORTING

        mode = l_splitter->mode_absolute.

    CALL METHOD l_splitter->set_row_height

      EXPORTING

        id     = 1

        height = 480.

    CALL METHOD l_splitter->set_column_width

      EXPORTING

        id    = 1

        width = 100.


    l_container_top    =

      l_splitter->get_container( row = 1 column = 1 ).

    l_container_bottom =

      l_splitter->get_container( row = 2 column = 1 ).


    CREATE OBJECT grid2

      EXPORTING

        i_parent          = l_container_top

      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.                               " IF sy-subrc <> 0.

 

With Thanks,

Dina.


Viewing all articles
Browse latest Browse all 8372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>