Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of amount useing spell_amount function

Former Member
0 Kudos
120

Hi

I am facing a peculiar problem while printing purchase invoice my invoice currency is Japanese Yen suppose in want to convert 670000.00 with spell_amount function it is converting 67 millions while for Indian rupees & USD it is printing correct. please help.

Thanks

Vinayak

2 REPLIES 2

christian_wohlfahrt
Active Contributor
0 Kudos
51

Hi Vinayak!

Check in table TCURX, how many decimals for the currencies are customized. Internally always two decimals are displayed (based on data element), but real value depends on TCURX (is converted by WRITE correctly).

If Yen is maintained with 0 decimals, then output is correct.

Regards,

Christian

0 Kudos
51

Hi,

so you've to move amount to a help-field

PARAMETERS: amount TYPE bseg-wrbtr DEFAULT '67000.00',
waers TYPE bkpf-waers DEFAULT 'JPY'.


DATA hfield TYPE p DECIMALS 0.
TABLES spell.

MOVE amount TO hfield.

CALL FUNCTION 'SPELL_AMOUNT'
     EXPORTING
          amount   = hfield
          currency = waers
*         language = 'EN'
     IMPORTING
          in_words = spell.

Andreas