The enterprise application landscape is undergoing its most significant transformation since the transition from R/3 to ERP. As organizations migrate to SAP S/4HANA, the traditional paradigm of heavy custom ABAP modifications is giving way to a new philosophy: the Clean Core.
Understanding Clean Core
A clean core involves keeping the standard SAP codebase untouched by custom development. Custom logic is built as side-by-side or on-stack extensions that communicate with the core via standard released APIs.
“Maintaining a clean core is not just about reducing upgrade costs; it is about agility, security, and continuous innovation in a cloud-first era.”
The Pillars: RAP and CAP
To implement a clean core, SAP offers two modern programming frameworks:
- SAP RESTful Application Programming Model (RAP): Optimized for on-stack extensions and custom backend logic within the ABAP platform.
- SAP Cloud Application Programming Model (CAP): An open, multi-language framework (supporting Node.js, Java, and TypeScript) designed for side-by-side extensions on SAP BTP.
Comparing RAP vs CAP
| Feature | SAP RAP | SAP CAP |
|---|---|---|
| Runtime Environment | ABAP Environment (S/4HANA or BTP ABAP) | Node.js or Java (Cloud Foundry, Kyma) |
| Ideal Use Case | Deep integration with legacy SAP transactions | Consumer-facing apps, third-party integrations |
| Skill Requirements | Modern ABAP (CDS, BOPF, Class-based) | JavaScript/TypeScript or Java, SQL |
Key Steps for Migration
To successfully migrate your legacy custom code to RAP and CAP, follow these steps:
- Conduct a custom code analysis using the ABAP Test Cockpit (ATC) to identify cloud-readiness.
- Identify legacy enhancements (User Exits, BAdIs) that can be migrated to Key User Extensibility.
- Expose core SAP tables using secure, released CDS views and APIs.
define root view entity Z_I_PurchaseOrder
as select from zpo_header
composition [0..*] of Z_I_PurchaseOrderItem as _Items
{
key po_uuid as PurchaseOrderUUID,
po_number as PurchaseOrderNumber,
supplier as Supplier,
_Items
}