Application Development 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: 

ALV - Full Screen Mode

former_member194669
Active Contributor
0 Kudos

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

uwe_schieferstein
Active Contributor
0 Kudos

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

12 REPLIES 12

GauthamV
Active Contributor
0 Kudos

Is this what you are looking for ?

0 Kudos

Gautham,

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

Former Member
0 Kudos

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

0 Kudos

I am using OO with OM SALV class

Former Member
0 Kudos

Hi,

Check the below program.

SALV_FORM_DEMO_LAYOUTS

Regards

Sunil

Former Member
0 Kudos

Hello

Here is else interesting idea

0 Kudos

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)

uwe_schieferstein
Active Contributor
0 Kudos

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

0 Kudos

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 ?

0 Kudos

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

former_member194669
Active Contributor
0 Kudos

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.

0 Kudos

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