on 04-02-2024 2:02 PM
Hello experts!
The goal of the flow is, to receive the data from a 3rd-party to create a inventory document and send the created document number to the 3rd-party system.
To create the document is no problem at all, but after the creation the idea is to update the created document with a batch with the information send from the other system.
When I try to Post the batch body, the following message is send from S/4 with a http-202:
--CFC1AD393136D49EBC9AE5399EE4EFD30
Content-Type: application/http
Content-Length: 964
content-transfer-encoding: binary HTTP/1.1 404 Not Found
Content-Type: application/xml
Content-Length: 838
dataserviceversion: 1.0
sap-cache-control: -u
<?xml version="1.0" encoding="utf-8"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>005056A509B11EE1B9A8FEC11C21778E</code>
<message xml:lang="en">The request URI contains an invalid key predicate.</message>
<innererror xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<transactionid>415116950F710170E00660B42EAF64B7</transactionid>
<timestamp>20240402124659.1327180</timestamp>
<Error_Resolution>
<SAP_Transaction>For backend administrators: use ADT feed reader "SAP Gateway Error Log" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details</SAP_Transaction>
<SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note>
</Error_Resolution>
</innererror>
</error>
--CFC1AD393136D49EBC9AE5399EE4EFD30--
The Input:
{
"Plant": "1111",
"StorageLocation": "9999",
"DocumentDate": "2024-04-01T00:00:00",
"PhysInventoryPlannedCountDate": "2024-04-01T00:00:00",
"to_PhysicalInventoryDocumentItem":
[ {
"Material": "816",
"Quantity": "13",
"QuantityUnit": "PC"
}, {
"Material": "815",
"Quantity": "7",
"QuantityUnit": "PC"
} ]
}
Used API: Physical Inventory Documents - Read, Create
Used Endpoint: [...]/sap/opu/odata/sap/API_PHYSICAL_INVENTORY_DOC_SRV/$batch
S/4 Input:
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_PhysInventoryDocItem(FiscalYear='2024',PhysicalInventoryDocument='100000053',PhysicalInventoryDocumentItem='1')) HTTP/1.1
Content-Type: application/json
{ "Material" : "816", "QuantityInUnitOfEntry" : "13", "UnitOfEntry" : "PC" }
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_PhysInventoryDocItem(FiscalYear='2024',PhysicalInventoryDocument='100000053',PhysicalInventoryDocumentItem='2')) HTTP/1.1
Content-Type: application/json
{ "Material" : "815", "QuantityInUnitOfEntry" : "17", "UnitOfEntry" : "PC" }
--changeset--
--batch--
As far as I understand it, the URL is wrong.
What is a bit strange is that the whole thing was configured in the same way for the API_BUSINESS_PARTNER endpoint and it works there.
What do I miss here?
Thank you!
Hello!
I found the issue.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.