Every time I talk to SAP teams about S/4HANA and AI, the story sounds similar: “We know we need to move. We know AI is important. But our ECC system has a giant ball of custom code and integrations. We’re scared to touch it.”
That “giant ball” has a name: technical debt. And it’s not just an SAP problem. It’s an enterprise problem that just happens to be very visible in ECC landscapes.
In this post, I want to unpack:
- How bad technical debt really is (with some hard numbers)
- Why ECC -> S/4HANA projects are getting stuck in that debt
- How this directly slows down AI adoption
- And, ironically, how AI itself can help us pay it down
First, a quick reality check: technical debt is not just “messy code”
Analysts like Gartner and McKinsey now talk about technical debt as a company-wide drag, not just an IT hygiene issue.
- McKinsey found CIOs estimate that technical debt equals 20–40% of the value of their entire technology estate.
- Other research summarizing Gartner data says that by 2025, companies will spend around 40% of their IT budgets just maintaining technical debt and legacy systems, instead of building new things.
So when we say “technical debt,” we’re talking about:
- Old applications and infrastructure
- Layers of custom code and quick fixes
- Spaghetti code integrations
- Multiple variations of bespoke micro apps that exactly does the same thing
- Unused code and programs that were once meant to serve just a few
- Manual workarounds and tribal knowledge
- Out-of-date data models and reports
In other words: every shortcut we took to go faster in the past becomes a challenge now.
Now zoom into ERP and SAP ECC
ERP is where a lot of this debt lives, because it sits at the heart of finance, supply chain, manufacturing, HR, and more.
In the SAP world, a few numbers stand out:
- An ASUG market study found that 91% of SAP customers rely on custom code, and a large majority of that code was written more than six years ago.
- Another ASUG stat from the same research, 63% of organizations said custom code creates barriers to upgrading or migrating to new SAP offerings, and 21% said it’s a direct barrier to innovation.
So if your ECC system feels like it’s held together by custom Z-programs, user exits, and one legendary developer who retired five years ago… you’re not unusual. You’re normal. The problem unfortunately is that: normal is now slowing you down.
ECC → S/4HANA: when technical debt becomes a brick wall
S/4HANA should be the perfect moment to clean things up:
- Standardise processes
- Simplify integrations
- Move from old customizations to modern extensions
- Clean up and retire unused programs
- Get ready for SAP’s AI roadmap
But most customers are discovering that their past decisions are catching up with them.
Recent ASUG research on S/4HANA migration shows that: “The number one risk customers report for S/4 projects is “too many customizations in old instances.”
That single line says a lot:
- ECC systems are over-customized.
- Documentation of all the customizations barely exists, and even if it does then nobody trusts it
- Every custom object becomes a question: “Do we migrate it, rewrite it, retire it, or move it to BTP?”
On top of that, we still have to deal with:
- Old interfaces to non-SAP systems
- Custom reports and Z-tables used by finance every month
- Country-specific tweaks and one-off projects that nobody remembers
This is why so many S/4 initiatives feel stuck in analysis paralysis. You’re not just doing a technical upgrade. You’re negotiating with 10–20 years of history.
Meanwhile, the business is asking: “Where is our AI?”
While ECC -> S/4 is crawling forward, expectations around AI are racing ahead. At the same time, reality has been sobering where a recent analysis of Gartner research highlighted that around 80% of companies see no earnings benefit from AI yet, and Gartner expects about 40% of AI projects to fail by 2027. One of the main reasons: poor data and underestimated technical debt.
That’s the punchline: AI doesn’t fail because the model is bad. It fails because the foundation is messy.
In SAP terms, this looks like:
- Inconsistent master data spread across ECC, BW, spreadsheets, and side systems
- Custom processes that don’t match SAP standard flows
- Hard-coded logic buried in thousands of Z-objects
- Reporting that needs manual fixing before anyone trusts the numbers
So when someone says “let’s plug AI into our SAP data,” the system quietly replies: “First, clean up 20 years of technical debt. Then we’ll talk.”
The double bind: technical debt → slow S/4 → slow AI
Put simply:
- Technical debt in ECC makes S/4HANA migration slow, risky, and expensive.
- As long as you’re stuck on ECC (or a heavily modified S/4), it’s harder to:
- Adopt SAP’s latest innovation
- Take advantage of AI co-pilots
- Experiment quickly with new ideas
Add to that the broader IT picture, some studies show technical debt can eat up to 40% of IT budgets, and even 10–20% of budgets meant for new products get diverted to fixing old problems.
So you’re under pressure to “do AI,” but the money and time are getting soaked up by:
- ECC firefighting
- Regression testing
- Patch upgrades
- Integration issues
- Custom code maintenance
No wonder CIOs feel like they’re dragging an anchor.
Here’s the hopeful part: AI can actually help with the technical debt
This is the slightly ironic twist I love talking about.
The same AI everyone wants for chatbots and forecasting can actually be most valuable behind the scenes: helping you understand and reduce your SAP technical debt.
Here are a few practical ways:
1. Map and measure your SAP technical debt
Before you can fix debt, you need to see it clearly.
AI can:
- Scan your ECC system and auto-classify custom objects (reports, interfaces, enhancements, forms, workflows).
- Group them by business process (OTC, PTP, ATR, manufacturing, HR, etc.).
- Flag duplicates, dead code, and rarely used objects based on usage logs.
- Highlight risky areas – like code that touches tax, closing, or regulatory reporting.
That alone turns the problem from “we have 10,000 custom objects” into “we now know which 500 matter, and why.”
2. Link custom code to business value
One big challenge with S/4 is answering the question: “Do we really need this?”. AI can help by:
- Reading custom code and summarizing what it does in simple language.
- Finding related transactions, tables, and user roles.
- Pulling in usage data to show how often it’s actually used.
- Identifying standard alternatives in future state
This makes conversations like: “Finance says this Z-report is critical. The logs show nobody has run it for 18 months” much easier to have.
3. Recommend future-state options for each object
For each custom object, AI can suggest a direction, for example:
- Retire – not used, or superseded by standard
- Fit to standard – S/4 now covers this process
- Move to side-by-side extension – put it on BTP
- Keep on-stack but modernize – if it must stay close to core, at least do it in the right way
This turns a scary backlog into a prioritized decision list.
4. Accelerate remediation and documentation
A lot of ECC custom code is under-documented. AI is good at things humans struggle with, like:
- Generating technical and functional documentation from code
- Suggesting cleaner versions of existing code
- Highlighting S/4 compatibility issues in old patterns
- Keeping up with frequently updated best practices guidelines from SAP
Is it perfect? No. Is it enough to speed up developers, give them a better starting point, and cut analysis time? Very much yes.
5. Build a cleaner base for AI use cases later
The nice side effect of doing all this is: you reduce custom code surface area, data model gets closer to SAP standard and upgrade paths gets simpler.
Which means when you later roll out SAP’s own AI co-pilots or build your own bespoke AI innovations, you’re not fighting your own history at every step.
So what can SAP leaders do right now?
If I had to summarize this into a simple playbook, it would be:
- Admit technical debt is a business problem, not “just IT.”
Show the numbers – how much budget, time, and risk it adds. Use the 20–40% tech estate and 40% IT budget benchmarks as a reference point. - Make ECC → S/4 and AI part of the same conversation.
S/4 is not just an upgrade – it’s your chance to build an AI-ready core. Talk about technical debt, data quality, and AI in one roadmap, not three separate ones. - Start with transparency, not heroics.
Before committing to a huge program, use AI-powered analysis to map your custom code, integrations, and debt hotspots. It’s much easier to get buy-in when you can point at a dashboard instead of waving a 400-page inventory. - Treat technical debt paydown as an investment in AI.
It’s easier to fund a “Technical Debt Reduction Initiative” when you frame it as “Clearing the path for AI and faster innovation”, not just “cleaning up old code.” - Protect capacity for debt reduction.
If 60–80% of your IT capacity is going to “keeping the lights on,” you’ll never catch up. Carve out a dedicated portion of each release or sprint to chip away at debt, supported by AI tools where possible.
If your ECC system feels heavy, you’re not alone. Almost every SAP customer has some level of technical debt, and the numbers show it’s already eating real money and slowing real projects.
The good news: We finally have tools – especially AI – that can help us see, measure, and manage that debt at scale instead of guessing.
S/4HANA and AI don’t have to be two separate journeys. They can be one carefully planned path: Use AI to understand and reduce your ECC technical debt → move to a cleaner S/4 core → unlock AI on top of something you can actually trust.
That’s where things start to move from “stuck in legacy” to “ready for what’s next.” I’m building an AI platform to help SAP customers document custom code, make sense of technical debt, and move toward S/4HANA and AI with confidence—if this is a challenge you’re facing, feel free to get in touch.