Prerequisites
- DATEV Unternehmen Online with Rechnungsschreibung and XRechnung module activated
- Mandant configured with complete seller contact info (Ansprechpartner, E-Mail, Telefon)
- Leitweg-ID obtained from each German public sector customer
- Valid USt-IdNr in Mandanten-Stammdaten (format: DE + 9 digits)
- ZRE portal account for federal submissions, or OZG-RE for state submissions
Step-by-Step Setup
Enable XRechnung in Mandanten-Stammdaten → Ausgabeoptionen
Stammdaten → Mandant → tab "Ausgabeoptionen". Enable "XRechnung-Ausgabe aktivieren". Select syntax: UBL (standard, Peppol-compatible) or CII (ZUGFeRD EXTENDED). For most cases, use UBL—it's directly accepted by ZRE. CII is only needed if you want hybrid PDF output (ZUGFeRD with XRechnung profile).
Complete mandatory seller contact info for BR-DE-17
Stammdaten → Mandant → tab "Kontakt". Fill in all three fields: Ansprechpartner (contact name), E-Mail-Adresse, Telefonnummer. XRechnung BR-DE-17 requires BG-6 (Seller Contact) to be complete. This is the #1 rejection reason for DATEV users—the fields exist but are often left empty during initial setup.
Add Leitweg-ID in Debitoren-Stammdaten for B2G customers
Stammdaten → Debitoren → select public sector customer → tab "Sonstiges" or "Rechnungsempfänger". Find field "Käuferreferenz (Leitweg-ID)". Enter the Leitweg-ID provided by your government customer. Format: 04011000-12345-67 (federal) or state-specific formats. Without this, DATEV generates BR-DE-15 error. The ID routes the invoice within government systems.
Create XRechnung invoice and export XML
Rechnungsschreibung → Neue Rechnung → select B2G customer with Leitweg-ID. Complete invoice including Lieferdatum (BR-DE-13 requires this). Output options → select "XRechnung" format. Click "Rechnung erstellen". DATEV generates compliant XML with CustomizationID = "urn:xoev-de:kosit:xrechnung:3.0". Download XML file for portal submission.
Submit to ZRE (federal) or OZG-RE (state) portal
For federal agencies: go to xrechnung.bund.de → log in with ELSTER certificate → upload XML. For state agencies: each Bundesland has its own OZG-RE portal (e.g., zre.nrw.de for Nordrhein-Westfalen). Some accept Peppol delivery too—check with your customer which method they prefer. Validate with Invoice Navigator first to avoid rejection and re-upload.
Common DATEV Errors
Why this happens in DATEV
DATEV users often forget to enter the Leitweg-ID when invoicing German government entities. The field exists in Debitoren-Stammdaten but isn't prominently displayed in the standard workflow. New users frequently miss it.
How to fix it
Go to Debitoren-Stammdaten > Rechnungsempfänger > Enter Leitweg-ID in "Käuferreferenz" field. Format: 04011000-12345-67 (check with your customer for exact ID).
Why this happens in DATEV
XRechnung requires seller contact (BG-6): name, email, and phone. DATEV has these fields in Mandanten-Stammdaten, but they may not be filled during initial setup, especially by Steuerberater doing quick client onboarding.
How to fix it
Complete Kontakt fields in Mandanten-Stammdaten: Ansprechpartner name, E-Mail address, and Telefon. All three are required for B2G.
Why this happens in DATEV
XRechnung requires delivery date (Lieferdatum) or service period (Leistungszeitraum). Quick invoices in DATEV may skip this mandatory field. Especially common with service invoices.
How to fix it
Always enter Lieferdatum or Leistungszeitraum (von/bis) on every invoice. For services, use the service period dates.
Why this happens in DATEV
Complex Buchungssätze with split VAT rates can cause €0.01 differences between sum of line amounts and document total. Common with multiple VAT rates on same invoice.
How to fix it
Review Buchungssätze before export. Ensure line totals sum correctly. Adjust rounding in Stammdaten > Rundungseinstellungen if needed.
Pre-Export Checklist for DATEV
Before exporting XRechnung from DATEV, verify these items:
- 1Verify Leitweg-ID is entered in Debitoren-Stammdaten > Käuferreferenz
- 2Confirm Mandanten-Stammdaten has complete contact info (name, email, phone)
- 3Check USt-IdNr format: DE + exactly 9 digits
- 4Ensure Lieferdatum or Leistungszeitraum is set on invoice
- 5Verify Buchungssatz line totals sum to document total
- 6Test with your first B2G invoice before going live
Testing Your Setup
Create a test XRechnung invoice for a B2G customer. Export the XML and validate before submitting to ZRE or OZG-RE portal.
💡 The German federal government (xrechnung.bund.de) provides official XRechnung test tools and sample files. Use these to verify DATEV output format.
Validate Your Output
Export XRechnung XML from DATEV and validate with Invoice Navigator before portal submission.
Validate XRechnungFAQ
How do I get the Leitweg-ID?
Can DATEV submit directly to government portals?
Related Guides
Ready to Test Your DATEV Export?
Upload your XRechnung invoice and get instant compliance feedback with DATEV-specific recommendations.
Validate XRechnung Invoice