Is your organization ready for mandatory e-invoicing using the National e-Invoicing System (KSeF)? If you’re using SAP, implementing an appropriate integration solution becomes not only an option but a necessity.
In this article, we present a comprehensive overview of integration SAP with KSeF, based on discussions and analyses conducted by Haergi with large organizations preparing for the upcoming changes.
Table of Contents:
- KSeF 2025 – Current Legal and Technical Status
- Integration SAP with KSeF – Haergi’s Approach
- Invoice Sending and Receiving Processes
- Automation, Workflow, and KSeF Cockpit in SAP
- Integration of SAP with External Systems and EDI
- Security, Error Handling, and Updates
- News in FA(3): Attachments and Offline Mode
- Conclusions and Recommendations
KSeF 2025 – current legal and technical status
As of the publication date, there are two versions of the KSeF schema in circulation: FA(2) and FA(3), which is in preparation. Although FA(3) doesn’t introduce significant changes to the XML structure, it is worth following its development, especially in the context of public institutions and the possibility of attaching XML attachments to invoices and the proposed offline mode.
Key dates and information:
- FA(3): Version under review, expected to be enforced: autumn 2025 (subject to change).
- Offline mode: Announced, but still lacking final specifications and regulations.
- QR code in offline invoices: Awaiting guidelines from the Ministry of Finance.
Integration SAP with KSeF – Haergi’s approach
Haergi has developed a solution integrating KSeF with SAP that does not require the installation of external components or additional servers. This is a key advantage, as the entire solution operates within the existing SAP environment, simplifying administration, reducing costs, and eliminating the need to use the cloud.
Main architectural features:
- Technology: Solution based 100% on open SAP ABAP code.
- API integration: Fully embedded in the SAP platform – no need for desktop applications.
- Multi-entity support: A central module supports many companies, both automatically and with approvals.
- Compliance: The solution complies with current KSeF requirements and is ready for upcoming changes (FA(3), offline24).
- API for invoicing programs: Custom API enables data exchange with already existing company systems (a single KSeF contact point).
Invoice sending and receiving processes
Sending invoices from SAP to KSeF
The process starts when an invoice is issued in SAP or the financial-accounting system. The invoice can be:
- Automatically sent immediately – e.g. in the background, right after issuance.
- Automatically sent at a specific time – e.g. every 15/30 minutes.
- Sent interactively – the user confirms sending from the cockpit level.
Receiving incoming invoices
Haergi’s solution also handles receiving purchase invoices, which are downloaded from KSeF and can be:
- Forwarded for description – e.g. initiating the acceptance workflow.
- Preliminary posted – with the option for description and approval.
- Fully posted – based on defined rules or user approval.
EDI integration
For companies using EDI, the system enables delaying the document’s EDI transmission until the KSeF number is received, ensuring process consistency and preventing the invoice from being sent via EDI before it enters the legal circulation in KSeF.
Automation, workflow, and KSeF cockpit in SAP
One of the biggest advantages of Haergi’s solution is the full automation of accounting processes and support for invoice description and approval – without documents leaving SAP.
Automation:
- Cyclic tasks: Software automatically sends and receives invoices in the background.
- Owner assignment rules: Based on invoice data (NIP, type, amount).
- Posting: Automatic booking of recurring documents.
Workflow and notifications:
- Multi-level approval: Depending on amount, invoice type, company, etc.
- Email notifications: New invoice, error, task to perform.
Advanced KSeF cockpit in SAP:
- Assigning custom statuses (e.g., “to verify / under approval”).
- Viewing detailed user logs related to every KSeF operation.
- Dynamic configuration of visible columns and filters in reports.
- Option to browse documents via a dedicated frontend in a web browser.
Integration of SAP with external systems and EDI
Many large organizations use distributed IT environments where sales and purchasing data come from various systems. Haergi’s solution also supports communication with external systems, allowing integration with older versions of invoicing programs.
Example supported data sources:
- SAP SD: Sales data.
- Soft, Martin Control: Sales/distribution support systems.
- ELOF, ELOE: Archiving and document management systems.
- Custom client systems: Communication via XML, API, WebService.
Security, error handling and updates
Stability and compliance with regulations are not just about code – they also involve security and keeping up to date.
Security mechanisms:
- Built-in logging and error diagnostics system – with readable messages based on KSeF error coding standards.
- Certificate and token management – directly in SAP.
- Automatic notifications of errors and other KSeF events.
Exception handling:
- Re-importing the document – e.g. after an error/structure correction.
- Error cockpit – with correction and resend option.
- Error notifications – via email or internal messages.
News in FA(3): attachments and offline mode
Version FA(3), planned for the second half of 2025, brings new functionalities:
- XML attachments to invoices: Ability to attach data (e.g. contract content, settlement specifications) to the invoice. To activate this function, the Ministry of Finance’s approval submitted via KSeF API is required. Haergi’s solution is already prepared to handle this feature.
- Offline mode: Will enable invoice issuance without immediate connection to KSeF. In this case, a QR code is mandatory – full guidelines are still pending. Support for offline mode will be added once the final specifications are published by the Ministry of Finance.
Conclusions and recommendations
Implementing KSeF in SAP doesn’t have to be an expensive and complicated project. A well-designed solution, like the one offered by Haergi, allows:
- Compliance with current and upcoming KSeF requirements (FA(2), FA(3), offline).
- Minimization of errors, delays, and extension conflicts.
- Full automation and integration with workflow in and outside SAP.
- Scalability and integration with other systems in the organization.
If your company operates in SAP and plans to switch to mandatory e-invoicing in KSeF – now is the best time to start the implementation.
Want to see how our KSeF solution works in practice?
Contact us and schedule a system demo – we’ll show you how we can tailor SAP integration to the reality of your organization.