cancel
Showing results for 
Search instead for 
Did you mean: 

HCI: limit number of simultaneous calls

dirugadr
Participant
0 Kudos

Hello community, I have this situation: A system (S/4) calls HCI using the IDOC adapter (IDOCs are generated in S/4, and "despatched" via RFC). When the process in S/4 is running, a bunch of IDOCs are generated and sent to HCI (let's say 100 or 150 requests are in place in HCI almost simultaneously) Each IDOC is transformed into a JSON (with some extra fields, according to the business logic), and it's sent to an external system, where it's processed and the result is returned to HCI. Based on the return code, the iFlow ends successfully or it's marked as failed. The IDOC status will depend on the iFlow status. The problem we are facing is that when the amounts of simultaneous calls to the external system exceed some number, the external system is unable to process the messages. I know the proper solution is to fix the external system, in order to accept more requests, but this is out of my control. Instead, I'd like to know if there is a way to "limit" the number of simultaneous requests that HCI can handle at a moment, without changing all the way we have already designed ours iFlows. I was thinking about using a variable with the "last run" timestamp, and before firing another instance of the external call execution, compare this timestamp against the current date&time, and only allow to execute if some time has occurred (10 seconds, by example). The problem is I should "lock" this variable otherwise, the result will be the same. But I don't know how to lock variables.. even if it's possible.

Well, every piece of help will be welcomed! Thanks

Adrián

View Entire Topic
Sriprasadsbhat
Active Contributor

Hello Adrian,

Interesting question.As per my understanding there is no such feature in SAP CPI to control.Below are the 2 ways i feel you can control.

1) Split the message into Smaller batch and apply some delay using script.But this is not recommended approach as per my experience.

https://answers.sap.com/questions/84770/how-to-delay-use-wait-step-message-in-sap-hci.html

2) Since you have already confirmed you can't control this feature in target system then control the same in Source System ( SAP S4 ).

Also appreciate if you could raise a request to add this new feature which might be helpful for this kind of scenarios.

https://blogs.sap.com/2020/05/29/central-sap-cloud-platform-feedback-requirements-channel-for-custom...

Also lets listen some more suggestion from community ...

Regards,

Sriprasad Shivaram Bhat