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

Number to Word Convert Function

Former Member
0 Likes
6,259

Dear All,

Plz anybody have function name which can convert NUMBER to WORD.

example: 1213 to One Thousand Two Hundred Thirteen

thanks,

RP

Dear All,

Plz anybody have function name which can convert NUMBER to WORD.

example: 1213 to One Thousand Two Hundred Thirteen

thanks,

RP

7 REPLIES 7
Read only

Former Member
0 Likes
3,240

Hi

try using

SPELL_AMOUNT

Regards

Shiva

Read only

Former Member
0 Likes
3,240

use fm SPELL_AMOUNT.

regards

shiba dutta

Read only

Former Member
0 Likes
3,240

hi

you can use FM 'SPELL_AMOUNT'

Read only

Former Member
0 Likes
3,240

Hai ,

U can use ,

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT =

CURRENCY =

FILLER = SPACE

LANGUAGE = 'E'

IMPORTING

IN_WORDS =

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3.

please mark if helpful

Read only

Former Member
0 Likes
3,240

rp,

Pls. use below FM...

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = amouno

CURRENCY = 'USD'

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = SPELL

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3.

Check

http://www.sap-img.com/fu001.htm

(OR)

Also you can use FM HR_IN_CHG_INR_WRDS.

report ztest02.

data: words(50) type c.

call function 'HR_IN_CHG_INR_WRDS'

exporting

amt_in_num = '100000'

importing

amt_in_words = words.

write:/ words.

Pls. Reward if useful

Read only

Former Member
0 Likes
3,240

Hi,

Use SPELL_AMOUNT for:

1. convert an amount into words

2. convert a number into words (CURRENCY=space)

3. set decimal point in an amount and return number of decimals for the currency (LANGUAGE=space)

DATA v_int TYPE i VALUE '1000'.

DATA words LIKE SPELL.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = v_int

  • CURRENCY = ' '

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = words

  • EXCEPTIONS

  • NOT_FOUND = 1

  • TOO_LARGE = 2

  • OTHERS = 3

.

WRITE: words-word.

Hope, it will help you....

Thanks,

Chetan Shah

Read only

Former Member
0 Likes
3,240

Conversion of amounts to words utility SPELL_AMOUNT Convert numbers and figures in words convert an amount into words

convert a number into words (CURRENCY=space)

set decimal point in an amount and return number of decimals for the currency (LANGUAGE=space)

DATA:v_curr LIKE SPELL.
clear v_curr.
CALL FUNCTION 'SPELL_AMOUNT'
 EXPORTING
   AMOUNT          = 100
   CURRENCY        = ' '
*   FILLER          = ' '
*   LANGUAGE        = SY-LANGU
 IMPORTING
   IN_WORDS        = v_curr
 EXCEPTIONS
   NOT_FOUND       = 1
   TOO_LARGE       = 2
   OTHERS          = 3
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Hope this helps.