Ansicht
Dokumentation

MATERIAL_UNIT_CONVERSION - NOTRANSL: Materialspezifische Umrechnung von Maßeinheiten

MATERIAL_UNIT_CONVERSION - NOTRANSL: Materialspezifische Umrechnung von Maßeinheiten

CPI1466 during Backup   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module converts a quantity from one unit of measurement to another. A requirement for this is that the units of measurement relate to a material. One of them must be the base unit of measure of the material, while the other must be defined as an alternative unit of measure for the material or be capable of being converted to an alternative unit of measure as per table T006.

You are recommended declaring the transfer parameters for the quantities and the conversion factors as type F fields since the runtime required for conversion is substantially less than with type P or type I fields and also because the exception OVERFLOW cannot then occur.

If the transfer parameters for the conversion factors are of type P (packed number), the system assumes that you require conversion with 5-digit accuracy. If they are of type I (integer), the system assumes that you require conversion with 10-digit accuracy. (See also the documentation on transfer parameter TYPE_UMR.)

Example
DATA: MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
MEINH LIKE MARM-MEINH,
INPUT TYPE F,
OUTPUT TYPE F,
UMREN TYPE F,
UMREZ TYPE F,
KZMEINH TYPE C.
. . .

CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'
EXPORTING
INPUT = INPUT
KZMEINH = KZMEINH
MATNR = MATNR
MEINH = MEINH
MEINS = MEINS
IMPORTING
OUTPUT = OUTPUT
UMREN = UMREN
UMREZ = UMREZ
EXCEPTIONS
CONVERSION_NOT_FOUND = 01
INPUT_INVALID = 02
MATERIAL_NOT_FOUND = 03
MEINH_NOT_FOUND = 04
MEINS_MISSING = 05
OUTPUT_INVALID = 06
OVERFLOW = 07.





Parameters

ADDKO
BATCH_CONVERSION_ERROR
CHARGE
CHARG_CUOBJ
EXTENDED_CONV
INPUT
KZMEINH
KZWSO
MATNR
MEINH
MEINS
MEINS
NO_OUTPUT
OUTPUT
TYPE_UMR
UMREN
UMREZ
WERKS

Exceptions

CONVERSION_NOT_FOUND
INPUT_INVALID
MATERIAL_NOT_FOUND
MEINH_NOT_FOUND
MEINS_MISSING
NO_MEINH
OUTPUT_INVALID
OVERFLOW

Function Group

MAME

BAL_S_LOG - Application Log: Log header data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 2978 Date: 20240604 Time: 003726     sap01-206 ( 57 ms )