Custom Code Remediation at Scale: How AI Agents Handle the 40% SAP Cannot Fix
SAP Joule fixes the easy ABAP. Here is what happens to the 5,000 Z-objects it cannot touch.
The Custom Code Problem: 5,000-15,000 Z-Objects Per ECC System
Every ECC system is unique because of its custom code. Over 15-20 years of operation, organizations build thousands of Z-programs, Z-tables, Z-function modules, BAdI implementations, user exits, enhancement spots, and custom workflows. These objects encode the specific business logic that differentiates how your organization operates within SAP.
When migrating to S/4HANA, every one of these objects must be analyzed for compatibility. The simplified data model, deprecated function modules, changed APIs, removed transaction codes, and new extension architecture all create potential incompatibilities that must be identified and resolved.
What SAP Handles vs. What It Does Not
| Category | SAP Tool | Coverage | What Remains |
|---|---|---|---|
| Syntax incompatibilities | ATC S/4HANA variant | Auto-detects 95%+ | Detection only — fix still manual for complex cases |
| Simple API replacements | Joule for Developers + quick-fixes | 40-60% auto-fix | One-liner swaps: deprecated FM to replacement |
| Deprecated function modules | ATC + simplification DB | Flags all occurrences | Complex FMs with no 1:1 replacement need redesign |
| Table access changes | ATC flags removed tables | Detection complete | Custom reports reading BSEG, GLT0, etc. need full rewrite |
| Business logic rewrites | None | 0% | Complex Z-programs with cross-table joins, calculations |
| HR-ABAP adaptations | Limited ATC coverage | 20-30% | HR infotypes, payroll schemas, time management custom |
| Module-pool to Fiori | None — different paradigm | 0% | Complete UI re-architecture from Dynpro to Fiori |
| Integration-dependent code | None | 0% | RFC/BAPI callers that depend on external system behavior |
| Workflow customizations | None | 0% | Custom workflow steps, agents, event linkages |
How Voltus Custom Code Remediation Agent Works
The Voltus Custom Code Remediation Agent addresses the 40% that SAP tools cannot handle. Its core advantage is cross-system context — understanding not just what the code does internally, but how it is called from external systems and what business processes depend on it.
Step 1: Semantic Analysis. The agent analyzes each Z-object not just syntactically (what APIs it calls) but semantically (what business function it performs). A Z-program that reads BSEG to calculate vendor aging is not just "a program that accesses a deprecated table" — it is a "vendor payment analysis function used by the treasury team every Friday."
Step 2: Cross-System Impact Mapping. Using iHub's integration discovery, the agent identifies how each Z-object is called from outside SAP — which batch jobs invoke it, which external systems send data to it, which integrations depend on its output. This cross-system context is critical for remediation because changing the Z-object may require coordinated changes in calling systems.
Step 3: Remediation Strategy Selection. For each object, the agent recommends one of four strategies: (a) Adapt — modify the existing code to work with S/4HANA APIs and data model; (b) Replace — swap custom code with standard S/4HANA functionality; (c) Re-architect — redesign as a BTP or iHub extension using clean core principles; (d) Retire — delete the object if usage analysis shows it is no longer needed.
Step 4: Code Generation. For Adapt and Replace strategies, the agent generates remediated ABAP code with inline comments explaining each change. For Re-architect strategies, it generates the target extension specification. For Retire strategies, it produces the impact analysis showing that retirement is safe.
The Code Pruning Opportunity (Bluefield-Exclusive)
Bluefield migration offers a unique advantage that Brownfield does not: the opportunity to reduce custom code footprint before remediation. The Code Pruning Agent analyzes usage patterns across your ECC system to identify Z-objects that can be safely deleted rather than migrated.
| Pruning Category | Typical Percentage | How Identified |
|---|---|---|
| Unused code (no execution in 12+ months) | 15-25% of Z-objects | ST03N workload statistics, code coverage analysis |
| Duplicate/redundant functionality | 5-10% | Semantic similarity analysis across Z-objects |
| Superseded by standard S/4HANA | 10-15% | Mapping custom functions to standard S/4HANA equivalents |
| Legacy integrations (partners decommissioned) | 3-8% | iHub integration inventory cross-reference |
| Total reducible footprint | 30-50% | Combined analysis with business-owner validation |
Reducing 30-50% of custom code before remediation dramatically simplifies the remaining work — fewer objects to fix, test, and maintain post-migration.
Remediation ROI: The Developer Math
The economics of AI-assisted remediation are compelling when you consider developer productivity.
| Metric | Manual Remediation | Voltus AI Agent | Improvement |
|---|---|---|---|
| Objects per developer per week | 5-10 (simple), 1-2 (complex) | 30-50 (simple), 8-15 (complex) | 5-8x throughput |
| Error rate (post-remediation defects) | 8-12% requiring rework | 2-4% with AI validation | 60-70% fewer defects |
| Time to first production-ready batch | 6-8 weeks | 2-3 weeks | 3x faster start |
| Total remediation timeline | 6-8 months | 3-4 months | 50% reduction |
Part 9: Custom Code Remediation at Scale (You are here)
Part 10: CIO Migration Acceleration Playbook
Send us a sample of your ATC findings and we will demonstrate how the Custom Code Remediation Agent generates production-ready fixes for your specific Z-objects.
Request Code Analysis Demo →