Sub topic 8
Side-by-side extensions on SAP BTP
This chapter assumes you know what clean core means and what a released API is. It also assumes you can read basic OData and OAuth 2.0 terms. Connectivity, runtimes, and CAP code get their own chapters. Here you build the working model.
What "side-by-side" means
A side-by-side extension is an application that runs outside the SAP S/4HANA system, on SAP Business Technology Platform (SAP BTP). It talks to S/4HANA only through released APIs and business events. It never changes S/4HANA code, tables, or objects.
Because the extension has its own runtime, database, and release cycle, an S/4HANA upgrade does not touch it. The only link between the two systems is the API contract.
When to choose it
Side-by-side fits when the requirement does not need to run inside the S/4HANA transaction. Typical cases:
- A new app with its own data model, such as a review workflow for business partners.
- A custom UI for external users, such as suppliers or customers.
- Integration with third-party systems or AI services.
- Logic with different scaling or release needs than the ERP.
It fits poorly when you must change standard behavior inside a transaction, for example adding a validation that must block a posting. That case belongs to in-app or developer extensibility, because a remote call cannot take part in the S/4HANA database transaction.
The working model
Three parts make up every side-by-side extension:
| Part | Role |
|---|---|
| Runtime | Runs your code. You pick Cloud Foundry, Kyma, or the ABAP environment. |
| Destination | Stores the S/4HANA host, authentication type, and credentials outside your code. |
| Contract | A released API or event that you consume and that SAP keeps stable. |
Your code asks for a destination by name, such as S4HC_BP. The Destination service returns the URL and the credentials or tokens needed for the call. Moving from test to production then means changing a destination, not the code.
Common errors
Calling unreleased or internal interfaces
Reading an S/4HANA table through a custom RFC or a non-released OData service brings the upgrade risk back. The system may allow the call, but the contract can change without notice. Check the API's release state in the SAP Business Accelerator Hub before you depend on it.
Copying data you do not need
Replicating business partners into your own database creates sync jobs, stale data, and data-protection duties. Read from the core on demand. Keep only the data that belongs to your extension, such as review comments and status.
Hard-coded hosts and credentials
URLs or passwords in code or in environment files break when systems change and leak easily. Use destinations.
Chatty synchronous calls
One S/4HANA call per row in a list is slow and may hit rate limits. Use $select, $filter, and $top, and request pages of data.
Assuming transactional consistency
If your app writes to its own database and then calls S/4HANA, the second step can fail and leave the two systems out of step. Plan retries, idempotent requests, or a compensating action.
Trade-offs
- Upgrade safety versus latency. Every remote call adds network time compared with in-process code.
- Freedom versus effort. You can use any language and service, but you must build and run authentication, monitoring, and deployment.
- Cost. BTP runtime and service usage is billed separately from S/4HANA.
Exercise
A team wants to add a check that rejects a sales order during saving if a custom credit rule fails. Is a side-by-side extension a good fit, and why?
Show answer
Usually not. The check must run inside the S/4HANA save transaction. A remote call from BTP cannot join that transaction and adds latency and failure risk. In-app or developer extensibility fits better, since it can hook into the process through released extension points.