Symptom
- When posting a supplier invoice via the REST API API_SUPPLIERINVOICE_PROCESS_SRV — for example, through an integration flow from SAP Business Network (Ariba) via SAP Cloud Integration (CPI) — the invoice creation fails with the following error:
- "No measurement unit is assigned to ISO code SPACE"
Message Class: BM, Message Number: 034
- "No measurement unit is assigned to ISO code SPACE"
- The error occurs at the invoice item level and prevents the invoice from being posted. Vendor payment processing is consequently blocked for the affected invoice.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Prepare an API payload for API_SUPPLIERINVOICE_PROCESS_SRV that includes purchase order-referenced invoice line items (to_SuplrInvcItemPurOrdRef).
- In one or more invoice line items, leave the PurchaseOrderQuantityUnit field empty or omit it from the payload entirely.
- Send the POST request to API_SUPPLIERINVOICE_PROCESS_SRV (e.g., via the gateway client /IWFND/GW_CLIENT or via a CPI integration flow).
Result: The API call fails with error BM034: "No measurement unit is assigned to ISO code SPACE." The invoice is not created.
Cause
- The error BM034 is triggered when the PurchaseOrderQuantityUnit field in one or more invoice line items is either empty, missing from the payload, or contains a value that does not match a valid ISO unit of measure code configured in the system.
- When the PurchaseOrderQuantityUnit field is blank or absent, the API internally maps the unit of measure to ISO code SPACE (an empty value). Since no unit of measure is assigned to SPACE in the unit of measure configuration (CUNI), the posting fails with error BM034.
- Although the PurchaseOrderQuantityUnit field is technically optional in the API schema, when it is populated it must:
- Contain a valid SAP unit of measure (e.g., KG, EA, CV)
- Match the unit of measure defined on the corresponding purchase order item
- If the value sent in PurchaseOrderQuantityUnit differs from the unit of measure on the referenced purchase order item, the same error may occur.
Resolution
Step 1: Verify the PurchaseOrderQuantityUnit Field in the API Payload
Review the API payload for all invoice line items under the to _SuplrInvcItemPurOrdRef entity:
- Ensure that the PurchaseOrderQuantityUnit field is populated for every line item in the payload.
- Verify that the value provided (e.g., KG, EA, CV) is a valid SAP unit of measure and corresponds to an ISO code assigned in the system.
- Ensure that the PurchaseOrderQuantityUnit in the invoice payload matches the unit of measure defined on the referenced purchase order item.
Example of a correctly populated line item in the payload:
<SupplierInvoiceItem>[value]</SupplierInvoiceItem>
<PurchaseOrder>[value]</PurchaseOrder>
<PurchaseOrderItem>[value]</PurchaseOrderItem>
<QuantityInPurchaseOrderUnit>[value]</QuantityInPurchaseOrderUnit>
<PurchaseOrderQuantityUnit>[value]</PurchaseOrderQuantityUnit>
<SupplierInvoiceItemAmount>[value]</SupplierInvoiceItemAmount>
Step 2: Verify Unit of Measure ISO Code Assignment
If the unit of measure value in the payload is correctly populated but the error persists:
- Verify that the unit of measure used in the payload (e.g., KG, EA, CV) is correctly configured and assigned to an ISO code in the system.
- In SAP S/4HANA Cloud Public Edition, unit of measure configuration can be reviewed in the Maintain Units of Measure Fiori application.
- Ensure the ISO code for the unit of measure is not blank or incorrectly mapped.
Step 3: Verify the Integration Flow Mapping (CPI)
If the invoice is transmitted via an SAP Cloud Integration (CPI) integration flow:
- Review the CPI integration flow mapping logic to confirm that the unit of measure field from the source system (SAP Business Network) is correctly mapped to the PurchaseOrderQuantityUnit field in the target API payload.
- Enable TRACE log level in the CPI integration flow and capture the message header, body, and payload to verify the field value at runtime.
- Correct any mapping gaps where the unit of measure value may be dropped or left empty during transformation.
For guidance on tracing message contents in SAP Cloud Integration, refer to SAP KBA 2665258 – How to Trace Message Contents in Cloud Integration (CPI).
See Also
Keywords
no measurement unit assigned, iso code space, bm034, api_supplierinvoice_process_srv, supplier invoice post, unit of measure, uom mapping, cuni, purchase order unit mismatch, odata invoice, ariba cpi integration, liv, s/4hana cloud public edition, invoice error, iso code configuration , KBA , MM-IV-LIV-2CL , Logistics Invoice Verification (Public Cloud) , Problem
SAP Knowledge Base Article - Public