2010 Feb 09 1:54 AM
hi,
i had created an alv which is editable,user will change the data and he will save the data.now my issue is the save button which i created in pf-status of the screen can see only the old data i.e before the changes.but only upon after enter or refresh button in the alv container only the new data can be seen.my question is i want to get the event triggered even after the save button which is created trough the pf status.please let me know.fyi... i can create a save button on the container toolbar but i want to achieve the prior way.please suggest.let me know if my question is not clear.
babita
2010 Feb 12 2:35 PM
See following code.
For the user command of your SAVE call the method check_changed_data which will refresh your internal table with all new data the user has filled in, without having to hit enter.
FORM save_records_in_table .
*-- For marked records in ALV save data. Determine new data
g_alv->check_changed_data( ).
hi,
i had created an alv which is editable,user will change the data and he will save the data.now my issue is the save button which i created in pf-status of the screen can see only the old data i.e before the changes.but only upon after enter or refresh button in the alv container only the new data can be seen.my question is i want to get the event triggered even after the save button which is created trough the pf status.please let me know.fyi... i can create a save button on the container toolbar but i want to achieve the prior way.please suggest.let me know if my question is not clear.
babita
2010 Feb 09 7:45 AM
hi,
Capture the sy-ucomm for button
"Call the method check_changed_data to keep the changed data in the internal table.
CALL METHOD g_editable_alv1->check_changed_data .
" to refresh alv
CALL METHOD obj1->refresh_alv
hope this helps
regards
RItesh
2010 Feb 09 9:08 AM
2010 Feb 12 2:35 PM
See following code.
For the user command of your SAVE call the method check_changed_data which will refresh your internal table with all new data the user has filled in, without having to hit enter.
FORM save_records_in_table .
*-- For marked records in ALV save data. Determine new data
g_alv->check_changed_data( ).