Application Development and Automation 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: 
Read only

Converting USD amount into word

Former Member
0 Likes
464

Hi,

I want to convert amount which is in USD into word i am using below FM

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = dmbtr

currency = waers

  • FILLER = ' '

language = langu

IMPORTING

in_words = spell

EXCEPTIONS

not_found = 1

too_large = 2

OTHERS = 3.

IF sy-subrc = 0.

**************

now my DMBTR amount is 21960.00 which is atually 219.60 USD but in dmbtr initially amount is coming as 21960.00 and when i convert it to word it is coming as USD : TWO HUNDRED NINETEEN, AND CENTS AS SIX THOUSAND, but acutally it should be USD DOLLAR TWO HUNDRED NINETEEN AND CENTS SIXTY ONLY, it is not coming peoprly so is there any other functionn module for this to convert USD , JPY into word.

regards,

zafar

Hi,

I want to convert amount which is in USD into word i am using below FM

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = dmbtr

currency = waers

  • FILLER = ' '

language = langu

IMPORTING

in_words = spell

EXCEPTIONS

not_found = 1

too_large = 2

OTHERS = 3.

IF sy-subrc = 0.

**************

now my DMBTR amount is 21960.00 which is atually 219.60 USD but in dmbtr initially amount is coming as 21960.00 and when i convert it to word it is coming as USD : TWO HUNDRED NINETEEN, AND CENTS AS SIX THOUSAND, but acutally it should be USD DOLLAR TWO HUNDRED NINETEEN AND CENTS SIXTY ONLY, it is not coming peoprly so is there any other functionn module for this to convert USD , JPY into word.

regards,

zafar

1 REPLY 1
Read only

Former Member
0 Likes
393

Hi Zafar,

I don't quite understand your requirement. If field DMBTR is of type P (e.g. like BSEG-DMBTR), then the internal representation of an amount of $219.60 is '219.60', not '21960.00'. That's because SPELL_AMOUNT gives a result of TWENTY-ONE THOUSAND NINE HUNDRED AND SIXTY dollars.

Kind regards,

Alvaro