Application Development 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: 

Extracting exchange rates from OC41

Former Member
0 Kudos

Hi,

I need to extract exchange rates from OC41, which is not a table but a transaction. Please let be know how do I go about doing this.

Thanks and Regards,

Amit Nayak

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

The correspoding view is v_tcurr.

YOu can write select statements on this view.

Regards,

Ravi

6 REPLIES 6

Former Member
0 Kudos

hi

try the FM

<b>

BAPI_EXCHANGERATE_GETDETAIL</b>

Message was edited by: Ganesh Mynampati

0 Kudos

Take a look at all TCUR* tables. I don't think there is any BAPI or function module which gives you all of them in an internal table. All the BAPIs or function modules that I know will give you the rate for given two currencies.

Former Member
0 Kudos

hii

all the exchange rates from tranaction OC41 are there in the following tables..

i cross checked them

Goto SE11 and search for the following tables regarding currencies.

TCURR - Exchange rates

TCURV - Exchange rate types for currency translation

TCURC - Currency Codes

if you want to automate the exchange rate transfer ,it can be scheduled through <b>RSIMPCURR</b> program

look at this code ..this is for currency code 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.

  • 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.

ENDFORM. " currency_conversion

regards

Naresh

former_member181962
Active Contributor
0 Kudos

The correspoding view is v_tcurr.

YOu can write select statements on this view.

Regards,

Ravi

0 Kudos

Thanks for the reply .

Is this same a OC41 . I mean if the values in OC41 changes dynamically is it reflected in v_tcurr ?

Thanks,

Amit Nayak

0 Kudos

OC41 is the maintenance transaction for the view v_tcurc. So whatever changes you make there has to be there in this view or in fact the underlying table of this view which is TCURR.