Hi,
I assume Your requirement like this .
Hope you activate >
I_GRID_SETTINGS = I_GRID_SETTINGS.
and then check this full code will help you as example.
transferring alv grid data to other program
Otherwise if you only want few editable field,then you can follow this code,which I am using,it is also easy.
a snippet,
CONSTANTS :
gc_refresh TYPE syucomm VALUE '&REFRESH'.
CONSTANTS :
c_x VALUE 'X'.
data: lt_event_exit TYPE slis_t_event_exit,
ls_event_exit TYPE slis_event_exit.
wa_fieldcat-fieldname = 'REMARKS'.
wa_fieldcat-seltext_l = 'Remarks'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-col_pos = 1.
wa_fieldcat-outputlen = 50.
wa_fieldcat-emphasize = 'X'.
wa_fieldcat-key = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR ls_event_exit.
ls_event_exit-ucomm = gc_refresh. " Refresh
ls_event_exit-after = c_x.
APPEND ls_event_exit TO lt_event_exit.
Depend upon your user command like save,refresh it ill work also,like example,
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE sy-ucomm.
WHEN gc_refresh.
refresh it_new_s.
LOOP AT it_new into wa_new where flag eq 'X'.
append wa_new to it_new_s.
ENDLOOP.
it_fieldcat_s[] = it_fieldcat[].
delete it_fieldcat_s where fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND_S'
i_callback_pf_status_set = 'PF_STATUS_SET'
it_fieldcat = it_fieldcat_s
is_layout = wa_layout
it_sort = it_sort
it_event_exit = lt_event_exit
TABLES
t_outtab = it_new_s[].
and
FORM pf_status_set USING ut_extab TYPE slis_t_extab. "#EC CALLED
DELETE ut_extab WHERE fcode = gc_refresh.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
EXCLUDING ut_extab.
ENDFORM.
There are lots of thread on editable alv,check also.
Thanks
Gourav.