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

Convert Amount into Words

Former Member
0 Likes
516

I'm doing a report and I need to convert the amount into words... But I'm Having some problems.

I used FM SPELL_AMOUNT.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = v_tot_comm

language = 'E'

IMPORTING

in_words = words.

1. The problem is for example v_tot_comm = 989 is transformed as "Ninety-Eight Thousand Nine Hundred"

2. 23,492.58 - I need to write it this way TWENTY THREE THOUSAND FOUR HUNDRED NINETY TWO PESOS AND <b>58/100</b> ONLY

The bold part, I can do with string manipulation, concat and stuff.. but is there a function that automatically writes the decimals that way?

I'm doing a report and I need to convert the amount into words... But I'm Having some problems.

I used FM SPELL_AMOUNT.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = v_tot_comm

language = 'E'

IMPORTING

in_words = words.

1. The problem is for example v_tot_comm = 989 is transformed as "Ninety-Eight Thousand Nine Hundred"

2. 23,492.58 - I need to write it this way TWENTY THREE THOUSAND FOUR HUNDRED NINETY TWO PESOS AND <b>58/100</b> ONLY

The bold part, I can do with string manipulation, concat and stuff.. but is there a function that automatically writes the decimals that way?

3 REPLIES 3
Read only

Former Member
0 Likes
480

You move the v_tot_comm into an Integer and try so that u will only get SPEELING of that value.

For example pass only 23,492 instead of 23,492.58 and for 58 paise you do your string manipulation work.

Read only

Former Member
0 Likes
480

Check this FM 'HR_IN_CHG_INR_WRDS' which returns the amount as required by you, however in 'Rupees' which you can replace with 'PESOS'

Read only

0 Likes
480

thanks it worked!