Skip to Content
avatar image
Former Member

ALV GRID EDITABLE - add row and default values

Hello friends, need your help. Search was failed for me.

When add new row with default value, must be continued handle change. But changes not insert at table "inserted_row", before update base.

P.S. in primer BCALV_EDIT_04, if delete one and only row... next insert row to be without values. This led me to this problem. Excus me, for my English.

What am I doing:

1) Use BCALV_EDIT_04

2) Use primer:

METHOD HANDLE_DATA_CHANGED.
DATA: dl_ins_row TYPE lvc_s_moce. 
FIELD-SYMBOLS: <fs> TYPE table. 


LOOP AT er_data_changed->mt_inserted_rows INTO dl_ins_row.
ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
loop at <fs> into ls_outtab.
ls_outtab-carrid = 'LH'.
ls_outtab-connid = '400'.
ls_outtab-fldate = sy-datum.
MODIFY <fs> FROM ls_outtab INDEX sy-tabix.
endloop.
endloop.
ENDMETHOD. "handle_data_changed

or

3) Use primer:

call method pr_data_changed->modify_cell
              exporting i_row_id    = num_id_row
                        i_fieldname = 'FIELDNAME' 
                        i_value     = 'VALUE'.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 13, 2017 at 06:08 AM

    The issue is that after adding row with default values, user action has labeled how "modified", but not "inserted".

    Add comment
    10|10000 characters needed characters exceeded