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

ALV

Former Member
0 Likes
534

Hi Folks,

What is the purpose of docking container?

Thanks in advance

Ravi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
493

Hi,

Docking container allows us to attach one or more areas to a screen.Container is docked at one edge of the screen.

They are specific by their characteristic that they don’t need a dynpro screen control to open in, and they don’t float freely like dialogbox containers.They rather “dock” at specified side of a screen. In their constructor, it’s possible to define their size and docking side (left, right, top or botton). Class: CL_GUI_DOCKING_CONTAINER is used for docking containers.

The difference between the docking and custom container is:

In docking container there is no need to drag and drop the container in the screen painter. The container will get created during run time.

In Custom container,we will be placing the container control.

<b>See the below BLOG</b>about the Docking container

/people/igor.barbaric/blog/2006/05/03/oo-abap-and-design-patterns-3-docking-containers-controller

Regards,

Beejal

**Reward if this helps

2 REPLIES 2
Read only

Former Member
0 Likes
494

Hi,

Docking container allows us to attach one or more areas to a screen.Container is docked at one edge of the screen.

They are specific by their characteristic that they don’t need a dynpro screen control to open in, and they don’t float freely like dialogbox containers.They rather “dock” at specified side of a screen. In their constructor, it’s possible to define their size and docking side (left, right, top or botton). Class: CL_GUI_DOCKING_CONTAINER is used for docking containers.

The difference between the docking and custom container is:

In docking container there is no need to drag and drop the container in the screen painter. The container will get created during run time.

In Custom container,we will be placing the container control.

<b>See the below BLOG</b>about the Docking container

/people/igor.barbaric/blog/2006/05/03/oo-abap-and-design-patterns-3-docking-containers-controller

Regards,

Beejal

**Reward if this helps

Read only

Former Member
0 Likes
493

hi,



ALV Grid control is based on the custom controls on the screen. When the program is scheduled in background, it tries to create GUI related front-end objects and hence the error “Fatal Error – GUI cannot be reached”. This type of problem is common with all the programs that use the ALV grid control to display the output.


Whenever we execute this type of programs in background, we should be passing a blank docking container instead of the custom container as parent to our grid control.

The docking container doesn’t need any of the custom controls on the screen; instead it attaches an area to any or all of the four edges of the screen (top, left, right or bottom). The behavior of the areas in the container is determined by the sequence in which they are initialized. Docking Containers are attached to the screen from the inside out. This means that when you create a second container, it is attached to the edge of the screen, and the container that was already there is pushed outwards.



·

Define a docking container in the program

data: or_doc type ref to cl_gui_docking_container .

·

At the time of creating a custom container, check if the program is being executed in background or foreground. If the program is scheduled in background, then create a docking container instead of custom container.



+if cl_gui_alv_grid=>offline( ) is initial.

create object or_custom_container

exporting container_name = c_container.

create object or_grid

exporting i_parent = or_custom_container.

else .

create object or_grid

exporting i_parent = or_doc .

endif . +

Now test executing the program in background. The report would be generated.

regards,

Naresh.