08-27-2009 6:13 AM
All,
I have ALV grid using CONTAINER , i need to make it FULL SCREEN mode as per the user screen display resolution.
Any Info ?
PS: Please donot suggest to drag the screen to maximum. that will not work with different screen resolution.
a®
08-27-2009 6:52 AM
Hello
Please have a look at sample report SALV_DEMO_TABLE_SIMPLE:
*&---------------------------------------------------------------------*
*& Form display_fullscreen
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form display_fullscreen .
*... §2 create an ALV table
* §2.2 just create an instance and do not set LIST_DISPLAY for
* displaying the data as a Fullscreen Grid
try.
cl_salv_table=>factory(
importing
r_salv_table = gr_table
changing
t_table = gt_outtab ).
catch cx_salv_msg. "#EC NO_HANDLER
endtry.
*... §3 Functions
*... §3.1 activate ALV generic Functions
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = gr_table->get_functions( ).
lr_functions->set_default( abap_true ).
*... set the columns technical
data: lr_columns type ref to cl_salv_columns.
lr_columns = gr_table->get_columns( ).
lr_columns->set_optimize( abap_true ).
perform set_columns_technical using lr_columns.
*... §4 display the table
gr_table->display( ).
endform. " display_fullscreen
In order to display the list in full-screen do NOT use any container or use a docking container which fills up the entire screen.
Regards
Uwe
08-27-2009 6:18 AM
08-27-2009 6:22 AM
Gautham,
I tried that resizing option in the container, but its not working , some users with higher resolution , for them screen get shrinked
a®
08-27-2009 6:27 AM
Hi,
Check the below programs it will help you.
BCALV_FULLSCREEN_DEMO
BCALV_FULLSCREEN_DEMO_CLASSIC.
let me know if your using oops methodlogy.
regards
Sunil
08-27-2009 6:37 AM
08-27-2009 6:55 AM
08-27-2009 6:21 AM
08-27-2009 6:25 AM
Thanks for your reply,
But how i can change the value sy-scols and sy-srows in the container.in runtime. (as per link u mentioned)
a®
08-27-2009 6:52 AM
Hello
Please have a look at sample report SALV_DEMO_TABLE_SIMPLE:
*&---------------------------------------------------------------------*
*& Form display_fullscreen
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form display_fullscreen .
*... §2 create an ALV table
* §2.2 just create an instance and do not set LIST_DISPLAY for
* displaying the data as a Fullscreen Grid
try.
cl_salv_table=>factory(
importing
r_salv_table = gr_table
changing
t_table = gt_outtab ).
catch cx_salv_msg. "#EC NO_HANDLER
endtry.
*... §3 Functions
*... §3.1 activate ALV generic Functions
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = gr_table->get_functions( ).
lr_functions->set_default( abap_true ).
*... set the columns technical
data: lr_columns type ref to cl_salv_columns.
lr_columns = gr_table->get_columns( ).
lr_columns->set_optimize( abap_true ).
perform set_columns_technical using lr_columns.
*... §4 display the table
gr_table->display( ).
endform. " display_fullscreen
In order to display the list in full-screen do NOT use any container or use a docking container which fills up the entire screen.
Regards
Uwe
08-27-2009 7:03 AM
Uwe,
Thanks for your reply
try.
cl_salv_table=>factory(
importing
r_salv_table = gr_table
changing
t_table = gt_outtab ).
catch cx_salv_msg.
endtry.
If i am using this way, that PF-status NOT getting displayed. How to display PF-status in Full Screen mode ?
a®
08-27-2009 3:28 PM
To bring the PF status in OM SALV you need to :
*... §3 Functions
*... §3.1 activate ALV generic Functions
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = gr_table->get_functions( ).
lr_functions->set_default( abap_true ).
If you already have a PF status than you can try:
o_alv->set_screen_status(
pfstatus = 'SALV_STANDARD'
report = 'SALV_DEMO_TABLE_EVENTS'
set_functions = o_alv->c_functions_all ).
Regards,
Naimesh Patel
08-27-2009 3:42 PM
But that solved the problem up to 95%. I am looking for solution that Toolbar buttons displayed in the grid level and my pf-status to be displayed in the pf-status bar level (1 level upper). But in full screen both toolbar & pf-status will displayed in the same level.
a®
08-27-2009 4:53 PM
In that case, as Uwe suggested you have to use the docking control to generate the ALV
Try like this:
DATA: gt_outtab TYPE TABLE OF sflight.
DATA: gr_table TYPE REF TO cl_salv_table.
DATA: lo_dock TYPE REF TO cl_gui_docking_container,
lo_cont TYPE REF TO cl_gui_container.
DATA: ok_code TYPE sy-ucomm.
START-OF-SELECTION.
*... Select data
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_outtab.
CALL SCREEN 0100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
"* Normal PF
SET PF-STATUS 'SALV_STANDARD' OF PROGRAM 'SALV_DEMO_TABLE_EVENTS'.
CHECK lo_dock IS INITIAL.
CREATE OBJECT lo_dock
EXPORTING
repid = sy-cprog
dynnr = '0100'
ratio = 95
side = cl_gui_docking_container=>dock_at_left.
* name = 'DOCK_CONT'.
IF sy-subrc <> 0.
MESSAGE 'Error in the Docking control' TYPE 'S'.
ENDIF.
lo_cont ?= lo_dock.
*... Create Instance
CALL METHOD cl_salv_table=>factory
EXPORTING
r_container = lo_cont
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = gt_outtab.
"* ALV's PF
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = gr_table->get_functions( ).
lr_functions->set_default( abap_true ).
*... Display table
gr_table->display( ).
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN '&F03' or '&F15' or '&F12'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Regards,
Naimesh Patel