11 Replies Latest reply: May 14, 2013 2:42 PM by Ambrish Mishra RSS

Correlation of Asynchronous calls

Praveen Vagicharla
Currently Being Moderated



We are Integrating SAP with Thirdparty using PI.


At first we have created the synchronous interfaces for our scenario and later we want to go to Async calls.


We are going with RFC --> PI --> SOAP.


whenever SAP trigger the data, the SOAP is executed and return the messages. The problem is that it is taking more than 30 min to execute and send the response back to SAP R/3 because of huge data.


So we have create the 2 Async interfaces.



1. SAP --> PI --> TP  --- request async

2. TP --> PI  --> SAP  --- response async


now the problem is that we want to track the response message from TP for its request from SAP.

The message data flow was very high and per day we are triggering RFC around 100 times(min).


Suppose if any of the request from RFC sent to TP and failed to give response. Is there any possibility that PI can send alerts that for this even if the TP system is not available or down or failed to send the response.


Please help me with this.




  • Re: Correlation of Asynchronous calls
    Udo Martens
    Currently Being Moderated

    Hi Praveen,


    you can theoretically use ccBPM (suppose you have PI double stack), correlating request to and response from TP. In a dead line branch you would raise an alert and then stop the process.


    The problem is here the TP runtime of 30 min and the load of 100 msg/min. That would lead to 3000 ccBPM instances at the same time and i guess you might get some performance issues.


    Therefore, i would correlate the messages inside SAP with a Z-table. You need of course a unique value inside request and response to correlate. So you have this unique value, a time stamp request and a timestamp response (the receiving RFC has to put in that). A SAP job is reading frequently the table is is detecting missing responses for requests older than 30 min and executes alerts.



  • Re: Correlation of Asynchronous calls
    Ambrish Mishra
    Currently Being Moderated

    Hi Praveen,


    If the TP system is not available, it will show an error at adapter level and alert will be generated if CCMS alerts are set up in your PI system. If third party failed to send any response, I am afraid you have limited options. Here you will have to do customize tracking, for example, if it is a custom RFC, store a key value(s) in a custom table outbound and update the status inbound.


    create a program which is run through a background job and checks every 10 mins if there are any records in the table where response was not received(status is null)and trigger an email to TP and business owner with details.


    Hope it helps!


  • Re: Correlation of Asynchronous calls
    Aashish Sinha
    Currently Being Moderated

    Hi Praveen,


    My first question is what PI version you are using? If using PI 7.31 - You can raise alert in case of any kind of failure, you just need to add alert rule (ID) and specify it in adapter. If by any case, data is not reaching to thirdparty, SOAP receiver will raise alert message.


    Now I will come to your main question, As per above, I can understand synchronous scenario is taking lots of time so you changes it to 2 Async scenario. I can see 3 drawbacks in sysnc approach.

    1. SOAP Receiver - In this case, instead using SOAP - try with rest adapter, possibly you will get response a bit faster.

    2. RFC Sender - Don't use RFC adapter for big data - Change it to proxy - Proxy Communication is best approach in this case.

    3. Data Size - Big data always gives problem, send it in chuck.


    Now i will give you another approach -

    Use RequestResponseBean and ResponseOneway Bean and create a scenario like below -


    Proxy -> PI -> TP(SOAP Adapter) -> Proxy receiver (generate server proxy). Use RequestResponseBean and ResponseOneWayBean in Sender channel  (Strictly for PI 7.31 - where Proxy communication uses SOAP Sender Channel).



    Aashish Sinha

  • Re: Correlation of Asynchronous calls
    Jörg Thiesmann
    Currently Being Moderated

    Hi Praveen,


    I support Udo's approach and only would like to add that I recommend you to not do this in PI, but on the sender SAP system. This way you leave the upgrade path to Java-only open plus you don't need to change values in the message sent from SAP system. This is usually better for audit purposes. Additionally, on sender system you could assign alerts directly to the users related to the business case. On PI you wouldn't have the user data and you would have to pass an alert to some admin first.