Hey guys,
in the SAP Case Management environment SAP offers the possiblity to define customer specifc "subcomponents". A subcomponent is basically a certain part on the screen.
For the implementation you get a reference to a GUI container (im_container TYPE Ref To CL_GUI_SIMPLE_CONTAINER). Customers can now easily add for example an ALV table by using the defined container.
In my situation I want to display a dynpro with several tabstrips on it so I thought of a carrier dynpro attached to the GUI container using docking container.
Is this possible at all? My code looks like this:
DATA lr_gui_docking TYPE REF TO cl_gui_docking_container. CREATE OBJECT lr_gui_docking EXPORTING parent = im_container repid = 'ZHG01' dynnr = '0200' EXCEPTIONS cntl_error = 1 cntl_system_error = 2 create_error = 3 lifetime_error = 4 lifetime_dynpro_dynpro_link = 5 OTHERS = 6.
I get a runtime exception ("CNTL_ERROR"). Debugging in system debug mode shows that the exception is thrown at the end of method "GET_FRAME_CONTAINER":
METHOD GET_FRAME_CONTAINER. DATA: PARENTID TYPE I. * CALL 'DY_GET_MODAL_LEVEL' ID 'MOD_LEV' FIELD PARENTID. * CALL 'DY_GET_MODAL_LEVEL' ID 'MOD_LEV_UI' FIELD PARENTID. * CALL 'DY_GET_MODAL_LEVEL' ID 'ACT_UI_MOD_LEV' FIELD PARENTID. IF CONTAINER IS INITIAL. CALL 'DY_GET_MODAL_LEVEL' ID 'ACT_UI_MOD_LEV' FIELD PARENTID. ELSEIF CONTAINER->H_CONTROL-SHELLID = -1. CALL 'DY_GET_MODAL_LEVEL' ID 'ACT_UI_MOD_LEV' FIELD PARENTID. ELSE. PARENTID = CONTAINER->H_CONTROL-SHELLID. ENDIF. IF PARENTID BETWEEN 10 AND 19. " this are the dynpro areas PARENTID = PARENTID - 10. " now its the corresponding frame ENDIF. data: new_dummy_parent_container type ref to CL_GUI_CONTAINER. IF PARENTID BETWEEN 0 AND 9. " CREATE OBJECT DUMMY_PARENT_CONTAINER " EXPORTING CLSID = SPACE. " DUMMY_PARENT_CONTAINER->H_CONTROL-SHELLID = PARENTID. " FRAME_CONTAINER = DUMMY_PARENT_CONTAINER. CREATE OBJECT NEW_DUMMY_PARENT_CONTAINER EXPORTING CLSID = SPACE. NEW_DUMMY_PARENT_CONTAINER->H_CONTROL-SHELLID = PARENTID. FRAME_CONTAINER = NEW_DUMMY_PARENT_CONTAINER. ELSEIF PARENTID = 99. FRAME_CONTAINER = CONTAINER. ELSE. IF CONTAINER_MUST_BE_TOPLEVEL = 0. FRAME_CONTAINER = CONTAINER. ELSE. RAISE CNTL_ERROR. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "DUMP!! ENDIF. ENDIF. ENDMETHOD.
I have no idea what this could mean.
Variables during runtime:
PARENTID is set to "181"
CONTAINER_MUST_BE_TOPLEVEL is set to "1"
Any ideas?
Thanks in advance,
Hendrik
first of all you should pass only REPID and DYNNR (no parent container for a docking)
then I am not sure at all that you will be able to display a dynpro inside the docking container
the normal way to include dynpros is the subscreen and afaik there is no way to put it into a graphical control
Hi François,
you're right. I think I missunderstood the sense of a docking container and it is simply not possbile. I also couldn't locate any reference implementations in the SAP standard for this. To sum up I think that only subclasses of "CL_GUI_CONTROL" can be used to work in a container like the ALVs, pictures or text edit controls.
Hendrik
Dynpros, subscreen and all other elements at screen painter are named 'classical controls'
and CL_GUI controls are object oriented controls that have 1-1 proxies at SAP server.
Classical controls handled by system internally.So they are limited according to CL_GUI controls -for me.
Last sentence: You are right, there is no way to mix these two concepts.
I newly learned this truth like you ![]()
I think SAP really needs to build an object oriented GUI/dynpro for all purposes. It should not be impossible to simply build an CL_GUI_DYNPRO_CONTAINER class, which would be a good start for a transition. Hell, I would do it myself, if they would give me their kernel and GUI sources (and maybe pay me for it).
Sorry, I know this is not helpful for the topic/question in any way, but I see posts like this for years now, and nothing is ever changing on this front - it's kinda frustrating.