cancel
Showing results for 
Search instead for 
Did you mean: 

amount in words

Former Member
0 Kudos

hi all,

i'm workin on invoice form and the amount will be in numbers like 15002, 1562...

i need these amount should be displayed both in words and in numbers..

how to handle this sitaution..

please help me out..

regards

Suprith

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Use function module "SPELL_AMOUNT" to display amount in words.

Regards,

SaiRam

Former Member
0 Kudos
data: words type spell.
 call function 'SPELL_AMOUNT'
 exporting
    amount          = '100000'
*   CURRENCY        = ' '
*   FILLER          = ' '
*   LANGUAGE        = SY-LANGU
  importing
    in_words        = words.
 if words-word = 'ONE HUNDRED THOUSAND'.
  words-word = '1 LAKH'.
endif.
 write:/ words-word.

Answers (5)

Answers (5)

Former Member
0 Kudos

thanks preetha.

problem i'm facing is i've to display the amount in words in smartforms.

wat are the modifications i've to do in smart forms ..

former_member196280
Active Contributor
0 Kudos

Create program lines in your smartform and pass your variable amount in your INPUT and TEXT in your output.

USE FM SPELL_AMOUNT.

Regards,

SaiRam

Former Member
0 Kudos

can any one explain the detail procedure

Former Member
0 Kudos

Hi Suprith,

I've written the code above, please check it out.

Below is another one using different FM.

tables spell.

data : t_spell like spell.

data: pwaers like sy-waers.

parameters : amount like spell-number.

*PARAMETERS: AMOUNT LIKE PAMOUNT.

sy-title = 'AMOUNT TO WORDS'.

*PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.

*FORM SPELL_AMOUNT USING PWRBTR PWAERS.

call function 'SPELL_AMOUNT'

exporting

amount = amount

currency = pwaers

filler = space

language = 'E'

importing

in_words = t_spell

exceptions

not_found = 1

too_large = 2

others = 3.

*ENDFORM. " SPELL_AMOUNT

write:1 'RS.',5 t_spell-word, 'POINT', t_spell-decword, 'ONLY'.

Regards,

Pritha.

Reward if helpful.

Former Member
0 Kudos

Hi,

Here's an example,

Check it out,

data amt_in_num like pc207-betrg.

data amt_in_words(100) type c.

parameters: amount like amt_in_num.

call function 'HR_IN_CHG_INR_WRDS'

exporting

amt_in_num = amount

importing

amt_in_words = amt_in_words

exceptions

data_type_mismatch = 1

others = 2

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

write amt_in_words.

Hope this helps,

Regards

PRitha.

Reward if helpful.

Former Member
0 Kudos

This FM is to convert the amount in INR

Call the function ‘HR_IN_CHG_INR_WRDS’ passing the ‘total’ as i/p.

Export Parameters

amt_in_num = TOT_NETWR

Importing Parameters

AMT_IN_WORDS = TOT_WORDS

Regards,

Prabhu

Former Member
0 Kudos

Hi ,

Try using the FM SPELL_AMOUNT.

Regards

Arun