cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Grid Refresh after Handle_get_changed

sf667
Explorer
0 Kudos
246

Hi all,

I have a simple report in which I'm using CL_GUI_ALV_GRID. I want to add a new line with ALV. When inserted new line and the user types in a MATNR and press Enter-Key, some other fields like MAKTX and others should be filled. I have method "handle_data_changed" which is triggered when Enter-Key is pressed. In this method i will add the new line to the internal table. 

But till now, I found no solution to refresh the alv grid so that I can see what is added from the method. I tried the refresh_table_method at the end of the method "handle_data_changed" but I can't see the changes in the ALV grid.

Any idea on how can I update the content of the added row?

Best regards,

Stefan

View Entire Topic
Sandra_Rossi
Active Contributor

The line was inserted by the user, hence you must not insert the line yourself, instead call the method CHECK_CHANGED_DATA which transfers any data changed by the user into the ALV internal table.

The refresh is to be done by filling via the method MODIFY_CELL of the parameter ER_DATA_CHANGED of the DATA_CHANGED event. You don't need to call REFRESH_TABLE_DISPLAY.

sf667
Explorer
Thanks for your help. This solved my problem.