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

Amount conversion based on currency

Former Member
0 Likes
788

Hi

I have a requirement for converting amount into words based on given currency.

I have tried doing this using function module spell_amount, but it is not working.

Points will be rewarded to the helpful answers.

Its very urgent.

Regards

Haritha.

5 REPLIES 5
Read only

Former Member
0 Likes
719

Hi Haritha,

Chek this program <b>RF_SPELL</b> with similar requirement

Read only

Former Member
0 Likes
719

hi Haritha,

Check with <b>HR_IN_CHG_INR_WRDS</b>


data: words(100) type c.
 
call function 'HR_IN_CHG_INR_WRDS'
     exporting
          amt_in_num   = '100000'
     importing
          amt_in_words = words.
 
 
write:/ words.

Read only

Former Member
0 Likes
719

Hello Check this:

Use the Function Module SPELL_AMOUNT to convert the integer into text.

DATA v_int TYPE i VALUE '1000'.

DATA words LIKE SPELL.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = v_int

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = words

.

WRITE words-word.

Vasanth

Read only

Former Member
0 Likes
719

Hi,

Use the Function module to convert the currency <b>CONVERT_TO_FOREIGN_CURRENCY</b>

to convert the Amount in words, look this link

http://www.geocities.com/victorav15/sapr3/abapfun.html

Regards

Sudheer

Read only

Former Member
0 Likes
719

Hi haritha,

REPORT ZSPELL.

TABLES SPELL.

DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.

DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.

SY-TITLE = 'SPELLING NUMBER'.

PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.

WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.

FORM SPELL_AMOUNT USING PWRBTR PWAERS.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = PAMOUNT

CURRENCY = PWAERS

FILLER = SPACE

LANGUAGE = 'E'

IMPORTING

IN_WORDS = T_SPELL

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3.

ENDFORM. " SPELL_AMOUNT