‎2011 Oct 07 7:24 AM
hello experts,
I need to get all weights into LB and volumes into CF (cubic feet).
Weight units like KG, Ton (TO & TON), GM (gram), OZ (ounce) - convert to LB (pounds)
Volume units like "3 (cubic inch), CCM (cubic centimeter), M3(cubic meter) - convert to CF.
Pls let me know is there any standard FM to do conversion asap.
thanks in advance,
Moderator message: please do more research before asking, show what you have done yourself when asking, no "asap" please.
Edited by: Thomas Zloch on Oct 7, 2011 10:40 AM
‎2011 Oct 07 7:31 AM
Hi Sunil,
Please check with CH_CONVERT_UNITS.
Check this form help.sap.com
[Unit Conversio|http://help.sap.com/saphelp_wp/helpdata/en/2a/fa013c493111d182b70000e829fbfe/content.htm]
Regards,
Madhu.
Edited by: madhurao123 on Oct 7, 2011 12:02 PM
‎2011 Oct 07 7:39 AM
hi sunil,
CONVERSION_FACTOR_GET
this fm helps you to conversion
& also check this link....
http://help.sap.com/saphelp_wp/helpdata/en/2a/fa013c493111d182b70000e829fbfe/content.htm
‎2011 Oct 07 7:51 AM
Hi Sunil,
try this..
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.
Regards
Rajashiva Ram