Establish cutover regression testing workflows, manage transports, monitor ST22 short dumps, and leverage developer-reviewed AI code remediation.
Harbor Supply Co. is entering the final phases of its SAP S/4HANA system conversion. You have identified unused objects, analyzed Simplification Database findings, and remediated core data model changes across reports such as ZSD_ORDER_STATUS, ZMM_STOCK_MOVES, and ZSD_PRICE_EXPORT. Now you must validate every change through systematic regression testing, manage transport logistics during cutover, use artificial intelligence (AI) tools safely to accelerate remaining fixes, and monitor runtime behavior after go-live.
Previous lesson: Clean Core and ABAP Cloud for Migrated Systems
Remediating hundreds of custom programs manually takes significant developer hours. Modern AI coding tools and SAP Joule for Developers provide an automated way to accelerate this workload while keeping control in developer hands.
The SAP S/4HANA custom code migration agent in SAP Joule for Developers works directly with the ABAP Test Cockpit (ATC). The agent scans assigned software packages, executes the S4HANA_READINESS check variant, and analyzes each finding. It then separates issues into deterministic changes and pattern-based proposals:
VBUK with VBAK, are executed automatically.General AI coding assistants such as Workik can also help: they read your custom ABAP and draft adapted code that a developer then reviews and tests.
Pro Tip: Never treat AI-generated code as production-ready without human review. AI models can occasionally produce hallucinated method parameters or syntax from older releases. Always run an ATC recheck and execute an ABAP Unit test after accepting an AI proposal.
Here is how an AI remediation assistant annotates an adapted pricing routine when human verification is required:
abapCopy
Converting an active production system requires careful transport coordination. Business operations continue in SAP ERP Central Component (SAP ECC) while developers fix code in the SAP S/4HANA migration sandbox and development environments. This overlap introduces the risk of overwriting remediated code or dropping emergency production fixes.
To manage this risk, implement a structured code freeze:
Common Mistake: Combining functional code remediations and unused code deletions in the same transport request. If a deleted program is suddenly needed during user acceptance testing, you cannot easily roll back the deletion without undoing valid functional fixes.
Static checks through ATC prove that your ABAP code conforms to syntax rules and data dictionary changes. They do not prove that business logic produces correct calculations. A focused regression testing strategy confirms business continuity.
Focus your testing effort on three primary risk profiles:
Custom export programs, such as Harbor Supply Co.'s ZSD_PRICE_EXPORT, communicate with third-party software. Verify that the output files, Application Link Enabling (ALE) Intermediate Documents (IDocs), and web service payloads retain exact field formats. If an external system expects an 18-character material number, sending a raw 40-character value from the new MATNR domain will break downstream systems.
Programs that execute goods movements or financial postings require step-by-step validation. Run ZMM_STOCK_MOVES against historical material documents and verify that compatibility views return accurate historical stock entries. Execute new postings and verify that table MATDOC registers the records without locking conflicts.
Write or update ABAP Unit test classes for isolated logic blocks before migration. Running unit tests before and after code changes provides instant proof that logic behavior remains consistent.
abapCopy
During the cutover weekend, the Software Update Manager (SUM) executes the technical conversion of the database and data dictionary. Once SUM completes, technical cutover for custom code begins.
Follow this sequence during the cutover window:
ATC directly in the converted system using check variant S4HANA_READINESS. Verify that no priority 1 syntax errors or missing object references remain.SGEN (SAP Load Generator) for custom packages (Z* and Y*) to generate ABAP program loads ahead of user logon. This step prevents initial response time spikes for end users.ZMM_STOCK_MOVES and confirm that reads through the MKPF and MSEG compatibility views return the expected data.Quick Challenge: Open transaction SE38 in your target test system and inspect a remediated program like ZSD_ORDER_STATUS. Run a local check using Ctrl + F2 to ensure no local inactive dependent includes were missed during transport release.
Even thorough testing misses edge-case data combinations. In the initial weeks following cutover, active system monitoring must catch and resolve runtime failures before they disrupt operations.
Transaction ST22 (ABAP Dump Analysis) is your primary post go-live monitoring tool. Focus on these specific error categories:
These errors indicate that an object was omitted from a cutover transport, or an inactive version was deployed. Filter ST22 by user and program name to isolate the missing dependency immediately.
This dump means code used an object reference that was never assigned. After migration, check calls to changed or replaced BAdIs and classes first.
ITAB_DUPLICATE_KEY occurs when code inserts a row into an internal table with a unique key and that key already exists. This can happen when new tables like ACDOCA or MATDOC return more detailed rows than the old tables did. ITAB_LINE_NOT_FOUND occurs when a table expression such as lt_orders[ ... ] finds no matching row.
abapCopy
Set up an automated daily alert for short dumps matching the pattern Z* to address issues proactively each morning during hypercare.
Execute a mock post-conversion check on one of your remediated programs:
ZSD_ORDER_STATUS or ZMM_STOCK_MOVES.S4HANA_READINESS.ST22 in your test environment. Filter the dump list for the last 7 days using your user name or test batch users to verify that your execution did not trigger silent runtime exceptions.You have completed the full journey of custom code migration from SAP ECC to SAP S/4HANA. By scoping unused code with SCMON and SUSG, prioritizing findings with ATC, resolving data model transformations across MATNR, KONV, VBUK, and MATDOC, applying clean core principles, and executing disciplined testing, you are prepared to deliver an upgrade-stable, high-performance S/4HANA system.
Was this lesson helpful?