If you follow my blog, then you probably noticed that I'm not keen of SALV class, as it's not editable and you cannot handle all events that you can in cl_gui_alv_grid class. With a small trick you can make your SALV editable and you can handle all the events you want from underlying cl_gui_alv_grid object.
 
What you need to do, is to set handler for event after_refresh for all instances of cl_gui_alv_grid and to force refreshing of SALV just after creation of the object.  Then inside the handler for after_refresh event you can set up handlers for other events just for current instance and you can modify layout or field catalog settings to make it editable.
 
Please check following code to see example of usage:

report zsalv_grid_events.

class lcl_grid_trick definition
  final
  create public .

  public section.
    interfaces if_alv_rm_grid_friend "important

    dataspfli type standard table of spfli,
          salv  type ref to cl_salv_table.

    methodscreate_salv.
    methodsevh_after_refresh for event after_refresh of cl_gui_alv_grid importing sender,
      evh_del_change_selection for event delayed_changed_sel_callback of cl_gui_alv_grid.
  private section.
    datahandler_added type abap_bool.
endclass.

class lcl_grid_trick implementation.
  method create_salv.
    select up to 100 rows into corresponding fields of table @spfli
    from spfli.

    cl_salv_table=>factory(
      importing
        r_salv_table   salv
      changing
        t_table        spfli
    ).

    "Setting handler for event after_refresh for all grids
    set handler evh_after_refresh for all instances.

    "just to triger handler
    salv->refresh).


    data(selectionssalv->get_selections).
    selections->set_selection_mode(   if_salv_c_selection_mode=>cell  )"Single row selection


    salv->display).

  endmethod.
  method evh_after_refresh.
    check handler_added eq abap_false.
    set handler me->evh_del_change_selection for sender.

*    "to use this method you need to inherit from cl_gui_alv_grid or add interface IF_ALV_RM_GRID_FRIEND
*    "to your class
    sender->set_delay_change_selection(
      exporting
        time   =  100    " Time in Milliseconds
      exceptions
        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.

    sender->register_delayed_event(
      exporting
        i_event_id =  sender->mc_evt_delayed_change_select
      exceptions
        error      1
        others     2
    ).
    if sy-subrc <> 0.
    endif.

    sender->get_frontend_fieldcatalog(
      importing
        et_fieldcatalog data(fcat)    " Field Catalog
    ).

    "setting editable fields
    assign fcat[ fieldname 'CARRID' to field-symbol(<fcat>).
    if sy-subrc eq 0.
      <fcat>-edit abap_true.
    endif.

    assign fcat[ fieldname 'CITYFROM' to <fcat>.
    if sy-subrc eq 0.
      <fcat>-edit abap_true.
    endif.

    sender->set_frontend_fieldcatalogit_fieldcatalog fcat ).
    sender->register_edit_event(
      exporting
        i_event_id sender->mc_evt_modified    " Event ID
*      exceptions
*        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.

    sender->set_ready_for_input(
        i_ready_for_input 1
    ).

    handler_added abap_true.
    sender->refresh_table_display(
*      exporting
*        is_stable      =     " With Stable Rows/Columns
*        i_soft_refresh =     " Without Sort, Filter, etc.
*      exceptions
*        finished       = 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.


  endmethod.

  method evh_del_change_selection.
    message i001(00with 'Yupi'.
  endmethod.

endclass.

start-of-selection.

  data(outputnew lcl_grid_trick).
  output->create_salv).

The result output would be like this:
 


Althought you can make it editable or add handlers to cl_gui_alv_grid with this trick, then still there is a problem with using styles of the cells with SALV, and still it's just a trick, so that's why I'll still stay with FALV or standard cl_gui_alv_grid class, but If I would need to enhance existing program then I would take this way into consideration.
 
You can also find an example of usage of this solution on Enno Wulff's blog, he was the one who made me think about such solution, thanks Enno!
 
 
 

Eclipse Plugins for ABAP

ABAP Favorites

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP ADT Extensions

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP Quick Fixes

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client