DATA:GV_JE TYPE SPELL.
CLEAR:I_JE.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = T_AMOUNT
currency = '232,323.84'
language = 'E'
IMPORTING
in_words = GV_JE
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
I_JE = 'TOTAL' && ' ' && GS_HEAD-WAERK && ' '
&& GV_JE-WORD && ' ' && 'AND' && ' ' && GV_JE-DECWORD && ' ' &&
'CENTS' && ' '&& 'ONLY'.
CONDENSE I_JE.
TRANSLATE I_JE TO UPPER CASE.
输出以下:
TOTAL USD TWO HUNDRED THIRTY-TWO THOUSAND THREE HUNDRED TWENTY-THREE AND EIGHTY-FOUR CENTS ONLY
总共贰佰叁拾贰仟叁佰贰拾叁角肆角四美元