2010 Aug 06 6:35 AM
I have an Editable ALV GRID control and I want to to check the data entered in editable cells of ALV and update the database accordingly , but it is only on SAVE button click on application toolbar
How can I track the changes in ALV , I am not using HANDLE DATA CHANGED Event as it is triggered on mouse double click or just changing cell content and not triggred on SAVE button click...
Plz help
2010 Aug 06 7:56 AM
call method c_alvgd->check_changed_data( ).
Based on user input when user clicks save , use pop-up-to- confirm and if yes referesh the data.
I have an Editable ALV GRID control and I want to to check the data entered in editable cells of ALV and update the database accordingly , but it is only on SAVE button click on application toolbar
How can I track the changes in ALV , I am not using HANDLE DATA CHANGED Event as it is triggered on mouse double click or just changing cell content and not triggred on SAVE button click...
Plz help
2010 Aug 06 7:56 AM
call method c_alvgd->check_changed_data( ).
Based on user input when user clicks save , use pop-up-to- confirm and if yes referesh the data.
2010 Aug 06 8:11 AM
Hello Karan ,
u need to use event DATA CHANGED to get latest values of the ALV container .
call method g_grid%1->check_changed_data.
call method g_grid%1->refresh_table_display.regards
Prabhu
2010 Aug 06 9:34 AM
But I need to do some validations on the screen and then save data
which I did thru handle data chage event , which can be triggered thru ENTER key press and not on SAVE click
how to trigger it on SAVE click
Edited by: Karan Chopra on Aug 6, 2010 2:54 PM
2010 Aug 06 10:31 AM
Hi,
go through below code,using this we can get the changes in the internal table used for report display.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data.
Regards,
Rajesh Akarte
2010 Aug 06 1:39 PM
Two people gave the right answer already. When you have determined that the Save button was clicked, you need to call call method alv->check_changed_data( ). This will refresh the data from the grid and then you can do any checking you want before saving. If you are using the HANDLE_DATA_CHANGED and HANDLE_DATA_CHANGED_FINISHED events, then calling call method alv->check_changed_data( ) will trigger those events.
Best Regards,
Brian
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |