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: 

spelling the amount

Former Member
0 Kudos

Hi ,

Can any body tell me which can convert the amount into words. It should also convert the paise also into text.

Thanks,

BSV

1 ACCEPTED SOLUTION

Former Member
0 Kudos

also chk this

DATA : AMT_IN_WORDS(200).

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    AMT_IN_NUM         = '99999999999'
  IMPORTING
    AMT_IN_WORDS       = AMT_IN_WORDS
  EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS             = 2.

WRITE : AMT_IN_WORDS.

5 REPLIES 5

Former Member
0 Kudos

HI

SPELL_AMOUNT is a FM usefull for this.

Kishi.

Former Member
0 Kudos

Hello,

Use the FM <b>SPELL_AMOUNT</b>

Vasanth

Former Member
0 Kudos

Hi,

Try this sample code,

TABLES SPELL.

DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.

DATA : PAMOUNT(10) TYPE C VALUE '1000'.

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.

Thanks,

Reward If Helpful.

Former Member
0 Kudos

also chk this

DATA : AMT_IN_WORDS(200).

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    AMT_IN_NUM         = '99999999999'
  IMPORTING
    AMT_IN_WORDS       = AMT_IN_WORDS
  EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS             = 2.

WRITE : AMT_IN_WORDS.

Former Member
0 Kudos

Hi,

You could try this FM: SPELL_AMOUNT .

Hope it works.

Thanks,

Sandeep.