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

scripts

Former Member
0 Likes
962

how do we print the dollars in scripts instead of rupees? and how do we convert the rupees into dollars?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
926

Hi sandhya,

Currecncy in dollers is select WAERS as USD and for conversion from usd to local we have one function module.

convert_lacal_currency.

Hope this helps you, reply for queries. shall post the updates.

Regards,

kumar.

7 REPLIES 7
Read only

Former Member
0 Likes
927

Hi sandhya,

Currecncy in dollers is select WAERS as USD and for conversion from usd to local we have one function module.

convert_lacal_currency.

Hope this helps you, reply for queries. shall post the updates.

Regards,

kumar.

Read only

0 Likes
926

Hi,

FM "convert_local_currency" does not exist.

Instead you can use function module DRM_CONVERT_CURRENCY to convert amount from one currency to another.

Reward if useful.

Regards

Sayee

Read only

Former Member
0 Likes
926

Hi,

There will be a Table-Field to print the Dollars symbols, i do not have the SAP system, so look at the table so that you will get the field for the Dollor Symbols

Regards

Sudheer

Read only

Former Member
0 Likes
926

Hi Sansya,

Sorry for the inconveneince.

That FM is CONVERT_TO_LOCAL_CURRENCY.

Regards,

Kumar.

Read only

Former Member
0 Likes
926

Hi Sandya,

Sorry for the inconveneince.

That FM is CONVERT_TO_LOCAL_CURRENCY.

Regards,

Kumar.

Read only

former_member223446
Active Participant
0 Likes
926

if u convert the rupees into dollar.

use FM CONVERT_TO_FOREIGN_CURRENCY

if u convert the dollar into rupees then

use

CONVERT_TO_LOCAL_CURRENCY

Read only

Former Member
0 Likes
926

Hai Sandhya,

Here is Program for Curreny_conversion.

Z_CUURENCY_CONVERSION.

DATA: gd_fcurr TYPE tcurr-fcurr,

gd_tcurr TYPE tcurr-tcurr,

gd_date TYPE sy-datum,

gd_value TYPE i.

gd_fcurr = 'EUR'.

gd_tcurr = 'GBP'.

gd_date = sy-datum.

gd_value = 10.

PERFORM currency_conversion USING gd_fcurr

gd_tcurr

gd_date

CHANGING gd_value.

*WRITE:

  • / p_date,

  • p_fcurr,

  • p_tcurr.

  • Convert value to Currency value

&----


*& Form currency_conversion

&----


  • text

----


  • -->P_GD_FCURR text

  • -->P_GD_TCURR text

  • -->P_GD_DATE text

  • <--P_GD_VALUE text

----


FORM currency_conversion USING p_fcurr

p_tcurr

p_date

CHANGING p_value.

DATA: t_er TYPE tcurr-ukurs,

t_ff TYPE tcurr-ffact,

t_lf TYPE tcurr-tfact,

t_vfd TYPE datum,

ld_erate(12) TYPE c.

CALL FUNCTION 'READ_EXCHANGE_RATE'

EXPORTING

  • CLIENT = SY-MANDT

date = p_date

foreign_currency = p_fcurr

local_currency = p_tcurr

TYPE_OF_RATE = 'M'

  • EXACT_DATE = ' '

IMPORTING

exchange_rate = t_er

foreign_factor = t_ff

local_factor = t_lf

valid_from_date = t_vfd

  • DERIVED_RATE_TYPE =

  • FIXED_RATE =

  • OLDEST_RATE_FROM =

EXCEPTIONS

no_rate_found = 1

no_factors_found = 2

no_spread_found = 3

derived_2_times = 4

overflow = 5

zero_rate = 6

OTHERS = 7

.

IF sy-subrc EQ 0.

ld_erate = t_er / ( t_ff / t_lf ).

p_value = p_value * ld_erate.

ENDIF.

WRITE:

/ p_date,

p_fcurr,

p_tcurr.

WRITE:

/,/

t_er,

t_ff,

t_lf,

t_vfd .

ENDFORM. " currency_conversion

Hope this helps you a lot.

Regards,

Rama chary.Pammi