3 weeks ago - last edited 3 weeks ago
Hello,
We want to use SOAP API Batch Inbound Integration:
https://help.sap.com/docs/SAP_S4HANA_CLOUD/9ce855c709ce4f5c99b685903461106e/d51b13a65cc744cf97a28a19...
https://api.sap.com/api/sap-s4-CE_BATCHBULKRPLCTNINFORMATION-v1/overview
for creating new batches and updating existing batches.
Not clear to us is the use of element ChangeOrdinalNumberValue. We noticed that setting a vlaue for this field is required since SAP otherwise rejects/ignores this request (see screenshot).
Therefore we set ChangeOrdinalNumberValue to 1, as result the batch were created.
For updates we need to set a greater ChangeOrdinalNumberValue otherwise requests get ignored as well.
Our first idea was to read the current ChangeOrdinalNumberValue of an existing batch by using ODATA API "Batch Master Record" (similar to eTag Handling for OData APIs) and to increase this number by 1:
https://api.sap.com/api/API_BATCH_SRV/path/get_Batch
Unfortunately this API doesn"t provide ChangeOrdinalNumberValue in it"s response.
Our current idea is to convert the current timestamp to an unix timestamp an use this as the ChangeOrdinalNumberValue so that we have always a greater ChangeOrdinalNumberValue for more recent requests.
What is best practices for ChangeOrdinalNumberValue or how did SAP foreseen ChangeOrdinalNumberValue handling with an external system?
Thanks and best regards
Robert
Request clarification before answering.
Hello Robert,
thanks for your question.
In the SOAP infrastructure, the system ensures that each message will be processed exactly once. However, it does not ensure that the processing always takes place in the order in which the changes of a transferred entity have taken place. Therefore, an ever increasing value is needed in the message payload to check in the inbound processing whether a message for a given batch and sender (the so-called sequencing context) can processed or must be ignored. This value is the change ordinal number value.
The sender of SOAP messages is responsible for ensuring this constraint. One option is that the sender stores and updates this value locally and handles it as counter. Note that one counter is then needed per combination Batch + recipient. By the way, this is also the approach chosen by the SOAP outbound integration.
If you aim at averting that local storage and counter handling, you could convert timestamps to integers and use that as an ordinal value - note that this is allowed since the change ordinal number values may contain gaps. The only downside is the lack of transparency on the recipient side - you'll always see gaps in the monitoring tools without being able to deduce whether some messages are missing.
Kind Regards,
Philipp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
116 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.