ALV: changing internal table in data_changed event.
I use OO ALV with editable columns, so I handle data_changes event to check the data, entered in ALV by user.
I need to change data in some other cells, connected with changed.
Chahging internal table directly doesn't work here.
With the cells in the same row method er_data_changed->modify_cell works fine, but now I need to change data in rows, that haven't been touched upon the changing.
LOOP AT er_data_changed->mt_mod_cells INTO ls_cell. READ TABLE gt_bul ASSIGNING <fs_bul> INDEX ls_cell-row_id. CHECK sy-subrc = 0. CASE ls_cell-fieldname. WHEN 'EXTBULNR'. LOOP AT gt_bul ASSIGNING <fs_bul_tmp> WHERE prknum = <fs_bul>-prknum AND wbillnr = <fs_bul>-wbillnr AND wbillgjahr = <fs_bul>-wbillgjahr AND shiftnum = <fs_bul>-shiftnum AND pernr = <fs_bul>-pernr. CALL METHOD er_data_changed->modify_cell EXPORTING i_fieldname = 'EXTBULNR' i_value = ls_cell-value i_row_id = sy-tabix. ENDLOOP. ENDCASE. ENDLOOP.
This peace of code cause dump ( there is no the proper row in the list of changed row in er_data_changed ).
Anybody can help me?