SAP Knowledge Base Article - Public

3802500 - Error "Unit &1 is not created in language &2" when creating sales orders using API API_SALES_ORDER_SRV

Symptom

While creating Sales Orders using the API_SALES_ORDER_SRV API, the following error is received:

  • Unit &1 is not created in language &2.

The request only succeeds if the UoM is maintained for the same logon language. For example, if logon language is DE but unit of measure PC is only maintained in EN, the request will fail with error: "Einheit PC ist in Sprache DE nicht angelegt".

Environment

SAP S/4HANA Cloud Public Edition

Cause

In OData V2 APIs for sales documents, several properties are language-dependent. These include the following:

  • The document type (for example, for sales orders this is SalesOrderType in A_SalesOrder)
  • The partner function (for example, for sales orders this is PartnerFunction in A_SalesOrderHeaderPartner)
  • Units of measure (for example, for sales orders this could be RequestedQuantityUnit in A_SalesOrderItem)

Resolution

  • When using these properties in request URLs, the keys should correspond to the logon language of the system.
  • To send data containing a language-dependent key that is different from the logon language, add sap-language=<your language key> to the URL request header or enter the language key for sap-language in the message header.

See Also

SAP Help Portal - Language-Dependent Properties in OData V2 APIs for Sales Documents

Keywords

API_SALES_ORDER_SRV, HTTP 400, /IWBEP/CM_MGW_RT/022, Einheit PC ist in Sprache DE nicht angelegt, unit of measure, UoM, language-dependent, sap-language, OData V2, sales order, German, EN, DE, 400 Bad Request, SAP S/4HANA Cloud Public Edition , KBA , SD-SLS-API-2CL , APIs for Sales Documents (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions