09-16-2015 7:02 AM
HI Friends
I hope you all doing good.
I have an issue while converting currency into words i have used bellow code
DATA l_spell LIKE spell.
* If the currency is INR
IF P_CURR = 'INR'.
CALL FUNCTION 'Z_FI_AMT_WRDS_CONVERT'
EXPORTING
AMT = P_P_WAGE
IMPORTING
WORD = P_L_WRDS.
CONCATENATE '(' P_L_WRDS INTO P_L_WRDS.
CONCATENATE P_L_WRDS ')' INTO P_L_WRDS.
* If the currency is USD
ELSEIF P_CURR = 'USD'.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = P_P_WAGE
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = l_spell.
CONCATENATE '$' l_spell-word INTO P_L_WRDS.
when INR it is converting fine into words suppose for ex 311.06 it is showing RUPEES THREE HUNDRES ELEVEN SIX PAISA
IF USD it is not displaying properly it is showing $THIRTY ONE THOUSAND ONE HUNDERD SIX is displaying.
Please help me
*
09-18-2015 8:07 PM
It might be an issue with your parameter type, which may lead to wrong conversions.
Please take a look at sample program RF_SPELL and check the parameter types. Try to use in your program similar to this example.
Regards
Luis Becker
09-22-2015 2:28 PM
Dear Satish,
Please pass the parameter SPELL_AMOUNT currency parameter in the importing parameter.
and check the table tcurx in debugging mode. Because system is only fetching the Currency and decimal from tcurx table.
Thanks
Nishant.
09-23-2015 8:48 AM