Application Development 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: 

Can I use Docking container in Subscreen

Former Member
0 Kudos

Hi Friends,

I have used Docking container in subscreen,its instance is getting created ,but i am unable to view it .

So,can I use docking container in Subscreen?

12 REPLIES 12

Former Member
0 Kudos

Hi,

Yes, you can use the docking container in your subscreen. Because in one of my previous projects for secondary list display i used subscreen with docking container.

Rgds,

Bujji

Former Member
0 Kudos

Hi,

YES. You can use it.

Pls refer to the sample program RSDEMO_DOCKING_CONTROL

Regards,

Renjith Michael.

http://www.sourceveda.com/

0 Kudos

Hi There,

Thanks for the reply.

I know how to use Docking container in normal screen,but I am unable to view it in subscreen.

Can,anyone send an example where docking container is used in subscreen?

Regards,

Anil

0 Kudos

Hello Anil

If you had provided all essential details of your problem earlier you would have received your answer much faster.

The crucial point is that you display your container in a popup which is not a main screen anymore. Therefore, you must tell the container at which dynpro level you are:

main dynpro => level 0 => cl_gui_container=>screen0
1st popup => level 1 => cl_gui_container=>screen1
...

Thus, you coding for the container in the popup needs to look like this:

* Create docking container
  CREATE OBJECT go_docking
    EXPORTING
      parent                      = cl_gui_container=>screen1  " 1st popup
      ratio                       = 90
    EXCEPTIONS
      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.

Regards

Uwe

Former Member
0 Kudos

Hi,

Just create one subscreen and call it in the program inproper place. In the module PBO of this new screen, the same thing you will have to do what you did for your first screen.

IF cl_gui_alv_grid=>offline( ) IS INITIAL.

CREATE OBJECT o_dockingcontainer_2

EXPORTING

ratio = '95'

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.

MESSAGE i010 WITH text-e01."Error in creating Docking container

LEAVE LIST-PROCESSING.

ENDIF.

ENDIF.

CREATE OBJECT o_alvgrid

EXPORTING

i_parent = o_dockingcontainer_2.

And also use SET HANDLER for this second screen also.

Rgds,

Bujji

0 Kudos

Hi Bujji,

Thanks for the reply.

I have created the docking container as u said,and both container and grid instances are created.

But,I am unable to view the container.I am calling this subscreen in a popup,is this one of the affecting factor ?

Regards,

Anil

Former Member
0 Kudos

Hi,

I am calling the screen directly by using the below statement.

CALL SCREEN 9002 STARTING AT 10 5 ENDING AT 80 60.

Rgds,

Bujji

0 Kudos

Hi Bujji,

here is the code is have used for creating docking container.

pls,check it once

IF ref_members_container IS INITIAL.

lt_fldcat = ref_matrix->mt_sxxx_keys.

CREATE OBJECT ref_members_container

EXPORTING

  • PARENT =

  • REPID =

dynnr = c_screen-new_member

side = lc_dock_side

  • extension = 300

  • lifetime = 1 " Life time screen

ratio = '95'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

others = 6.

CREATE OBJECT ref_members_grid

EXPORTING

i_parent = ref_members_container

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

others = 5.

ls_layout-zebra = c_true.

ls_layout-sel_mode = 'A'. " Multiple Selection

CALL METHOD ref_members_grid->set_table_for_first_display

EXPORTING

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • I_CONSISTENCY_CHECK =

  • I_STRUCTURE_NAME =

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

is_layout = ls_layout

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

CHANGING

it_outtab = <lt_keys>

it_fieldcatalog = lt_fldcat

  • IT_SORT =

  • IT_FILTER =

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

ELSE.

CALL METHOD ref_members_grid->tables_display_refresh

CHANGING

it_outtab = <lt_keys>.

ENDIF.

Former Member
0 Kudos

Hi,

When at the time of create object for docking container, the only difference between your code and mycode is, here i am exporting only the field ratio. But in your code you are exporting dynnr and one more field. Apart from these 2 exporting parameters there is no difference. Try to comment these 2 fields when create object.

Rgds,

Bujji

zdenko_necas
Discoverer
0 Kudos

Well, in order to my "fresh" practise, I'm think that it is not possible to use docking container in subscreen (=included screen in another main screen). If you call the constructor of docking container without parameters dynnr and repid (leave it commented), the dock container is created for the main screen and not only in the subscreen area ...

In sample report RSDEMO_DOCKING_CONTROL it's used main screen and not subscreen.

To Buji:

"Hi,

I am calling the screen directly by using the below statement.

CALL SCREEN 9002 STARTING AT 10 5 ENDING AT 80 60."

- this means, that 9002 is "main" screen (which is displayed in popup, but doesn't matter), but it is not a subscreen .

former_member212653
Active Contributor
0 Kudos

Be sure tp pass the screen number and program name while creating the docking container.

zdenko_necas
Discoverer
0 Kudos

Well, i think there is a little "misunderstanding". I'm also need docking container in subscreen, which is attached in another main screen. [So i made the picture, which illustrate the situation.|http://www.globesy.sk/gbs/share/docking.png]

Creation of the docking container is contained in PBO of subscreen 2000 .

The question is - it's is possible to achieve the requested result ? (docking only in subdynpro)? I think not ...