Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Trigger ALV data_change event manual

$
0
0

As we know, when we changed something in the alv grid, event data_changed will be triggered, and we can do some custom check.

but do you face this situation, after you changed this alv and push on some user command, like 'SAVE', the data_changed event will not be triggered again, because no cell is changed in alv grid, but actually, you want to trigger it and do something you want.

below i will give you 1 solution to trigger it by compulsion.

 

in PAI, use method IF_CACHED_PROP~SET_PROP of class CL_GUI_ALV_GRID to set property 'GridModified' as modified, then call CHECK_CHANGED_DATA of CL_GUI_ALV_GRID, data_changed event will be triggered.

 

1.add code in PAI

图像 001.png

2.Run your program and update data, then save.

图像 007.png

 

图像 010.png

3.Push 'SAVE', event will be triggered.

图像 003.png

图像 004.png

 

This is my first time to write blog, please give your comment if you also have some experience on this topic. Thanks.


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>