Architectural Reference Blueprint • Module 07

Developer Extensibility BAdI Architecture in ABAP Cloud & Clean Core

👤 Andrea Antonio Perrelli (SAP Certified Solution Architect) 📅 October 2026 ⏱ 7 min read 🌎 Clean Core Tier-1 Extensibility

In S/4HANA Cloud and modern S/4HANA on-premise systems, legacy modification hooks (user exits, customer exits, implicit enhancement spots) are permanently blocked by the ABAP Cloud compiler. In this architectural guide, discover how to design, evaluate, and implement upgrade-proof Developer Extensibility BAdIs released under Contract C1.

1. The Death of Classic Enhancement Hooks

For 25+ years, SAP developers modified ERP business logic by placing custom ABAP inside subroutines like USEREXIT_SAVE_DOCUMENT_PREPARE (in include MV45AFZZ) or injecting code through implicit enhancement spots at the beginning/end of SAP standard function modules.

Under the Clean Core Imperative, these techniques cause massive technical debt:

Core Architectural Law: The only sanctioned mechanism to execute custom in-app ABAP inside standard SAP transaction lifecycles is via Developer Extensibility BAdIs explicitly released under Release Contract C1.

2. Classic Enhancements vs ABAP Cloud Replacements

Legacy Enhancement Technique Upgrade Safety Clean Core Tier-1 Replacement
USEREXIT_* (e.g., MV45AFZZ) ❌ High Risk (Breaks on release) Released Developer BAdI (e.g., SD_SLS_MODIFY_HEAD)
Customer Exit (SMOD / CMOD) ❌ Deprecated / Obsolete Custom Business Logic BAdI in ABAP Cloud
Implicit Enhancement Spot ❌ Prohibited in ABAP Cloud Developer BAdI or Tier-2 Quarantine Wrapper
Classic BAdI (Unreleased Interface) ❌ Non-compliant C1-Released BAdI Definition in ADT
Direct DB Modification (Z-table join) ❌ Upgrade Blocker Released CDS View Entity Projection

3. BAdI Definition Architecture: Single vs Multiple-Use

When inspecting released BAdIs in ABAP Development Tools (ADT), architects must evaluate three structural properties:

  1. Single-Use BAdIs: Only one active implementation can exist in the system for a given filter combination. Used primarily for calculations where multiple answers would conflict (e.g., custom price determination).
  2. Multiple-Use BAdIs: Multiple independent implementations can be executed sequentially. Execution order is non-deterministic; implementations must be mutually independent.
  3. Filter-Dependent BAdIs: The runtime engine only instantiates the BAdI implementation if the runtime filter context (e.g., CompanyCode = '1010' or SalesOrg = 'US01') matches the filter expression configured in ADT.

4. Production ABAP Cloud Implementation Listing

Below is a production-grade implementation of a released Developer Extensibility BAdI in ABAP Cloud:

CLASS zcl_sales_order_check_badi DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_badi_interface. INTERFACES if_sd_sls_check_head. ENDCLASS. CLASS zcl_sales_order_check_badi IMPLEMENTATION. METHOD if_sd_sls_check_head~check_header. " 1. Verify contextual preconditions IF salesorder-salesorganization <> '1010'. RETURN. ENDIF. " 2. Validate business rules using Released APIs only IF salesorder-totalnetamount > 100000 AND salesorder-purchaseorderbycustomer IS INITIAL. " Add error message to released protocol table APPEND VALUE #( messagetype = 'E' messageid = 'ZSALES_MSG' messagenumber = '001' messagevariable1 = salesorder-salesorder ) TO messages. ENDIF. ENDMETHOD. ENDCLASS.

5. What to Do When No Released BAdI Exists: Tier-2 Quarantine

In complex S/4HANA migration projects, you may encounter an obsolete business process where SAP has not yet published a C1-released BAdI.

Do not revert to modifying core code! Instead, apply the Tier-2 Quarantine Pattern:

Generate BAdI Classes Automatically:
Use our free browser-based Developer BAdI Implementation Generator for ABAP Cloud.
Launch BAdI Generator →
COMPLETE ENTERPRISE ARCHITECTURE SUITE

Master Enterprise Clean Core on S/4HANA & SAP BTP

Get all 15 modules, 40 Retina architecture diagrams, 61 production-grade code snippets, editable DOCX specifications, and the SAP BTP AI Companion.

Get Enterprise Suite €9.80 (80% Off) Order on Amazon ($19.99)