on 04-28-2006 1:13 PM
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..
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.
*--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use SPELL_AMOUNT for numbers as well, just dont pass the CURRENCY parameter
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.