Custom Code Management on ECC
If you're staying on ECC, your custom code isn't going anywhere. Here's how to maintain, optimize, and modernize it without a full S/4HANA conversion.
The ECC Custom Code Reality
Organizations staying on ECC often have extensive custom code portfolios built over 15-20 years. Without the forcing function of S/4HANA conversion, this code tends to accumulate indefinitely.
The challenge: how do you prevent technical debt from becoming technical bankruptcy while staying on ECC?
Start with Assessment
Inventory Your Custom Objects
Use SE16 or custom reports to catalog:
- •All Z/Y programs, function modules, classes, includes
- •User exits, BAdIs, enhancements (CMOD, SE19, SE18)
- •Custom tables, structures, data elements
- •Custom transactions, function groups
- •Smartforms, SAPscripts, Adobe forms
Criticality Analysis
Tag each object:
- Mission Critical: Business can't operate without it
- Important: Supports key workflows, workarounds exist
- Nice to Have: Convenience features, low usage
- Obsolete: No longer used, safe to retire
Usage Analysis
Track actual usage:
- • ST03N transaction usage statistics
- • ABAP runtime analysis (SAT)
- • Database table access logs
- • Job scheduler execution history
Management Strategies
1. Freeze New Custom Development
Implement a "custom code freeze" policy for non-critical enhancements. Force teams to explore alternatives before writing new Z code.
Alternative Options:
- • Cloud extensions via BTP (keep ECC clean)
- • RPA bots for workarounds
- • Low-code apps (Neptune, Mendix)
- • Configuration vs customization
2. Retire Obsolete Code
Target 20-30% reduction in custom code portfolio through aggressive retirement.
Quick Wins:
- • Programs not executed in 2+ years
- • Duplicate reports with overlapping functionality
- • Test/development objects in production
- • Unmaintained or poorly documented code
Pro tip: Don't delete immediately. Move to "quarantine" transport for 6-12 months. If no one complains, delete permanently.
3. Refactor for Maintainability
For critical code that's staying, improve maintainability to reduce long-term cost.
- Add documentation: Header comments, inline explanations, business logic rationale
- Modularize: Break monolithic programs into reusable function modules
- Fix code smells: Remove dead code, simplify nested loops, improve naming
- Add error handling: Proper exception handling, logging, recovery
4. Optimize Performance
Slow custom code costs money and frustrates users. Target performance improvements.
Common Issues:
- • SELECT * from large tables
- • Nested SELECT in loops
- • No database indexes
- • Memory-intensive internal tables
- • Unoptimized SQL joins
Tools:
- • ST05 SQL trace
- • SAT runtime analysis
- • Code Inspector (SCI)
- • ST12 ABAP trace
5. Standardize Development Practices
Prevent future technical debt through governance.
- • Enforce naming conventions (Z_MODULE_OBJECT pattern)
- • Require peer code reviews before transport
- • Use Code Inspector checks in transport workflow
- • Mandate documentation templates
- • Establish reusable function library
Automation Opportunities
Many custom code maintenance tasks can be partially automated:
Usage Tracking Dashboard
Build custom report pulling ST03N, batch logs, and table access to auto-flag unused objects
Automated Code Quality Checks
Run Code Inspector nightly, email developers with violations
Documentation Generator
Extract inline comments into wiki/Confluence pages
Dependency Mapping
Where-used analysis showing impact of code changes
Establish Governance
Quarterly Review Process
- Q
Quarterly Assessment
Review usage stats, identify retirement candidates, track tech debt metrics
- A
Annual Deep Dive
Full portfolio review, refactoring priorities, budget allocation
- C
Continuous Monitoring
Dashboard with KPIs: object count, code quality score, retirement rate
Cost Reality Check
Without active management, custom code maintenance costs grow 5-10% annually as complexity compounds and knowledge walks out the door.
With disciplined governance, you can stabilize or even reduce costs while improving quality.
Typical Investment
1-2 FTE for code quality program, 20-30% of development capacity for refactoring
Expected Return
15-25% reduction in maintenance costs, 30-40% faster enhancement delivery
Last Updated
January 17, 2025
Recent Changes
- •Added automation opportunities section
- •Expanded refactoring strategies
- •Added quarterly governance model
Sources
- •SAP Code Inspector documentation
- •ABAP Development Tools best practices
- •Industry benchmarking data on custom code portfolios