去除小数点后面的0

DATA : p_numval TYPE p DECIMALS 4 VALUE '3.100' .
DATA : l_del0 TYPE c LENGTH 20 .

 

l_del0 = p_numval.
SHIFT l_del0 RIGHT DELETING TRAILING ' '.
SHIFT l_del0 RIGHT DELETING TRAILING '0'.
SHIFT l_del0 RIGHT DELETING TRAILING '.'.
CONDENSE l_del0 NO-GAPS.

WRITE l_del0.

 

 

posted @ 2019-10-24 11:34  纱缚之印  阅读(339)  评论(0编辑  收藏  举报