Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
paddyw
Participant
0 Kudos
4,038

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) 

paddyw_0-1725375864568.png

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.

paddyw_1-1725376116142.png

 

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

paddyw_2-1725376347778.png

 

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

paddyw_3-1725376545054.png

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

Capture.PNG

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' 

Capture.PNG

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

paddyw_0-1725425777783.png

Error handling configuration is also available to cater for failed conversion

paddyw_1-1725425858260.png

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

paddyw_3-1725426030879.png

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

paddyw_2-1725425936305.png

Save and deploy the view

Final output

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

paddyw_4-1725426174488.png

The value help populate all the currency code nicely

paddyw_5-1725426222993.png

 

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

Capture.PNG

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. 

SAP Datasphere BW (SAP Business Warehouse) 

 

 

 

 

 

 

 

 

 

 

3 Comments