cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP status code 428 - HTTP Patch call to odata - SAP CPI

11-20-2022 2:11 PM
3504 views 3 comments
SAP Managed Tags
Subscribe

Hi,

Iflow:

IDOC (ECC) -> CPI -> ODATA (S4)

I am facing the precondition failed or 428 status code issue while HTTP patch call. Checked at every possibilities, but not able to find.

Scenario:

Fetching the IDOC -> Odata GET call to check if resource already exists -> If yes, Update or create..
Update operation -> Mapping the data... Setting cookie header after HTTP HEAD call... then HTTP patch call.

Error i am getting is "HTTP Operation failed invoking http://<host>:<port>/sap/opu/odata/sap/API_SLSPRICINGCONDITIONRECORD_SRV/Entity('xxxxxx') with status code 428

Upon searching for the status code reason, it says that the header if-match might be missing. So i hardcoded the if-match to the GET call etag . Still same issue. Tried to paste the GET call payload again in content modifier and changed some values. Still getting the same error.

What parameters do i need to check for this error and I know the information might not be sufficient for solving. kindly let me know what details are needed to analyze this issue. I have attached the iflow total screenshot.

Update:

I tried creating a simple Iflow, where through content modifier i am passing the payload and setting the headers (csrf, ifmatch, content type and cookie). HTTP head call and after that HTTP patch call. Now getting 403 error.

Attached the patch call before step headers screenshot.

View Entire Topic
GoranKovacic
Participant

Hi Subin,

why does your if-match header have a speciale value, in your case "W.........."?
I had a similar problem with the 428 error and I just assigned the header "If-Match" the value "*" (asteriks) and it worked. Can you maybe try it with the * ?
Hope it helps!

BR
Goran

KirankumarCh
Discoverer
0 Likes
yes, I added above If-Match header a value as * and Content-Type as application/json. I successfuly update the SalesOrder API through Patch . Thanks