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

converting unit

Former Member
0 Likes
944

hai all,

pls help me with this

i have two info object with masterdata. i want to convert the quantity feild of one info object to the same unit as other in the start routine for updating to ODS.

how to do this problem? pls help me for a solution.

thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
905

Hi

You can also use the fun modules

UNIT_CONVERSION_SIMPLE or

MD_CONVERT_MATERIAL_UNIT

just enter these fun modules name in SE37 and search for where used list

you will find lot of programs

see the one as sample and use it.

<b>Reward points for useful Answers</b>

Regards

Anji

8 REPLIES 8
Read only

Former Member
0 Likes
905

Hi..,

You can use this function module..

CALL FUNCTION 'VHUMISC_CONVERT_TO_BASEUNIT'

EXPORTING

MATNR = fs_vbap-matnr

QUANTITY = fs_vbap-kwmeng

UNITQTY = fs_vbap-vrkme

IMPORTING

BASEQUANTITY = fs_final-qty_order

CHANGING

BASEUNIT = fs_vbap-meins

EXCEPTIONS

CONVERSION_FAILED = 1

ROUNDING_ERROR = 2

OTHERS = 3.

regards,

sai ramesh

Read only

0 Likes
905

thanks for this...

pls show this with one example.

thanks in advance

Read only

Former Member
0 Likes
906

Hi

You can also use the fun modules

UNIT_CONVERSION_SIMPLE or

MD_CONVERT_MATERIAL_UNIT

just enter these fun modules name in SE37 and search for where used list

you will find lot of programs

see the one as sample and use it.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
905

thanks for this

Read only

Former Member
0 Likes
905

but its not working for the problem

Read only

younes_bouaouad
Explorer
0 Likes
905

Hi,

use FM MD_CONVERT_MATERIAL_UNIT, it takes your MATNR, an input unit of measurement, an input quantity, and your desired output unit of measurement, and then it gives the result of quantity conversion from input unit to output unit.

reward points if helpful

Regards

Read only

0 Likes
905

my input is the unit<weight> of an infobject capa_wt.

my output should be capa_wt with converted unit as that of basic unit, there in master data, bas_unit.

pls help me with this.

i think the above function modules will not work for this problem

Read only

Former Member
0 Likes
905

k