Sie sind auf Seite 1von 7

Report RFIMPNBS - Upload Exchange Rates from ECB Technical Documentation

European Central Bank (ECB) publishes every workday an exchange rate list of selected currencies to Euro. The reference rates are usually updated by 3 p.m. C.E.T. They are based on a regular daily concertation procedure between central banks across Europe and worldwide, which normally takes place at 2.15 p.m. CET. The exchange rates are valid for the day they were published. However, in some countries there is a legal requirement that newly published exchange rates have to be valid as of the next day. All exchange rates published by ECB use indirect quotation. Indirect quotation expresses how much foreign currency you get/pay for 1 EUR. Report RFIMPNBS was designed for automatic download of exchange rates from ECB web page and their upload into ERP system. PREREQUISITES Make sure you read OSS note nr. 1286897 - Import of Exchange Rates from ECB and its related notes. Pay special attention to setting up RFC destination to ECB server as described in the note 1286897. CURRENCIES AND EXCHANGE RATES BASICS In order for ECB exchange rate list to be able to be uploaded into ERP system, basic customizing must be setup for affected currencies. 1. View V_TCURC - Currency codes All currencies must be defined in this view. Each currency is defined by its Currency ID, ISO Code, Alternative key and Description.

Fig ur e 1: V _T C URC V i e w S a mp le

2. View V_TCURF - Translation Ratios In this view it's necessary to define translation ratios for currencies to Euro. Translation ratio determines number of units of first currency compared to number of units of second currency.

Usually ratio 1:1 is used. For some currencies it's possible to use different ratio e.g. 100:1 or 1000:1 (1000:1 means that exchange rate expresses the price of 1000 units of a currency for 1 Euro). Nevertheless ECB publishes its exchange rates always in ratio 1:1, therefore the same should be set in customer systems as well. Although the system enables to set a different one, this can lead to report's errors as shown later in this document. The currencies are grouped in Exchange Rate Types. The most used one is type EURX. "Currency From" is a foreign one, "Currency To" is to be EUR. It's also necessary to fill in "Valid From" date.

Fig ur e 2: V _T C URF Vi e w Sa m pl e

3. View V_TCURR - Currency Exchange Rates This view contains current and previous exchange rates. Normally the entries of this view are automatically updated by the system and RFIMPNBS report, but can be also updated manually. Because RFIMPNBS report before upload compares last exchange rates stored in this view, it's important to understand how they are stored. Following picture shows the example of the view. For each currency within the exchange rate type there are many entries, determining valid one for appropriate date. It's clear, that there can be several ways how to store the exchange rate. The way RFIMPNBS stores them is, it uses indirect quotation and ratio 1:1 (this is taken from V_TCURF during insertion). Obviously exchange rate can be stored also in "direct quotation" field and can have different ratio. As already stated ECB uses indirect quotation and ratio 1:1. Sometimes it's necessary to update the view manually and move "direct quotation" amount into "indirect quotation" field. Indirect quotation amount equals to reciprocal value of direct quotation amount (1/x).

Fig ur e 3: V _T C URR V i e w S a mp le

4. View V_TCURN - Quotations In this view quotation types can be set individually for particular exchange rate or for group of exchange rates. As shown in table below, if only "To" currency is filled (e.g. EUR), this is valid for exchange rates of all currencies to EUR. Make sure that always indirect quotation is used.

Fig ur e 4: V _T C UR N Vi e w S a mp le

RUNNING THE REPORT After starting RFIMPNBS report, following selection screen appears:

Fig ur e 5: Se le ct io n S cr ee n of R FIM PNBS R ep ort

DESCRIPTION OF SELECTION SCREEN PARAMETERS General Data section Date in Data Source The exchange rates to be uploaded are valid from this date. They cease to be valid on the next date entered. If no further date has been entered, the validity is unlimited until one is entered. At the same time, report checks if ECB input file contains the same release date. If this is not the case, error message is issued. Valid for Next Day In some countries there is a legal requirement that published exchange rates must be valid as of next day. Checking this checkbox will cause uploading and saving them with the date entered in above parameter plus one. Exchange Rate Type Key under which you define exchange rates in the system. As an example you can use the exchange rate type to define a bank buying and selling rate and an average rate for the translation of foreign currency amounts. You can use the average rate for foreign currency translation, and the buying and selling rates for the valuation of foreign currency amounts. The most common exchange rate type is "EURX". From Currency This parameter determines source currencies for which the exchange rates to EUR are to be uploaded. This parameter enables multiple entries. The list of those currencies must be a subset of those published by ECB. To-currency This parameter determines target currency to which all other are referred (local currency). Here is always used Euro (EUR). Variance in Percent This parameter determines the maximal allowed difference in percent of current ECB exchange rate to the previous rate stored in V_TCURR table, which date is lower than the one requested. The variance is calculated in following way: Variance [%] = 100 * ABS (ECB_rate - V_TCURR_rate) / V_TCURR_rate. If this calculated variance is greater than the one set on selection screen (parameter GP_DEV), system issues an error. Test If this checkbox is checked, only simulation takes place. The report performs all the checks, but at the end no posting and V_TCURR view update is performed. Data Source section This section determines the source of data containing exchange rates published by ECB for selected date. RFC Destination If this radio button is checked, report tries to read the data online. At the same time RFC destination must be customized properly in SM59 transaction according to OSS Note nr. 1286897. At the same time this target destination must be put in the field next to the checkbox. This functionality is not available in all releases. Application Server If this radio button is checked, report reads the data from a file stored on application server. Correct file name including its application server path must be entered. Local Workstation If this radio button is checked, report reads the data from a file stored on local computer (front-end). Correct file name including its local workstation path must be entered.

Fig ur e 6: R e su lt of Su cc e ss fu l R un of RF IM PNBS R ep ort

POSSIBLE ERRORS AND THEIR SOLUTION During run of RFIMPNBS report different types of error can occur. Both in test and update run

Fig ur e 6: Ex a mp le of er ror s of R FIM PNBS re por t

Hereafter the most common errors and their solution are described. Sample error messages are highlighted bolt. Not highlighted parts of the messages are variables and may differ according to current situation. In data source are not valid data for date 22.09.2012 Date in input file or ECB web site containing exchange rates list doesn't correspond to that on selection screen. Other possibility of this error can be the fact that input data source as well as input screen contains exchange rate for a currency that hasn't been defined in the system

Response:

correct the date on selection screen or use proper input data source. Check also if all involved currencies are properly defined as described above.

USD Line 1: Entry already exists, insert is not possible This message means that exchange rate for displayed currency and date in question was already imported and stored in the system. Response: If you need, from whatever reason, to rewrite the entries, remove them from V_TCURR view. Alternatively you can remove concrete currency from selection screen and thus preventing this to be uploaded. RUR Missing exchange rate for ISO code RUB Mostly the reason of this error is, that currency (in our example RUB) has incorrectly defined its ISO code (in our example RUR) and it doesn't correspond to that published by ECB. Other possibility is that currency is not defined in the system at all. Response: Check currency existence or correct currency's definition in V_TCURC view (field ISOCD). IDR Maintain conversion factors for IDR / EUR (currency type EURX) This message means there are no conversion factors maintained for displayed currency in V_TCURF at all. Response: Maintain appropriate currency in V_TCURC/V_TCURF views correctly. RUB Different number of valid digits 39.4883 0.39488 These errors are caused by incorrect factors of displayed currency. Exchange rates are in SAP system stored internally in variables with 5 decimal places. The report checks the amount of valid numbers in ECB exchange rates and those recalculated by factors. In above example RUB has 100:1 factor set in V_TCURF table. ECB exchange rate is 39,4883 RUB for 1 EUR, it means it has 6 valid digits. After recalculation it with factor 100:1 following rate is achieved 39,4883 / 100 = 0, 39488 (rounded to 5 decimal place). As you can see it has only 5 valid digits, the last one gets lost. Because numbers of valid digits of ECB and recalculated exchange rates are not the same, system issues error messages. Response: set proper factors in V_TCURF view. RUB File on applicat.server cann't be opened 39.4883 0.39488 This message has the same meaning like the one above (Different number of valid digits), which replaced it in higher releases. CNY Line 5: 6.161,7% difference to current exchange rate The report compares actual exchange rate publish by ECB to that latest one stored in the system. It calculates variance (difference in %). In case this difference is higher than that put in selection screen, report issues error message. See description of "Variance" parameter for detailed explanation how it's calculated. Usually this variance is caused by currency exchange rate progress. Nevertheless, sometimes it's caused by stored exchange rate. All exchange rates published by ECB are in indirect quotation. That's why also the report calculates everything in indirect quotation (it means how much foreign currency you get for 1 EUR). It also expects that indirect quotation is stored for previous rates in V_TCURR view. Following example shows what happens if previous exchange rate is direct one instead of indirect: Previous CNY:EUR exchange rate stored is 8,00300 but as direct one! Minus sign expresses direct quotation. The indirect is calculated as 1/x. In our case 1/8,00300 = 0,12495. ECB exchange rate is 7,8235. The variance is: 100 * (7,8235 - 0,12495) / 0,12495 = 6161,3. This is greater than 10% set on selection screen, even greater than maximal 999 %. Response: Check and clean up previous exchange rates in V_TCURR view or set higher value to "Variance in percent" parameter on selection screen. There is another possibility. Set "Variance in percent" on selection screen to 0. In such a case the variances won't be taken into account and the report will finish successfully. If you run the report productively (not in test mode) new correct exchange rates will be written into V_TCURR view. All other runs for later dates will refer to the new values in V_TCURR.

After fixing appropriate error re-run the report until it's error free.

APPENDIX Small English-German Terminology Vocabulary First line contains English text, the second line in bold contains its German translation. Selection Screen Texts: Date in Data Source Datum in Datenquelle Valid for Next Day Gltig fr nchsten Tag Exchange Rate Type Wechselkurstyp From currency Von-Whrung To-currency Nach-Whrung Variance in Percent Abweichung in Prozent RFC Destination RFC-Destination Application Server Anwendungsserver Local Workstation Lokale Workstation

Error messages: In data source are not valid data for date <date> Datenquelle enthlt ungltige Daten fr Datum <Datum> <Currency> Line <n>: Entry already exists, insert is not possible <Whrung> Zeile <n>: Eintrag schon vorhanden, kein Insert mglich <Currency1> Missing exchange rate for ISO code <Currency2> <Whrung1> Fehlender Wecheslkurs fr ISO-Code <Whrung2> <Currency1> Maintain conversion factors for <Currency1> / <Currency2> (currency type <Curr_type>) <Whrung1> Bitte Umrechnungsfaktoren fr <Whrung1> / <Whrung2> (Kurstyp < Kurstyp>) pflegen <Currency> Different number of valid digits <n1> <n2> <Whrung> Abweichende Anzahl gltiger Ziffern <n1> <n2> <Currency> File on applicat.server cann't be opened <n1> <n2> <Whrung> Datei auf Anwendungsserver kann nicht geffnet werden <n1> <n2> <Currency> Line <n1>: <n2> % difference to current exchange rate <Whrung> Zeile <n1>: <n2> % Abweichung vom aktuellen Kurs

Das könnte Ihnen auch gefallen