‎2008 Mar 11 4:45 AM
hey i used spell_amount FM for spell the amount when i used that i am getting incompatible error with export parameter, plz tell me how i maintain the charecterstics of my field in that case, plz help me out
(or)
i used another FM in that it is spelling ' rupee twenty five thousand and paise zero only' i want to delete ' and paise zero '
i want only 'rupees twenty five thousand only' for 25000. how to do this. plzz help me out
‎2008 Mar 11 5:01 AM
Better use this FM.
HR_IN_CHG_INR_WRDS.
or
This is the code.Try this
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.
‎2008 Mar 11 5:01 AM
Better use this FM.
HR_IN_CHG_INR_WRDS.
or
This is the code.Try this
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.
‎2008 Mar 11 5:09 AM
hey thanks for what you say if i use this again i am getting incompatible problem.
‎2008 Mar 11 5:04 AM
Hi,
Check this. I am getting out put as Twenty five thousand.
DATA: l_word TYPE spell,
l_amount(10) TYPE c.
MOVE '25000.00' TO l_amount.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = l_amount
CURRENCY = 'IND'
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = l_word
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.
WRITE l_word-word.
Thanks,
Vinod.
‎2008 Mar 11 5:11 AM
Hi,
Please the below link
http://www.sap-basis-abap.com/abap/abap-function-example-hr-in-chg-inr-wrds.htm
Regards,
Santosh
‎2008 Mar 11 6:29 AM