2010 Mar 08 4:17 AM
hi,
Since i am new to abap Can anyone tell me how do we convert digits to words without using any standard functions.
if input is 2341 then my output should be two thousand three hundred and fourty one.
thanks in advance,
mansi.
2010 Mar 08 4:36 AM
Welcome to SCN.
Plz SEARCH in SCN before posting, you will get lot of information.
2010 Mar 08 4:25 AM
Hi Manasa,
Grand Welcome to SCN/SDN
Use FM SPELL_AMOUNT this will give you required output
TABLES spell.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = 2345
* CURRENCY = ' '
* FILLER = ' '
* LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = spell
* EXCEPTIONS
* NOT_FOUND = 1
* TOO_LARGE = 2
* OTHERS = 3
.
IF sy-subrc = 0.
WRITE spell-word.
ENDIF.
Cheerz
Ram
2010 Mar 08 4:26 AM
2010 Mar 08 4:27 AM
Hi !
CALL FUNCTION 'ZIBHR_AMT_WORDS_INR'
EXPORTING
amt_in_num = amt_ctc
IMPORTING
amt_in_words = amt_words
EXCEPTIONS
data_type_mismatch = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DESCRIBE TABLE offer LINES table_lines.
IF amt_words <> 'NIL'.
REPLACE 'Paise' IN amt_words WITH 'Paise'.
IF sy-subrc = 0.
REPLACE 'Rupees' IN amt_words WITH 'And'.
ELSE.
REPLACE 'Rupees' IN amt_words WITH ''.
ENDIF.
ENDIF.
CONCATENATE 'Rupees' amt_words INTO amt_words
SEPARATED BY ' '.
2010 Mar 08 5:50 AM
A Z Function Module? Wow!!!
Reported to SCN Moderators along with the rest who answered the query.
pk
2010 Mar 08 4:36 AM
Welcome to SCN.
Plz SEARCH in SCN before posting, you will get lot of information.
2010 Mar 08 5:04 AM
2010 Mar 08 8:23 AM
Hi Manasa,
I dont think this is a business requirement , its a kind of training task assigned to you.
2010 Mar 08 11:28 AM
Please folks, don't ask or answer such basic questions.
Thread locked.
Thomas