‎2012 Apr 24 11:22 AM
Hi everybody,
I have an ALV OO, and the data showed in that ALV can be changed from another Z program. Is there any way to automatically update my ALV when the data is changed from the other program? Something like tha ALV program could be waiting for an event, and that event is launched from the updating program when it updates the database....
Thanks in advance.
‎2012 Apr 24 11:31 AM
The ALV program picks the data from the table with updated values( from another program ). Instead of events or communication between 2 programs, why not try a auto refresh http://www.erpgenie.com/abaptips/content/view/346/33/ of ALV for a period of time. This makes it very easy
‎2012 Apr 24 11:34 AM
Dear Jose Beiro,
As far as I know, there is no event in SAP which gets triggered on a general data base update. So if you want you may handle events in ALV, like on user enter you may check for the new data, if there is any change in the data, then you may build your internal table again and refresh the ALV table which will display the new data.
Hope it helps, Thank you.
Regards,
kartik
‎2012 Apr 24 12:22 PM
You could try to use such an event to refresh the display, then when handling the event look for a change in database since last display, if available look at CDHDR or DBTABLOG depending of the data you display.
For the refresh raising event search scn for cl_gui_timer for disussions or documents like Automatic Data Refresh on Module pool Screen.
Regards,
Raymond
‎2012 Apr 24 12:28 PM
I have situations where the user can modify or delete rows in a table, based on ALV functions. For my needs, I clear the ALV table immediately afterward, call my routine that grabbed the data for the table, sort it and do an ALV refresh. Works very well for me. However, if the data is changed by something other than a process called by the ALV, this would not work. In one case, I have a refresh button that does the same thing (dump, rebuild the table and refresh the ALV), to allow the user to see what was changed by use of another program in another session.