Sub topic 13
Clean core and extensibility principles
Prerequisites
This chapter assumes you know what custom ABAP code is and how a development, quality, and production landscape works. It also assumes you have read the chapters on custom code analysis and fit-to-standard. It applies to all three transition paths.
What "clean core" means
A clean core is an S/4HANA system whose standard SAP code and data model are left unmodified. Your own logic lives beside the standard in extensions that use stable, released interfaces. The goal is that SAP upgrades and updates do not break your extensions.
ECC systems often contain modifications. These are direct changes to SAP objects, such as edits to standard programs or tables. Each modification must be re-examined at every upgrade. Clean core aims to stop this pattern from carrying over into S/4HANA.
Extensibility options
| Option | Where it runs | Typical use |
|---|---|---|
| Key user extensibility | Inside S/4HANA | Custom fields, custom logic, and simple custom business objects, built with in-app tools |
| Developer extensibility (on-stack) | Inside S/4HANA | ABAP Cloud development on released objects only |
| Side-by-side extensibility | SAP Business Technology Platform (BTP) | Separate apps and services that call S/4HANA through released APIs and events |
The key rule is to use released objects only. A released object is an API, CDS view, or class that SAP has marked as stable for customers to use. Unreleased objects can change without notice, and they are the usual source of broken extensions.
How the path shapes clean core
- Greenfield: You start with an empty system, so you can enforce clean core from day one. Fit-to-standard workshops decide which gaps need an extension at all.
- Brownfield: Your existing custom code arrives with the system. Custom code analysis tells you what to delete, adapt, or move. Cleaning up is optional work unless you plan for it, so it is easy to postpone.
- Selective data transition: You can choose to clean up code and configuration while keeping data. How much you gain depends on how much of the original system you keep.
A common brownfield tactic is to convert first and refactor afterward. Moving modifications to released extension points in steps keeps the conversion project smaller.
A worked example
Suppose ECC has a modified standard program that sets a custom approval status on sales orders. In S/4HANA you can rebuild this without touching standard code:
- Add the status as a custom field with key user extensibility.
- Implement the approval rule as custom logic at a released extension point.
- If the approval needs an external workflow tool, build it on BTP and subscribe to a released business event from S/4HANA.
The standard sales order code stays unchanged. A later SAP update therefore does not require you to merge your change into it.
Common errors
- Treating clean core as a one-time goal. Without code checks in your delivery process, new unreleased calls creep back in.
- Calling unreleased objects because they work today. They may fail after an update.
- Skipping fit-to-standard and rebuilding every ECC customization as an extension.
- Moving everything side-by-side. Chatty integrations that make many calls to S/4HANA add latency and operating cost.
Exercise
A brownfield project finds a custom program that reads an unreleased SAP table directly. What clean core steps would you take?
Show answer
Check whether the requirement is still needed, using fit-to-standard. If it is, look for a released API or CDS view that gives the same data and rewrite the program to use it. If none exists, build the logic with developer extensibility or side-by-side on BTP using released interfaces, and delete the old program.