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: 

Covert Amount in words in other format

Former Member
0 Kudos
123

Hi,

I have a value say 222.20 .

When I use CALL FUNCTION 'HR_IN_CHG_INR_WRDS' then it gives output as:-

TWO HUNDRED TWENTY TWO Rupees TWENTY Paise.

But I want output as:

TWO HUNDRED TWENTY TWO And 20/100.

Plz. help.

Thanks in advance.

Manoj kumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
101

Hi,

do like this.

field-symbols:<fs> type any.

split amt at '.' into rs <ps>.

pass rs to the function module and get the text then concatenate (<ps>)/100 into final variable and then print it.

rgds,

bharat.

3 REPLIES 3

Former Member
0 Kudos
101

i guess you can not get such o/p by any FM .

but you can do it programatically.

1) just split the amount at decimal.

2) pass the whole no to function module and get the word description in one sting.

3) get the decimal part converted to whole no like 0.55 will be converted as .55*100 = 55.

4)then take a string and get values concatenated like 55,/,100.

where / and 100 will always remain same.

5) now concatenate the string 1 from word desc and this string 2 in staring3

6) string 3 is the required o/p.

former_member386202
Active Contributor
0 Kudos
101

Hi,

Us eFunction Module SPELL_AMOUNT

Regards,

PRashant

Former Member
0 Kudos
102

Hi,

do like this.

field-symbols:<fs> type any.

split amt at '.' into rs <ps>.

pass rs to the function module and get the text then concatenate (<ps>)/100 into final variable and then print it.

rgds,

bharat.