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

Alternate UOM to Base UOM conversion using FM

Former Member
0 Likes
8,692

We are using MATERIAL_UNIT_CONVERSION for conversion. We passed MENGE, MATNR, MEINS and MEINH to the FM.

I have material: MATERIAL1 with KU as Base UOM.

in Alternate UOM (MM03 -> Additional Details -> Unit of Measure) we have the following details:

1CS <=> 10KU

When I enter 1CS, the BAPI will have the following parameter:

INPUT = 1

MATNR = MATERIAL1

MEINS = KU

MEINH = CS

When we check the output, it gives 0.1 as result. We expect a '10' of result. We are wondering how it happened. Can anyone advise what to do?

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
6,492

MEINS is the base unit of measure.

MEINH is the alternative unit of measure.

By default, it converts INPUT from MEINS to MEINH (KZMEINH = space).

To do the opposite, pass KZMEINH = 'X'.

What you're currently doing is converting 1KU to ?CS, and as you defined 1CS=10KU so it returns 0.1. If you pass KZMEINH='X', then you'll be converting 1CS to ?KU, so it will return 10.

5 REPLIES 5
Read only

Sandra_Rossi
Active Contributor
0 Likes
6,492

MATERIAL_UNIT_CONVERSION is not a BAPI, it's a classic function module.

Read only

Former Member
6,492

Thanks mate! I edited the title. About the topic, can you advise what to do?

Read only

Sandra_Rossi
Active Contributor
6,493

MEINS is the base unit of measure.

MEINH is the alternative unit of measure.

By default, it converts INPUT from MEINS to MEINH (KZMEINH = space).

To do the opposite, pass KZMEINH = 'X'.

What you're currently doing is converting 1KU to ?CS, and as you defined 1CS=10KU so it returns 0.1. If you pass KZMEINH='X', then you'll be converting 1CS to ?KU, so it will return 10.

Read only

0 Likes
6,492

Thank you so much! I added the parameter in exporting and it worked as expected. Gracias!!!!

Read only

abo
Active Contributor
0 Likes
6,492

Now, if only SAP bothered to add your answer to the official documentation of that module...