10-18-2008 5:29 PM
Hi Experts,
Is there any function module to convert milli meter to inches
Thanks and Regards
Ganesh Reddy
10-18-2008 5:51 PM
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
10-18-2008 5:44 PM
Hi Reddy,
Check in the function groups SCV0 and SCVU you may get the function module for changing the units.
Cheers!!
Balu
10-18-2008 5:51 PM
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
10-18-2008 6:04 PM
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
10-18-2008 6:12 PM
Hi Reddy,
Have you checked my above post ?
Ok let me try out for myself.
Cheers!!
Balu
10-18-2008 6:21 PM
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
10-18-2008 6:25 PM
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
10-18-2008 6:34 PM
Hi Reddy,
Let me know if still any issues its working fine for me just copy paste the code and execute.
Cheers!!
10-18-2008 6:47 PM