You are using API_PHYSICAL_INVENTORY_DOC_SRV to create Inventory Documents and post the Inventory Count from data loaded from an external file. When you post the count you are running into errors, for example 'Unit PI is not created in language EN'.
SAP S/4HANA Cloud All versions
Reproducing the Issue
Create a Physical Inventory Document via API API_PHYSICAL_INVENTORY_DOC_SRV.
Post the count for this Physical Inventory Document.
In the payload pass the "UnitOfEntry" : "PI".
The count posting fails with error 'Unit PI is not created in language EN'.
Note: If you pass "UnitOfEntry" : "PC" in the payload the count is posted successfully.
The system links the external and internal units of measure. There is a validation of the Unit of Measure in the payload using the logon language of the user.
In the case of the API, this is the language of the communication user. In this example, the Spanish commercial Unit of Measure 'PI' is passed in the payload but the logon language of the communication user is English leading to the conflict.
Consider the logon language of the communication user.
If the communication user is using English you would need to pass an English commercial unit of measure.
If the communication user is using Spanish you would need to pass a Spanish commercial unit of measure.
T006, MSEH3, SY-LANGU, CONVERSION_EXIT_CUNIT_INPUT, T006B, SPRAS, MI07, count, API_PHYSICAL_INVENTORY_DOC_SRV , KBA , MM-IM-VDM-PI , VDM Physical Inventory , MM-IM-PI , Physical Inventory , How To