12-13-2006 6:44 PM
I'm using method check_changed_data in my ALV program to update the grid with changes the user makes. The method works fine for this purpose. But I also want to know if any data actually changed. Can anyone give me an example?
FORM update_vendor .
do I need to call a different method before check_changed_data ?
call method gridhead->check_changed_data.
is there a parameter available here to see if anything actually
changed?
loop at gt_head into wa_head.
clear wa_head-lifnam.
select single name1 into wa_head-lifnam
from LFA1 where lifnr eq wa_head-lifnr.
if sy-subrc eq 0.
modify gt_head from wa_head.
endif.
endloop.
ENDFORM. " update_vendor
12-13-2006 8:20 PM
Hello Beth
If data have been changed then method <b>go_grid->CHECK_CHANGED_DATA</b> will raise event <b>DATA_CHANGED</b>. If you have an event handler method like HANDLE_DATA_CHANGED then you can, for example, validate the changes.
If no data were changed event DATA_CHANGED will not be raised and your event handler method will not be called.
Regards
Uwe
12-13-2006 8:20 PM
Hello Beth
If data have been changed then method <b>go_grid->CHECK_CHANGED_DATA</b> will raise event <b>DATA_CHANGED</b>. If you have an event handler method like HANDLE_DATA_CHANGED then you can, for example, validate the changes.
If no data were changed event DATA_CHANGED will not be raised and your event handler method will not be called.
Regards
Uwe