cancel
Showing results for 
Search instead for 
Did you mean: 

BPC Currency Translation - Average value

Former Member
0 Kudos

Hi Experts,

We have a requirement where the user wants average currency rate translation. Taking example as below, in the Rates model, we have the following value:

Let's say we have a transaction with LC value 1000 on 2017.04 and it will look up for the rate above. We want to calculate the average rate from time 2017.01 to 2017.04 to get the average conversion rate on 2017.04. In this case ((2.1 + 2.2 + 2.2 + 2.1) / 4) = 2.15. The currency conversion rate used would be 2.15. So the currency conversion value would be 1000 * 2.15 = 2150.

The current script and business rules are looking up the rate on 2017.04 (which is 2.1) directly. I am not familiar with the business rules and I think we might need a BADI to perform this calculation. Appreciate your help to provide some insight on this.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

You can use different rate entity and fill rates for this new rate entity calculating average of existing rates (using excel formulas or some script logic). Then use this new rate entity for currency conversion. Or you can use different category...

Former Member
0 Kudos

Hi Vadim,

Thanks for the suggestion. I actually tried to create a new rate type call A_AVG to store the average rate calculation value. In the business formula, I put formula [A_AVG] to look up for the rate however this does not work and it will give value 0 during currency translation.

I have done some reading. So we could only use the following standard one for the formula in business rule?

I also tried to create a new rate entity to store the average rate. I name the rate entity as "Average". By creating new rate entity, I could use rate type [AVG] and in the business rule formula, I could put it as [AVG]. However, when i tested, it also gives me value 0 during currency translation. There are related rates stored in Rates model. Following is the script that I have used. Things are working fine for the usual currency translation. It didn't work for me when I create a new rate entity "Average" or create a new rate type "A_AVG".

Do you have any idea on this? Appreciate your feedback on this.

Thank you.

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Looks like you don't have rates in Average rate entity. By the way rate entity name is case sensitive.

Former Member
0 Kudos

Hi Vadim,

I have done some test and check. We could declare formula like [A_AVG] in the business rule. It does not work previously as I do not maintain the local currency rate. Let's say we are doing currency conversion from EUR to USD where EUR is the local currency, we have to maintain both the currency rates in the Rates model or else the calculation will not work and it will give value 0.

Thank you very much for your guidance.

Thank you.