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: 

currency in smartform

Former Member
0 Kudos

Hi

In my smartform my currency is 329,543.000

And it is spelling it as

three hundred twenty-nine thousand five hundred fourt-three and zero paise only.

Where as it shouls spell it as

three lakhs twenty nine thousand five hundred and fourty three only

my coding is as below

v_rupees = spell-word.

V_CESS_ADD_FINAL = ( v_second - '0' ) * 100.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = V_CESS_ADD_FINAL

CURRENCY = 'INR'

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = spell

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3

.

v_paise = spell-word.

if v_rupees is not initial.

if v_paise is not initial.

concatenate 'RUPEES' v_rupees 'AND' v_paise 'PAISE ONLY' into v_frupees

separated by space.

else.

concatenate 'RUPEES' v_rupees 'ONLY' into v_frupees separated by space.

endif.

endif.

2 REPLIES 2

Former Member
0 Kudos

lalitha,

the word lakhs used by indians only, but other countries they use millions and billions so after thousands FM using millions and billions.

so for u r purpose spell_amount fm is not useful.

try with other fm.

Madhavi

Former Member
0 Kudos

Hi,

SPELL_AMOUNT FM will provide you the internationally accepted format. Lakhs are not valid. cross check with your customer in what format they want.

No FM exist for the expected result.