如何将数值转换为数字单词?
我正在尝试检查某个数字(例如 7845)是否有千、百或十,例如 7845 有 7 倍千、8 倍百、4 倍十。
然后该程序应该将次数转换为字符串:
IF ( DMBTR MOD 10000000 ) LE 9.
DMBTR / 10000000 = lv_tenmillions.
lv_tenmillions_check = lv_tenmillions MOD 1.
IF lv_tenmillions_check > 0.
"Convert
ENDIF.
IF lv_tenmillions_check < 0.
"ZERO
ENDIF.
ENDIF.
我编写的代码将检查一千万,因此将检查 10000000 的值的 MOD 是否小于 9。是否有任何函数或代码可以abap中用于将数字转换为字母?
提前谢谢大家!
I am trying to check if a certain number, e.g. 7845, has any thousands, hundred, or tens, e.g. 7845 has 7 times thousands, 8 times hundreds, 4 times tens.
The program is supposed to then convert the amount of times to a string:
IF ( DMBTR MOD 10000000 ) LE 9.
DMBTR / 10000000 = lv_tenmillions.
lv_tenmillions_check = lv_tenmillions MOD 1.
IF lv_tenmillions_check > 0.
"Convert
ENDIF.
IF lv_tenmillions_check < 0.
"ZERO
ENDIF.
ENDIF.
The code that I have written would check for tenmillions, thus would check if the MOD of a value with 10000000 is less equal to 9. Is there any function or code that is used in abap to convert the number into letters?
Thank you all in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用功能模块 SPELL_AMOUNT:
lv_spell-word 包含您需要的内容。
You can use function module SPELL_AMOUNT:
lv_spell-word contains what you need.
使用功能模块 SPELL_AMOUNT。或者复制它并进城。
use the functional module SPELL_AMOUNT. Or copy it and go to town.