abap中ROUND 函数使用方法
1 Introduction
ROUND Function is rounding up, rounding down. it is not normal rounding functionality.
2 Code Example
DATA:L_STR TYPE P DECIMALS 4.
DATA:LL_STR TYPE P DECIMALS 2.
L_STR = '1.1211' .
CALL FUNCTION 'ROUND'
EXPORTING
DECIMALS = 2 " 保留多少位
INPUT = L_STR
SIGN = '+' " + 向上取舍
IMPORTING
OUTPUT = LL_STR
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4.
CHECK SY-SUBRC = 0.
WRITE LL_STR.
post SAP-Garson
原文链接:https://blog.csdn.net/beyond911/article/details/123738982文章来自于网络,如果侵犯了您的权益,请联系站长删除!