KSeF is Coming – How to Prepare SAP for Mandatory E-Invoicing? SAP and KSeF Integration
The National e-Invoice System (KSeF) is one of the most significant digitalization initiatives in the Polish tax system. It changes not only how invoices are issued but also impacts the organization of financial and accounting processes, document flow, and the technical architecture of ERP systems. SAP and KSeF integration requires precise planning, process adjustments, and a careful selection of integration technology.
This article presents the latest information on the KSeF implementation plan, the challenges associated with integration in an SAP environment, the most common mistakes to avoid, and recommendations for testing and training. Additionally, we discuss the impact of the new FA(3) structure on invoicing processes.
Contents page
- National e-Invoice System – Latest Information on Mandatory Implementation
- KSeF and Invoices in SAP – What Changes for Businesses?
- SAP Integration with KSeF – Architecture, Possibilities, Challenges
- Common Mistakes in KSeF Implementation and How to Avoid Them
- The Importance of Testing, Updates, and Training in the Implementation Process
- FA(3) Structure – Key Changes and Impact on SAP Integration with KSeF
- Implementation Recommendations – How to Ensure Security and Compliance?
- Haergi Support – Secure KSeF Integration in the SAP Environment
1. National e-Invoice System – Latest Information on Mandatory Implementation
After analyzing the demands submitted by businesses and assessing the system’s readiness, the Ministry of Finance published an updated KSeF implementation schedule. The obligation to use the system will be introduced in several stages:
- From February 1, 2026 – for large taxpayers (sales exceeding PLN 200 million in 2024).
- From April 1, 2026 – for other entrepreneurs.
- From January 1, 2027 – for the smallest digitally excluded entities (transactions up to PLN 450 and monthly sales up to PLN 10,000).
Key Facilitations for Businesses:
- The ability to issue invoices in “offline24” mode, regardless of system availability.
- No penalties for errors in invoicing through KSeF until the end of 2026.
- No obligation to provide the KSeF number in transfers (including split payment).
- Maintaining the possibility of issuing invoices from fiscal cash registers until the end of 2026.
2. KSeF and Invoices in SAP – What Changes for Businesses?
The transition to mandatory invoicing in KSeF signifies a significant change in daily business processes, especially for companies using ERP systems like SAP. This includes:
- Generating invoices in XML format compliant with the FA(3) structure.
- Automatically sending invoices to KSeF via API.
- Handling return messages (e.g., confirmation of receipt, validation errors).
- Managing authorization tokens and issuer certificates.
3. SAP Integration with KSeF – Architecture, Possibilities, Challenges
Popular Integration Approaches:
Solution | Integration Type | Advantages | Challenges |
SAP PI/PO | On-premise | Stable integration in large environments | Time-consuming configuration |
SAP CPI (Cloud Integration) | Cloud | Fast configuration | SAP BTP license costs, partner dependency |
Dedicated middleware | External integrator | Freedom of technology choice | Requires managing an external system |
Direct API integration | SAP ABAP / BAPI + REST | Low latency, full control | Requires ABAP knowledge |
Key Technical Challenges:
- Data validation before invoice generation.
- Handling duplicates and correcting invoices.
- Managing KSeF tokens and certificates (especially in offline24 mode).
- Monitoring communication and automatic retries in case of errors.
4. Common Mistakes in KSeF Implementation and How to Avoid Them
Most Common Problems:
- Insufficient analysis of SAP – KSeF XML data mapping.
- Lack of mechanisms for handling exceptions and integration errors.
- Insufficient testing in test and pre-production environments.
- Outdated and incorrect data (contractors, NIP numbers, addresses, bank accounts).
- Required SAP update to a version supporting KSeF API integration.
How to Avoid Them?
- Implement data validation mechanisms before sending.
- Establish procedures for handling return feedback errors.
- Regularly update SAP integration components and middleware.
- Ensure a transparent testing process and integration with accounting and sales teams.
5. The Importance of Testing, Updates, and Training in the Implementation Process
Key Elements of Success:
- Unit tests of XML files.
- Integration tests with the KSeF API in the Ministry of Finance test environment.
- End-to-end tests in the QA environment with real-life scenario simulations.
- Tracking updates of KSeF documentation, especially regarding API 2.0 and FA(3).
- Training for business users and IT teams, covering both system operation and the interpretation of return messages.
6. FA(3) Structure – Key Changes and Impact on SAP Integration with KSeF
The new FA(3) logical structure, which will be published in June 2025, introduces several significant changes:
- Expansion of fields related to the split payment mechanism.
- Improved handling of correcting invoices and duplicates.
- Possibility of adding structured attachments.
- More precise document identifiers.
You can read more about the changes in FA(3) in our article: Latest changes to KSeF – new logical structure of FA(3)
7. Implementation Recommendations – How to Ensure Security and Compliance?
- Start by analyzing the invoicing processes in your organization.
- Plan the integration of SAP with KSeF, considering the scale of operations and system architecture.
- Choose the appropriate integration solution: PI/PO, CPI, middleware, or API.
- Ensure full coverage with integration tests and data validation.
- Conduct training for users and system administrators.
- Plan monitoring mechanisms and handling of errors and exceptions.
8. Haergi Support – Secure KSeF Integration in the SAP Environment
Haergi is an implementation partner that supports companies in the secure and compliant implementation of the National e-Invoice System in the SAP environment. We provide proprietary software for integration with KSeF, as well as integrations for internal sales systems through a special API.
Thanks to our experience in KSeF implementation and knowledge of the latest legislative changes, we help organizations effectively prepare for mandatory e-invoicing.
Contact us to learn how we can support your company in integrating SAP with KSeF.