Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV - Full Screen Mode

former_member194669
Active Contributor
0 Likes
9,196

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.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
5,288

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

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.

12 REPLIES 12
Read only

GauthamV
Active Contributor
0 Likes
5,287

Is this what you are looking for ?

Read only

0 Likes
5,287

Gautham,

I tried that resizing option in the container, but its not working , some users with higher resolution , for them screen get shrinked

Read only

Former Member
0 Likes
5,287

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

Read only

0 Likes
5,287

I am using OO with OM SALV class

Read only

Former Member
0 Likes
5,287

Hi,

Check the below program.

SALV_FORM_DEMO_LAYOUTS

Regards

Sunil

Read only

Former Member
0 Likes
5,287

Hello

Here is else interesting idea

Read only

0 Likes
5,287

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)

Read only

uwe_schieferstein
Active Contributor
0 Likes
5,289

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

Read only

0 Likes
5,287

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 ?

Read only

0 Likes
5,287

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

Read only

former_member194669
Active Contributor
0 Likes
5,287

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.

Read only

0 Likes
5,287

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