‎2009 Dec 27 2:18 PM
Hi All,
Hope all are fine !!!
I am using custom container ( cl_gui_custom_container ) to create an alv.
Now the blocking point is with the height and widtht of container i.e., the container's widtht & height are fitting properly according the layout size .
Any soln's to fix the above are highly appreciated
Thanks in advance
Jack
‎2009 Dec 27 3:22 PM
You can set the size on the screen, where you have put the custom controll?
Is this your question
‎2009 Dec 27 11:05 PM
you should go to the screen painter, then set up resolution of canvas for 200/240 [rows, cols]. Save it, then change the size for elements (custom control in case of ALV). Now, the tricky part. Go to the attributes of element, allow the horizontal and vertical size change, and set it for some small value , like 5 & 5.
Now the element will adjust itself to the resolution of screen withou using a scroll bars.
‎2010 Jan 09 10:30 PM
Hi jack,
I do not have a real solution. You want to create the container just the right size for the grid.
If the grid is static without column width optimization, you can get the output length Iin characters) of all fields from the field catalog, divide it by an experimental determined pixels per character and add a constant for the frame. Still this is not more than an approximization. And you will run into trouble if the user has scaled down his screen width (find out by checking sy-scols multiplied by some 8 or so pixels) .
I think there shouls be a better way but I don't know.
Regards,
Clemens