SAP Function UNIT_OF_MEASURE_SAP_TO_ISO - Converts an SAP measurement unit code into ISO code

Parameter Reference Type Length Default Optional Text
SAP_CODE T006-MSEHI C 3 Internal SAP code for the measurement unit

Parameter Reference Type Length Text
ISO_CODE T006-ISOCODE C 3 ISO code for the measurement unit

Exception Text
NOT_FOUND ISO code not found in system
NO_ISO_CODE SAP code has no ISO code assigned to it

Function
This function module converts the SAP internal measurement unit codeinto the internationally-normed ISO measurement unit code.
If no entry is found with the specified SAP code, the exceptionNOT_FOUND is raised;
If the ISO code for this entry is not maintained (initial), theexception NO_ISO_CODE is raised.

Example
DATA: ISO_MEASURE_UNIT LIKE T006-ISOCODE,
SAP_MEASURE_UNIT LIKE T006-MSEHI,
SAP_MEASURE_UNIT = 'ST'.
CALL FUNCTION 'UNIT_OF_MEASURE_SAP_TO_ISO'
EXPORTING SAP_CODE = SAP_MEASURE_UNIT
IMPORTING ISO_CODE = ISO_MEASURE_UNIT
EXCEPTIONS NOT_FOUND = 1
NO_ISO_CODE = 2.
After this call ISO_MEASURE_UNIT has the value 'PCE' (ISO code forpiece).
The ISO code for the measurement units is a measurement unit code which is normed by the International StandardsOrganisation (ISO).
The SAP code for a measurement unit is the internallyused code.

747422Replace internal units with ISO codes - modification