Currency conversion in SAP Datasphere

Estimated read time 6 min read

Currency conversion is a fundamental capability across most SAP products, playing a vital role in enabling accurate financial reporting and analysis across different currencies. Whether you’re working within the traditional BW environment or leveraging the modern features of SAP Analytics Cloud, there are various techniques available to handle currency conversion effectively.

In this blog, I’ll take you through a comprehensive, step-by-step guide to modeling currency conversion in SAP Datasphere, helping you unlock the full potential of this essential feature.

Disclaimer: All the data created are for demo purposes, the approach is used to demo the functionality of the currency conversion in SAP Datasphere, not intended for production design or usage.

Step overview:

1. Create SAP currency tables/views

2. Create a task chain to trigger data loading for SAP currency exchange rate/currency code/decimals, etc

3. Create a transaction data table and view on top of it

4. Create a currency conversion column to perform currency conversion

Detailed steps:

1. Create SAP currency tables/views

From Data Builder, create SAP currency tables/views, we can load data from S4 source system(connection needs to be set up beforehand) 

The below screenshot shows the source of currency tables/views, multiple data flows also be created when currency conversion views are added to the space, you can also choose to get the source manually.

 

2. Create a task chain to combine all the data flows to trigger data loading for SAP currency exchange rate/currency code/decimals, etc 

Running the task chain to load all the currency related data from S4

 

3. Create a transaction data table and view on top of it

When creating a transaction data table, we will need to assign ‘Currency code’ semantic type to the Currency column

In this demo, we are going to convert transaction currency to

1. Global currency

2. Currency from Input Parameter

Let’s first take a look at the transaction data we created:

Exchange rate we loaded from S4 source system, in order to derive the correct date, we will need to use 99999999 minus the ‘Date as of which the Exchange rate is Effective’ 

4. Create a currency conversion column to perform currency conversion

Convert to GlobalCurrency

In the view build, select add a ‘Currency Conversion Column’, a new column will be generated automatically, configure the ‘Source Amoutn Column’, ‘Source Currency’, and ‘Target Currency’, in this case, it’s ‘GCCurrency’, we will use the CURRENT_DATE() as a reference date to perform the conversion,

Note: you can also create your own formula to use different date as reference date

Error handling configuration is also available to cater for failed conversion

Convert to Target Currency based on Input Parameter

In this case, we need to create Input Parameter from the downstream target, so that it will appear when we create currency conversion column in the calcuation node

Input parameter created in downstream target:

We go back to calculation node of currency conversion column, we can select Input parameter as a new option

Save and deploy the view

Final output

Now if we preview the final output, it will prompt us to choose the target currency

The value help populate all the currency code nicely

 

We choose JPY in this case, you can see the conversion performed nicely with result in both global currency(USD) and JPY: 

Conclusion

The currency conversion modeling in SAP Datasphere is very straightforward, it can support multiple currency codes easily. 

Hope you enjoy the reading, feel free to leave your comment or question below. 

  

 

 

 

 

 

 

 

 

 

 

 

​ Currency conversion is a fundamental capability across most SAP products, playing a vital role in enabling accurate financial reporting and analysis across different currencies. Whether you’re working within the traditional BW environment or leveraging the modern features of SAP Analytics Cloud, there are various techniques available to handle currency conversion effectively.In this blog, I’ll take you through a comprehensive, step-by-step guide to modeling currency conversion in SAP Datasphere, helping you unlock the full potential of this essential feature.Disclaimer: All the data created are for demo purposes, the approach is used to demo the functionality of the currency conversion in SAP Datasphere, not intended for production design or usage.Step overview:1. Create SAP currency tables/views2. Create a task chain to trigger data loading for SAP currency exchange rate/currency code/decimals, etc3. Create a transaction data table and view on top of it4. Create a currency conversion column to perform currency conversionDetailed steps:1. Create SAP currency tables/viewsFrom Data Builder, create SAP currency tables/views, we can load data from S4 source system(connection needs to be set up beforehand) The below screenshot shows the source of currency tables/views, multiple data flows also be created when currency conversion views are added to the space, you can also choose to get the source manually. 2. Create a task chain to combine all the data flows to trigger data loading for SAP currency exchange rate/currency code/decimals, etc Running the task chain to load all the currency related data from S4 3. Create a transaction data table and view on top of itWhen creating a transaction data table, we will need to assign ‘Currency code’ semantic type to the Currency columnIn this demo, we are going to convert transaction currency to1. Global currency2. Currency from Input ParameterLet’s first take a look at the transaction data we created:Exchange rate we loaded from S4 source system, in order to derive the correct date, we will need to use 99999999 minus the ‘Date as of which the Exchange rate is Effective’ 4. Create a currency conversion column to perform currency conversionConvert to GlobalCurrencyIn the view build, select add a ‘Currency Conversion Column’, a new column will be generated automatically, configure the ‘Source Amoutn Column’, ‘Source Currency’, and ‘Target Currency’, in this case, it’s ‘GCCurrency’, we will use the CURRENT_DATE() as a reference date to perform the conversion,Note: you can also create your own formula to use different date as reference dateError handling configuration is also available to cater for failed conversionConvert to Target Currency based on Input ParameterIn this case, we need to create Input Parameter from the downstream target, so that it will appear when we create currency conversion column in the calcuation nodeInput parameter created in downstream target:We go back to calculation node of currency conversion column, we can select Input parameter as a new optionSave and deploy the viewFinal outputNow if we preview the final output, it will prompt us to choose the target currencyThe value help populate all the currency code nicely We choose JPY in this case, you can see the conversion performed nicely with result in both global currency(USD) and JPY: ConclusionThe currency conversion modeling in SAP Datasphere is very straightforward, it can support multiple currency codes easily. Hope you enjoy the reading, feel free to leave your comment or question below.                Read More Technology Blogs by Members articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author