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

SPELL_AMOUNT

Former Member
0 Likes
1,047

what r the limitation of function SPELL_AMOUNT

can it convert a number having more than 4 digit into

words

8 REPLIES 8
Read only

dani_mn
Active Contributor
0 Likes
1,007

HI,

Yes it can.

it can take upto 15 digits.

Regards,

Read only

Former Member
0 Likes
1,007

Yes you can do it.Check the SAP standard program <b>RF_SPELL</b>for your reference

Read only

Former Member
0 Likes
1,007

i guess its upto 3 decimals.the reason behind is if you see the structure SPELL

<b>DECIMAL</b> IN_DECI NUMC 3 0 Decimal places of the amount converted

<b>CURRDEC</b> CURRDEC INT1 3 0 Number of decimal places

these both the fields are of 3 length.

correct me,if i am wrong.

for NUMERIC you can give any value.i guess there is no such limit for a NUMERIC. but the above explanation is for DECIMALS.

also check this post,

SRiaknth

Message was edited by: Srikanth Kidambi

Message was edited by: Srikanth Kidambi

Read only

Former Member
0 Likes
1,007
i think it is taking as many

chk this prog by increasing the amount

REPORT ZSPELL.

TABLES SPELL.

DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '123451022343333235'.

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
Read only

Former Member
0 Likes
1,007

Hi Jitendra,

1) You can enter values upto 999 trillion ie it can accept upto 15 digits.

2) Upto this range it will converts into number into words.

3) To know more about this just check table TO15Z which actually converts numbers into words.

Thanks,

Vinay

Read only

0 Likes
1,007

u can use...

data: words(50) type c.
 
call function 'HR_IN_CHG_INR_WRDS'
     exporting
          amt_in_num   = '100000'
     importing
          amt_in_words = words.
 
 
write:/ words.

Read only

0 Likes
1,007

Hi,

Have a look at the documentation for the function module for a clear understanding of its usage and limitations.

Regards

Read only

Former Member
0 Likes
1,007

maximum is 23 and 2 dcimal places , execute RF_SPELL program , and check the amount length