FM to display number in words
REPORT ZZSPELLAMT.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : AMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
PERFORM SPELL_AMT USING AMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMT USING P_AMT P_WAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = P_AMT
CURRENCY = P_WAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM.
Wednesday, August 1, 2007
Subscribe to:
Posts (Atom)