Skip to Content

Editable cell in CL_GUI_ALV_GRID disable itself after one action

Jun 07, 2017 at 01:27 PM


avatar image


I made a ALV with class cl_gui_alv_grid.

I have two columns as checkbox.

Step 1 : Initial display. If I check the 1st checkbox, the 3rd column will be editable, if I check the 2nd colunm, the 4th will be editable.

At the beginning, 3rd and 4th are not editable.

Step 2 : I check the 1st column, and the 3rd column is now editable.

Step 3 : I fill the 3rd colunm with a value.

Step 4 : I press enter or with arrow i move to another cell, and now 3rd column is now no more editable but i keep the value inside.

ALV object and internal table which is displayed are globally declared.

In my internal table I have a field with a table lvc_t_styl for manage editable cell.

I create a class for manage event : handle_data_changed.

Why in my internal table the value '63' (and checkbox's value) is recorded and not my tab lvc_t_styl which is always returning to his beginning value ?

Thanks for any help,

Best regards.

step-error.jpg (29.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jun 07, 2017 at 01:44 PM

Did you [un]set the stable option in the refresh display method?

Show 5 Share
10 |10000 characters needed characters left characters exceeded

I try with and without this option, doesnt seem to change anything.


(Typo) I meant the I_SOFT_REFRESH parameter not the STABLE.


Same for this parameter, with and without I have same result.


Can you insure in your code the sequence handle data_changed -> change itab -> handle data_changed_finished -> refresh_table_display is respected?


When my code process data_changed_finished, I already loose the value for the field celltab (lvc_t_styl) of my internal table. (I didn't find where value is lost, cant put a watchpoint on a field of an internal table, or on a fieldsymbol assign to lost value).

In handle_data_changed, I change multiple values, all this values are kept. Only the field celltab doesnt keep my modification.

Sandra Rossi Jun 08, 2017 at 06:10 AM

You didn't mention it, so maybe you didn't do it as follows: if you need to change a cell style while editing an ALV grid, you have to use the method ER_DATA_CHANGED->MODIFY_STYLE in event DATA_CHANGED (and no need to use REFRESH_TABLE_DISPLAY)

10 |10000 characters needed characters left characters exceeded