Depending on your business location, your customer location, your operating concern currency and your company code currency, you might need to maintain couple of exchange rate in your system. Most of our client have to maintain an average of 5 different currencies in their system, and in most case they do it manually.
There are already some literature explaining how to make the process easier, this blog on the SAP website for example.
Most likely if you are still reading this blog it's because you didn't find yet something answering your need, either because you do not have a exchange rate feed provider (expensive sometime for what they do), or your SAP is not reaching internet, or any other good reason.
For this use case, I will explain how to perform the action on a daily basis based on the official Brazilian exchange rate, provided by the Brazilian government:
1. First we need to get the feed. You can use any of your favourite programmatic language to call the following wsdl (I use python of course): , https://www3.bcb.gov.br/sgspub/JSP/sgsgeral/FachadaWSSGS.wsdl
2. Once the rate extracted, you can insert into SAP with the following BAPI: BAPI_EXCHANGERATE_CREATE
This BAPI will take in argument the information about the exchange rate you would like to modify, the format will look like this:
CURR_VAL = {
'RATE_TYPE':'x',
'FROM_CURR':'USD',
'TO_CURRNCY':'BRL',
'VALID_FROM':
Rate_type will depend on your setup, but most likely 'M'.
To validate the update, you need to commit the transaction by calling: BAPI_TRANSACTION_COMMIT
This can be done for any currency, as soon as you have identify the feed and the way to get the value of the exchange rate.
For a company doing the exercise everyday for one currency, we have estimated that it require 10 min of someone with a medium risk of error, which represent 200 min per month saved with this simple use case.
If you have any question, or willing to get the full code, please contact us.