Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding MATERIAL_UNIT_CONVERSION function module

Former Member
0 Likes
11,619

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

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
5,955

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

3 REPLIES 3
Read only

Former Member
0 Likes
5,955

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 .

Read only

Former Member
0 Likes
5,955

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.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
5,956

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