Skip to Content
0
Former Member
Sep 09, 2009 at 04:48 PM

OO ALV , sort order screen missing save icon

87 Views

Hello all,

The following code creates an ALV on a selection screen, 1001. When the ALV is displayed and the sort order screen is presented, the save icon is missing. Does anyone know why?

Thanks

Bruce

 
INCLUDE rsdbc1xx.      " selection screen stuff
DATA: l_alv      TYPE REF TO   cl_gui_alv_grid,
      lt_sflight TYPE TABLE OF sflight.

DATA: lt_exclude  TYPE STANDARD TABLE OF syucomm.
PARAMETERS: p_nuthin AS CHECKBOX.

SELECTION-SCREEN BEGIN OF SCREEN 1001.
SELECTION-SCREEN END   OF SCREEN 1001.
 * events at selection-screen output.
 *
AT SELECTION-SCREEN OUTPUT.
*
  IF sy-dynnr = '1001'.
    current_scr-mode = 'S'.
*                                        disable functions:
    APPEND 'SPOS' TO current_scr-excl.
    APPEND 'SCRH' TO current_scr-excl.
    APPEND 'ONLI' TO current_scr-excl.    "Online execution
*    APPEND 'PRIN' TO current_scr-excl.   "Execute and print
  ENDIF.
*
 *  IF sy-tcode EQ 'ZZREPORT'. " Replace with your own transaction code
*

*
START-OF-SELECTION.
*
  SELECT * FROM sflight INTO TABLE lt_sflight.
* Creation of the ALV object, when we use cl_gui_container=>screen0 as
* parent, the ALVGrid control will automatically use the full screen to
* display the grid, NO CONTAINER DEFINITION IS REQUIRED !
*
  CREATE OBJECT l_alv EXPORTING i_parent = cl_gui_container=>screen0.
*
*  Set layout options:
 data: w_LVC_S_LAYO type LVC_S_LAYO.
*
  w_LVC_S_LAYO-zebra      = 'X'.
  w_LVC_S_LAYO-sel_mode   = 'D' .             "  D = cell selection
  w_LVC_S_LAYO-GRID_TITLE =
     'Grid title - 60 characters maximum'.
*
* calling the display of the grid, the system will automatically create
* the fieldcatalog based on the table name you pass in parameter
*
  CALL METHOD l_alv->set_table_for_first_display
    EXPORTING
      i_bypassing_buffer = 'X'
      is_layout          = w_LVC_S_LAYO
      i_structure_name   = 'SFLIGHT'
    CHANGING
      it_outtab          = lt_sflight.
*
*
* You have to create an EMPTY screen, put NOTHING in the layout and
* this is going to work
    CALL SELECTION-SCREEN 1001.

Edited by: Bruce Tjosvold on Sep 9, 2009 1:20 PM

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code. I removed some unneeded comments

Edited by: Rob Burbank on Sep 9, 2009 1:30 PM