BR-DE – XRechnung
BR-DE-22: attachment file name used more than once
ErrorXRechnung business rule (KoSIT)
Official message
[BR-DE-22] Das "filename"-Attribut aller "EmbeddedDocumentBinaryObject"-Elemente muss eindeutig seinSource: KoSIT XRechnung, version 3.0.2 (Schematron 2.6.0)
What the message means
Your invoice contains several embedded documents, at least two of which carry the same file name. The recipient stores the attachments under that name; with equal names one attachment would overwrite the other, or their assignment to the invoice would be unclear. XRechnung therefore requires unique file names. Typical cases are two proofs of service both exported as attachment.pdf, or a timesheet attached twice by mistake.
Common causes
- The software gives every attachment the same default name.
- The same attachment was added to the invoice twice.
- Several documents were exported under a generic name such as annex.pdf.
How to fix it
Give every attachment its own file name in the filename attribute of the embedded object, in UBL cbc:EmbeddedDocumentBinaryObject, in CII ram:AttachmentBinaryObject. Remove files attached twice instead of renaming them.
<cac:AdditionalDocumentReference>
<cbc:ID>Proof of service</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="attachment.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>Timesheet</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="attachment.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference><cac:AdditionalDocumentReference>
<cbc:ID>Proof of service</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="proof-of-service-2026-03.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>Timesheet</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="timesheet-2026-03.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>Frequently asked
Does the rule apply even when the attachments have different content?
Yes. Only the file name is checked. Two different documents with the same name trigger BR-DE-22 just like a duplicate attachment.
Is a different value in BT-122, the attachment identifier, enough?
No. The identifier is another field; the filename attribute itself must be unique.
Fields concerned
- BT-125
- BG-24
- BT-122
Related rules
- BR-TMP-5
- BR-TMP-4
- BR-DE-CVD-02
Check your invoice
The XRechnung validator reports this rule with the line number and location – right in your browser, without upload.
Technical details
- UBL · Context (XPath)
/ubl:Invoice | /cn:CreditNote- UBL · Schematron test
count(cac:AdditionalDocumentReference) = count(cac:AdditionalDocumentReference[not(./cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename = preceding-sibling::cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename)])- CII · Context (XPath)
/rsm:CrossIndustryInvoice- CII · Schematron test
count(//ram:AdditionalReferencedDocument) = count(//ram:AdditionalReferencedDocument[not(./ram:AttachmentBinaryObject/@filename = preceding-sibling::ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename)])
Explanation written on 14 September 2026