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

Explain about RF_SPELL

Former Member
0 Likes
384

i want to converts amount value in numbers to Rupees .

Could anyone please explain about RF_Spell

2 REPLIES 2
Read only

Former Member
0 Likes
351

Use FM HR_IN_CHG_INR_WRDS or SPELL_AMOUNT

Here is the sample code

DATA AMT_IN_NUM LIKE PC207-BETRG.

DATA AMT_IN_WORDS(100) TYPE c.

PARAMETERS: AMOUNT LIKE AMT_IN_NUM.

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

amt_in_num = AMOUNT

IMPORTING

AMT_IN_WORDS = AMT_IN_WORDS

EXCEPTIONS

DATA_TYPE_MISMATCH = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WRITE AMT_IN_WORDS.

Reward Points if it is helpful

Thanks

Seshu

Read only

gopi_narendra
Active Contributor
0 Likes
351

Make use of the FM : SPELL_AMOUNT

Regards

Gopi