DATA: menge LIKE ekpo-menge .
**每PC等于多少KG
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = '001100000000000005'
i_in_me = 'PC'
i_out_me = 'KG'
i_menge = 1
IMPORTING
e_menge = menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
WRITE menge .
**每基本单位等于多少KG,如果kzmeinh = 'X'则为每KG等于多少基本单位
CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'
EXPORTING
input = 1
kzmeinh = ' '
matnr = '001100000000000005'
meinh = 'KG'
IMPORTING
output = menge
EXCEPTIONS
conversion_not_found = 1
input_invalid = 2
material_not_found = 3
meinh_not_found = 4
meins_missing = 5
no_meinh = 6
output_invalid = 7
overflow = 8
OTHERS = 9.
WRITE / menge .
阅读(3669) | 评论(0) | 转发(1) |