Table of Contents
III Supported ZUGFeRD Versions and Marketing Documents
IV Enabling PDF/A File Generation
I Introduction (Back to Table of Contents)
In this section, we would like to highlight some general background and information in relation to the new ZUGFeRD implementation in Coresuite Designer.
In response to the legal changes in Germany, which took effect in January 2025, and the increasing adoption of the ZUGFeRD standard, we introduced the possibility of generating the PDF/A format in Coresuite Designer. This format combines both human-readable and machine-readable components by integrating PDF with XML.
The main difference between a standard PDF and a PDF/A file is that PDF/A includes an embedded XML file, which enables automated data processing. Additionally, when you open a PDF/A file in a PDF viewer, a notification may appear, indicating that the document is optimized for long-term archiving (PDF/A).
Coresuite Designer 8.30 introduced the first iteration and with this version, you could generate ZUGFeRD PDF/A files with ZUGFeRD version 2.2 for Sales AR invoices. In this article, you can find the improved implementation delivered in Coresuite Designer 8.40.
For more detailed information on ZUGFeRD and electronic invoicing in Germany, please visit the FeRD - Forum elektronische Rechnung Deutschland.
II Prerequisites (Back to Table of Contents)
- Coresuite Designer 8.40 is installed
III Supported ZUGFeRD Versions and Marketing Documents (Back to Table of Contents)
With Coresuite Designer 8.40, we support generating ZUGFeRD files of version 2.0 and 2.3.
The PDF/A format file generation is supported on the following marketing documents in SAP Business One:
- Sales AR Invoices
- Sales AR - Credit Memos
- Sales AR - AR Down Payment Invoice
- Sales AR Reserve Invoice
- AR Down Payment Request
IV Enabling PDF/A File Generation (Back to Table of Contents)
PDF/A generation is configurable at the PrintDefinition level for each supported marketing document.
- Open any supported marketing document (e.g., A/R Invoice).
- Click the pen icon to open the printdefinition.
- Locate the "PDF Type" dropdown.
- Select "PDF/A format" to enable the generation of a compliant PDF/A format file for this printdefinition.
Configuring the Global ZUGFeRD Version
You can configure the general/default ZUGFeRD version for all PDF/A format files on supported documents system-wide in:
- Go to Administration → Add-Ons → Coresuite Designer → Configuration → "General" tab.
- Pick the desired value from the new "ZUGFeRD Version" selection field.
Available Options in the Dropdown:
- Latest - Always uses the most recent version supported by the 3rd party library (automatically applied when the Designer is updated).
- 200 - 2.0 - Forces use of ZUGFeRD 2.0, the initial release version.
- 230 - 2.3 - Forces use of ZUGFeRD 2.3, currently the latest supported version.
Note: Coresuite Designer uses an external library to generate PDF/A format files. Supported ZUGFeRD versions depend on the capabilities of this library and will be extended as new versions are released and integrated.
Overriding the Global Version Per Business Partner
To meet customer-specific e-invoicing requirements, you can override the general ZUGFeRD version for individual customers:
- Location: Business Partner Master Data
- Field: User-Defined Field (UDF) named "ZUGFeRD Version"
When this UDF is populated, it takes priority over the global configuration for any documents generated for that business partner.
V Data Mapping Tables (Back to Table of Contents)
To enhance flexibility in handling ZUGFeRD format we implemented for customers data mapping tables to define their own user-specific UDFs (User-Defined Fields), VAT categories, and Units of Measures (UOMs).
1. User Defined Fields (Back to Table of Contents)
These UDTs SWA_LD_ZUGFERDMAP and SWA_LD_ZUGFERDMAP90 map customer User-Defined Fields (UDFs) from SAP Business One into the XML structure used by ZUGFeRD.
How this data mapping works
Customers can define their own UDFs using these mapping tables:
- SWA_LD_ZUGFERDMAP - for data source Document_88
- SWA_LD_ZUGFERDMAP90 - for data source Document_90
Coresuite Designer retrieves data using the B1_Data datasource, which is used to populate the ZUGFeRD XML file. The mapping between B1_Data elements and the XML structure is stored in the @SWA_LD_ZUGFERDMAP or SWA_LD_ZUGFERDMAP90 table.
- Property - This field in the UDT must not be modified. It serves as a static identifier that links layout fields with their corresponding XML tags and ensures the correct functioning of the mapping logic.
-
Datasource - This field determines the source table used by the layout designer. It specifies which internal SAP Business One data table is accessed during layout generation.
Example: OINV for invoice headers, INV1 for invoice lines, etc. - Field - This is the specific column within the chosen datasource that is mapped to the corresponding element in the ZUGFeRD XML. Here, users may also specify UDFs (User-Defined Fields) if custom data points need to be integrated.
- Datasource Override - Allows specifying a different datasource than the default one in the "Datasource" column.
- Field Override - Enables specifying a different field than the default one in the "Field" column.
Important: If overriding either the datasource or field, both "Datasource Override" and "Field Override" must be set to ensure proper functionality.
For each XML element, the "Datasource Override" and "Field Override" values must exist in the B1_Data datasource within the Designer layout.
Warning: Only the "Datasource Override" and "Field Override" columns should be modified. All other columns are system-managed and may be updated automatically during Coresuite Designer upgrades. Changing system columns could lead to unexpected behavior.
Example Use Case
If you need to replace Document.DocNum with a user-defined field (U_SampleUDF), you can set:
- Datasource Override → "Document"
- Field Override → "U_SampleUDF"
Considerations for Datasource Changes
If overriding the default datasource, ensure you do not mix header and row tables. Headers typically contain a single row, whereas row tables can have multiple entries, making it difficult to determine the correct line. For row datasources, the Datasource Override should always match the default datasource.
2. Unit of Measure (UOM) (Back to Table of Contents)
The mapping table SWA_LD_ZUGFERDUOM - SWA_LD Zugferd UOM Map enables mapping for Unit of Measure (UOM).
It allows customers to define custom mappings between the INV1.unitMsr field in SAP Business One and the UnitCode used in the TradeLineItem section of the ZUGFeRD XML document.
How to Create a Mapping
1. Add a new row in the UDT "SWA_LD_ZUGFERDUOM" from the SAP Business One to define a mapping.
2. Fill in the relevant columns:
- SAP Unit Measure - INV1.unitMsr value as is defined in your SAP Business One.
- Zugferd Unit Code - Corresponding ZUGFeRD Unit Code.
- Both fields Code and Name must be filled. Use a zero-padded row number, eight characters long.
Example: 00000001, 00000002, etc.
Note: If no mapping is found for a unit of measure used in an invoice line, the system will default to the ZUGFeRD UnitCode H87 (piece).
To assist with correct mapping, a reference file containing valid ZUGFeRD unit codes is provided at the end of this article in a file UOM_Codes.xlsx.
3. TAX Categories (Back to Table of Contents)
The mapping table SWA_LD_ZUGFERDTAX - SWA_LD Zugferd Tax Map allows flexible and precise control over how SAP Business One VAT codes are translated into ZUGFeRD-compliant tax categories.
How VAT Categories Are Determined
Coresuite Designer does not assume a standard VAT group or VAT rate within a given SAP Business One system, as these can vary significantly between installations and local customizations. Instead, the system dynamically reads the VAT group and VAT rate for each line item on the invoice at runtime.
- The VAT rate is directly included in the ZUGFeRD XML document for each invoice line.
- The VAT group is used to determine the ZUGFeRD tax category by checking against the SWA_LD_ZUGFERDTAX mapping table.
Default Behavior and Custom Mapping
If no explicit mapping is found for a given VAT group, the system defaults to using the "S" (Standard) tax category in the ZUGFeRD document.
To support scenarios where local or customized VAT groups do not align with the default "S" category, the mapping table allows users to define specific relationships between SAP VAT groups and the appropriate ZUGFeRD tax categories.
- The "S" tax category is used as a fallback when no mapping is defined.
- Only non-standard VAT groups - those that should not be treated as "S" - need to be explicitly mapped in the SWA_LD_ZUGFERDTAX table.
VI Specific Logic (Back to Table of Contents)
This section documents ZUGFeRD-specific logic implemented in Coresuite Designer that may not be immediately visible in the standard configuration or UI. These behaviors are driven by internal logic and mapping conventions to support the ZUGFeRD XML structure.
1. BuyerReference (NumAtCard) vs Leitweg ID (Back to Table of Contents)
The BuyerReference (BT-10) will be set based on the Leitweg Id defined on the Business Partner. This value is user-defined in the mapping table under the key Header.BPLeitwegId, and is typically stored as a UDF on the Business Partner master data.
Solution:
• The system will first attempt to use the Leitweg Id (as per the mapping table).
• If the Leitweg Id is not defined, NumAtCard will be used.
• If both Leitweg Id and NumAtCard are defined, Leitweg Id will take priority.
• If you prefer to use NumAtCard regardless, this behavior can be customized within the mapping table. Please see the section V Mapping Tables - 1. User Defined Fields.
VII Changelog (Back to Table of Contents)
Please subscribe to this FAQ to receive automatic notifications each time we update this FAQ. We will update this FAQ whenever we release a fix or an improvement in respect of ZUGFeRD Implementation in Coresuite Designer or have additional information in respect of this topic.
Designer 8.40 |
- Implementation of UDT SWA_LD_ZUGFERDMAP90 to allow data mapping of UDFs for layouts with data source Document_90 |
Designer 8.35 |
- Upgrade of Basic ZUGFeRD Profile to Enhanced, to support more details in the XML file data mapping |
Designer 8.30 |
Initial version - Enablement of PDF/A file version 2.0 generation on Sales AR Invoices |
Comments
0 comments
Article is closed for comments.