I wrote in previous post, you can’t use this class directly without any effort. First of all, the class itself will not display anything if you’ll not create a container for it. The following containers can be used:
- Custom container
- Splitter container
- Docking container
- Dialogbox container
1. Custom container
Custom container can be created with a class CL_GUI_CUSTOM_CONTAINER, but it needs a parent container in which it could be placed or it needs an custom control area to be created in custom screen . This solution is mainly used by me in the applications I develop now. But it’s also common that you’ll mix custom containers with other in one development.
Many persons creates the custom container during the PBO event of the screen that contains custom container area, but you don’t have to do that. You can create it also before calling the screen, like in the simple example of using CL_GUI_CUSTOM_CONTAINER that you can find in Figure 1 and in demo program ZDEMO_AIN_CL01.
Don’t try to find anything in this program, that was not needed just to quickly display the data on the grid. There is no GUI Status, there is no PBO and PAI handling. I did it on purpose just to create really simple example. (As you may read it the abapGit version can differ from here)
Figure 1 ZDEMO_AIN_CL01 example of using CL_GUI_CUSTOM_CONTAINER
Of course in order to be able to display the grid I had to create a SCREEN 0100 which contains custom container area named CC which you can find in Figure 2. The only additional setting for the screen I did was to setup its size to 200 x 255 and I have given the area possibility to resize vertically and horizontally, so it will fit to all screens.