Bring your SAP development workflows into the agentic era using abapctl
abapctl gives you a standard, scriptable interface to SAP that works for both pipelines and AI agents. The deterministic commands handle the mechanical work. Agents build on top for tasks that need reasoning. Together they bring SAP development workflows into the same automation patterns the rest of the industry already uses.
Series: AI Assisted SAP ABAP workflows using Kiro Agents (1 article)
- 1Bring your SAP development workflows into the agentic era using abapctl This article
A typical SAP customer has thousands of custom ABAP objects. Some were written a decade ago by developers who have long since moved on. Many lack documentation. Most have never been through a unit test. And now every one of them stands between them and S/4HANA conversion. The work to fix this is well understood: scan the codebase, classify what needs adapting, apply the fix, validate against the system, move to the next object. SAP's Custom Code Migration app and ABAP Test Cockpit give you the checks. What's missing is a way to close the loop programmatically, where an agent or a script can read the findings, apply a fix, run the check again, and iterate until the object passes.
While Agentic AI makes it easier to do these at scale, it still needs the tools to connect to an SAP system and understand SAP related workflow such as object activation and transports. There are few ways of connecting agents to tools:
In this article, we discuss one such CLI tool called abapctl , a command-line tool that connects your terminal, your scripts, and your AI agents directly to SAP's development interfaces over HTTPS. From source code management to quality checks, transports, OData queries, and Clean Core assessment, it covers the SAP development primitives that power agentic workflows.
The problem space
abapctl closes following gaps by providing deterministic actions for pipelines and an agent-compatible surface for AI workflows that build on them.
- Pipeline automation. Running ATC checks or releasing a transport as part of an automated build required custom scripting. No standard tooling, no error handling, no safety layer. Every team writes their own.
- Agentic workflows at scale. Teams want to plan and execute multi-step SAP tasks (assess a development package, fix violations, run unit tests, release a transport) without manual intervention at each step, but with the ability to review and approve before any write hits the system.
Architecture
Think of abapctl as the primitive (Figure 1 below). It handles deterministic interactions with SAP. Agents like Claude Code, Kiro IDE/CLI, Codex, etc. build on top of it, adding reasoning and orchestration to deliver SAP use cases at scale. You can use abapctl directly in scripts and pipelines or let an agent drive it.

Figure 1: abapctl as the primitive layer between AI agents and SAP systems
Every command runs as a direct call to your SAP system, with each call captured both in your SAP audit trail and in a local log under .abapctl/logs/
Agentic use cases for SAP
Using abapctl is as simple as downloading the binary, configuring your SAP system, and typing commands (or typing natural language when using Kiro CLI)
From there, the full SAP development surface is available. Here are a few workflow examples and we'll discuss details of each in subsequent articles.
Use Case 1: Test-driven development (TDD)
TDD in ABAP has always been possible with ABAP Unit, and with abapctl, the red-green-refactor cycle becomes something an agent can drive. You describe what you want to build. The agent writes the test first, pushes it, runs it, confirms it fails. Then it writes the implementation, runs the test again, confirms it passes. Refactors. Re-runs.
Example: Implement a method in ZCL_PAYMENT_VALIDATOR that rejects payments where amount is zero. Follow test driven development methodology.
Use Case 2: S/4HANA readiness and ATC Quick Fixes
SAP's ABAP Test Cockpit flags deprecated and simplified API usage. For many of these findings, deterministic quick fixes exist. A Kiro agent with access to abapctl can read the ATC results, apply the available quick fixes, and activate the object, making what used to be a manual Eclipse workflow as easy as pushing a button.
Use Case 3: Clean Core assessment and remediation
SAP Clean Core A-D maturity model classifies custom code into four levels: A (fully clean), B (pragmatic), C (plan migration), and D (blocked). Level D objects are your upgrade blockers. The challenge is not the classification itself, it is doing it at scale and then acting on the results.
abapctl handles the assessment deterministically by running ATC checks against every object in the package, classifies each into A through D, and produces a structured report with level distribution, top findings, and most-referenced legacy APIs. For remediation, Kiro agents build on top of abapctl to drive the fix loop. The agent reads the assessment results, downloads source and baselines, researches released API replacements from SAP's catalog, generates code changes, pushes them to SAP, and gates every fix with syntax + ATC validation. If a fix regresses the object, it rolls back automatically.
CI/CD pipeline automation
ABAP development has never had a standard way to run quality gates in a pipeline. abapctl gives you stable commands with structured JSON output and exit codes that any CI/CD tool can consume. Run syntax, ATC, and unit tests on every commit. If anything fails, the pipeline stops. Only clean code gets released.
Security and Agentic Optimization
Since abapctl enables agentic workflow, here are few security and AI optimization that is built in:
- Credentials never touch disk. The recommended setup stores your SAP password in AWS Secrets Manager. The config file holds a reference, not the credential itself. At runtime, abapctl resolves it through the AWS CLI using your existing profile and SSO settings
- Every command is safety-annotated. All commands are tagged as READ, DESTR (destructive), or IDEMP (idempotent). An agent's planner can use these tags to decide what is safe to run without approval and what needs a human in the loop
- Structured output on every command. Every command supports --json output with consistent error codes. Agents parse the response and decide what to do next without string matching or screen scraping
- Destructive operations require explicit consent. Any command that writes to SAP prompts interactively unless you pass --yes. The pattern: run with --dry-run first, review the preview, then commit
- Full audit trail. Every call is logged in your SAP system's change log and locally under .abapctl/logs/. You always know what happened, when, and who authorized it
Run abapctl tools list --json to get the full command catalog with schemas, descriptions, and safety flags. Drop that into your agent's tool registry and it can plan workflows, route commands by read/write classification, and surface destructive operations for review before execution.
Conclusion
abapctl gives you a standard, scriptable interface to SAP that works for both pipelines and AI agents. The deterministic commands handle the mechanical work. Agents build on top for tasks that need reasoning. Together they bring SAP development workflows into the same automation patterns the rest of the industry already uses.
Other helpful resources:
Series: AI Assisted SAP ABAP workflows using Kiro Agents (1 article)
- 1Bring your SAP development workflows into the agentic era using abapctl This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article