Skip to Content

ALV GRID EDITABLE - add row and default values

Jul 05, 2017 at 11:13 AM


avatar image
Former Member

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:

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.
ENDMETHOD. "handle_data_changed


3) Use primer:

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

You should be making your changes in DATA_CHANGED_FINISHED.

* Please Login or Register to Answer, Follow or Comment.

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".

10 |10000 characters needed characters left characters exceeded