← Blog|Technical Deep-DiveApril 2026 · 13 min read
SAP Migration Series — Part 9 of 10

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.

VW
Editorial — VoltusWave
VoltusWave Research & Engineering

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.

🔴The scale of the problem: A typical mid-size ECC system contains 5,000-8,000 custom objects. Large enterprise systems contain 10,000-15,000+. SAP's Readiness Check and ATC can flag most incompatibilities — but flagging is not fixing. The remediation effort is where the real cost and timeline risk lives.

What SAP Handles vs. What It Does Not

CategorySAP ToolCoverageWhat Remains
Syntax incompatibilitiesATC S/4HANA variantAuto-detects 95%+Detection only — fix still manual for complex cases
Simple API replacementsJoule for Developers + quick-fixes40-60% auto-fixOne-liner swaps: deprecated FM to replacement
Deprecated function modulesATC + simplification DBFlags all occurrencesComplex FMs with no 1:1 replacement need redesign
Table access changesATC flags removed tablesDetection completeCustom reports reading BSEG, GLT0, etc. need full rewrite
Business logic rewritesNone0%Complex Z-programs with cross-table joins, calculations
HR-ABAP adaptationsLimited ATC coverage20-30%HR infotypes, payroll schemas, time management custom
Module-pool to FioriNone — different paradigm0%Complete UI re-architecture from Dynpro to Fiori
Integration-dependent codeNone0%RFC/BAPI callers that depend on external system behavior
Workflow customizationsNone0%Custom workflow steps, agents, event linkages
💡The 40% that remains is not random — it is systematically the most complex, most business-critical, and most time-consuming code to remediate. This is where traditional migration projects spend 60-70% of their code remediation budget.

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.

📋Real-world pattern: A global manufacturer's ECC system contained 847 custom reports reading from deprecated aggregate tables (BSEG, BSID, BSAD, GLT0). SAP ATC flagged all 847. Joule auto-fixed 312 (simple SELECT replacements). The Voltus agent remediated 489 complex reports involving cross-table joins, calculated fields, and ALV grid transformations — in 3 weeks instead of the estimated 4 months of manual developer effort.

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 CategoryTypical PercentageHow Identified
Unused code (no execution in 12+ months)15-25% of Z-objectsST03N workload statistics, code coverage analysis
Duplicate/redundant functionality5-10%Semantic similarity analysis across Z-objects
Superseded by standard S/4HANA10-15%Mapping custom functions to standard S/4HANA equivalents
Legacy integrations (partners decommissioned)3-8%iHub integration inventory cross-reference
Total reducible footprint30-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.

MetricManual RemediationVoltus AI AgentImprovement
Objects per developer per week5-10 (simple), 1-2 (complex)30-50 (simple), 8-15 (complex)5-8x throughput
Error rate (post-remediation defects)8-12% requiring rework2-4% with AI validation60-70% fewer defects
Time to first production-ready batch6-8 weeks2-3 weeks3x faster start
Total remediation timeline6-8 months3-4 months50% reduction
SAP Migration Blog Series
Part 8: IT Assurance Beyond Testing
Part 9: Custom Code Remediation at Scale (You are here)
Part 10: CIO Migration Acceleration Playbook
See AI-Assisted Remediation in Action

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 →