小数位 处理函数



  LV_P1 '1.999'.
    CALL FUNCTION 'ROUND'
      EXPORTING
        DECIMALS 0
        INPUT    = LV_P1
       SIGN     '-'
      IMPORTING
        OUTPUT   = LV_P1.
*
*                     CALL FUNCTION 'HR_NZ_ROUNDING_DECIMALS'
*                     EXPORTING
*                       value_in                 = LV_P1
*                       conv_dec                 = 0      " 设置保留几位小数
*                     IMPORTING
*                       value_out                = LV_P1
*                     EXCEPTIONS
*                       no_rounding_required     = 1
*                       decimals_greater_than_10 = 2
*                       rounding_error           = 3
*                       OTHERS                   = 4.

posted @ 2017-08-18 17:58  Eric.su  阅读(221)  评论(0编辑  收藏  举报