Skip to Content
0
Former Member
Aug 31, 2006 at 08:04 AM

ALV grid display enable save button

447 Views

Hi gurus all,

I want to make save button in alv display turns onn, cause now it's gray and i cannot click on it. and i'm using function reuse_alv_grid_display.

i'm included half of my code,

DATA: li_events TYPE slis_t_event,

lwa_events LIKE LINE OF li_events.

REFRESH li_events.

CLEAR lwa_events.

  • Get event

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 4

IMPORTING

et_events = li_events.

  • Set event END_OF_LIST

READ TABLE li_events WITH KEY name = 'END_OF_LIST'

INTO lwa_events.

IF sy-subrc = 0.

lwa_events-form = 'END_OF_LIST'.

MODIFY li_events FROM lwa_events TRANSPORTING form

WHERE name = 'END_OF_LIST'.

ENDIF.

data : ls_variant like disvariant,

gs_layout type slis_layout_alv.

ls_variant-report = sy-repid.

  • Display ALV

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_top_of_page = 'TOP_OF_PAGE'

it_fieldcat = i_fieldcat

is_layout = gs_layout

it_sort = i_sortcat

it_events = li_events

i_save = c_x

is_variant = ls_variant

TABLES

t_outtab = i_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid

TYPE sy-msgty

NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.