1 1 1 1 1 Rating 0% (0 Votes)
Tags: FALV
The latest version of each part of FALV can be found on github repository https://github.com/fidley/falv which you can use in abapGit for easier up to date handling. 
 
There are 3 ways to make your grid editable, you can set whole grid editable in layout, some columns in field catalog and some cells in cells style table. This demo shows it all.

"! This is demo for FALV with edit settings
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv11.

typesbegin of t_sflight.
        include type sflight.
types:  styles type lvc_t_styl,
        end of t_sflight.

datasflight type standard table of t_sflight.


parametersp_whole  radiobutton group gr1 default 'X',
            p_column radiobutton group gr1,
            p_cell   radiobutton group gr1.


start-of-selection.


  select up to 100 rows
  into corresponding fields of table @sflight
  from sflight.

  "FALV creation with only table passed
  data(falvzcl_falv=>createchanging ct_table sflight ).

  "Add title variable
  falv->title_v1 'ZDEMO_FALV11'.

  if p_whole eq abap_true.
    "set whole grid editable
    falv->layout->set_editabap_true ).
  elseif p_column eq abap_true.
    falv->column'SEATSMAX' )->set_editabap_true ).
    falv->column'PLANETYPE' )->set_editabap_true ).
  else.
    "Set style column name
    falv->layout->set_stylefname'STYLES' ).
    do 20 times.
      falv->set_cell_enabled(
        exporting
          iv_fieldname 'FLDATE'
          iv_row       * sy-index
          ).
    enddo.
  endif.

  "Change grid to edit mode
  falv->set_editableiv_modify abap_true ).

  "Display full screen grid
  falv->display).

Video with demo results