‎2009 Jan 10 9:46 AM
Hi. I am using REUSE_ALV_GRID_DISPLAY and setting the EDIT flag so that the user can change data in the ALV.
How can I get the users data out of the ALV without using OO?
I don't just need the changed data, I know you need OO for that, I want to get all the data in every field and row.
I thought the internal table I passed into the function module would be updated with the users data and I could get to it from user command but the data is the original data, not the edited data.
There must be a way, if there is not, why does the ALV have an edit flag? If you can not get the data out there is no point in making it editable.
Any help would be very much appreciated.
Regards,
Dave.
‎2009 Jan 10 10:30 AM
Hi David,
In the call back user command write the following and it works for REUSE_ALV_GRID_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.
eg:
case sy-ucomm.
When 'UPDATE'.
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.
*---> check the internal table here..it will have the changed data
Hope it helps
Regards
Byju
‎2009 Jan 10 10:30 AM
Hi David,
In the call back user command write the following and it works for REUSE_ALV_GRID_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.
eg:
case sy-ucomm.
When 'UPDATE'.
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.
*---> check the internal table here..it will have the changed data
Hope it helps
Regards
Byju
‎2009 Jan 12 10:06 AM