cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Currency conversion for specific day

Former Member
1,795

Hi guys,

I´m using the currency conversion for the day when the query is executed.

In the table TCURR are values for example like that:

1.1.2011 USD 1.3211 to 1 EUR

1.12.2010 USD 1.2222 to 1 EUR

1.11.2010 USD 1.11111 to 1 EUR

.

.

.

When I´m selecting in the query (selection mask) the month January 2011 the currency conversion is ok and the currency rate from 1.1.2011 is selected.

When I´m selecting in the query (selection mask) the month November 2010 also the currency rate from 1.1.2011 is selected. I expected the rate from 1.11.2010 because the November 2010 was selected in query selection mask.

How can I do the settings for the query that for each month wich was selected the corresponding currency rate from TCURR is selected correct?

Is there some easy solution?

Thank you in advance for your answers!

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

First you need to include 0DATE in your query and create a Customer Exit variable on the InfoObject 0DATE. This variable should take the value from the Month Variable that request the user to enter the month value during report execution. You can populate the 0DATE customer exit variable with the first day of the month value.

While creating the Currency Translation Type in RSCUR, Goto the last tab of Time Ref. There select the option Time Reference from variable and select the variable that you had created on 0DATE.

Former Member
0 Likes

> First you need to include 0DATE in your query and create a Customer Exit variable on the InfoObject 0DATE. This variable should take the value from the Month Variable that request the user to enter the month value during report execution. You can populate the 0DATE customer exit variable with the first day of the month value.

>

> While creating the Currency Translation Type in RSCUR, Goto the last tab of Time Ref. There select the option Time Reference from variable and select the variable that you had created on 0DATE.

That sounds good.

But I´m not using the 0DATE in my query and I´m not sure if it makes sense to use it in my case.

Because the ERP delivers data which is uploaded on monthly basis and therefore only InfoObject 0CALMONTH is used in the query.

For example:

2011001 1000EUR ...

2010012 2000EUR ...

2010011 3000EUR ...

...

...

So the user is only able to select a month.

Is it possible to make the settings for InfoObject 0CALMONTH

Edited by: saplaz on Jan 26, 2011 8:39 AM

Edited by: saplaz on Jan 26, 2011 8:54 AM

Former Member
0 Likes

Hi,

If you have Calmonth in your query and your query data is shown for the calmonth selected, you can do the following:

Create a Currency Translation Type in RSCUR with Time Reference -->

Variable time Reference - Start of the Month

Standard Infoobject - 0Calmonth (Or whichever calmonth infoobject you use)

You can use this Currency translation type in the RKF/CKF of your query and assign the target currency (either fixed or dynamic variable).

This will pick up the currency conversion available at the start of the month entered.

Check this and see if it works.

- Shruti.

Former Member
0 Likes

> Hi,

>

> If you have Calmonth in your query and your query data is shown for the calmonth selected, you can do the following:

>

> Create a Currency Translation Type in RSCUR with Time Reference -->

> Variable time Reference - Start of the Month

> Standard Infoobject - 0Calmonth (Or whichever calmonth infoobject you use)

>

> You can use this Currency translation type in the RKF/CKF of your query and assign the target currency (either fixed or dynamic variable).

>

> This will pick up the currency conversion available at the start of the month entered.

>

> Check this and see if it works.

>

> - Shruti.

I did the adjustments after checking the options in currency translation like you have mentioned it.

In development the data amount is mostly zero but for two data sets I was able to check the conversion. I think it works and will check the results when transports are in testsystem.

I did the settings in currency translation:

tab exchange rate:

selected currency type and selected one specific currency type

dynamic currency determination

tab currency:

selected source currency from data set

selected target currency during conversion

tab time reference:

selected variable time reference and selected specific time reference (start of the month)

selected standard infoobject 0CALMONTH

-

-


I´m thinking about if I did maybe a mistake in tab currency with selection of "target currency during conversion" and not selecting "target currency from variable" (because in the query I´m using the variable in properties > conversion).

Former Member
0 Likes

Hi,

You have used "target currency during conversion" (in Currency tab) and it is fine. You need not give any currency variable in this definition. In that way you, will be able to use this conversion type in multiple queries having different target currency variables.

Let us know when you are able to test this with data.

Former Member
0 Likes

> Hi,

>

> You have used "target currency during conversion" (in Currency tab) and it is fine. You need not give any currency variable in this definition. In that way you, will be able to use this conversion type in multiple queries having different target currency variables.

> Let us know when you are able to test this with data.

I´ve tested for a few months it and it works fine as it seems.

The performance is also very good because in my case the users are using a few hundred up to thousand data sets.

So that currency conversion method seems to be very flexible instead of using conversion throught DSO.

Does somebody know how to mesure the performance of queries?

Former Member
0 Likes

You can check query performance statistics by executing and debugging the query in RSRT.

I usually check the query statistics, Do not use cache Display execution plan and Display SQL Query options while debugging query performance using RSRT.

The execution plan gives you time consumed at different reads of the query execution. The Query Statistics gives you time consumed by the query to read fact table, and number of records read from fact table etc.

To calculate currency conversion in the DSO, you could use the function module "CONVERT_TO_LOCAL_CURRENCY". You can specify source and target currency, date to use for exchange rate etc. This module will return the converted value, exchange rate etc.

If you are familiar with using function modules in your end or start routines, you can do this easily. If not you can check with an ABAP resource, they will be able to help you with this.

Good Luck.

MP.

Answers (1)

Answers (1)

Former Member
0 Likes

Are you sure this is the business requirement? Typically SO and PO transactions in SAP have a Price Date which is the date used for calculating exchange rates for a particular transaction.

We are calculating the currency conversions in the backend DSO's and Infocubes using the fixed pricing date and storing it in custom keyfigures and then just using the custom keyfigures in the query.

We noticed performance impacts when we used currency translation in the query.

MP.

Former Member
0 Likes

>

> Are you sure this is the business requirement? Typically SO and PO transactions in SAP have a Price Date which is the date used for calculating exchange rates for a particular transaction.

> We are calculating the currency conversions in the backend DSO's and Infocubes using the fixed pricing date and storing it in custom keyfigures and then just using the custom keyfigures in the query.

> We noticed performance impacts when we used currency translation in the query.

>

> MP.

Unfortunately in this case/project are no specific business requirements. Not only for currency conversion. Because the currency conversion can be done in various areas (DSO, Query ...) I thought I will be more flexible doing the conversion in query. Also the data amount is large but not exremly large and in addition to this the query selection of the clients will be very specific so that the performance will be fine. I assume that.

Do you have some examples or step-by-step guides for currency conversion in DSO or InfoCubes?

Thank you!