如: 123,456.78 -> 123456.78
REPORT z_barry_test NO STANDARD PAGE HEADING .
TABLES usr01.
DATA: pp TYPE p DECIMALS 2 . "注意这个地方的定义
SELECT SINGLE * FROM usr01 WHERE bname = sy-uname.
CALL FUNCTION 'UNITS_STRING_CONVERT'
EXPORTING
units_string = '12,345.7'
dcpfm = usr01-dcpfm
IMPORTING
units = pp
EXCEPTIONS
invalid_type = 1
OTHERS = 2.
WRITE pp.
阅读(3784) | 评论(1) | 转发(0) |