Skip to Content

ALV - Full Screen Mode

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 27, 2009 at 05: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

    Add comment
    10|10000 characters needed characters exceeded

    • Naimesh Patel .Subramony A R .Subramony Ramakrishnan

      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

  • Aug 27, 2009 at 05:18 AM

    Is this what you are looking for ?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 27, 2009 at 05:21 AM

    Hello

    Here is else interesting idea

    screen-resolution

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 27, 2009 at 02: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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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