05/08/2010

Unit Conversion in Reports


REPORT ZRRSAMPLE.

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.

Nenhum comentário:

Postar um comentário