SAP Adapters in CPI

An adapter is the connector between CPI and an external system. CPI uses adapters on both sides of an iFlow — a sender adapter to receive messages from the source, and a receiver adapter to send messages to the target. Each adapter is specialized for a specific protocol or technology. Using the right adapter means CPI speaks the native language of each connected system.

Think of adapters like the charging cables for different phone brands. Every phone charges using electricity, but each brand uses a different connector shape. An adapter is the piece that matches CPI's internal processing to the specific connector shape the external system expects.

Sender Adapter vs Receiver Adapter

[External System A]                              [External System B]
       │                                                  ▲
       │ uses SENDER ADAPTER                              │ uses RECEIVER ADAPTER
       │ (how CPI receives from A)                        │ (how CPI sends to B)
       ▼                                                  │
[iFlow Start] ──→ [Processing Steps] ──→ [iFlow End] ──→ B

A sender adapter listens for incoming data. A receiver adapter delivers outgoing data. An iFlow always has one sender and at least one receiver. You configure each adapter channel with connection details, authentication, and protocol-specific settings.

HTTP Adapter

The HTTP adapter sends and receives data over HTTP and HTTPS. It is the most general-purpose adapter in CPI.

As a sender: External systems call an HTTPS endpoint that CPI exposes. The URL includes your CPI tenant address and the iFlow name. When a request arrives, the iFlow starts.

As a receiver: CPI calls an external HTTPS URL, sending the processed message as the request body. You configure the HTTP method (GET, POST, PUT, DELETE), the target URL, request headers, and authentication.

Authentication options: Basic authentication (username + password), OAuth 2.0 (client credentials or authorization code flow), Client Certificate (mutual TLS), API Key (sent as a header or query parameter).

SOAP Adapter

The SOAP adapter handles SOAP 1.1 and SOAP 1.2 web service calls. You import a WSDL document during configuration, and CPI automatically structures the XML envelope correctly for each operation.

As a sender: CPI exposes a SOAP endpoint. External SOAP clients call it with a properly formed SOAP envelope. CPI validates the message against the WSDL and starts the iFlow.

As a receiver: CPI calls an external SOAP web service. You select the operation from the imported WSDL, and CPI builds the SOAP envelope around your message before sending.

OData Adapter

The OData adapter is purpose-built for SAP's OData APIs. It understands OData-specific features that a plain HTTP adapter does not handle well — delta tokens, entity collections, $expand navigation, and batch requests.

OData V2 and V4 are both supported. SAP S/4HANA OData APIs are the primary use case. Configure the OData service URL (the service document URL), the entity set, the operation, and optional filters and expands.

OData Adapter configuration example:
  Address:     https://my-s4hana.example.com
  Service:     /sap/opu/odata/sap/API_SALES_ORDER_SRV
  Entity Set:  A_SalesOrder
  Operation:   GET
  Filter:      SalesOrderType eq 'OR'
  $expand:     to_Item

IDoc Adapter

The IDoc adapter sends and receives SAP IDocs. It handles the conversion between CPI's internal XML representation and the SAP IDoc format.

As a sender: SAP sends IDocs to CPI through the IDoc adapter. CPI processes them and delivers the transformed data to a target system.

As a receiver: CPI sends IDocs to an SAP system. The IDoc adapter handles the SAP Basis configuration (RFC destination, logical system, port) and posts the IDoc to SAP's inbound processing queue.

RFC Adapter

The RFC adapter calls ABAP function modules and BAPIs on an SAP system. It connects to the SAP system using the RFC protocol (native SAP binary protocol) rather than HTTP.

Configure the RFC adapter with the SAP system's host, system number, client, username, and password (or use a secure alias). Specify the function module name and map the input/output parameters. The adapter converts CPI's XML message into RFC call parameters and returns the result as XML.

SFTP Adapter

The SFTP adapter reads and writes files on SFTP servers. Many legacy integrations use file-based exchange — a supplier drops an invoice file on an SFTP server, and CPI picks it up for processing.

As a sender: CPI polls an SFTP directory at a configured interval. When it finds a file, it downloads the file, starts the iFlow with the file content as the message body, and optionally moves or deletes the file.

As a receiver: CPI writes the processed message to a file on an SFTP server. Configure the target directory, filename pattern (including dynamic names with timestamps), and whether to overwrite existing files.

Mail Adapter

The Mail adapter sends and receives emails. Common uses: send error notification emails when an integration fails, or receive order confirmations from suppliers who cannot use a structured interface.

Configure the SMTP or POP3/IMAP server address, port, credentials, and whether to use TLS. For outgoing emails, set the recipient address, subject, and body content — which can include dynamic values from the message payload.

JDBC Adapter

The JDBC adapter connects CPI directly to relational databases (Oracle, SQL Server, MySQL, SAP HANA). It executes SQL queries and updates.

As a receiver: Execute INSERT, UPDATE, or DELETE statements using data from the message payload. Useful for writing processed data directly into a database table.

As a call step (Request Reply): Execute a SELECT query and use the results in further processing. Useful for looking up reference data — for example, finding a customer's SAP ID by their external CRM ID.

AS2 Adapter

AS2 (Applicability Statement 2) is a protocol for secure B2B data exchange over the internet. Retail, automotive, and healthcare industries use AS2 extensively for EDI document exchange. The AS2 adapter handles AS2-specific features: digital signing, encryption, Message Disposition Notifications (MDN), and non-repudiation logging.

Choosing the Right Adapter

SCENARIO                                      ADAPTER TO USE
─────────────────────────────────────────     ─────────────
External app calls CPI via REST               HTTP (sender)
CPI calls a REST API                          HTTP (receiver)
CPI calls S/4HANA OData API                   OData (receiver)
CPI sends IDoc to SAP                         IDoc (receiver)
CPI calls a BAPI on SAP                       RFC (receiver)
SAP sends IDoc to CPI                         IDoc (sender)
CPI reads file from SFTP                      SFTP (sender)
CPI writes file to SFTP                       SFTP (receiver)
CPI calls a SOAP web service                  SOAP (receiver)
CPI sends error notification email            Mail (receiver)
CPI exchanges data with trading partner (EDI) AS2
CPI queries a database                        JDBC

Leave a Comment

Your email address will not be published. Required fields are marked *