Archived discussions are read-only. Learn more about SAP Q&A

ALV: changing internal table in data_changed event.

Hi, ABAP-gurus.

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.

        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
              i_fieldname = 'EXTBULNR'
              i_value        = ls_cell-value
              i_row_id     = sy-tabix.

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?

Not what you were looking for? View more on this topic or Ask a question