Hi,
I have a requirement as below but I am unable to come up with a solution for it. Request all experts here to help me.
I will simplify the requirement as follow:
We have a BEx query which has characteristics YEAR, CURRENCY and keyfigure TOTAL.
Now, I have to add a new keyfigure TOTAL_FX which has to convert the TOTAL value to USD based on the data stored in another table/master data.
sy-datum = 18-Nov-2015.
My BEx Query:
YEAR | CURRENCY | TOTAL | TOTAL_FX |
2015 | EUR | 10 | 10 * 1.15 |
2015 | GBP | 20 | 20 * 1.75 |
2016 | EUR | 15 | 20 * 1.15 |
2016 | GBP | 25 | 20 * 1.75 |
Exchange rate table:
YEAR | CURRENCY | RATE |
2015 | EUR | 1.15 |
2015 | GBP | 1.75 |
2016 | EUR | 1.25 |
2016 | GBP | 1.65 |
Solutions tried:
- IF CONDITION: Can not use this since I can only check numbers in the condition and not the data like 'EUR' or 'GBP'.
- Currency Translation Type: Exchange rates are not stored in TCURR table. These are stored in an Infoobject or a DSO.
- Virtual Keyfigure: Not sure how to pass the currency values into BADI. I have checked some of 'How To' but none of it showed how can I pass the values from a BEx query to BADI and use it for calculation. I can share the codes in here if required.
I want to try more on the Currency Translation method and see if I can use the values stored in the master data can be used to create new type. Also, I was thinking of creating a new exchange rate type to store these values and then use it for calculation in the BEx query but not sure if we can update the TCURR table values from a masterdata object.
It would be great if you guys help me in solving the issue.
P.S: Its not possible to do it in the data modelling part because the exchange rate depends on the year derived from the system-date and not the year in the source record.
Thanks,
Dinesh