SAP Knowledge Base Article - Public

3779851 - API_PURCHASEORDER_2 (OData V4): Batch and Storage Location Updates On Subcontracting Components Not Persisted

Symptom

Attempting to update Batch and Storage Location on subcontracting purchase order components via API_PURCHASEORDER_2 (OData V4) returns success but does not save the values.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Send a PATCH request to the POSubcontractingComponent entity of API_PURCHASEORDER_2 (OData V4) to set Batch and Storage Location.
  2. Observe that the service responds with HTTP 200 OK.
  3. Read back the same component and see that Batch and Storage Location are still blank.

Cause

The Batch field at BOM component level (entity POSubcontractingComponent) in API_PURCHASEORDER_2 is designed as read-only; payload entries are ignored and updates are not supported (refer to the provided note). In standard UI processes, the Batch field for subcontracting components is also not editable during create/change, reflecting the same design.

Resolution

  1. Do not attempt to set the POSubcontractingComponent Batch via API_PURCHASEORDER_2; this field is read-only by design and cannot be persisted through POST, PATCH, or MERGE.
  2. Maintain or derive the component Batch using standard batch determination in subcontracting processes within materials management, or other supported application processes outside this API.

See Also

Keywords

api_purchaseorder_2, odata v4, POSubcontractingComponent, subcontracting components, purchase order components, batch, storage location, patch, 200 OK, not saved, not persisted, read-only field, bom component, update ignored, s4hana cloud , KBA , MM-PUR-PO-2CL , Purchase Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions