Sub topic 14
Deciding which extension approach to use
This chapter assumes you know the three extension options (in-app, developer, and side-by-side) and the clean core levels A to D from earlier chapters. You should also be comfortable with released APIs, and you should know that a side-by-side extension reaches S/4HANA through a destination. The chapter doesn't introduce new mechanisms. It shows how to choose among the ones you have, and how to defend the choice in a review.
Why a framework helps
Most requirements can be built in more than one way. A custom approval step can be a key user rule, an ABAP Cloud class, or a CAP service on SAP BTP. All three can work on the day of go-live. They differ in what happens at the next upgrade, who maintains the result, and how much the team pays to change it later.
A decision framework replaces "what do we know how to build?" with a fixed set of questions. The answers narrow the options, and a short written record explains the outcome. You can then review the choice, and a new team member can see why it was made.
The questions that drive the decision
Ask these questions in order. The earlier ones rule options out. The later ones choose among the options that remain.
- Can the requirement be met using only released APIs and extension points? If not, stop. Changing the requirement is better than building on unreleased objects, which are the anti-patterns covered earlier in this tutorial.
- Must the logic run inside the core transaction? Examples are a validation that blocks a posting, or a field that must be saved with the business document. If so, the extension has to live in the S/4HANA stack.
- Is the logic simple enough for a key user tool? Custom fields, simple determinations, and small UI adaptations often are.
- Does the extension need its own user interface, its own scaling, or its own release cycle? Does it combine data from several systems? If so, it belongs side by side.
- Who owns it over time? A key user, an ABAP team, or a cloud development team?
| Question | Points toward |
|---|---|
| Must run inside the core transaction, logic is simple | In-app extensibility |
| Must run inside the core transaction, needs real code | Developer extensibility with ABAP Cloud |
| Needs its own UI, users outside the ERP, or its own release cycle | Side-by-side on SAP BTP |
| Combines data from several systems | Side-by-side on SAP BTP |
| Needs heavy or bursty compute, or non-ABAP technology | Side-by-side on SAP BTP |
| Needs unreleased objects | Redesign the requirement |
A decision flow
Every path ends at a level A extension, unless you stop at the redesign step. The framework never sends you toward modifications. It only decides which clean option fits.
The same logic as code
Some teams put the first screening step into an intake form or a pipeline check. This function mirrors the flow above. It runs with Node.js as shown.
function recommend(req) {
if (!req.usesReleasedInterfaces) {
return 'redesign'
}
if (req.mustRunInCoreTransaction) {
return req.keyUserToolsSuffice ? 'in-app' : 'developer'
}
return 'side-by-side'
}
const cases = [
{ name: 'Custom field on sales order', usesReleasedInterfaces: true, mustRunInCoreTransaction: true, keyUserToolsSuffice: true },
{ name: 'Complex pricing validation', usesReleasedInterfaces: true, mustRunInCoreTransaction: true, keyUserToolsSuffice: false },
{ name: 'Partner review app for external staff', usesReleasedInterfaces: true, mustRunInCoreTransaction: false, keyUserToolsSuffice: false },
{ name: 'Read an internal table directly', usesReleasedInterfaces: false, mustRunInCoreTransaction: false, keyUserToolsSuffice: false }
]
for (const c of cases) {
console.log(`${c.name}: ${recommend(c)}`)
}Running it prints in-app, developer, side-by-side, and redesign for the four cases in order. A script can't replace judgment. It does make the order of the questions explicit, and it shows that the released-interface check comes before everything else.
Worked scenarios
Scenario 1: A regulatory field on a business document
A tax authority requires an additional reference number on outgoing invoices. The value must be stored with the document and shown on the form.
The data belongs to the core document and must be saved in the same transaction, so side-by-side is out. A custom field with a simple rule is within key user tools. In-app extensibility is the answer. It is the cheapest option, and the platform handles the upgrade.
Scenario 2: A validation that depends on custom master data
Before a purchase order is released, the system must check the supplier against an internal risk list with its own tables and rules. The check must block the release.
It must run inside the core transaction and needs real code and its own data model. Developer extensibility with ABAP Cloud fits. You use released BAdIs and APIs only, and the code is upgraded together with the system.
Scenario 3: A review app for external partners
A partner manager team outside the ERP user base needs a web app to review business partners and flag problems. The app has its own UI and its own authorization model. It will change monthly, while S/4HANA updates follow a different cycle.
This is a side-by-side extension on SAP BTP. A CAP service reads the released Business Partner API through a destination, as the earlier chapters showed. The app's release cycle is independent of the core.
Scenario 4: A requirement that wants a table read
A team proposes reading an SAP internal table directly because no released API returns the field. The framework stops at the first question. The options are to check whether a released API or a released CDS view already exposes the data, ask SAP for a release, or change the requirement. Wrapping the table read in a side-by-side service doesn't help, because the dependency on an unreleased object remains.
Trade-offs between the approaches
| Aspect | In-app | Developer (ABAP Cloud) | Side-by-side |
|---|---|---|---|
| Runs inside the core transaction | Yes | Yes | No, calls out through APIs or events |
| Typical builder | Key user or consultant | ABAP developer | Cloud developer |
| Upgrade coupling | Handled by SAP | Moves with the S/4HANA release | Independent, but tied to API contracts |
| Own UI and scaling | Limited | Limited | Full control |
| Added infrastructure | None | None | BTP subaccount, destinations, runtime |
| Latency to core data | None | None | Network call per request |
| Typical clean core level | A | A | A |
The last row needs care. Level A is reachable with all three options, but only if the extension consumes released interfaces. The approach doesn't grant the level. The dependencies decide it.
Failure modes in decisions
- Choosing by team skill alone. An ABAP team builds everything in ABAP Cloud, including a partner portal that needs its own UI and release cycle. The extension then ships on the ERP's slower upgrade schedule.
- Choosing side-by-side for a simple field. A cloud team builds a service plus a data copy to store one extra field. The result adds a runtime, a destination, an authorization model, and a synchronization problem for a few minutes of key user work.
- Splitting a transaction across the boundary. If a side-by-side service must veto a posting synchronously, every network failure or slow response in the extension becomes a failure in the core process. Either move the validation into the core stack, or accept the decision after the fact through events and a compensating action.
- Copying core data without a reason. A side-by-side extension that replicates master data creates a second source of truth. Prefer reading through the released API at request time, and copy only when performance or offline access requires it.
- Skipping the written record. Without a record, no one can later tell whether an extension was a deliberate exception or an accident.
Governance checks at review time
Apply the same checks to every proposal, whichever approach it uses.
- List every interface the extension consumes. Mark each as released or not.
- Assign a clean core level, A to D, and record the reason.
- Name the owner, and name the process for retesting after each S/4HANA release.
- Record the alternatives you rejected and why. One sentence each is enough.
- For side-by-side extensions, record the destination, the authentication method, and the runtime.
- Set a review date. Re-check the extension when SAP deprecates an API it uses.
An extension that passes these checks at level A needs only routine monitoring. Anything below level A needs an exception approval with an end date and a migration plan.
Exercise
Exercise
A sales team wants a mobile-friendly app, used by field staff outside the company, to show open sales orders and add notes. The notes must not be stored in S/4HANA. The app will be released every two weeks. Orders are available through a released OData API. Which extension approach do you choose, and which two answers in the framework lead there?
Show answer
Side-by-side on SAP BTP. Released APIs are enough, so the first check passes. The logic does not need to run inside a core transaction, because the notes live outside S/4HANA, and the app needs its own UI, external users, and a two-week release cycle. Those answers rule out in-app and developer extensibility and point to a CAP service that reads the sales orders through a destination.
Exercise
A colleague proposes a side-by-side service that reads a field from an internal SAP table over a custom RFC call, because "it is outside the core, so it stays clean." What is wrong with this reasoning, and what should happen next?
Show answer
Clean core depends on which interfaces the extension uses, not on where it runs. An RFC call to an internal table is an unreleased dependency, so the extension cannot be level A and may break at an upgrade. The next step is to look for a released API or released CDS view with the field, request a release from SAP if none exists, or change the requirement.