REPORT zunit_conversion .
data: lv_input type p DECIMALS 3 value '10000.000',
lv_output type p DECIMALS 3.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = lv_input
UNIT_IN = 'LB'
UNIT_OUT = 'KG'
IMPORTING
OUTPUT = lv_output
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.
write:/ lv_output.
No comments:
Post a Comment