SAP Knowledge Base Article - Public

3075451 - PATCH request against a sales order line item field returns an incorrect Status code

Symptom

Executing a PATCH request to update the Reason for Rejection returns status code 204 - successful. However, the patch request did not successfully update the field.

Environment

  • Sales and Distrubution (SD)
  • SAP S/4HANA Cloud All versions 

Cause

The patch request is only to set the RejectionReason against the item. In general, Patch requests can change multiple fields with one request. The check still rejects the change, but not the complete request. If you check the order afterwards, the item is not rejected. For this, there is still an error message raised. The messages that where created are available in the header-field "SAP-MESSAGE" of the response message. At the same time this error message is not severe enough to abort the processing of the request. For example, if you want to change the SalesOrderItemText in the same request, this can still be changed.

Resolution

The behavior is expected. if an external consumer is interested in one particular field change, they should check the SAP-message header to check for the resulting error message. The current behavior reflects also the behavior of the Sales Order UI Processing.

Keywords

A_SalesOrderItem, ~status_code, 204, ~status_reason, No Content, SalesDocumentRjcnReason, delivered, status, completed , KBA , SD-SLS-API , API , Problem

Product

SAP S/4HANA Cloud all versions