‎2009 Sep 13 1:32 PM
Hello,
Everytime I need a screen with more than 1 ALV, I do as follows:
1 - I define one custom container for each ALV;
2 - In my program, I create one object of class CL_GUI_CUSTOM_CONTAINER for each ALV;
3 - For each ALV, I create one object of class CL_GUI_ALV_GRID. For each of these objects, I assign one of the parents created in 2;
So far so good - with this technique I can easily have multiple ALV screens, make ALV's dependent on each other, etc.
My problem is as follows:
- I need to change the screen appearence in my program (typically size and position of the ALV's);
- I tried to use the methods of class CL_GUI_CUSTOM_CONTAINER that seem to be appropriate (SET_HEIGHT, SET_LEFT, etc), but nothing seems to happen:
Example:
CALL METHOD gr_ccontainer1->set_height EXPORTING height = 200.
I would appreciate any help,
Regards,
Joao
‎2009 Sep 14 8:34 PM
You can use the Splitter Container of type CL_GUI_SPLITTER_CONTAINER to put your ALVs on the screen. This Splitter container has some methods which can be used to set the height / width of the container.
Regards,
Naimesh Patel
‎2009 Sep 13 8:52 PM
Doesn't work for me too. I guess they don't work. I never saw sap using that too. The sap library only talks about get_height and get_width.
Anyway, even if you could change it, as the containers have fixed positions in the dynpro, you could only change the position of the inner controls there would be some blanks all around, the effect would not be much better than what it is currently.
A better solution is to use splitter containers, you can define the size of the panels (set_column_width, set_row_height).
‎2009 Sep 13 9:02 PM
Hello Joao
If the ALV grids are the only elements on your screen (i.e. you do not need any additional input / ouput fields) then I never use a custom container. Instead, I always use a docking container which fills the entire screen. The docking container becomes the parent for a splitter container whose cells (= CL_GUI_CONTAINER) are eventually filled with ALV grid instances.
Regards
Uwe
‎2009 Sep 14 8:34 PM
You can use the Splitter Container of type CL_GUI_SPLITTER_CONTAINER to put your ALVs on the screen. This Splitter container has some methods which can be used to set the height / width of the container.
Regards,
Naimesh Patel
‎2009 Sep 18 6:38 PM
Thank you all for your quick replies, they've all been very helpful. Unfortunately I can only award points to one person.
Regards,
Joao
‎2009 Sep 18 9:04 PM
Hi Joao, could you give a feedback (how you solved, advices for other people who will have the same question...)
By the way, why can't you give points to other people, this is allowed !
‎2009 Sep 19 7:28 PM
Hi Sandra,
Thank you for the tip about the poins, I'll try to correct that, if it is still possible. About the question, I confess that I didn't test the solution with the splitter. Nevertheless, I decided to close the question - I believe that following the tips I'll get somewhere:-)
In fact, trying to resize the ALVs was just a first step towards the final result that I want: to resize the objects in a (ABAP) screen according to the screen resolution. Because time is short I decided not to continue for now, and I used my normal approach:
- Defining a screen for the worst resolution in the project;
- Designing custom containers (that now I know cannot change in size in runtime);
- Attacching my ALVs to these custom containers;
Regards,
Joã