2007 Apr 25 3:50 PM
Hi gurus!
I have an editable alv grid. One of the columns in it is updated automatically when I enter some digits in other fields according to their values. The update is made with the help of data_changed event. Then I made a total for that field. But it isn't updated automatically even if I use refresh_table_display method. How can I achieve this?
Thanks, points will be rewarded!
2007 Apr 27 3:47 PM
Hi Pavel,
The standard functionality of totalling the values is done after the code written after the data_changed event is triggered and the changes made to the data in the layout is also reflected only after the data_changed event is complete.
Hi gurus!
I have an editable alv grid. One of the columns in it is updated automatically when I enter some digits in other fields according to their values. The update is made with the help of data_changed event. Then I made a total for that field. But it isn't updated automatically even if I use refresh_table_display method. How can I achieve this?
Thanks, points will be rewarded!
2007 Apr 25 4:03 PM
hi Pavel,
In the subroutine, are you setting the field selfield-refresh = 'X' ?
if not try the following logic:
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
case ucomm.
when 'F8'...
...
endcase.
selfield-refresh = 'X'.
endform.
hope this helps,
Sajan Joseph.
2007 Apr 25 4:13 PM
Hi!
You've misunderstood. I use handle_data_changed event of cl_gui_alv_grid. And there is no selfield parameter there.
2007 Apr 25 5:18 PM
Hi Pavel,
Please check using this in the handle_data_changed event
CALL METHOD ER_DATA_CHANGED->MODIFY_CELL
EXPORTING
I_ROW_ID = Rowid
I_FIELDNAME = field name
I_VALUE = field value to be updated.
2007 Apr 26 7:44 AM
Hi! No, this didn't help me. My question is why my total doesn't update when I change some editable data in ALV Grid?
I've noticed that when I change the editable data for the <b>second time</b> the total is updated in accordance with the data that I entered for the <b>first time</b>! Where should I find my problem?
2007 Apr 27 3:47 PM
Hi Pavel,
The standard functionality of totalling the values is done after the code written after the data_changed event is triggered and the changes made to the data in the layout is also reflected only after the data_changed event is complete.
2007 Apr 27 3:52 PM
2007 May 02 8:07 AM
Thanks to all. I found the solution. I executed grid->refresh_table_display in the data_changed_finished event.