Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV GRID EDITABLE - add row and default values

former_member570893
Discoverer
0 Kudos

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'.
2 REPLIES 2

former_member570893
Discoverer
0 Kudos

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

former_member182550
Active Contributor
0 Kudos

You should be making your changes in DATA_CHANGED_FINISHED.