GetExRate
Software to retrieve the current currency rates from the ECB
© 2009 inbase gmbh
With graphical user interface or or to use in batch mode
Batchmodus, z.B.: GetExRate.exe -once -currency EUR -outfile rates.csv -delimiter ;
Parameter:
| |
-once |
=> |
execute, save rates and exit program |
| |
-currency EUR |
=> |
Base Currency |
| |
-today |
=> |
Date of today, not ECB Date |
| |
-dateformat dd.mm.yyyy [yyyymmdd] |
=> |
Date format |
| |
-delimiter tab [;], |
=> |
Field delimiter |
| |
-outfile out.csv [c:\rates.txt] |
=> |
Output file |
| |
-nofirstrow |
=> |
no field names in first row |
| |
-2fieldline |
=> |
2nd row is header line for SAP/DTW |
z.B. Batch:
@echo off
echo Starting get exchange rates ...
C:\GetExRates\GetExRate.exe -once -currency EUR -outfile rates.csv -delimiter tab -today
GUI/Options, choose currencies, Change text:

Notes about operation:
The exchange rates are calculated based upon the currency exchange rates issued by the ECB.
The “rate” column reflects the ratio of the euro to foreign currency, e.g. 1 EUR = 1.4881 USD.
The “rate2” column displays the reversed ratio of the foreign currency to the euro, e.g. 1 USD = 0.672 EUR.
Base rate selection
The issuance of the ECB’s exchange rates shall be made based upon the euro (EUR).
By means of the base rate, the calculation basis, you can also calculate the exchange rates upon a different basis.
For example, if USD is selected as the basis, then all exchange rates based upon 1 USD are displayed.
Thus, 1 USD corresponds to precisely 0.672 EUR or rate2: 1 EUR = 1.4881 USD (as of 15/10/2009)
Options
Select the currencies from the “Options” menu for which the calculations are supposed to be made or which you wish to prepare for importing into an ERP system or the like.
Delimiter: Delimits the fields for the outputting of the exchange rate file.
Display date: Displays date column on the list or outputs exchange rates in one file.
Additional functions
The date formats and designated additional functions must be activated via start parameters.
Thus, the date is displayed in the format “01/01/2010” via the GetExRate date format dd/mm/yyyy.
Example of Import to Büro Plus NexT:

Basisdaten / Importdatei, C:\rates.csv:
pos;date;currency;rate;rate2
1;14.10.2009;USD;1,4864;0,6728
2;14.10.2009;CZK;25,923;0,0386
3;14.10.2009;DKK;7,4441;0,1343
4;14.10.2009;GBP;0,94080;1,0629
5;14.10.2009;HUF;268,79;0,0037
6;14.10.2009;RON;4,2960;0,2328
ImportLayout, C:\GetExRate.bpl:
«Dummy»;«FrW.LtzDat»;«FrW.ISOBez»;«FrW.FrWFak»;«Dummy»
Batch with bpStarter:
@echo off
echo Starting get exchange rates ...
if exist C:\rates.csv del C:\rates.csv
C:\GetExRates\GetExRate.exe -once -outfile C:\rates.csv -today -dateformat dd.mm.yyyy
if not exist C:\rates.csv goto eofa
C:\bpStarter\bpStarter.exe -mandant Man1 -layoutfile C:\GetExRate.bpl -layoutgroup FrWImpListe -once
:eofa
@echo ende
Basis data / Import file, C:\rates.csv:
pos;date;currency;rate;value
pos;date;currency;rate;value
1;14.10.2009;USD;0,0575;17,3913
2;14.10.2009;HUF;10,4472;0,0957
3;14.10.2009;PLN;0,1624;6,1576
4;14.10.2009;EUR;0,0387;25,87
DTW-Import „C:\GetExRates.xml“:


Batchmode: "C:\Program Files (x86)\SAP\Data Transfer Workbench\DTW.exe" -s C:\GetExRates.xml
Result: SAP B1 Exchange Rates and Indices

|