2008 Oct 13 9:43 AM
Hi. I have questions concerning container
I created a container in which there is grid inside. How to determine container to fit it's Height&Width to grid's Height&Width?
Here the problem is container is giving its own scorll bar and Grid is giving its own scroll bar. It becoming comples to handle two scroller in the screen.
Helpful answers are surely rewarded.
2008 Oct 13 12:34 PM
2008 Oct 13 2:33 PM
Hi Priyanka,
If ur Grid is going to occupy the full screen, then it is not
necessary to create a custom_control in the screen.
Instead u can use the screen as the parent container while
create the ALV grid object.
Hence no two scroll bars..
Check the sample code below...
DATA : go_grid TYPE REF TO cl_gui_alv_grid,
gt_disp TYPE TABLE OF vbak.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module PBO OUTPUT *
*&---------------------------------------------------------------------*
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
SET TITLEBAR '001'.
SELECT * FROM vbak INTO TABLE gt_disp UP TO 30 ROWS.
CREATE OBJECT go_grid
EXPORTING
i_parent = cl_gui_container=>default_screen.
go_grid->set_table_for_first_display( EXPORTING i_structure_name = 'VBAK'
CHANGING it_outtab = gt_disp ).
ENDMODULE. " PBO OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI INPUT *
*&---------------------------------------------------------------------*
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. " PAI INPUTScreen flow logic:
PROCESS BEFORE OUTPUT.
MODULE PBO.
PROCESS AFTER INPUT.
MODULE PAI AT EXIT-command.Cheers,
Jose.
2008 Oct 14 5:49 AM
hi,
alv grid fit in container. container won't give scroll bar.i think you used sub screen. there is more than a container in sap. check which one you used.
2008 Oct 14 5:57 AM
Hi Priyanka,
Check Txcode DWDM.
you will get various examples on the containers which will solve your issue.
Cheers!!
2008 Oct 14 6:06 AM
hi,
you can see 5 type of container in DWDM. you use first type container for alv report, it won't give scroll bar. others gives scroll bar.
2008 Oct 21 8:51 AM
Issue is resolved.
The in Screen Painter the Container Resizing options are not set. If I make them 'Horzontal: 1' and 'Vertical: 1' the container size is automatically resizing to the screens resolutions.
Earlier they are not set. so its taking the entire container co-ordinates(no resizing) so it giving scrolls.
Thanks for all your replies.
2011 Apr 06 12:52 PM
2012 Jun 14 6:59 AM