SAP Knowledge Base Article - Public

3157894 - SalesOrderBulkRequest_In - No measurement unit is assigned to ISO code

Symptom

You are using Sales Order (A2A) API (SalesOrderBulkRequest_In) to create or update a sales order and you are getting the following error:

No measurement unit is assigned to ISO code ***

Environment

SAP S/4HANA Cloud

Reproducing the Issue

The payload you are sending has the respective values for SAPunitCode and unitCode at the item level, for example:

<RequestedQuantity SAPunitCode="BAG" unitCode="BAG">1.0</RequestedQuantity>

Cause

The error is caused because in both fields, SAPunitCode and unitCode, the same values are passed.

The SAPunitCode is right in this example, but the unitCode needs to be the ISO code.

 

According to the SAP Help Documentation this field is optional and you can use either the ISO Code or the SAP code:

You can find settings related to units of measurement in the configuration activity Check Units of Measurement in SAP Central Business Configuration. In case you are using Manage Your Solution, you can find these settings in configuration activity 102179 (Check Units of Measurement).

Considering the example above, we are using unit BAG, and the respective ISO code is BG:

Resolution

Check the payload that is being used in the request.

As mentioned in the SAP Help Documentation you can use either the ISO Code or the SAP code.

So, it is expected to have, for example, one of the following lines in your payload:

 <RequestedQuantity SAPunitCode="BAG">1.0</RequestedQuantity>

Or

<RequestedQuantity unitCode="BG">1.0</RequestedQuantity>

 

In case you want to send both values unitCode and SAPunitCode you need to set the correct values in the payload. Considering the above example, you will have the following line in your payload:

<RequestedQuantity SAPunitCode="BAG" unitCode="BG">1.0</RequestedQuantity>

See Also

Sales Order (A2A),  SalesOrderBulkRequest_In, asynchronous, API, sales, /SDSLS, 034(BM), BM034, BM 034, internalUoM, ISO code, measure, SAPunitCode, unitCode, 102179, Check Units of Measurement, UoM

Keywords

KBA , SD-SLS-API , API , Problem

Product

SAP S/4HANA Cloud all versions