02-18-2008 7:04 AM
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?
02-18-2008 7:09 AM
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
02-18-2008 7:29 AM
Hi,
YES. You can use it.
Pls refer to the sample program RSDEMO_DOCKING_CONTROL
Regards,
Renjith Michael.
02-18-2008 7:36 AM
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
09-25-2008 8:05 PM
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
02-18-2008 7:43 AM
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
02-18-2008 7:51 AM
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
02-18-2008 7:59 AM
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
02-18-2008 8:01 AM
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.
02-18-2008 8:11 AM
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
09-25-2008 5:33 PM
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 .
09-25-2008 8:20 PM
Be sure tp pass the screen number and program name while creating the docking container.
09-26-2008 9:23 AM
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 ...