SAP Update(PATCH)- 500 error

0
Hello,I am trying to update data in SAP using Update(PATCH) activity of odata connector, but getting "UPDATE|Response code: 500, Response text: Error when processing resource", Get List and create actions are working fine but only facing issue when updating. My Flow look like: - Get List- Find object using List operation to which you want to update-Change object-Update(PATCH)I have checked using debugging mode, and the url and update data all looks good but some how when it reached update patch it throws the above error.The same PATCH method works in POSTMAN.
asked
2 answers
0

hi,


A 500 Internal Server Error from SAP on a PATCH call usually means the SAP backend rejected the update, not a Mendix or connector bug.

Even if GET and CREATE work and Postman runs it fine, the update payload or service configuration is likely invalid for the SAP OData endpoint.

Why This Happens

1.500 means server-side failure, not a Mendix connection problem.

2.PATCH and UPDATE differ — PATCH sends partial data and SAP may enforce stricter requirements.

3. SAP OData services often require:

  • Required fields to be present
  • Correct data types
  • No read-only/key fields in the payload
  • If any violation occurs, SAP returns 500.

What to Do (100% Working Steps)

1.Compare the actual HTTP request

Extract the request Mendix is sending (enable logging on the OData Connector) and compare with the exact request that works in Postman.

Mendix might be sending extra fields or missing required ones.

2.Check in SAP Backend Logs

Run transaction /IWFND/ERROR_LOG or /IWBEP/ERROR_LOG in SAP Gateway. These logs show the exact error SAP threw.

This is the only reliable way to know why a 500 occurs.

3.Validate Required Fields

Make sure the body of the PATCH contains:

  • ✔ All required (non-nullable) fields
  • ✔ No read-only or key fields
  • ✔ Correct field names and JSON format

SAP rejects if a required field is missing or if payload is malformed.

4.Check CSRF & Headers

Sometimes SAP requires extra headers (e.g., X-Requested-With) for update actions — missing this can also cause 500 errors.

answered
0

Since the PATCH request works in Postman, the most reliable approach is to compare the exact request sent by Postman with the one sent by Mendix. You should verify the following parts carefully:


  • URL
  • Headers
  • Request body format
  • Key field used in the endpoint


To analyze this, you can open the request in Postman and check the Headers and Body sections to see exactly what is being sent. Then, trigger the same request from Mendix and open your browser’s Developer Tools → Network tab, find the PATCH request, and inspect its headers, URL, and payload.


By comparing these two requests side by side, you can identify the differences and adjust your Mendix configuration accordingly.


answered