Enhancements
ABAP Developmentadvanced

Enhancements Part 10: Enhancements in S/4HANA and Clean Core

Key takeaway

Map classic enhancement techniques to S/4HANA clean core: key user extensibility (custom fields and logic), developer extensibility with released BAdIs and APIs, side-by-side extensions, what happens to user exits and implicit enhancements, and how to classify and reduce existing enhancements.

Explanation

📌 KEY POINTS
✅ Clean core = keep SAP code unchanged and extend only through released, upgrade-stable interfaces.

✅ Three extension styles: key user (in-app, Fiori apps for custom fields and logic), developer extensibility (ABAP Cloud with released BAdIs/APIs), side-by-side (SAP BTP).

✅ Classic user exits, customer exits and implicit enhancements still work in S/4HANA on-premise/private cloud, but they are not clean core.

⚠️ In S/4HANA Cloud public edition, only released extension points are available — no classic exits or modifications.

━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE

Parts 1–9 covered the classic toolbox. Most customers run existing ECC enhancements in S/4HANA and must decide what to keep, move or remove.

━━━━━━━━━━━━━━━━━━━━
▶ 1. KEY USER EXTENSIBILITY

  • Custom Fields app — add fields to business contexts (e.g. sales order header) including UI, OData, CDS and some forms.
  • Custom Logic app — implement released BAdIs in a restricted ABAP in the browser (e.g. field validation, defaults).
  • Suitable for simple rules; managed and upgrade-stable.

━━━━━━━━━━━━━━━━━━━━
▶ 2. DEVELOPER EXTENSIBILITY (ABAP CLOUD)

  • Develop in ADT with ABAP language version "ABAP for Cloud Development".
  • Only released objects (C1 contract): released BAdIs, CDS views, classes.
  • New BAdIs for S/4HANA processes (e.g. sales document checks) are released for cloud development.

━━━━━━━━━━━━━━━━━━━━
▶ 3. SIDE-BY-SIDE

Separate apps on SAP BTP using released APIs/events — for new processes that don't need to run inside the transaction.

━━━━━━━━━━━━━━━━━━━━
▶ 4. EXISTING ENHANCEMENTS IN A CONVERSION

  • Custom code migration (ATC with S/4HANA checks) shows affected code (simplification items, changed tables).
  • Classify each enhancement: still needed? replaced by standard? replaceable by a released BAdI or key user extension?
  • Tier model (on-premise/private cloud): tier 1 ABAP Cloud, tier 2 wrappers for unreleased APIs, tier 3 classic (user exits, implicit enhancements, modifications) — to be reduced over time.

━━━━━━━━━━━━━━━━━━━━
▶ 5. PRACTICAL RULES FOR NEW REQUIREMENTS

  1. Standard or configuration?
  2. Key user extensibility?
  3. Released BAdI with developer extensibility?
  4. Side-by-side?
  5. Only then classic exits (tier 3), documented with a plan to replace.

━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP

  1. Open the Custom Fields app (or its documentation) and see which business contexts exist for sales orders.
  2. In ADT, search released BAdIs for your area (e.g. filter by API state "Released").
  3. Classify three of your system's enhancements into tier 1/2/3 and suggest the target.

✅ CHECKPOINT: you can apply clean core rules to new and existing enhancements.

Code example

ABAP Code
* ===== Classic (tier 3): user exit in MV45AFZZ =====* FORM userexit_save_document_prepare.*   IF vbak-auart = 'ZOR' AND vbak-bstnk IS INITIAL.*     MESSAGE e001(zsd).*   ENDIF.* ENDFORM. * ===== Clean core target: released BAdI implemented in ABAP Cloud =====* (Example structure - exact BAdI names differ by release; look them up in ADT*  via the released-objects view for your business object.)CLASS zcl_so_check_po DEFINITION PUBLIC FINAL CREATE PUBLIC.  PUBLIC SECTION.    INTERFACES if_badi_interface.*   INTERFACES <released_badi_interface>.      " e.g. a sales document check BAdI    METHODS check      IMPORTING iv_doc_type TYPE c                iv_po_number TYPE c      EXPORTING et_messages TYPE bapiret2_t.ENDCLASS. CLASS zcl_so_check_po IMPLEMENTATION.  METHOD check.    DATA ls_msg TYPE bapiret2.    IF iv_doc_type = 'ZOR' AND iv_po_number IS INITIAL.      ls_msg-type    = 'E'.      ls_msg-id      = 'ZSD'.      ls_msg-number  = '001'.      APPEND ls_msg TO et_messages.            " returned, not displayed    ENDIF.  ENDMETHOD.ENDCLASS. * ===== Classification register (documentation) =====* Enhancement              Tier  Target* MV45AFZZ PO check        3     Released sales document check BAdI (tier 1)* Implicit enh. in pricing 3     Pricing routine / condition technique (config)* RFC call to legacy FM    2     Wrapper class ZCL_..._API until SAP releases API

Real project scenario

During an ECC to S/4HANA conversion, a company had 180 enhancements. The team classified them: 45 were obsolete (standard now covered the need), 60 moved to key user custom fields and custom logic or released BAdIs, 50 remained in tier 3 with documented replacement plans, and 25 stayed as tier 2 wrappers.
For every new requirement after go-live, the architecture board required the clean core decision sequence, which stopped the growth of new implicit enhancements.

Common mistakes

  • Converting all old exits 1:1 without checking if standard covers them.
  • Using unreleased objects in ABAP Cloud code.
  • Assuming classic exits exist in S/4HANA Cloud public edition.
  • Ignoring ATC custom code migration results.
  • No plan to reduce tier 3 enhancements.

Best practices

  • Follow the decision order: standard → key user → released BAdI → side-by-side → classic.
  • Classify existing enhancements into tiers with targets.
  • Use ATC with cloud readiness checks.
  • Wrap unreleased functionality in tier 2 classes.
  • Keep an enhancement register with owners.

Interview angle

Questions: "What is clean core?", "How do you extend S/4HANA?", "What happens to user exits in S/4HANA?"
Strong answer: extend only via released interfaces; key user extensibility (custom fields/logic), developer extensibility in ABAP Cloud with released BAdIs/APIs, side-by-side on BTP; classic exits/implicit enhancements work on-premise/private cloud (tier 3) but should be reduced; public cloud allows only released extension points; classify existing enhancements with ATC.

Practice this lesson

Quick check

1. Under clean core, which option should be considered BEFORE a classic user exit in S/4HANA?

2. Which extension option is available in SAP S/4HANA Cloud public edition?

3. Which supports S/4HANA Clean Core best?

Interview questions

1. You are migrating from legacy ECC 6.0 with 30 CMOD enhancements to SAP S/4HANA. Develop a comprehensive strategy for assessing, planning, and executing the migration. What are the key technical challenges?

Answer it in your own words first, then compare.

2. In an S/4HANA project, a sales validation request was initially proposed as an implicit enhancement. How would you handle it under clean core principles?

Answer it in your own words first, then compare.

Practice more with Interview AI →

Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.

More lessons in this topic

Interview questions on this topic

Related SAP topics