Skip to Content
0

ALV GRID EDITABLE - add row and default values

Jul 05, 2017 at 11:13 AM

110

avatar image

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'.
10 |10000 characters needed characters left characters exceeded

You should be making your changes in DATA_CHANGED_FINISHED.

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

1 Answer

Alex Talpis Jul 13, 2017 at 06:08 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded