Indu Learning Platform
Course/Unit 3 · The modern S/4HANA stack
Lesson 3-4

Clean core, RAP and SAP BTP

How extensions are built on S/4HANA today, what the RAP stack looks like, and why it changes the technical MDG role.

Watch firstWhat Is the ABAP RESTful Application Programming Model (ABAP RAP)? · SAP PRESSOpen on YouTube ↗

What clean core means

ECC customisations (modifications, exits, direct table reads) turned every upgrade into a repair project. Clean core keeps S/4HANA standard and builds extensions only on released interfaces, in ABAP Cloud (an ABAP version that allows only released objects) or on SAP BTP. SAP's clean-core level model has been revised; check the current guide before quoting it.

Side-by-side on SAP BTPown apps, AI, integration, eventsDeveloper extensibility (on-stack)ABAP Cloud, RAP, released APIsKey user extensibilityCustom Fields, Custom Logic in FioriS/4HANA corestandard, upgraded by SAP
Three extension options above an untouched core. Prefer the lowest that does the job.

Choosing the extension option

MDG keeps its own frameworks (data model, BRFplus, BAdIs such as USMD_RULE_SERVICE). Clean core doesn't remove them: use released interfaces where they exist and document where they don't.

NeedBest fitWhyExtra field on BP, shown in FioriKey userNo code, upgrade-safeDerive a field on save in S/4Developer (ABAP Cloud)Same transaction, released BAdISteward work list from a CDS viewDeveloper (RAP)Close to data, OData out of theboxAI agent that drafts BP fixesSide-by-side on BTPAI services, own lifecycleIntegration with 15 source systemsSide-by-side (Integration Suite)Many systems, monitoring
Match the need to the lowest tier that works.

Try it: which extension tier?

Try it · Sort

Sort each extension into the tier you would choose.

Key user
Developer (ABAP Cloud / RAP)
Side-by-side (BTP)
Click an item, then a bucket (or drag it).

The RAP stack

The ABAP RESTful Application Programming Model (RAP) adds behavior (create, update, validations, determinations, actions) to CDS views, with locking, drafts and authorisation from the framework. Managed RAP writes the table for you; unmanaged wraps existing save logic. Read an unfamiliar object in order: data model, behavior, projection, service.

Step through · 1 of 7
Data modelCDS root view entityBehavior definitionBDEFBehaviorimplementationABAP classProjectionC_ view + projection BDEFService definitionwhat to exposeService bindingOData V4, UI or APIConsumersFiori elements, API, agent
A root view entity (and optional children) defines the object's data, usually on a custom table or released views.
Click through the RAP layers, bottom to top.

A behavior definition, read slowly

A small custom object that tracks data-quality issues found by the lesson 3-1 views:

  • managed: the framework does create, update, delete and the DB writes.
  • validation … on save: rejects bad data before commit, like an MDG check rule.
  • determination … on modify: derives values, like an MDG derivation.
  • action: a named operation exposed to the UI and the API.
RAP BDEF (outline)
managed implementation in class zbp_i_dqissue unique;
strict ( 2 );

define behavior for ZI_DQIssue alias DQIssue
persistent table zdq_issue
lock master
authorization master ( instance )
{
  create; update; delete;
  field ( readonly, numbering : managed ) IssueUUID;
  field ( mandatory ) BusinessPartner, IssueType;
  validation validateBusinessPartner on save { create; field BusinessPartner; }
  determination setStatusNew on modify { create; }
  action markResolved result [1] $self;
}

Reading outline, not a tested object. Generate a starter with the ADT wizard and compare.

Try it: call the object with EML

Code inside the system uses EML (Entity Manipulation Language) instead of direct table updates, so the same validations and authorisation checks run as in the UI.

Try it · Fill the blanks

Complete the EML that creates one data-quality issue.

 OF zi_dqissue
  ENTITY DQIssue
     FIELDS ( BusinessPartner IssueType )
    WITH VALUE #( ( %cid            = 'issue1'
                    BusinessPartner = '1000123'
                    IssueType       = 'TAX_MISSING' ) )
  MAPPED   DATA(mapped)
     DATA(failed)
  REPORTED DATA(reported).

.

Classic versus clean-core habits

Classic ECC styleModify SAP code or use user exitsSELECT and UPDATE any tableDynpro and Web Dynpro UIsCustom RFCs for integrationUpgrade = regression projectClean core styleReleased BAdIs and APIs onlyReleased CDS views and EMLFiori elements from annotationsOData, events, Integration SuiteUpgrade-stable extensionsvs
Validations, derivations, workflow: same ideas, upgrade-safe foundations.

SAP BTP around S/4HANA and MDG

SAP BTP hosts side-by-side extensions: the ABAP environment (with a free trial), SAP Build, Integration Suite, and AI services such as AI Core, the generative AI hub and Joule. MDG cloud edition runs there too. Names and bundles change often; confirm on SAP's BTP pages.

ABAP environmentRAP, ABAP CloudSAP Buildapps, process automationIntegration Suiteflows, APIs, eventsAI servicesAI Core, generative AI hubMDG cloud editionBP governance as a serviceS/4HANAreleased APIs + eventsSAP BTP
A capability map. Verify current product names.

Why this changes the MDG role

An agent that helps stewards never writes to BUT000. It reads through a CDS-based OData service and submits fixes through a RAP action or MDG change request, so validation, approval and audit still apply. Designing these doorways is the technical MDG job ahead.

AI agent (BTP)OData serviceRAP / MDG logicStewardGET open DQ issuesIssues + BP dataDraft fix proposalPOST proposal (action)Validate + authoriseRoute for approvalApproveActivate + audit log
The agent proposes, the governed service validates, a human approves.

Try it: give the agent access

Try it · What would you do?

An AI agent should correct region codes on 300 BPs. A developer proposes giving it a HANA database user with UPDATE rights on BUT000 and ADRC. Your answer?

Remember

  • Clean core: no modifications, released APIs only; pick the lowest extension tier that works.
  • RAP layers: CDS model, behavior definition and pool, projection, service definition, binding; EML replaces table updates.
  • Governed OData/RAP or MDG services are the doorway for AI agents, with approval and audit.

Check yourself

Adding a custom field to the BP and showing it in a Fiori app without code is…
Which RAP artefact declares validations, determinations and actions?
Why should clean-core ABAP use EML instead of UPDATE on the table?
An AI agent should help stewards fix BP data. What is the clean-core pattern?