cancel
Showing results for 
Search instead for 
Did you mean: 

convert character to amount : Urgent

former_member187452
Contributor
0 Kudos

Hi,

I have developed script for check printing.

to convert amount in words , I am using function module HR_IN_CHG_INR_WRDS, since i want the amount in words in laks

but the value that comes from script is in character format.

so it goves dump CONVT_NO_NUMBER.

Can you please tell me how to convert character to amount.

Regards,

Bharat.

      • Helpful answers will be awarded

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187452
Contributor
0 Kudos

Thread close

Former Member
0 Kudos

Hi try this

ABAP function to convert Number to Words

***

    • Converting Number to Words**

  • This function comes handy mostly for the Finance module as they need to print out check

  • for the vendors. The function allows you to covert easily from numbers to words.

*

*

REPORT ZSPELL.

TABLES SPELL.

DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.

DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.

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. " SPELL_AMOUNT

Thanks and if useful please reward points