SAP BTP Integration with S/4HANA

SAP S/4HANA is the core ERP system where business transactions are recorded. SAP BTP is the platform where integrations, extensions, and analytics run. Together, they form SAP's recommended architecture called the Clean Core approach: keep the S/4HANA core clean and unmodified, and build all extensions and integrations on BTP. This makes S/4HANA upgrades faster and less expensive because there is less custom code inside the core to maintain.

Connection Methods Between BTP and S/4HANA

OData API (Cloud-to-Cloud and Cloud-to-On-Premise)

S/4HANA exposes over 2,500 pre-built OData APIs covering every major business object. CPI iFlows call these APIs using the OData adapter. For on-premise S/4HANA, the Cloud Connector bridges the network gap.

CPI iFlow → [OData Adapter] → [Cloud Connector (if on-premise)] → S/4HANA OData Service
                                                                    → Business Logic
                                                                    → HANA Database

Business Events (S/4HANA to BTP)

S/4HANA can publish business events to SAP Event Mesh on BTP. When a sales order is created, a goods receipt is posted, or a customer master is changed, S/4HANA fires an event automatically — no custom code required. This is the foundation of event-driven integration between S/4HANA and the BTP ecosystem.

S/4HANA: Sales Order Created
      ↓ publishes event automatically
SAP Event Mesh (BTP)
      ↓
CPI iFlow subscribes to the event
      ↓
CPI transforms and delivers to downstream systems

Remote Function Call (RFC)

For scenarios where OData APIs do not expose the required functionality, CPI can call ABAP Function Modules and BAPIs on S/4HANA through RFC. The RFC adapter handles the protocol conversion between HTTP-based CPI and SAP's binary RFC protocol.

IDoc

IDocs remain the dominant message format for high-volume, guaranteed-delivery exchanges with S/4HANA, especially in manufacturing and supply chain scenarios. CPI sends and receives IDocs to and from S/4HANA through the IDoc adapter.

SAP Integration Suite Pre-Built Content for S/4HANA

SAP provides hundreds of pre-built integration packages on the SAP Business Accelerator Hub specifically for S/4HANA integration scenarios. These packages contain:

  • Fully configured iFlows with mapping, routing, and error handling
  • OData API specifications for S/4HANA services
  • Value mapping tables for common code conversions
  • Documentation explaining the business process flow

Common pre-built integration scenarios:

  • SAP S/4HANA ↔ SAP SuccessFactors (employee data)
  • SAP S/4HANA ↔ Salesforce (customer and order data)
  • SAP S/4HANA ↔ Ariba (procurement)
  • SAP S/4HANA ↔ Concur (expense management)
  • SAP S/4HANA ↔ SAP Commerce Cloud (e-commerce orders)

S/4HANA Cloud vs S/4HANA On-Premise Integration Differences

┌─────────────────────┬──────────────────────┬──────────────────────┐
│ Aspect              │ S/4HANA Cloud        │ S/4HANA On-Premise   │
├─────────────────────┼──────────────────────┼──────────────────────┤
│ API Access          │ Direct HTTPS from BTP│ Via Cloud Connector  │
│ Events              │ Native to BTP        │ Via Cloud Connector  │
│ RFC/BAPI            │ Not supported        │ Fully supported      │
│ Custom IDoc types   │ Limited              │ Fully supported      │
│ OData API count     │ 2,500+ standard      │ 2,500+ + custom      │
│ Authentication      │ OAuth 2.0 (BTP)      │ Basic or OAuth       │
│ Upgrade impact      │ SAP upgrades         │ Customer manages     │
└─────────────────────┴──────────────────────┴──────────────────────┘

Communication Arrangements (S/4HANA Cloud)

In S/4HANA Cloud, you do not configure RFC destinations or IDoc ports manually. Instead, you use Communication Arrangements — a standardized configuration framework that sets up connections between S/4HANA Cloud and BTP services including CPI.

Creating a Communication Arrangement involves:

  1. Select the Communication Scenario (pre-defined connection type, e.g., SAP_COM_0008 for Business Partner integration)
  2. Create a Communication System representing the BTP tenant
  3. Create a Communication User (the service account CPI uses)
  4. Map everything together in the Communication Arrangement

SAP pre-defines dozens of Communication Scenarios covering every major integration touchpoint. You configure rather than code.

Extending S/4HANA on BTP

The BTP Extension Suite lets you build custom applications and processes that extend S/4HANA functionality without modifying the S/4HANA core. Common extension patterns:

  • Side-by-side extension – Build a custom app on BTP that reads and writes S/4HANA data through APIs. The app extends what S/4HANA can do without touching its code.
  • Process extension – Add approval steps, notifications, or automation around S/4HANA business processes using SAP Build Process Automation on BTP.
  • UI extension – Build custom Fiori apps on BTP that present S/4HANA data in new ways for specific user roles.

All extensions communicate with S/4HANA through the same OData APIs and event mechanisms covered in this topic. Integration Suite is the connectivity layer; BTP application services are the extension layer. Together, they form the full extension architecture.

Monitoring the BTP-S/4HANA Connection

Monitor the health of BTP-to-S/4HANA connectivity at three levels:

  • Cloud Connector status – Verify the tunnel is connected in the BTP Cockpit
  • Destination connectivity test – Use the Connectivity Test in BTP Destinations to verify the SAP system is reachable
  • CPI Message Monitor – Track actual message success and failure rates for S/4HANA-bound iFlows

A green Cloud Connector does not guarantee that S/4HANA is accepting messages. Test all three layers during troubleshooting — a working tunnel with a down SAP application server still causes integration failures.

Leave a Comment

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