DATA : dat TYPE p DECIMALS 9 VALUE '12.5445' ,dat1 TYPE p DECIMALS 9 .DATA dat2 TYPE p DECIMALS 9 VALUE '12.540'.* 方法一 CALL FUNCTION 'HR_NZ_ROUNDING_DECIMALS'EXPORTINGvalue_in = datconv_dec = 2 " 设置保留几位小数IMPORTINGvalue_out = dat1EXCEPTIONSno_rounding_required = 1decimals_greater_than_10 = 2rounding_error = 3OTHERS = 4.* 方法二 CALL FUNCTION 'ROUND'EXPORTINGdecimals = 0 " 保留多少位小数input = dat2sign = '+' " + 向上取舍 - 向下取舍 (负数也一样)IMPORTINGoutput = dat1 " 输出返回结果EXCEPTIONSinput_invalid = 1overflow = 2type_invalid = 3OTHERS = 4.