Below, we will walk you through a specific example of automating exchange rate retrieval using the SAP Integration Suite, as explained by our expert Jan Tůma in his blog on SAP Community. „This blog is part of our series on automating exchange rates in SAP using Market Rates Management (MRM). In the previous articles, we set up SAP Market Rates Management in SAP BTP. Now, let’s focus on automating the process of fetching exchange rates with SAP Integration Suite,“ explains Jan Tůma.

Step 1: Setting up SAP Integration Suite
„Before we start building the iFlow, you need to have SAP Integration Suite set up in SAP BTP and the MRM service instance created, so that you can receive exchange rates from an external API,“ continues Jan Tůma. This is the first step for connecting your systems with external exchange rate databases.
Step 2: Creating the Integration Flow (iFlow)
„To fetch exchange rates from an external provider, such as the Slovak National Bank, we use the HTTP adapter in SAP Integration Suite. This adapter will call the API of the institution and retrieve data in XML format,“ explains Jan Tůma.
In our case, we will be using the API of the Slovak National Bank, which provides up-to-date exchange rates for multiple currencies.
As the following XML response shows, the data includes currency pairs and their current exchange rates, which we will then process for further use in SAP systems.
Step 3: Transforming the Data
„Once the data is received from the API, it must be converted into a format compatible with SAP MRM. To achieve this, we use a simple Groovy script to transform the data from XML to JSON format,“ explains Jan Tůma. This step is crucial for correctly processing the data in your SAP system.
The Groovy script processes the XML data and converts it into a format that SAP MRM expects for accurate exchange rate processing. As shown in the following code, this script automatically formats the data, which is key to sending it to SAP MRM.
Step 4: Sending Data to SAP MRM
„Once we have the data in the correct format, we use an HTTP request to send the data to SAP MRM. This step is essential for updating the exchange rates in real-time,“ adds Jan Tůma. „Make sure to set up a regular schedule for automatic updates to ensure that exchange rates are always up-to-date and your system runs efficiently,“ concludes Jan Tůma.

Step 5: Automating the Process 24/7
„Deploy the iFlow and automate the process for daily updates. Also, monitor the logs for any errors,“ advises Jan Tůma. This step ensures that the system runs smoothly 24/7 without any interruptions.
With SAP Integration Suite, you can automate the process of managing exchange rates and integrate various SAP systems with external data sources. This tool saves time, eliminates manual errors, and ensures smooth data flow between systems.
If you'd like more details on implementing this process, feel free to contact us.