‎2007 Jun 08 12:31 PM
Hi All,
How can I convert currency in to words in SAP scripts.
And how can I change currencies in to different country currencies.
Please explain me with examples.
Regards
SAISRI
‎2007 Jun 08 12:33 PM
Hello,
Use the FM <b>SPELL_AMOUNT</b> and
<b>CONVERT_TO_LOCAL_CURRENCY
</b>
Vasanth
‎2007 Jun 08 12:33 PM
HI,
use the function module
spell_amount
for inr use the function module
this works less than hundred crores only
IF G_AMOUNT LT '1000000000'.
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
AMT_IN_NUM = G_AMOUNT
IMPORTING
AMT_IN_WORDS = L_SPELLAMOUNT
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.
ENDIF.
reward points if helpful
regards,
venkatesh
‎2007 Jun 08 12:35 PM
Hi,
Use subroutines. In program use FM: 'SPELL_AMOUNT'
Regards,
Bhaskar
‎2007 Jun 08 1:02 PM
hi,
we can convert currency in to words in SAP scripts by using function modules.
<b>SPELL_AMOUNT </b> and
we can change currencies in to different country currencies by using function modules.
<b>CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency</b> . we call these FM in subroutine.
or by using <b>set country key <key></b> control statement also we can print the data asper country base. we keep this control statement in script edior.
regards,
AshokReddy.