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: 

Function Module to convert amount to amount in words

Former Member
0 Kudos

Dear Guru ,

I want to know is there any sap standard Function Module to convert amount value to amount in words

Thanks & Regards

1 ACCEPTED SOLUTION

former_member181995
Active Contributor

HR_IN_CHG_INR_WRDS

6 REPLIES 6

former_member188827
Active Contributor
0 Kudos

try:

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = zsum

currency = is_bil_invoice-hd_komk-waerk

language = 'E'

IMPORTING

in_words = gt_amtwords

EXCEPTIONS

not_found = 1

too_large = 2

OTHERS = 3.

.

plz reward points if dis helps

former_member181995
Active Contributor

HR_IN_CHG_INR_WRDS

0 Kudos

Great its working!

0 Kudos

IN India it is working, but in other country not working...

Former Member
0 Kudos

Hi..

Use FM SPELL_AMOUNT.

This function module converts an amount or number into words. It can be used as follows:

Convert a number into words

To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.

Convert an amount into words

To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.

Program RF_SPELL contains a sample call of the function module. You can use it for test purposes.

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

I hope it helps.

Reward pts if helpful

Regards

- Rishika Bawa

ChrisSolomon
Active Contributor
0 Kudos

This thread is from 2008.....you raised it from the dead simply to post an OSS note link. Why?