Skip to main content

Ledger export file

A ReconHub export rule with the export format Generic creates an export in the CSV format described in this document

The mapping to the specific fields is configured in the posting rules attached to the export rule.

Format

The CSV uses the semicolon as separator. Each line begins with a number that identifies the record type.

The following record types are supported:

Record typeDescription
100Header row
200Posting row
999Footer row

The structure of the CSV file is as follows:

  • Header row (100)
  • Posting row (200) - 0 to n repetitions
  • ...
  • Footer row (999)

Notes and constraints

  • A semicolon (;) is used as field separator.
  • Values containing a semicolon will be enclosed with double quotation marks (").
  • The export file is UTF-8 encoded.
  • The currency of a source account and target account must be identical.
  • All fields of a record are required but are left empty if the field is defined as optional.
  • Due to the automated processing of posting data, it is possible for the external program to generate postings outside the current fiscal year. It is recommended that when importing into the accounting software, a check is carried out which, in the event of an error, discards the respective entry and issues a corresponding warning.

Data types

Data typeDescriptionExample
numericInteger value [0-9] without prefix and separator.1234
amountNumeric decimal number with possible sign. Decimal separator = decimal point (.), symbol for negative sign = minus (-), a negative sign is output left-justified, a number grouping is not used.
The maximum length refers to the sum of the numeric characters including decimal point and sign.
-123.15 (with currency CHF)
-123 (with currency JPY)
stringAlphanumeric character string.
If the character string itself contains the separator (semicolon), the entire string will be enclosed in double quotation marks ((see Constraints).
This is an example
dateDate in format 'yyyyMMdd'.21090509
timeTime in format 'HHmmss'.164930
currency3-digit currency code according to ISO 4217 (see [ISO4217]).CHF

Field definitions

Legend

AbbreviationValueDescription
CConditionalThe value of the field is based on a condition.
OOptionalField is optional and can be empty.
MMandatoryField is mandatory and must not be empty.

100 Header row

FieldNameData typeLengthMandatoryDescriptionExample
1Recordtypenumeric3MConstant 100100
2Versionstring10MVersion of the ledger generic interface1.0
3ExportDatedate8MDate of export creation20190430
4ExportTimetime6MTime of export creation163258

200 Posting row

FieldNameData typeLengthMandatoryDescriptionExample
1Recordtypenumeric3MConstant 200200
2BookingDatedate8MPostingdate20190215
3DebitElement1string50OFreely usable, e.g. account number10020015
4DebitElement2string50OFreely usable, e.g. cost center10008
5DebitElement3string50OFreely usable, e.g. business areaFood
6DebitElement4string50OFreely usable, e.g. branchLU05
7DebitElement5string50OFreely usable, e.g. document typeCSV
8CreditElement1string50OFreely usable, e.g. account number10020025
9CreditElement2string50OFreely usable, e.g. cost center10008
10CreditElement3string50OFreely usable, e.g. business areaFood
11CreditElement4string50OFreely usable, e.g. branchLU05
12CreditElement5string50OFreely usable, e.g. document typeCSV
13Amountamount50MPostingamount20.70
14Currencycurrency3MCurrency of the posting amountEUR
15BookingTextstring500OPostingtextCredit VISA Berlin
16VATFlagnumeric1MDefines whether the booking contains a VAT code and, if so, on which side of the posting. Possible values:

0 = inactive
1 = debit
* 2 = credit
0
17VATCodestring50CVAT code of the accounting department. This field will be ignored if VATFlag is set to 0 (inactive).DE999999999
FieldNameData typeFieldMandatoryDescriptionExample
1Recordtypenumeric3MConstant 999999
2BookingCountnumeric10MNumber of postings in the file154

Example

Structure

1234567891011121314151617
100;1.0;20190509;175001
200;20190410;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;2640;CHF;"Bookingtext example; For spec";1;DE999999999
200;20190411;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;5800;CHF;Bookingtext example;2;DE999999999
200;20190413;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;5800;CHF;Bookingtext example;0;
...
999;30

Content

100;1.0;20190509;175001  
200;20190410;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;2640;CHF;"Bookingtext example; For spec";0;
200;20190411;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;5800;CHF;Bookingtext example;0;DE999999999
...
999;31