cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP : Number to Words

Former Member
0 Kudos

Hi.. Could anyone help me on this. I'm trying to convert a number into words.. Please note that i'm not talking abt CURRENCY into words. Is there any Function Module in ABAP to do this..

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

With this, we can get NUMBER into WRODS.

In the code below, wa_amt-WORD will have "ONE HUNDRED"

DATA: wa_amt TYPE SPELL.

*--

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = 100

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = it_amt

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3.

*--

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE 'A' NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*--

write wa_amt-WORD.

*--

athavanraja
Active Contributor
0 Kudos

you can use SPELL_AMOUNT for numbers as well, just dont pass the CURRENCY parameter

Regards

Raja