Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 4 of 6

SAP's custom code migration agent

9 min

Listen to this lesson

0:00 / 11:23

In Q2 2026, SAP released its first agent for custom code migration. The SAP Help Portal calls it the SAP S/4HANA Custom Code Migration Agent: an agent developed by SAP to streamline migration from SAP ECC to SAP S/4HANA 2023 or higher, which runs ATC, analyzes the results, applies deterministic quick fixes and uses AI for code remediation, so that developers focus on review and activation. SAP News describes it as the first of the agents for its custom code migration strategy, with a second agent for clean core transformation announced as planned for Q3 2026. Treat the clean core agent as announced until you can see it in your own system's documentation.

Prerequisites

AreaRequirement as documented by SAP (October 2026)
ProductsAn SAP system that needs migration to S/4HANA; a target S/4HANA system on 2023 or higher; SAP Joule for Developers, ABAP AI capabilities
IDELatest build of ABAP development tools for Eclipse with MCP server capability
Coding assistantGitHub Copilot Pro or Amazon Q Developer Pro license, with the matching Eclipse plug-in installed and enabled
Agent instructionsCustom instructions (Copilot) or rules (Amazon Q) as described in SAP Notes 3751537 and 3751829
OptionalSAP Note 3757335 to run the workflow on object sets from the Object Set Playground, not only packages
ConfigurationADT MCP server enabled and running; assistant integration active
AuthorizationsDeveloper access, transport request creation and change, development and debugging, ATC execution
TransportsNo sub-objects or sub-packages of the package in existing requests; one dedicated request for everything in the package, given to the agent
LimitationsListed in SAP Note 3759994

Prerequisites of the SAP S/4HANA Custom Code Migration Agent, from the SAP Help Portal.

Two points surprise people. First, the agent runs in ADT for Eclipse, not in VS Code: ADT for VS Code had its first release in Q2 2026, starting with ABAP Cloud development, and added classic object types in version 1.1 (July 2026). Second, the agent doesn't bring its own chat; it runs through a third-party coding assistant that SAP names explicitly. Contoso's licensing and security review therefore covers two vendors, not one.

How it works

You start it with a single prompt in the assistant's chat, of the form SAP documents: Migrate package <name> to SAP S/4HANA compliant code with variant <ATC_Variant>, where the variant is S4HANA_READINESS_2021 or higher. The agent asks for confirmation, checks status and then works through the package using the tools of the ADT MCP server.

The agent orchestrates ADT MCP tools: ATC, deterministic quick fixes, then AI fixes; the developer reviews and activates.
The Sign-Off Table · thesignofftable.com/academy/sap-aid-301
DeveloperStarts the run, confirms, reviews every change and activates
Coding assistant (Copilot or Amazon Q in Eclipse)Runs the agent logic with SAP's custom instructions or rules
ADT MCP server (local, in Eclipse)Exposes ATC, quick fix, AI fix, transport and diff tools on localhost
Joule for Developers, ABAP AI capabilitiesLicensed AI fixes; AI fix tools require it and consume AI Units
S/4HANA development systemHolds the code, runs ATC, records changes in the dedicated request
The layers involved in one agent run, from person to system.
The Sign-Off Table · thesignofftable.com/academy/sap-aid-301

Confidence scores and comments

The agent's quality rules are the most important thing to understand. Each AI fix gets a confidence score. SAP says code is applied automatically only when the confidence is high and syntax validation passes. Low-confidence or syntax-error-prone fixes are inserted as comments for a developer to review and implement by hand. All changes are logged, and the run ends with a summary that includes confidence scores and explanations for fixes added as comments. In other words, the agent produces three outputs: applied quick fixes, applied AI fixes and AI suggestions in comments. Each needs a different review.

OutputWhat the reviewer does
Deterministic quick fixes appliedSpot-check by pattern; rely on the ATC recheck; normal regression scope
High-confidence AI fixes appliedRead every change in the unified diff; confirm behavior for used objects
Low-confidence suggestions as commentsDecide case by case; implement, rewrite or reject; remove the comments

Three kinds of agent output and the review each needs.

Costs and controls

SAP moved Joule for Developers, ABAP AI capabilities to usage-based billing in AI Units. In the ADT MCP server's tool list, ATC, deterministic quick fixes, transports and diffs don't consume tokens; abap_atc_apply_ai_fix and abap_atc_get_ai_fix_result do. The ADT MCP server can restrict access to named ABAP projects and packages: objects outside the allowed packages can't be created or changed through it, although reading stays possible everywhere. SAP's security considerations for the MCP server warn about prompt injection and say that additional MCP servers a user adds are the user's responsibility. The guardrails course sap-aid-302 builds on those warnings.

What the agent doesn't do

  • It doesn't decide scope: you choose the package, and scoping with usage data should already have removed unused code.
  • It doesn't test behavior: syntax validation and ATC aren't regression tests (lesson 5).
  • It doesn't release transports: the dedicated request stays open for review and activation by a person.
  • It doesn't replace SPDD, SPAU and SPAU_ENH: modification adjustment still happens in the conversion steps SAP documents.
  • It doesn't make level D code clean: it makes it S/4HANA-compatible, which is a different goal than clean core.

What would you do?

Kenji wants to run the agent on package ZCMC_SD_EXT in the sandbox. A colleague still has three objects of that package in an open request for an unrelated fix. What should happen first?

Key points
  • The SAP S/4HANA Custom Code Migration Agent targets S/4HANA 2023 or higher and runs ATC, quick fixes and AI fixes.
  • It needs ADT for Eclipse with MCP, Joule for Developers ABAP AI capabilities and a GitHub Copilot Pro or Amazon Q Developer Pro license.
  • Give it one dedicated transport request per package; see SAP Note 3759994 for limitations.
  • High-confidence fixes that pass syntax checks are applied; others become comments; developers review and activate.
  • The clean core agent is announced for Q3 2026; verify availability before planning on it.

Check your understanding · not graded

Lesson check

  1. 1. Which target release does SAP require for the custom code migration agent?

  2. 2. What does the agent do with a low-confidence AI fix?

  3. 3. Which ADT MCP tools consume AI Units in the agent's workflow?

  4. 4. What transport setup does the agent require?