Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Separate CL_GUI_DOCKING_CONTAINER

0 Likes
7,777

Hi all,

I want to separate a CL_GUI_DOCKING_CONTAINER in four parts.

-


-


|

| |----


-


I had done this:


CREATE OBJECT g_container_left
    EXPORTING
      side      = cl_gui_docking_container=>dock_at_left
      extension = 300
      repid     = g_repid
      dynnr     = '1001'
      lifetime  = cntl_lifetime_imode.

  CREATE OBJECT g_container_top
    EXPORTING
      repid     = g_repid
      dynnr     = '1001'
      extension = 200
      side      = cl_gui_docking_container=>dock_at_top.

  CREATE OBJECT g_container_bottom
    EXPORTING
      repid     = g_repid
      dynnr     = '1001'
      extension = 50
      side      = cl_gui_docking_container=>dock_at_bottom.

But I can't get the bottom part inside the left part, I tried this:


CREATE OBJECT g_container_left2
    EXPORTING
      repid     = g_repid
      dynnr     = '1001'
      extension = 50
      side      = g_container_left->dock_at_bottom.

Any idea.

Thanks everyone.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,772

REPORT  z_sourav_splitter.
TYPE-POOLS:cndp.
DATA: docking TYPE REF TO cl_gui_docking_container,
      splitter TYPE REF TO cl_gui_splitter_container.
PARAMETERS: p TYPE char1.
AT SELECTION-SCREEN OUTPUT.
  IF docking IS NOT BOUND.
    CREATE OBJECT docking
      EXPORTING
        repid                       = sy-repid
        dynnr                       = sy-dynnr
        side                        = docking->dock_at_left
        extension                   = 800.
    IF sy-subrc = 0.
      CHECK splitter IS NOT BOUND.
      CREATE OBJECT splitter
        EXPORTING
          link_dynnr        = sy-dynnr
          link_repid        = sy-repid
          height            = 50
          align             = 15
          parent            = docking
          rows              = 2
          columns           = 2.
      IF sy-subrc = 0.

        PERFORM publish using: '1' '1' 'DEMOWORD97SAPLOGO',
                               '2' '1' 'ENJOYSAP_LOGO',
                               '1' '2' 'ENJOYSAP_LOGO',
                               '2' '2' 'DEMOWORD97SAPLOGO'.

      ENDIF.
    ENDIF.
  ENDIF.

FORM publish using l_row type any
                   l_column type any
                   l_logo type W3OBJID.

data: dock_sub_cont TYPE REF TO cl_gui_container,
      url TYPE cndp_url,
      picture_control TYPE REF TO cl_gui_picture.
        CALL METHOD splitter->get_container
          EXPORTING
            row       = l_row
            column    = l_column
          RECEIVING
            container = dock_sub_cont.

        CREATE OBJECT picture_control
          EXPORTING
            parent = dock_sub_cont.

        CALL FUNCTION 'DP_PUBLISH_WWW_URL'
          EXPORTING
            objid                 = l_logo
            lifetime              = cndp_lifetime_transaction
          IMPORTING
            url                   = url
          EXCEPTIONS
            dp_invalid_parameters = 1
            no_object             = 2
            dp_error_publish      = 3
            OTHERS                = 4.
        IF sy-subrc = 0.
          CALL METHOD picture_control->load_picture_from_url_async
            EXPORTING
              url = url.
        ENDIF.
ENDFORM.
11 REPLIES 11
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
3,772

If you want 4 parts inside of the docking container, use a splitter. See the example for splitter in transaction DWDM.

Regards,

Rich Heilman

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,772

Hi Rich,

I was unaware of DWDM till now. You just made my day !!!

BR,

Suhas

PS: I have a gut feeling DWDM is a revised version of SE83. Is it correct ?

Read only

0 Likes
3,772

Hi Sushan, the DWDM transaction was simply a program delivered to illistrate the capabilities of the control framework which was introduced with the "Enjoy" release.

Regards,

Rich Heilman

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,772

Hi Rich,

I am Suhas & not Sushan ... If it comforts you in anyway you are not the first person to re-christen me

Anyways thanks for enlightening us as always ....

Cheers,

Suhas

Read only

0 Likes
3,772

Sorry bout that. Must have went cross-eyed while replying to the post. My apologies.

Regards,

Rich Heilman

Read only

himanshu_gupta13
Product and Topic Expert
Product and Topic Expert
0 Likes
3,772

Dear Rich,

I am very thankful to you to post such a useful transaction DWDM, it's very helpful to learn and use new techniques..

Many Thanks / Himanshu Gupta

Read only

0 Likes
3,772

Hi Rich Heilman,

I'm using cl_gui_docking_container, and I want to can use this option, if it's possible.

Thanks anyway.

Read only

0 Likes
3,772

Hello,

Why do you think this is not possible ?

I modified the demo program to check if we can split a docking container & found the answer:


*&---------------------------------------------------------------------*
*& Report  RSDEMO_DOCKING_CONTROL                                      *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  z_split_docking_cont         .

* Docking Container
DATA docking TYPE REF TO cl_gui_docking_container.

DATA  url(132).

DATA splitter TYPE REF TO cl_gui_splitter_container.
DATA container_1 TYPE REF TO cl_gui_container.
DATA container_2 TYPE REF TO cl_gui_container.
DATA picture_1 TYPE REF TO cl_gui_picture.
DATA picture_2 TYPE REF TO cl_gui_picture.
DATA  init.
DATA ok_code TYPE sy-ucomm.
DATA repid TYPE sy-repid.
DATA dynnr TYPE sy-dynnr.

TYPE-POOLS cndp.

CALL SCREEN 100.

BR,

Suhas

Edited by: Suhas Saha on Apr 19, 2010 10:56 PM

PS: The code i have used as reference is from the demo program RSDEMO_DOCKING_CONTROL & RSDEMO_SPLITTER_CONTROL.

Moderator message - Please respect the 2,500 character maximum when posting. Do not try to get around it with multiple posts.

Edited by: Rob Burbank on Apr 19, 2010 1:41 PM

Read only

0 Likes
3,772

Thanks Rob ... After posting i realised i should have posted only the part dealing with splitting the docking container ...

Read only

Former Member
0 Likes
3,773

REPORT  z_sourav_splitter.
TYPE-POOLS:cndp.
DATA: docking TYPE REF TO cl_gui_docking_container,
      splitter TYPE REF TO cl_gui_splitter_container.
PARAMETERS: p TYPE char1.
AT SELECTION-SCREEN OUTPUT.
  IF docking IS NOT BOUND.
    CREATE OBJECT docking
      EXPORTING
        repid                       = sy-repid
        dynnr                       = sy-dynnr
        side                        = docking->dock_at_left
        extension                   = 800.
    IF sy-subrc = 0.
      CHECK splitter IS NOT BOUND.
      CREATE OBJECT splitter
        EXPORTING
          link_dynnr        = sy-dynnr
          link_repid        = sy-repid
          height            = 50
          align             = 15
          parent            = docking
          rows              = 2
          columns           = 2.
      IF sy-subrc = 0.

        PERFORM publish using: '1' '1' 'DEMOWORD97SAPLOGO',
                               '2' '1' 'ENJOYSAP_LOGO',
                               '1' '2' 'ENJOYSAP_LOGO',
                               '2' '2' 'DEMOWORD97SAPLOGO'.

      ENDIF.
    ENDIF.
  ENDIF.

FORM publish using l_row type any
                   l_column type any
                   l_logo type W3OBJID.

data: dock_sub_cont TYPE REF TO cl_gui_container,
      url TYPE cndp_url,
      picture_control TYPE REF TO cl_gui_picture.
        CALL METHOD splitter->get_container
          EXPORTING
            row       = l_row
            column    = l_column
          RECEIVING
            container = dock_sub_cont.

        CREATE OBJECT picture_control
          EXPORTING
            parent = dock_sub_cont.

        CALL FUNCTION 'DP_PUBLISH_WWW_URL'
          EXPORTING
            objid                 = l_logo
            lifetime              = cndp_lifetime_transaction
          IMPORTING
            url                   = url
          EXCEPTIONS
            dp_invalid_parameters = 1
            no_object             = 2
            dp_error_publish      = 3
            OTHERS                = 4.
        IF sy-subrc = 0.
          CALL METHOD picture_control->load_picture_from_url_async
            EXPORTING
              url = url.
        ENDIF.
ENDFORM.
Read only

0 Likes
3,772

Thanks Sourav Bhaduri ,

Your code resolved my problem, but now I want to specify the dimension of the containers. Is it possible??

Thanks a lot.