0
点赞
收藏
分享

微信扫一扫

abap 去掉后缀0和中间逗号实例

先峰老师 2022-12-06 阅读 19

data g_len type i.
data str1 type c length 30 value '123,456,789.5002000'.
while sy-subrc eq 0.
replace ',' with '' into str1.
endwhile.
g_len = strlen( str1 ).
shift str1 right deleting trailing space.
shift str1 right deleting trailing '0'.
g_len = strlen( str1 ).
condense str1 no-gaps.
g_len = strlen( str1 ).
write str1.

举报

相关推荐

0 条评论