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: 

Embedding a screen in a docking container - Is it possible at all??

Former Member
0 Kudos

I am working on a screen design similar to SE80, where I will be required to display a tree structure in screen say '0100' to the left of the screen and upon node_double_click event, I should be able to bring up another screen '0200' on to the right side with out navigating away from the screen 0100.

I have a custom control in my initial screen 0100, covering the full area, and I am instantiating the docking container object in the node_double_click handler method of the tree control. I have passed sy-repid and dynpro number '0200' but to no avail.

The following is the code sample.

IF docking_right IS INITIAL.

CREATE OBJECT docking_right

EXPORTING

repid = g_repid

dynnr = '0200'

side = cl_gui_docking_container=>dock_at_right

extension = 900.

ENDIF.

I have gone through many posts in this forum but none of them have a definitive indication if that can be possible, that is why I had to create this new thread. I will be glad if any of you could let me know if there is way accomplishing this.

Thanks in advance,

Raghu.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate

You can not embed a dynpro(screen) inside of a control container. The input field in SE80, which appears to be a screen is not really a screen in ABAP, it is actually an HTML control which is made to look like a screen. So to answer your question, no you can not embed a dynpro in a control container. There is no way to do this.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate

You can not embed a dynpro(screen) inside of a control container. The input field in SE80, which appears to be a screen is not really a screen in ABAP, it is actually an HTML control which is made to look like a screen. So to answer your question, no you can not embed a dynpro in a control container. There is no way to do this.

Regards,

Rich Heilman

MarcinPciak
Active Contributor

Hi Raghu,

Create main screen, say 0100. Do not place there customer container control, instead use subscreen area . This will be used to display your 0200 screen (note! its attribute must be set to subscreen ).

Now in PBO of 0100 screen place your docking container residing on the left hand side. Do not provide repid neither dynnr parameters. System will automatically use the one which you are in.

Next in same PBO of 0100 place your subscreen in the screen flow logic


PROCESS BEFORE OUTPUT.
   MODULE placing_my_docking_container.
   CALL SUBSCREEN  your_subscreen_area INCLUDING '0200'.  

In class where you handle your double_click event set any details you want and send it to screen 0200.

Now when the screen is displayed (you can initialize it in PBO) it will display the details you set previously.

That should suffice.

As for your subject - No! You can't never place screen inside any of GUI control. You do oposite thing - always placing GUI control inside the screen. Using the subscreen technique you can, however, achieve very complicated screens with different subscreens displayed at the same time different GUI controls. All is placed then on one main screen (i.e. 0100). I hope you get an idea now.

Regards

Marcin

0 Kudos

Thanks Rich and thanks Marcin for your responses. while I understand that we can use docking container either to the right or left, I have infact already used the custom container to the left of my screen where I have the tree because the tree needs to be constantly visible. I was specifically interested in exploring the option (if any) of combining conventional controls and the new GUI controls because I am trying to get to a scenario where I should be able create conventional controls like list boxes and buttons dynamically based on user actions.

One of way of accomplishing this could be, if we have a docking container that can take a screen, we can accomplish the above requirement by splitting the docking container endlessly and embedding a screen that has the group of list boxes and buttons that we need. Ironically the constructor of docking container supports repid and dynpro for no apparent utility.

Thank you once again for your kind response.

0 Kudos

Hi Raghu,

I was specifically interested in exploring the option (if any) of combining conventional controls and the new GUI controls because I am trying to get to a scenario where I should be able create conventional controls like list boxes and buttons dynamically based on user actions. .

For GUI controls you always need some container which is a "bridge" b/w control created in program and the screen. For standard dialogs you don't need such container. You just place them on the screen. Therefore you can combine these techniques by simply placing a container (which you already have and will use for tree control). The rest of the screen area can be used by standard controls (listoboxes, i/o fields etc). This way standard controls would be statically set, whereas container would store GUI control assinged dynamically in program.

If, on the other hand, you want both controls and GUI controls be dynamically determined, just keep you container (for GUI control) and create a subscreen area where you dynamically swap different screens. These screen must be set as subscreens and must have statically defined layout, thus only determination of the screen to be displayed is dynamic here.

Anyhow, there is no way to dynamically set standard controls on the screen. You could, however in turn switch them on/off in PBO (based on certain conditions) but this would require placing all the possible controls and just hiding/showing them. No replacment is then possible, so image empty gaps which this approach would produce.


Ironically the constructor of docking container supports repid and dynpro for no apparent utility.

As I said, container is used only to place some GUI control in it and then send this entire package (container+ GUI control) to appropriate place on the screen. That's why in container's constructor there is both repid and dynpro. These only determine where this container should be attached.

Regards

Marcin

0 Kudos

That is exactly how my present design is! turns out that there isn't much choice here

Thanks for clearing the air surrounding repid and dynpro in docking container, Marcin!

Have a nice day!