SAP

SAP and Apache Kafka Integration: One Architecture for Every Path

Many enterprises that run SAP S/4HANA or SAP ECC also run Apache Kafka, and not only to feed a data lake. Kafka has become the event-driven integration platform for operational systems: scalable, reliable, open source, and built to decouple producers from consumers. SAP sits in the middle of these processes. It publishes orders, deliveries and invoices that other systems need right away, and it consumes events from web shops, payment providers and the shop floor. Yet most companies still connect SAP and Kafka project by project, each with its own tool. The result is a collection of point-to-point integrations instead of an enterprise architecture. This article explores how to connect SAP and Apache Kafka with one integration architecture across all paths, and why the end of maintenance for SAP PI/PO is the right moment to decouple, not just to migrate.

Why Connect SAP and Apache Kafka

SAP Kafka integration connects SAP systems such as SAP S/4HANA and SAP ECC with Apache Kafka through ABAP, SAP middleware or a standalone adapter, so that business events flow in real time in both directions. I described Kafka as a complement to classic middleware in Apache Kafka vs. middleware (MQ, ETL, ESB) and the integration options between SAP and Kafka back in 2020. What changed since then is the SAP side, with SAP Integration Suite replacing SAP PI/PO.

From SAP to Kafka

SAP publishes business events such as an order created, a delivery posted or a material master changed. Kafka stores them durably and in order and distributes them to every system that needs them, from e-commerce and logistics to the data platform and AI agents. A new consumer subscribes to the topic instead of requesting a new SAP interface.

From Kafka to SAP

Events from outside SAP flow in: orders from a web shop, payment confirmations, confirmations from manufacturing execution systems, or master data from other platforms. The integration writes them into SAP through business interfaces such as BAPIs or IDocs. The SAP backend only processes what it actually needs, at a pace it can handle.

Bidirectional Integration

Most end-to-end processes need both directions. Order-to-cash, procure-to-pay and production processes exchange events between SAP and other applications through the same topics, keys and schemas. On SAP PI/PO and Integration Suite, sending to Kafka and receiving from Kafka are about equally common.

SAP Kafka Integration Use Cases by Industry

The business drivers differ by industry:

  • Energy and utilities: Smart meter readings, grid events and customer changes flow into SAP billing and customer service. Volumes are high, but SAP needs only the billing-relevant data.
  • Financial services: Transactions and customer master data from core banking and payment platforms flow into SAP finance and reporting, often at very high volumes.
  • Manufacturing: Production orders flow from the ERP to the shop floor. Confirmations, actual times and quality data flow back and feed traceability, as described in lessons learned from ERP migrations in German manufacturing.
  • Retail: Order, payment and invoicing processes connect e-commerce and stores with SAP order management and financials. Stock levels reach every sales channel in real time.
  • Telecommunications: Customer, contract and billing events from network and CRM platforms keep SAP master data and billing accurate without nightly batch jobs.

The Fragmentation Problem in SAP Kafka Integration

SAP integration teams rarely choose one path. They inherit several.

  • Runtimes: Some interfaces run in the ABAP stack, others in SAP PI/PO, in SAP Cloud Integration or in SAP Edge Integration Cell.
  • Networks: Kafka runs as a fully managed cloud service, self-managed in a private data center, or both. SAP runs in the cloud or on premises.
  • Teams: The SAP integration team thinks in iFlows, mappings and IDocs. The platform team thinks in topics, partitions and schemas. Each project picks its own connector, monitoring and error handling.

The business does not care whether an order event leaves SAP through ABAP code or an integration flow. The business cares that the event arrives once, in the right order, in a known format, and that someone notices when it does not. No single SAP Kafka connector solves that. An integration architecture does.

One Integration Architecture with Four Paths

The architecture has three layers. Kafka at the top runs as a fully managed service in the cloud, self-managed in a private network, or both. The SAP systems at the bottom expose business data through IDocs, BAPI and RFC, OData, web services and CDS views. The integration path in the middle is chosen per use case.

This article uses KaTe, a vendor of SAP integration software with customers in Europe and North America, as a concrete example. KaTe offers one connector platform for SAP and Kafka with a dedicated adapter per integration path, so the same solution covers the whole architecture and the adapter follows the use case. Other vendors follow later in the article. The architecture itself does not depend on a specific vendor.

The integration is not tied to one Kafka platform. KaTe runs, among others, with Apache Kafka, Confluent and Azure Event Hubs, but authentication, transactions and schema registry support differ between platforms, so test against the one you actually run.

SAP PI/PO: Kafka in the Existing Middleware

Many enterprises still run a large share of their interfaces on SAP Process Orchestration (PI/PO). A Kafka adapter in the PI/PO Adapter Framework maps PO messages to Kafka records with key, headers and payload, and the other way around. Existing mappings, routing and monitoring stay in place. The KaTe Kafka Adapter for SAP PO also supports exactly-once-in-order processing per partition and per key, so all events of one business object arrive in sequence. This path fits companies that want Kafka now and plan the move to Integration Suite later.

SAP Integration Suite: Cloud Integration and Edge Integration Cell

SAP Integration Suite is the strategic successor of SAP PI/PO. Integration flows (iFlows) run in SAP Cloud Integration (CPI), which SAP operates on SAP Business Technology Platform (BTP), or in SAP Edge Integration Cell (EIC) on a Kubernetes cluster that the customer runs in its own network. The same integration content runs in both. Kafka adapters in Integration Suite connect iFlows to Kafka topics. KaTe offers a Kafka adapter for SAP Integration Suite with options for high volumes.

Standalone Adapter Outside the SAP Middleware

Some use cases do not need the SAP middleware at all. A platform team that wants a few SAP business objects in Kafka does not want to build and operate iFlows for it. A standalone adapter runs outside SAP PI/PO and Integration Suite, in a container or directly on a server. It connects to SAP interfaces, filters and transforms records, and writes them to Kafka. Its role is similar to Kafka Connect, for example to replicate SAP tables close to 1:1 into Kafka topics. It does not prepare or model the data the way SAP Datasphere does. KaTe’s implementation is KaTegrate, an integration platform with its own studio, admin console and runtime. It runs the complete KaTe adapter portfolio without SAP Integration Suite.

ABAP: Kafka Directly in the SAP ERP

The ABAP path puts a Kafka producer and consumer directly into the SAP system. The KaTe Kafka Adapter for ABAP connects to the Kafka brokers over TCP and TLS without a REST proxy. It sends and receives complete IDocs and custom ABAP structures, works with consumer groups, and commits offsets only after SAP has processed a record successfully. Avro and JSON Schema work with a schema registry. This path fits application-specific events close to the business logic. Use it deliberately: custom code in the ERP core works against SAP’s clean core principle, and too many direct connections bring back point-to-point integration.

The value is not in any single path. It is in using the same Kafka semantics across all of them. Topics, keys, schemas and consumer groups stay the same when the path changes, for example from SAP PI/PO to Integration Suite, or from a cloud runtime to an on-premises runtime. A connector platform that covers all paths adds practical benefits on top: one configuration model, one set of skills, one support contract, and a migration path without switching tools. The trade-off is a dependency on that vendor, which deserves the same due diligence as any other strategic component.

Why Not Read the SAP Database Directly?

Almost nobody integrates SAP by reading or writing its database, and for good reasons. Most SAP customers run SAP HANA with a runtime license, which covers use through SAP applications only. Direct SQL access by third-party tools typically requires a more expensive full-use license, and SAP-managed offerings such as RISE with SAP do not expose the database at all. The tables carry little business meaning without the application logic, and writing into them bypasses validation and authorization. That is why the JDBC-based HANA connectors advertised by many middleware and data tools rarely help in practice. The business interfaces listed above are the supported way in and out.

Public, Private and Hybrid Network Connectivity

Network topology decides more SAP Kafka projects than adapter features do.

  • Public to public: SAP Cloud Integration connects to a fully managed Kafka service in the public cloud, secured with TLS and authentication.
  • Private to private: SAP Edge Integration Cell, SAP PI/PO or ABAP run in the same private network as a self-managed Kafka cluster. The data never leaves the data center. Regulated industries often require this setup.
  • Public to private: SAP Cloud Integration on BTP reaches a Kafka cluster in the private network.

The third pattern is harder than it looks. Kafka is not HTTP. A client talks to each broker directly, and the schema registry and the identity provider for OAuth often sit in the private network as well. Two options exist:

  • SAP Cloud Connector: SAP’s standard tunnel from BTP into the private network. It works as a static proxy. Each broker is configured explicitly, so adding brokers requires manual changes.
  • Kafka protocol proxy: A proxy such as Kroxylicious (open source), Confluent Gateway or Conduktor Gateway speaks the Kafka protocol and maps brokers dynamically. Clients see one stable endpoint, even when the cluster changes.

KaTe supports both approaches. Its adapter routes brokers, schema registry and OAuth provider through SAP Cloud Connector and works with Kafka protocol proxies for larger and changing clusters. Kafka proxies deserve a deeper look of their own in a future post.

What SAP Kafka Integration Needs Beyond Publish and Subscribe

Sending a message to a topic is the easy part. Production needs more:

  • Offsets and replay: Consumer groups with freely defined names, a start position at the beginning, the end or any offset, and controlled reprocessing after an error.
  • Ordering per key: Kafka guarantees order within a partition. With the business object as the key, for example the order number, all events of one order arrive in sequence.
  • Data contracts: Avro, Protobuf and JSON Schema with a schema registry, plus conversion to XML for existing SAP mappings.
  • Security: TLS, SASL, OAuth and client certificates. For sensitive fields, client-side field-level encryption keeps data encrypted in Kafka.
  • Batches and transactions: Several Kafka records can be processed in one SAP integration call, for example one iFlow execution or one PI/PO message. In the other direction, several records from SAP can be written in one Kafka transaction. Consumers with the isolation level read_committed then see the full batch or nothing.
  • Filters and error handling: Records are filtered before the SAP runtime, failed records are logged or moved to a dead letter topic, and consumer lag shows up in the standard SAP monitoring.

Filtering Before the SAP Runtime

Filtering deserves a closer look because Kafka handles it differently from classic message brokers. Kafka has no filtering on the broker. A consumer reads every record and decides itself what to keep, which surprises teams coming from IBM MQ or Solace.

In SAP integration, this matters twice. Every record that reaches the SAP side costs processing time, whether in an iFlow, a PI/PO channel or an ABAP program. In SAP Integration Suite, it also counts as a billable message. A typical example is a telco that streams everything about a customer into one large topic, from call records to billing events and master data, while the ERP needs only the master data and specific billing records. The cheapest record is the one that never reaches the SAP runtime. KaTe filters records on header, key or payload inside the adapter, before any mapping or SAP processing runs. For high throughput, header filters are the fastest option because the payload is not deserialized. Filtering and error handling patterns for SAP and Kafka are a topic for a separate post.

Throughput and Cost at High Volumes

Two limits meet at high volumes. On the Kafka side, a consumer group cannot run more consumers in parallel than the topic has partitions. On the SAP side, each record usually triggers its own processing step, such as one iFlow execution or one PI/PO message, with its own overhead. In SAP Integration Suite, each of these messages also adds cost.

Batching and key-level parallelism change the economics. Instead of one consumer per partition, records of one partition are processed in parallel while the order per key is kept. KaTe combines this with batching of many records into one SAP processing step. This raises the limit considerably. It does not remove it, because the SAP integration runtime stays in the data path. For pure bulk replication without SAP business logic, a replication tool or Kafka Connect can be the better fit.

Kafka itself now offers a second answer for a different kind of use case. Queues for Kafka (KIP-932) are production-ready since Apache Kafka 4.2. Consumers in a share group scale beyond the number of partitions but give up ordering. That fits independent records such as notifications, while business objects that need a sequence stay with key-level parallelism. The KaTe adapters already support Queues for Kafka, so each integration can use the consumption model that fits its ordering requirements.

SAP PI/PO End of Maintenance as a Chance to Decouple

Mainstream maintenance for SAP PI/PO 7.5 ends on 31 December 2027. SAP offers extended maintenance at an additional fee until 31 December 2030, and no further extension is planned. SAP ECC 6.0 follows the same timeline, so many companies face the PI/PO decision and the S/4HANA migration at the same time. PI/PO keeps running after 2030, but the risk grows every year.

Most migration projects treat the deadline as a lift and shift. Every interface moves one to one from PI/PO to Integration Suite. A one-to-one migration pays for the move and keeps every point-to-point dependency. The deadline is also an opportunity to change the architecture in three steps:

  1. Publish from PI/PO to Kafka: Business events leave SAP PI/PO as Kafka records. New consumers subscribe to the topics.
  2. Move consumers to Kafka: Existing receivers switch from PI/PO interfaces to the Kafka topics, one by one.
  3. Migrate the SAP side: The interfaces move to Integration Suite or Edge Integration Cell. Topics, schemas and consumers do not change.

This works best when the Kafka adapter behaves the same on SAP PI/PO and Integration Suite. KaTe states that interfaces built with its PI/PO adapter continue to work on Integration Suite without refactoring. Validate this in a proof of concept with your own interfaces, data formats and network setup.

Not every interface belongs on Kafka. Synchronous request-response calls, B2B and EDI with trading partners, and file transfers often stay in the integration middleware.

SAP Kafka Integration Vendors and Options

Most adapters in the market cover one runtime, one direction or one set of SAP interfaces. That works for a single project. The enterprise architecture view is different. Across use cases, business units and SAP landscapes, every additional tool brings its own operating model, skills, licenses and support contracts. The main options:

  • SAP standard Kafka adapter: Part of SAP Integration Suite and covers publish and subscribe in iFlows. Avro with a schema registry typically needs custom scripts in the iFlow.
  • Advantco: Kafka adapter for SAP PI/PO, Integration Suite and SAP HANA Smart Data Integration, with Avro, Protobuf, Parquet and schema registry support. Part of Argano since December 2025.
  • ASAPIO: ABAP add-on that connects SAP ECC and S/4HANA to Kafka in both directions without middleware. Outbound uses the native Kafka protocol, with ordering per business object, Avro with schema registry and code-less payload modeling.
  • INIT: A Kafka Connect source connector that extracts SAP data through Operational Data Provisioning (ODP), one way from SAP to Kafka. SAP Note 3255746 no longer permits third-party tools to use ODP via RFC, so check the licensing situation first.
  • SAP-native data paths: SAP Datasphere replication flows can write analytical data to Kafka and Confluent, and SAP Advanced Event Mesh distributes SAP events. Both come with SAP support, but they offer less control over topics, keys and offsets than a Kafka-native integration.
  • KaTe: One connector platform with adapters for SAP PI/PO, Integration Suite with Edge Integration Cell and ABAP, the standalone KaTegrate platform, high-volume consumption with key-level parallelism or Queues for Kafka, and IntegraMon for monitoring Integration Suite and Edge Integration Cell.

The main difference between these options is coverage. Most focus on one runtime or one direction.

Choosing the SAP Kafka Integration Path

The right path depends on the starting point:

Starting point Integration path
SAP PI/PO with the deadline ahead Kafka adapter on PI/PO now, moved to Integration Suite later with the same topics and schemas
Integration Suite as the strategic middleware Cloud Integration, private Kafka through SAP Cloud Connector or a Kafka protocol proxy
Data must stay in the private network Edge Integration Cell, ABAP or a standalone adapter on premises
Platform team wants SAP events without iFlows Standalone adapter or ABAP
High volumes from Kafka into SAP Filters, batching and key-level parallel processing

Many enterprises combine several paths, for example ABAP for a few application events and Integration Suite for the bulk of the middleware interfaces. That works well when all paths follow the same data contracts: shared schemas in the schema registry, consistent keys and clear ownership of each topic.

One Integration Architecture Instead of Many SAP Kafka Projects

SAP keeps reshaping its integration portfolio. XI became PI, PI became PO, and PO becomes Integration Suite. Kafka topics, schemas and consumer groups outlive these product cycles. Design the event layer once, and treat the SAP integration path as a replaceable part.

The architecture also pays off financially. Data leaves SAP once and reaches every consumer through Kafka, instead of one interface, one middleware message and one extra load on the SAP backend per consumer. Fewer interfaces mean lower license, operations and maintenance costs.

Start with one business event, such as an order created in SAP. Define the topic, the key, the schema and the owner. Pick the integration path that fits today. The second event is where the architecture pays off, because topics, schemas and operations already exist. For companies on SAP PI/PO, the time until the end of maintenance is the window to make this decision deliberately instead of under deadline pressure.

To follow this work across data integration, data streaming, workflow orchestration and trusted agentic AI, subscribe to the newsletter and connect on LinkedIn.

Supported by KaTe GmbH. Kai Waehner is the author and retains full editorial control. KaTe reviewed this article for factual accuracy only.

Kai Waehner

Bridging the gap between technical innovation and business value for data integration, workflow orchestration, and agentic AI. Author of the book The Trinity of Modern Data Architecture.

Recent Posts

How Uber Governs AI Agents in Production: Lessons From 5,000 Skills and a Secure AI Framework

AI agent governance needs controls for capabilities and for behavior. Lessons from Uber’s 5,000 agent…

4 days ago

Converged Database Versus Lakehouse Platform for AI Agents

An AI agent reads current state, history and similar products in one request. A converged…

7 days ago

Unified Orchestration in Insurance: One Control Plane Across Policy, Claims, and Underwriting

Insurance IT runs on four orchestration silos, from the batch night to the claims desk.…

1 week ago

What Anthropic’s S-1 Says About AI Agent Orchestration

Anthropic's S-1 mentions orchestration 14 times: for the compute layer across four chip families, for…

2 weeks ago

Why Most Model Calls in a RAG Pipeline Belong to a Decision Model

A RAG pipeline is a decision pipeline with one generation step. Classification, sensitivity, routing, reranking,…

2 weeks ago

Apache Kafka and the Database as Source of Truth for AI Agents

The source of truth for AI agents is a combination of systems in an event-driven…

3 weeks ago