2008 Oct 16 7:32 AM
hi guys,
i m using the following function module to convert amount to words for USD. but the result is coming in lakhs and crores .. i want the amount in thousands and millions .
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = val
CURRENCY = 'USD'
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = IN_WORDS.
SPELL_VAL = IN_WORDS-WORD.
for example,
val = 231,620.00
words = TWO HUNDRED THIRTY-ONE THOUSAND SIX HUNDRED TWENTY DOLLARS
above is the output i get in development server for the f.m. and is exactly what i want.
but for the same example, in production server , the output is
words = TWO LAKH THIRTY-ONE THOUSAND SIX HUNDRED TWENTY DOLLARS
and suggestions ????
2008 Oct 16 7:35 AM
Hello,
Check The default currency , and sy-langu of production server..!
thanks
Regards
Narsim Aeda
Edited by: Aeda N on Oct 16, 2008 8:35 AM
2008 Oct 16 7:35 AM
Hello,
Check The default currency , and sy-langu of production server..!
thanks
Regards
Narsim Aeda
Edited by: Aeda N on Oct 16, 2008 8:35 AM
2008 Oct 16 7:37 AM
thanks for replying...can u please tell me how do i check this???
2008 Oct 16 7:39 AM
Hi,
Check it with TCode SCC4 in Production Server as well as in Development Server, is there any differece..?
Thanks
Regards
Narsim Aeda
2008 Oct 16 7:42 AM
the currency is INR is both servers..so why do u think there is a difference in the results
2008 Oct 16 7:47 AM
Hi Poonam,
Try this code
DATA : WORDS TYPE SPELL,
WORDS_SPELL TYPE CHAR1024.
DATA : NO TYPE I VALUE '231620.00'.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = NO
* CURRENCY = ' '
* FILLER = ' '
* LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = WORDS
* EXCEPTIONS
* NOT_FOUND = 1
* TOO_LARGE = 2
* OTHERS = 3
.
WRITE : WORDS-WORD.
WORDS-WORD will contain TWO HUNDRED THIRTY-ONE THOUSAND SIX HUNDRED TWENTY.
Let me know what output you are getting in your system.
Regards
Edited by: Rajvansh Ravi on Oct 16, 2008 8:48 AM
2008 Oct 16 7:55 AM
Hi,
Can you check the entries in T015Z table are same in Dev and Prod server...
Revrt back..
Regards,
Naveen
2008 Oct 16 7:59 AM
2008 Oct 16 8:12 AM
2008 Oct 16 9:28 AM
Hi Poonam,
If you have not already checked the program RF_SPELL try checking it in Development and production system to see how it behaves.
Regards.
2008 Oct 16 10:37 AM
thnx for replying ..
i have checked the program RF_SPELL..
Selection-screen :
Language EN
Currency (with 'space' digits) usd
Amount 123,456,789.12
In production for this program o/p is as follows..
TWELVE CRORE THIRTY-FOUR LAKH FIFTY-SIX THOUSAND SEVEN HUNDRED E
IGHTY-NINE
TWELVE
In development for this program o/p is as follows..
ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND
SEVEN HUNDRED EIGHTY-NINE
TWELVE
2008 Oct 16 11:14 AM
Hi Poonam,
Check this note Note 939145. It says "The words for the input numbers are read from the customizing table T015Z. It can be maintained using the customizing view V_T015Z."
I have checked 2 scenarios. USD works fine for me as the table T015Z contains proper entries.
But i am not able to display the amount in INR which i assume is because of my table T015Z which does not have entries for LAKH or CRORE .
Does your table contain entries for LAKH or CRORE in production. Check the field WORT in T015Z for language E.
Regards
2008 Oct 16 11:43 AM
i have compared the entries in table T015Z in both the servers and the are the same....
2016 May 05 5:11 PM
2008 Oct 16 7:36 AM
Hi ,
Try this function module . Then there will be no such problems.
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
AMT_IN_NUM = W_EXBED
IMPORTING
AMT_IN_WORDS = W_EXBED_WORD
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2..
Regards.
Eshwar.
2008 Oct 16 7:37 AM
2008 Oct 16 9:25 AM
Hi Please try this code....
DATA : WORDS TYPE SPELL,
WORDS_SPELL TYPE CHAR1024.
parameters p_val type p decimals 2.
*DATA : NO TYPE I VALUE '231620.00'.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = p_val
CURRENCY = 'USD'
FILLER = ' '
LANGUAGE = sy-langu
IMPORTING
IN_WORDS = WORDS
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
.
WRITE : WORDS-WORD.
I this its working fine in Millions and thousands...
I hope it will be helpfull.
Thnaks
2008 Oct 27 5:45 AM