CALL FUNCTION'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = gt_alv_fieldcat
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_default = 'X'
i_save = 'S'
is_layout = gd_layout
TABLES
t_outtab = i_data.
Assuming you have the user command in your FM for ALV, do the following coding in the user command subroutine, Suppose SAVE is the function code for Save button.
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN'SAVE'.
* Add this code to save the data changes on the ALV grid.
DATA ref1 TYPEREFTO cl_gui_alv_grid.
CALLFUNCTION'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
CALLMETHOD ref1->check_changed_data.
rs_selfield-refresh = 'X'.
* No need to call the screen again, the control will automatically return to the screen with the edited data.
ENDCASE.