cancel
Showing results for 
Search instead for 
Did you mean: 

Spell amount in words

Former Member
0 Kudos

Hi,

I have a smartform based on the document type it should display the total amount in INR(Indian Ruppes) or USD(US dollars).Based on doc type how i can get the total amount in words.

If Doc.Type = 'X'

Rupees Hundred and Twenty Three Only

If Doc.TYpe = 'Y'

USD Hundred and Twenty Three Only

Accepted Solutions (0)

Answers (3)

Answers (3)

radhushankar
Participant
0 Kudos

Hi

In the corresponding text element you have to place a alternative option in that make a condition that

doc number = 'x'.

If the condition is true means the system will go for a 'YES' Option and Place a text element and call a function module to spell the amount.

If the conditon is NO Means the system will execute the rest and as said for the above conditon here also u have incorporate the textelemt and call a function module as pass the detials as per your requirement.

Thanks and Regards

Arun Joseph

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

If Doc.Type = 'X'

*Rupees Hundred and Twenty Three Only

call function 'HR_IN_CHG_INR_WRDS'

exporting

amt_in_num = '100000'

importing

amt_in_words = words.

If Doc.TYpe = 'Y'

*USD Hundred and Twenty Three Only

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = v_int

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = words

.