Skip to Content
author's profile photo Former Member
Former Member

How to ensure idempotency of requests to SAP?

Hi All

We need to submit Sales Orders to SAP BYD over the SOAP web services interface. If there is a communication failure we can safely retry, however if there is a socket timeout, we need to know how we can replay the same request again, without SAP BYD creating a duplicate sales order for it.

I have gone through the documentation and there is a "UUID" which we can optionally pass into a request. However this is not adequate to prevent a duplicate order from being created. There is also a "BuyerID" described as an "External Reference ID" - However neither of these provide what we would desire.

Our expected result is that on a resubmission of the same SOAP web service request, SAP BYD should reply/ignore a duplicate message it has successfully received/processed having the same UUID / BuyerID?

I appreciate if someone could point me to the relevant information that could help me achieve what we expect



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 19, 2015 at 09:50 AM

    Hi Asankha,

    ByD synchonous writing web services support transparent retries (idem potency) in case of lost server responses caused by bad network connections. Using idem potency is optional. If the Web service consumer fills the UUID element of the BasicMessageHeader message element, the server returns the cached response if the same UUID is received within a short time period. This allows the consumer to perform multiple retries in case the original response did not reach the consumer in time. The maximum time span a consumer performs retries should not exceed some minutes. Responses for requests with a filled UUID are cached for 2-4 hours. Reusing the same UUID after this period is not allowed and results in a fault message response.





    Beyond idem potency you can avoid creating duplicates by providing the corresponding key elements and using action code "01 - create". Using action code 01 the system returns an error message if a business object with the same key already exists.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Knut

      Thank you for the correct and expected solution, and this provided the exact functionality I was looking for.

      I was unable to locate such general documentation on using ByD web services, on facing failures and recovery etc. Maybe I have missed to read some guide which is not easily found..I will keep looking 😊

      Thanks again,



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.