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

SAP SCRIPTS - Urgent Please

Former Member
0 Likes
476

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

4 REPLIES 4
Read only

Former Member
0 Likes
453

Hello,

Use the FM <b>SPELL_AMOUNT</b> and

<b>CONVERT_TO_LOCAL_CURRENCY

</b>

Vasanth

Read only

Former Member
0 Likes
453

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

Read only

Former Member
0 Likes
453

Hi,

Use subroutines. In program use FM: 'SPELL_AMOUNT'

Regards,

Bhaskar

Read only

Former Member
0 Likes
453

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.