A strategic engineering guide on scoping legacy custom code, decommissioning dead assets, and designing multi-tier ADT package hierarchies for Clean Core migrations.
When preparing an enterprise ERP landscape for SAP S/4HANA (Cloud or On-Premise), the custom code inventory typically contains hundreds of thousands of lines of ABAP code written over decades. Attempting to manually analyze every object leads to project paralysis.
Industry-standard Clean Core methodology categorizes all custom objects into 5 distinct disposition buckets:
| Bucket | Criteria | Action | Typical % |
|---|---|---|---|
| 1. Decommission | 0 executions in SUSG / SCMON over 12 months | Delete prior to conversion or exclude from transport scope | 35% - 50% |
| 2. Quick Fix | Syntax deprecations with ADT automated fixes | Batch execute Quick Fixes via Eclipse ADT ATC view | 20% - 25% |
| 3. Tier-1 Clean Core | Strategic business logic with released API equivalents | Re-architect as RAP Business Objects and CDS View Entities | 15% - 20% |
| 4. Tier-2 Quarantine | Core logic depending on unreleased SAP objects | Wrap in Classic ABAP package and expose via Contract C1 | 10% - 15% |
| 5. Key-User In-App | Simple field extensions and table UI adjustments | Replace with Custom Fields and Logic App (YY1_*) | 5% - 10% |
In ABAP Cloud Clean Core, packages are not merely organizational folders; they are architectural boundaries enforced by the compiler. The ABAP Language Version must be explicitly configured at the package level:
ABAP Language Version = 'ABAP Cloud'. Code here can ONLY call SAP Released APIs (Contract C1) and objects exposed via Package Interfaces.ABAP Language Version = 'Standard ABAP' (permitted in Private Cloud and On-Premise). Contains quarantined wrappers that call classic BAPIs/tables.Activate Source Code Monitor (SCMON) in Production and aggregate data monthly via transaction SUSG. Load the aggregated usage data into the SAP BTP Custom Code Migration App to automatically filter out unused packages.
Get the complete 400+ page guide with end-to-end architectures, testing patterns, and migration blueprints:
Unlock Complete Enterprise Suite (80% Off • €9.80) → Also available in Paperback & Kindle on Amazon ($19.99)