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: 

mm to Inches

Former Member
0 Kudos

Hi Experts,

Is there any function module to convert milli meter to inches

Thanks and Regards

Ganesh Reddy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ganesh,

Small addition to my above post goto SE37 Txcode and in the function module give as UNIT_CONVERSION* and press F4 you will get 4 function modules which may help you try them first.

Cheers!!

Balu

8 REPLIES 8

Former Member
0 Kudos

Hi Reddy,

Check in the function groups SCV0 and SCVU you may get the function module for changing the units.

Cheers!!

Balu

Former Member
0 Kudos

Hi Ganesh,

Small addition to my above post goto SE37 Txcode and in the function module give as UNIT_CONVERSION* and press F4 you will get 4 function modules which may help you try them first.

Cheers!!

Balu

0 Kudos

I tried all the FM, but I can't able to get the correct one

Can u plz help in that issue

Thanks and regards

Ganesh Reddy

0 Kudos

Hi Reddy,

Have you checked my above post ?

Ok let me try out for myself.

Cheers!!

Balu

0 Kudos

when I am trying to execute the FM UNIT_CONVERSION_SIMPLE

By giving

INPUT 64

NO_TYPE_CHECK X

ROUND_SIGN +

UNIT_IN MM

UNIT_OUT IN

its giving an error like

Please use a number field for the input value

0 Kudos

Hi Reddy,

Check the below shown program may help

REPORT Unit_Conversion .

PARAMETERS :

p_svalue TYPE p DECIMALS 2,

p_sunit TYPE mara-meins,

p_tunit TYPE mara-meins.

DATA:

w_target_value TYPE f,

l_factor TYPE f.

CALL FUNCTION 'MC_UNIT_CONVERSION'

EXPORTING

nach_meins = p_tunit " Target unit

von_meins = p_sunit " Source unit

IMPORTING

umref = l_factor

EXCEPTIONS

conversion_not_found = 1

material_not_found = 2

nach_meins_missing = 3

overflow = 4

von_meins_missing = 5

OTHERS = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE.

w_target_value = p_svalue * l_factor.

WRITE :

'The value after conversion to the target unit of measure is',

w_target_value.

ENDIF.

Modify your code accordingly.

Cheers!!

Balu

0 Kudos

Hi Reddy,

Let me know if still any issues its working fine for me just copy paste the code and execute.

Cheers!!

0 Kudos

Many many Thanks for ur valuable code....

Regards

Ganesh Reddy