Architecture Guide #24 • S/4HANA Migration Strategy

SAP S/4HANA Custom Code Migration Scoping & Package Architecture Guide

A strategic engineering guide on scoping legacy custom code, decommissioning dead assets, and designing multi-tier ADT package hierarchies for Clean Core migrations.

Interactive Architect: Automatically design your ADT package structure, generate the scoping matrix, and export the migration runbook with our In-Browser Custom Code Migration Architect.

1. The 5-Bucket Scoping Framework

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%

2. ADT Multi-Tier Package Hierarchy

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:

3. Automated Decommissioning via SUSG

Rule #1 of Migration: The cleanest custom code is code that does not exist. Do not remediate code that has not been executed by any business user in the past 12 months.

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.

Master Enterprise RAP & Clean Core Architecture

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)