main banner

Modernizing Invoice Processing to Achieve KSeF Compliance at Wegmann Automotive Poland

LeverX implemented its proprietary solution that enables Wegmann Automotive Poland to automate the exchange of electronic invoices with Poland's National e-Invoicing System (KSeF). The solution enables the company to send and receive electronic invoices through SAP while supporting compliance with Poland's mandatory KSeF regulations.

Table of contents:

Discover how LeverX implemented a proprietary SAP KSeF solution for Wegmann Automotive Poland to automate e-invoicing and support regulatory compliance.

Client

Wegmann Automotive Polska Sp. z o.o. is the Polish subsidiary of Wegmann Automotive, a global manufacturer of automotive components and a trusted Tier 1 supplier to leading vehicle manufacturers. Based in Nekla, Poland, the company plays a strategic role in the group's European manufacturing and supply chain operations, specializing in C-parts — small but essential components used around vehicle wheels and power systems. Wegmann Automotive products are installed in two out of every three new vehicles worldwide, reflecting the company's strong market position and global reach.

Challenge

With Poland introducing mandatory electronic invoicing through KSeF, Wegmann Automotive Poland needed a solution to automate the sending of sales invoices to the National e-Invoicing System and the receipt of purchase invoices from suppliers. The solution also had to integrate with SAP, generate invoices in the required XML format, and exchange them with KSeF in compliance with the new regulations.

The project addressed several key challenges:

  • Meeting mandatory KSeF requirements. The company needed a solution that complied with Poland's mandatory e-invoicing regulations.
  • Automating invoice exchange with KSeF. The customer required a solution capable of sending sales invoices to KSeF and receiving purchase invoices from suppliers through the KSeF system on a daily basis.
  • Integrating with SAP. The solution had to collect invoice data directly from SAP, transform it into the required XML format, and exchange it with the KSeF platform.
  • Responding to changing KSeF specifications during development. While the solution was under development, the Polish Ministry of Finance continued to update KSeF specifications. Throughout the development phase, LeverX monitored these changes and incorporated the required adjustments into the solution as part of the implementation process, before the project was delivered to the customer.
  • Establishing a long-term partnership. In addition to implementation, the customer was looking for a trusted SAP partner that could provide long-term post-implementation support and support its evolving business needs.

The customer selected LeverX based on its SAP expertise, proprietary SAP KSeF solution, availability of experienced Polish-speaking consultants who ensured effective communication and understanding of local regulatory requirements, as well as its ability to provide long-term post-implementation support.

LeverX implemented its proprietary KSeF solution to automate electronic invoice exchange with KSeF. Development followed the Scrum methodology with continuous integration (CI), enabling the team to efficiently incorporate changes to KSeF specifications during implementation. Built as a native SAP application, the solution enables the customer to send and receive electronic invoices directly within SAP while complying with the requirements of the Polish Ministry of Finance.

Invoice data extraction and XML generation

When a billing document or invoice is created in the SAP SD or FI modules, the solution extracts the required transaction, material, and tax data. The extracted information is then converted into the XML format required by the KSeF platform.

Integration with the KSeF platform

The solution establishes an authorized session with the KSeF portal using electronic signatures, transmits electronic invoices, and waits for confirmation from the government platform. It also periodically retrieves incoming supplier invoices from KSeF and stores them in SAP.

Native SAP architecture

The solution was developed as a native SAP application using ABAP and a modular architecture. It performs end-to-end invoice processing directly within the SAP environment, eliminating the need for third-party middleware and helping the customer avoid the cost of additional third-party licenses, such as SAP Document and Reporting Compliance (SAP DRC).

Alignment with KSeF requirements

During development, KSeF specifications continued to evolve. LeverX monitored updates published by the Polish Ministry of Finance and updated the solution throughout the implementation to ensure compliance with the applicable KSeF requirements.

Technology Stack

The solution is built entirely within the SAP environment, enabling secure and efficient electronic invoice exchange with KSeF.

Application platform: SAP ABAP 7.50+
The solution is developed as a native SAP application using the modern ABAP 7.50+ stack, supporting all business logic and end-to-end invoice processing.

User interface: SAP ABAP List Viewer (SAP ALV)
SAP ALV grids provide dedicated inbound and outbound cockpit interfaces for managing electronic invoices directly within SAP.

Logging and audit: SAP Business Application Log (SAP BAL)
The SAP BAL framework provides persistent logging and audit trails for invoice processing activities.

Data exchange: XML, XSD, and HTTPS/REST APIs
The solution generates invoices in the XML format required by the Polish Ministry of Finance, validates them against XSD schemas, and exchanges data with the KSeF platform through HTTPS/REST APIs.

Security: OpenSSL and digital signatures
OpenSSL supports cryptographic operations, including AES and RSA encryption, for secure communication, while XAdES digital signatures are used for authentication in accordance with the requirements of the Polish Ministry of Finance.

Database: SAP database
Invoice data and processing records are stored within the customer's existing SAP database using custom SAP tables.

Results

The implementation enabled Wegmann Automotive Poland to automate electronic invoice exchange with KSeF while complying with Poland's mandatory e-invoicing requirements.

Key business outcomes include:

  • Compliance with mandatory KSeF regulations. The customer can send and receive electronic invoices through the KSeF system in accordance with the requirements of the Polish Ministry of Finance.
  • Automated invoice exchange. The implemented solution automates the daily sending and receiving of electronic invoices directly from SAP.
  • Improved process transparency. The solution improves process transparency and enables faster issue resolution through improved monitoring and error handling.
  • Ongoing support for regulatory changes. As KSeF regulations continue to evolve, some updates may require additional manual analysis and development. LeverX provides post-implementation support to implement the necessary changes when required.
  • Long-term partnership with LeverX. The project established a foundation for ongoing support and provides the customer with access to SAP expertise and additional proprietary SAP solutions.

More Case Studies