Custom Code Remediation
Custom code is often the biggest variable in S/4HANA transitions. Understanding your code footprint and remediation approach is critical to realistic planning.
of project effort typically
inventory → classify → remediate → test
may be retired
analysis is critical
Why Custom Code Is the Critical Path
In many S/4HANA transitions, custom code remediation consumes 40-60% of project effort and is the primary source of timeline risk. Underestimating this workstream is one of the most common causes of project delays and budget overruns.
S/4HANA introduces significant changes: simplified data models, deprecated functions, new APIs, and HANA-specific syntax requirements. Custom code that worked perfectly in ECC may fail to compile, perform poorly, or produce incorrect results in S/4HANA.
The good news: with proper analysis and a structured approach, this is a manageable workstream. The key is starting early, classifying ruthlessly, and automating testing.
Common Mistake
"We'll handle custom code in parallel with testing." — This almost always leads to delays. Start code analysis 6-12 months before conversion.
Last Updated
January 15, 2026
Sources
- •SAP Simplification List
- •SAP ATC Documentation
What Makes Code Incompatible
Simplified Data Models
S/4HANA consolidates tables. Code referencing old tables (BSEG, KONV, etc.) may break.
Deprecated Functions
Many function modules and BAPIs are removed or replaced with new APIs.
Business Partner
Customer/Vendor master replaced by Business Partner. All related code needs review.
Material Ledger
Material Ledger mandatory in S/4HANA affects costing and valuation code.
HANA Syntax
Native SQL, OpenSQL changes, and HANA-specific functions require adaptation.
Unicode Compliance
All code must be Unicode-compliant—check older legacy programs.
The 4-Step Remediation Process
Inventory
2-4 weeks
Key Activities
- •Run SAP Readiness Check to identify impacted objects
- •Use ATC (ABAP Test Cockpit) with S/4HANA check variants
- •Extract full list of Z* objects with usage data
- •Identify third-party add-ons and their dependencies
Output
Complete inventory with severity classification
Classify
2-4 weeks
Key Activities
- •Categorize: Must fix / Should fix / Can retire
- •Map objects to business processes and criticality
- •Identify "dead code" (no usage in 12+ months)
- •Assess effort per object (auto-generated estimates)
Output
Prioritized remediation backlog
Remediate
3-12 months
Key Activities
- •Fix syntax issues and simplification items
- •Replace deprecated functions with new APIs
- •Adapt to new data models (compatibility views or rewrites)
- •Retire unused code (with governance approval)
Output
S/4HANA-compatible codebase
Test
Continuous
Key Activities
- •Unit test each remediated object
- •Integration test affected business processes
- •Regression test full scenarios
- •Performance test critical transactions
Output
Validated code ready for production
Understanding Simplification Items
SAP's documented list of changes affecting custom code
SAP publishes a "Simplification List" documenting every change that could affect custom code. This is your primary reference for understanding what needs to change. The list grows with each S/4HANA release.
Common Categories
Table/View Changes
Tables consolidated or replaced (e.g., BSEG → ACDOCA)
Function Module Obsolescence
FMs removed or replaced with new APIs
Business Logic Changes
Mandatory new features (Material Ledger, Business Partner)
Compatibility Options
- A
Compatibility Views
SAP provides views that mimic old structures—use short-term
- B
Released APIs
SAP-recommended replacement interfaces
- C
Custom Rewrite
Full redesign using new S/4HANA capabilities
Tools for Custom Code Analysis
SAP-Native Tools
SAP Readiness Check
High-level impact assessment and sizing
ABAP Test Cockpit (ATC)
Detailed code analysis with S/4HANA check variants
Custom Code Migration Worklist
Prioritized remediation tracking in Fiori
SAP Business Technology Platform
Remote custom code analysis via BTP
Partner/Third-Party Tools
Panaya
Cloud-based impact analysis and testing
Tricentis
Automated testing for regression validation
Basis Technologies
Automated code remediation and transport
Virtual Forge / SAST Tools
Security-focused code analysis
Custom Code Governance
During Transition
- Establish code review board for retire/remediate decisions
- Set clear criteria for retirement (no usage, duplicate, etc.)
- Track remediation velocity weekly
- Block new Z* development unless S/4-ready from start
- Document all changes for audit trail
Post Go-Live (Clean Core)
- Enforce clean core principles for new development
- Prefer extension points over modifications
- Use released APIs only
- Regular ATC scans for new code
- Track custom code metrics in ops reporting