SAP小数点四舍五入处理

DATA : DAT TYPE P DECIMALS 9  VALUE '12.5445' ,
       DAT1 TYPE P DECIMALS 2 .

*       MOVE DAT TO DAT1.

CALL FUNCTION 'HR_NZ_ROUNDING_DECIMALS'
  EXPORTING
    VALUE_IN                       = DAT                      " Input field with decimals

   CONV_DEC                       = 2                         " i    Number of desired decimals for conversion

 IMPORTING
   VALUE_OUT                      = DAT1.                  " Output field with rounded decimals

write : dat1.

你可能感兴趣的:(SAP小数点四舍五入处理)