SAP Knowledge Base Article - Public

3802471 - Unable to clear BOMItemIsCostingRelevant to blank via POST UpdateBOMItemWithECN (API_BILL_OF_MATERIAL_SRV v2) – SAP S/4HANA Cloud Public Edition

Symptom

Unable to update 'BOMItemIsCostingRelevant' with change number to blank via POST; identical requests sometimes return HTTP 400 "Malformed URI literal syntax" and sometimes HTTP 200 without persisting the change.

Environment

  • Product: SAP S/4HANA Cloud Public Edition
  • Bills of Material (Public Cloud)

Reproducing the Issue

  1. Use API_BILL_OF_MATERIAL_SRV;v=2 function import UpdateBOMItemWithECN to POST an update for a BOM item, providing EngineeringChangeDocForEdit and setting BOMItemIsCostingRelevant to an empty value ("").
  2. Repeat the same POST several times with valid X-CSRF-Token and If-Match (ETag).
  3. Observe that some attempts respond with HTTP 200 but the indicator remains set when checked afterwards, and other attempts respond with HTTP 400 "Malformed URI literal syntax".

Cause

  • A product defect in the UpdateBOMItemWithECN function import causes inconsistent behavior and prevents clearing BOMItemIsCostingRelevant to blank.

Resolution

  1. Discontinue using the UpdateBOMItemWithECN function import for this field until the fix is delivered in an upcoming release.
  2. Use a PATCH operation on entity MaterialBOMItem to update the indicator.
  3. Retrieve a valid X-CSRF-Token and the current ETag (If-Match) for the target MaterialBOMItem.
  4. Send PATCH to:

/sap/opu/odata/SAP/API_BILL_OF_MATERIAL_SRV;v=2/MaterialBOMItem(BillOfMaterial='...',BillOfMaterialCategory='M',BillOfMaterialVariant='...',BillOfMaterialVersion='',BillOfMaterialItemNodeNumber='...',HeaderChangeDocument='',Material='...',Plant='...')

  1. Use payload (example):

{

"BOMItemIsCostingRelevant": "",

"EngineeringChangeDocForEdit": "YOUR_CHANGE_NUMBER"

}

  1. Verify via GET or application UI that BOMItemIsCostingRelevant is cleared.
  2. Monitor release notes for the announced fix of UpdateBOMItemWithECN and revert to the function import when the correction is available.

See Also

Keywords

API_BILL_OF_MATERIAL_SRV, UpdateBOMItemWithECN, MaterialBOMItem, GET, PATCH, POST, BOMItemIsCostingRelevant, costing relevance, change number, ECN, EngineeringChangeDocForEdit, HTTP 400, Malformed URI literal syntax, OData v2, BOM item update, inconsistent response , KBA , LO-MD-BOM-2CL , Bills of Material (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions