Include the postal address subdivision no more than once

Error FX-SCH-A-000748 Factur-X

Element 'ram:CountrySubDivisionName' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

CountrySubDivisionName occurs more than once in PostalTradeAddress. This element may occur no more than once.

What the rule means

CountrySubDivisionName identifies a subdivision within a country. The limit prevents ambiguous or repeated entries at this location in the postal address.

Please include the postal address subdivision no more than once

The sales agent’s postal address contains CountrySubDivisionName more than once. You can resolve this by limiting the entry to at most one element.

What to do
  1. Open the sales agent’s PostalTradeAddress.
  2. Remove duplicate CountrySubDivisionName elements so that no more than one remains.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>...</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>...</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>...</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

In the context of PostalTradeAddress, the rule checks that no more than one direct CountrySubDivisionName element is present; zero elements are allowed.

Where the rule applies

The rule applies to the sales agent’s postal address under SalesAgentTradeParty and checks PostalTradeAddress.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SalesAgentTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountrySubDivisionName)<=1