2012 Jan 27 2:38 PM
Hi,
i need to convert fetch quantity into metric tonnes
there are so many function modules
which function module is better for this approach
i tried with
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = WA_VBRKP-NTGEW
NO_TYPE_CHECK = 'X'
* ROUND_SIGN = ' '
UNIT_IN = WA_VBRKP-GEWEI
UNIT_OUT = 'TO'
IMPORTING
* ADD_CONST =
* DECIMALS =
* DENOMINATOR =
* NUMERATOR =
OUTPUT = WA_VBRKP-NTGEW
* EXCEPTIONS
* CONVERSION_NOT_FOUND = 1
* DIVISION_BY_ZERO = 2
* INPUT_INVALID = 3
* OUTPUT_INVALID = 4
* OVERFLOW = 5
* TYPE_INVALID = 6
* UNITS_MISSING = 7
* UNIT_IN_NOT_FOUND = 8
* UNIT_OUT_NOT_FOUND = 9
* OTHERS = 10
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<Added code tags>
Thanks & regards
Sadeq
Edited by: Suhas Saha on Jan 27, 2012 9:17 PM
2012 Jan 27 3:53 PM
Hello Sadeq,
UNIT_CONVERSION_SIMPLE is released, well documented whereas the other FMs mentioned are not released!
Are you facing any problems using it? If yes, please elaborate it.
BR,
Suhas
2012 Jan 27 3:30 PM
Hi,
You can Try "CF_UT_UNIT_CONVERSION"
Example:
Import parameters Value
MATNR_IMP
MEINS_IMP
UNIT_NEW_IMP KG
UNIT_OLD_IMP TO
VALUE_OLD_IMP 10.000
Export parameters Value
VALUE_NEW_EXP 10,000.000
Regards,
Anil
2012 Jan 27 3:38 PM
Hi Sadeq,
You can also try the function: MD_CONVERT_MATERIAL_UNIT
Regards
Bruno Xavier.
2012 Jan 27 3:53 PM
Hello Sadeq,
UNIT_CONVERSION_SIMPLE is released, well documented whereas the other FMs mentioned are not released!
Are you facing any problems using it? If yes, please elaborate it.
BR,
Suhas
2012 Jan 28 4:44 AM