Skip to Content
Former Member
Nov 28, 2008 at 11:56 AM

Changes inside ALVGrid are not marked as changes in ER_DATA_CHANGED


Hello to all!

I got a very specific problem with data changes in alvgrid. Let me tell you.

My problem is: Inside the grid, via a user command, some cell values are changed by a popup window (function module POPUP_GET_VALUES). Now, I want to return the modified values to the grid. I can transfer the data entered in the popup into my data table:

loop at lt_fields into ls_field.

check ls_field-field_attr = '00' or ls_field-field_attr = '01'.

shift ls_field-value left deleting leading space.

assign component ls_field-fieldname

of structure <fs_tab_item> to <fs_field_val>.

<fs_field_val> = ls_field-value.


modify <fs_tab_data> index ls_row_no-row_id from <fs_tab_item>.

And I can refresh the display:

ls_stbl-col = ls_stbl-row = 'X'.

call method refresh_table_display


is_stable = ls_stbl

i_soft_refresh = 'X'.

But on saving, the manually changed data is not visible in the u201Cchanged fieldsu201D-information upon the call of the event HANDLE_DATA_CHANGED (parameter ER_DATA_CHANGED type ref to CL_ALV_CHANGED_DATA_PROTOCOL).

Do you know a way to tell the grid that a cell value was changed, but not by direct user input in the cell, but another way of data change? In the class CL_ALV_CHANGED_DATA_PROTOCOL, there is a method modify_cell, but I need an instance of this class in order to call this method. How do I get an instance of this class? Are there other ways to tell the grid about changed cells?

With kind regards

Stefan Wagenblast