Application Development 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: 

convert material weight from KG to LB and roundup

Former Member
0 Kudos

my requirement is convert materila weight from KG to LB and after decimal roundup it 3 digits.

iam using MD_CONVERT_MATERIAL_UNIT

MD_CONVERT_MATERIAL_UNIT

i_matnr = '0.24'

i_in_me = 'KG'

i_out_me = 'LB'

i_menge = '0.000'

IMPORTING

e_menge = gf_quantity

but iam getting errorT "here is no conversion factor for material BD-3 and unit of measure KG"

please tell what is the reason of error and is there any other FM which do convertion and as well roundup also?

Thanks

vasa

7 REPLIES 7

Former Member
0 Kudos

First check if your passing the correct variable in the corresponding fields. And also check in material master(MM03) If there is UOM conversion defined for that material from KG to LB. IF it is not defined in the material master that the FM will throw that error.

Former Member
0 Kudos

This function module is typically used to convert between unit of measures maintained for that material.

ie, it is a pre requisite that both the units shud be maintained for that material.

in your case, the material dont have a conversion factor for KG. (table MARM).

use any generic conversion function modules..or else, maintain conversion factor for KG for the material

Former Member
0 Kudos

Why not just multiply by 2.2??

Rob

former_member188685
Active Contributor
0 Kudos

you can try with the function UNIT_CONVERSION_SIMPLE or MATERIAL_UNIT_CONVERSION

0 Kudos

Hi

there was no convertion is maintained for the material in MM03 and unfortnately its not possible now.

so iam trying use other FM : UNIT_CONVERSION_SIMPLE or MATERIAL_UNIT_CONVERSION

but iam getting below error "Use a number field for the entry value of INPUT"

actually iam passing the number only to input filed.

my requirement is convert any unit of measure ( ex: KG ,oz ) to LB .

so please tell ho can i do it?

0 Kudos

pass the value for input thru a variable.

and make sure this variable is not declared as type c.

it shud be type p or quantity etc.

Former Member
0 Kudos

Do not execute FM directly. Just use FM in yr test program.

Pass the values

It will work.

regards,

Rh