‎2010 Jul 15 10:11 AM
Hi,
I want to convert MEINS = *Pack* to Pair for a given material. For my condition 1 pack = 50 pairs. I am using MATERIAL_UNIT_CONVERSION this function module. So could you please let me know, what are the fields i need to provide import and export parameters in function module & how to give it.
thanks in advance
‎2010 Jul 15 10:49 AM
Before using a FM read the documentation once (if it exists though !!!).
The documentation for MATERIAL_UNIT_CONVERSION says:
... 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 ...
So if the BUoM of the material is not "Pairs" the FM wont work correctly. In your case you have to perform 2 steps:
1. Convert to "Packs" to BUoM of the material &
2. From the BUoM convert to "Pairs".
How to use the FM is quite straight forward. Read the parameter definitions, search the forum for details.
BR,
Suhas
‎2010 Jul 15 10:24 AM
Hi
Please make sure both the units you are using must be : be the base unit of measure of the material and the oher must be other must be defined as an alternative unit of measure for the material i.e entry sholud be present in T006.
DATA: MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS, """ UOM
MEINH LIKE MARM-MEINH, """" UOM
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.
Hope it helps
Regards
Swapni .
‎2010 Jul 15 10:29 AM
In table MARM (se16) , enter the material code multiply qty in context say (p_qty) by umrez/umren
factor = ( wa_marm-umrez / wa_marm-umren ) * P_QTY.
‎2010 Jul 15 10:49 AM
Before using a FM read the documentation once (if it exists though !!!).
The documentation for MATERIAL_UNIT_CONVERSION says:
... 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 ...
So if the BUoM of the material is not "Pairs" the FM wont work correctly. In your case you have to perform 2 steps:
1. Convert to "Packs" to BUoM of the material &
2. From the BUoM convert to "Pairs".
How to use the FM is quite straight forward. Read the parameter definitions, search the forum for details.
BR,
Suhas