Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Auto Refresh using AMC

424

Hi,

I am in need of Developing a report and refresh automatically if there are some new data added in the system. For example if the report is to display the list of deliveries based on some selection, report need to be refreshed automatically when a new delivery got created which matches the selection criteria.

I understand we have couple of options:

1. Using FM RFC_Ping _WAIT technique

2. Using CL_GUI TIMER ( Looks like we have an issue with it based on OSS Note 2679117.

3. SAP AMC (Message Channel)

I am afraid that option 1 & 2 above will have unnecessary load as my Selects are costlier and these two methods will be based on specified intervals (irrespective whether new data is added or not).

Option#3 above, I am not sure how to keep the session alive and wait for the messages. like initially we display ALV, then we have to start listening, once received, refresh ALV and then again go back to Listening till some specified time (say until 8 PM).

Can you please suggest if anyone achieved this functionality using SAP AMC? Also is there any other possible option?

5 REPLIES 5

Sandra_Rossi
Active Contributor
0 Kudos
195

Your title doesn't reflect the question which is ALV autorefresh with AMC.

DoanManhQuynh
Active Contributor
0 Kudos
195

There is a statement:

WAIT FOR MESSAGING CHANNELS

and you can define time in second there...dont know if it useful in your case.

Also you may try the point-to-point communication:

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenamc.htm#@@ITOC@@ABENAMC_4

0 Kudos
195

I understand WAIT FOR MESSAGING CHANNELS, but how do I repeat it after displaying ALV.

DoanManhQuynh
Active Contributor
0 Kudos
195

in 7.52 there is a new method GET_CONSUMER_SESSION_ID of class CL_AMC_CHANNEL_MANAGER which I think could work with your case, unfortunately I dont have 7.52 in my hand now to verify it...

DoanManhQuynh
Active Contributor
195

Sorry for miss leading, i think AMC cant do what you want due to this:

https://blogs.sap.com/2016/10/13/faq-abap-channels/#_Toc570164252