Scope custom code remediation through six key steps: build a complete inventory, identify and retire unused code, analyze the remaining code for S/4HANA compatibility issues, prioritize findings, estimate remediation effort, and create a structured remediation plan. Starting this assessment early helps organizations build a fact-based migration strategy rather than one based on assumptions.
Why Custom Code Matters for Your S/4HANA Migration
SAP S/4HANA introduces significant changes to the underlying data model and application architecture. Customer and vendor records move to the Business Partner model, material numbers can support longer formats, financial data is consolidated through the Universal Journal, and legacy tables such as MKPF and MSEG are replaced by newer structures such as MATDOC.
Custom programs that directly access or update these objects may fail, produce incorrect results, or require redesign.
Custom code remediation helps organizations understand which components can remain, which require modification, and which should be retired or replaced.
Step 1: Identify What You Have
Begin with a comprehensive inventory of custom objects. Use the repository directory, including table TADIR, to identify Z and Y objects and categorize them by:
- Object type: Reports, function modules, classes, enhancements, BAdIs, user exits, forms, and custom tables
- Package or functional area: Finance, sales, procurement, production, and other business areas
- Owner: Business team or consultant responsible for the object
- Interfaces: IDocs, RFCs, files, and other integrations connecting SAP with external systems
Also include modifications to SAP standard objects and third-party add-ons. These can introduce additional remediation requirements and are often overlooked during initial assessments.
A complete inventory provides a clear understanding of the overall custom code landscape.
Step 2: Remove What Nobody Uses
One of the most effective ways to reduce remediation effort is to identify code that is no longer being used.
Collect production usage data using the ABAP Call Monitor (SCMON) and Usage Procedure Logging (UPL). The analysis should cover sufficient business activity to capture seasonal processes, financial activities, audit routines, and other less-frequent transactions.
Classify each object into three categories:
- Used: Retain and assess for remediation
- Unused: Retire or archive
- Uncertain: Validate with the relevant business owner
Retiring unused code reduces the number of objects that need to be tested, remediated, maintained, and supported.
Step 3: Scan for S/4HANA Compatibility Issues
Once the relevant code has been identified, analyze it for S/4HANA compatibility.
SAP provides the ABAP Test Cockpit (ATC) along with S/4HANA readiness checks. These checks can be used against SAP’s Simplification Item Catalog to identify technical and functional changes that may affect custom code.
Common findings include:
- Removed or changed objects: Tables, function modules, transactions, or other objects that are no longer available
- Data model changes: Custom code dependent on legacy customer, vendor, material, or financial structures
- Functional changes: Standard SAP functionality that behaves differently in S/4HANA
- Performance risks: Code designed for older database technologies that may not perform efficiently on SAP HANA
Production SQL monitoring can provide additional insight into database-intensive operations and help identify performance hotspots that require attention.
Step 4: Prioritize with a Simple Matrix
A large findings list can quickly become difficult to manage. Prioritize remediation based on two factors: business value and remediation effort.
| Low Effort | High Effort | |
| High Business Value | Fix first | Plan carefully and start early |
| Low Business Value | Fix in bulk or automate | Retire or replace |
This approach also encourages organizations to reconsider whether certain custom developments are still necessary.
For example, if a custom report duplicates functionality now available in standard SAP, consider replacing it. If an enhancement can be redesigned using in-app extensibility or a side-by-side approach on SAP Business Technology Platform, evaluate those options.
These decisions support a clean core strategy, helping organizations simplify future upgrades and reduce technical debt.
Prioritize business-critical processes such as order-to-cash, procure-to-pay, and financial close because disruptions in these areas can directly affect business operations.
Step 5: Estimate with Effort Buckets
Simply counting custom objects does not provide an accurate estimate. Different objects can require significantly different levels of effort.
Group remediation findings into practical effort categories:
- Quick Fix: Automated or near-automated corrections
- Simple Manual Fix: Field changes or minor query adjustments
- Moderate: Logic redesign involving Business Partner, new tables, or changed data flows
- Complex: Complete rewrites, replacements, or new extension designs
A pilot exercise can help validate these estimates. Select representative objects from each category, remediate them, and record the actual effort required. These results can then be used to establish realistic effort rates for the broader remediation program.
For example, an assessment may identify hundreds of custom objects, with a portion being retired after usage analysis. The remaining objects can then be distributed across the different effort categories to develop an overall remediation estimate.
The figures should be based on actual pilot results rather than generic assumptions.
Testing should also be estimated separately because validation can require substantial effort. A contingency buffer should be considered for findings that become more complex once developers begin detailed analysis.
Step 6: Build the Remediation Plan
An estimate becomes an actionable plan when it includes sequencing, ownership, and clear responsibilities.
Key considerations include:
- Determine when each correction should be completed: Some changes can be implemented before the migration, while others may depend on the S/4HANA environment.
- Work by business process: Group related objects by processes such as order-to-cash or procure-to-pay so functional teams can validate complete business flows.
- Develop test cases early: Associate each remediated object with a defined test scenario and responsible business tester.
- Control new custom development: Establish governance to prevent unnecessary new development from increasing the remediation scope.
- Track progress: Monitor objects retired, remediated, tested, and approved to maintain visibility across the program.
The remediation approach should also align with the selected S/4HANA migration strategy, whether brownfield, greenfield, or selective migration.
Common Mistakes to Avoid
Organizations should avoid the following common mistakes:
- Running technical scans before analyzing usage data, which can unnecessarily increase the scope
- Estimating effort based only on object counts
- Treating all custom code as equally important
- Overlooking interfaces and third-party add-ons
- Delaying testing until the final stages of the migration
- Skipping a pilot and relying on generic effort assumptions
Effective scoping helps prevent these issues and provides a more reliable foundation for the migration program.
How EDCS Can Help
Expora Database Consulting Services Pvt. Ltd. is a Bengaluru-based IT consulting company and SAP Registered Partner offering end-to-end SAP services across implementation, rollout, support, upgrades, and migration projects.
For custom code remediation, EDCS can support organizations with:
- Custom Code Inventory: Cataloging custom objects, modifications, and interfaces
- Usage Analysis: Identifying active, inactive, and potentially obsolete code
- Readiness Assessment: Configuring ATC checks and interpreting technical findings in business terms
- Prioritization and Estimation: Categorizing objects based on business value and remediation effort
- Remediation and Testing: Supporting code corrections, clean-core decisions, and business validation
- Migration Planning: Aligning custom code remediation with the broader S/4HANA transformation roadmap
EDCS supports organizations across industries such as manufacturing, FMCG, pharma, chemicals, and retail, with a practical and customer-focused approach to SAP transformation.
Key Takeaways
- Scope custom code before finalizing your S/4HANA migration plan and budget.
- Retire unused code to reduce the overall remediation workload.
- Analyze the remaining code for S/4HANA compatibility issues.
- Prioritize remediation based on business value and technical effort.
- Use pilot-based effort estimates instead of relying only on object counts.
- Plan testing as a separate workstream.
- Establish clear ownership, sequencing, governance, and progress tracking.
- Align custom code remediation with your overall S/4HANA migration strategy.
Ready to Scope Your Custom Code?
A successful S/4HANA transformation starts with a clear understanding of your existing custom code landscape. By identifying what should be retained, remediated, replaced, or retired, organizations can reduce complexity and build a more predictable migration roadmap.
EDCS can help transform a large and uncertain custom code landscape into a structured, actionable remediation plan.
Visit www.edcs.co.in and connect with the EDCS team to explore a custom code assessment.
