ABAP with a local LLM: S/4HANA custom code, Z-program explanations and ABAP Unit tests
Eurokommerz, Vienna, since 2006: Private AI/ML · IT Managed Services · Enterprise Training · AI Hardware & Software
- In a published ABAP benchmark (TH Köln and CONSILIO, January 2026), gpt-oss-120b passed 46.2 per cent of 180 tasks after five rounds of compiler and unit-test feedback, against 1.4 per cent at the first attempt; GPT-5 reached 77.1 per cent
- SAP's Joule for developers explains ABAP and CDS code, generates ABAP Unit tests and explains ATC findings in S/4HANA Cloud Private Edition 2025; it uses an underlying SAP cloud service, and SAP confirms the commercial terms for your contract
- SAP's own tools do the deterministic work: SCMON and SUSG usage data, the Custom Code Migration app and the ABAP Test Cockpit with S/4HANA readiness and ABAP Cloud readiness checks
- By our users-per-card rule, one 96 GB NVIDIA RTX PRO 6000 Blackwell Workstation Edition or Max-Q holds gpt-oss-120b with 9 sessions of 64K tokens, and a server with four RTX PRO 6000 Server Edition cards holds 92 in memory, 48 at 50 tokens per second
- You can order the server alone, the setup of the model server and the check pipeline for abapGit exports alone, or both together: the server delivered with everything installed and configured
Supplied by Eurokommerz: AI servers, built to order Request a configuration →
What a local LLM does for an SAP development team
A local LLM for ABAP is an open model on a GPU workstation or server in your own data centre that explains old Z-programs and the ABAP Test Cockpit (ATC) findings of an S/4HANA custom code migration, drafts the adaptations and writes ABAP Unit tests, while your custom code stays in the company. In the ABAP benchmark by TH Köln and CONSILIO (January 2026), the best open model, gpt-oss-120b, solved 46 per cent of the tasks after five rounds of syntax-check and unit-test feedback and almost none at the first attempt. One 96 GB NVIDIA RTX PRO 6000 Blackwell Workstation Edition or Max-Q runs that model for a small SAP team, and a server with four RTX PRO 6000 Server Edition cards serves a conversion project by day and documents programs at night.
This guide is for SAP development leads, basis teams and IT managers who plan the move of custom code to S/4HANA or want to bring it closer to a clean core, and whose ABAP holds pricing logic, customer rules and interfaces that should not go to a cloud service. It covers SAP's own AI, the published evidence for open models, the SAP tools that do the deterministic part, the loop between model and system, and the hardware. Our guides to COBOL modernisation and to Java upgrades with a local LLM apply the same pattern to other legacy code.
SAP's Joule for developers and where it runs
SAP offers its own AI for ABAP developers. A post on SAP's community site announced Joule for developers, ABAP AI capabilities, for S/4HANA Cloud Private Edition, version 2025. It lists inline code completion, explanations of ABAP and CDS code, "automated unit test generation for ABAP and ABAP core data services (CDS)" and the generation of RAP business objects. For custom code migration it names a documentation chat on S/4HANA simplifications, "ABAP Program Explain" for legacy programs and step-by-step explanations of ATC findings. SAP's product page for the private edition says that Joule "is fully integrated in the ABAP Development Tools for Eclipse" and that "AI Units are currently required to use this AI offering in the underlying Cloud Service". The community post on the private cloud release states other commercial terms for those customers, so SAP confirms which terms apply to your contract. The post describes the ABAP AI SDK as the entry point to the generative AI hub in SAP AI Core.
| QUESTION | JOULE FOR DEVELOPERS | LOCAL OPEN MODEL |
|---|---|---|
| Where the model runs | an SAP cloud service | your GPU in your network |
| Systems named | S/4HANA Cloud Private Edition 2025, Public Edition | any system abapGit can export |
| ABAP Unit tests | generated for ABAP and CDS | drafted, then checked by ABAP Unit |
| Integration | ABAP Development Tools for Eclipse | abapGit, ADT and your pipeline |
SAP product page "SAP S/4HANA Cloud Private Edition, Joule for developers, ABAP AI features" and SAP community post on Joule for developers in the private cloud, both read on 30 October 2026; SAP's product page for Joule for developers lists S/4HANA Cloud Public Edition among compatible products.
The pages we read do not say whether S/4HANA systems that run on-premise are covered, nor where the code a developer selects is processed. If your rule is that ABAP source stays in-house, put that question to SAP in writing. The two routes can also run side by side: Joule in the private edition for the developers who may use it, and a local model for code that has to stay in your network or for systems Joule does not cover.
How well open models write ABAP
ABAP is a small language next to Java or Python, and the evidence is thin. One of the few systematic public tests is a paper by TH Köln and CONSILIO GmbH, published on arXiv on 21 January 2026. The authors adapted the 164 HumanEval tasks to ABAP and added 16 tasks on SAP database tables, 180 in all. Each answer was created as a class in the ABAP Cloud Developer Trial 2023 in Docker, syntax-checked through the ADT interface and run against an ABAP Unit test class. A model got up to five rounds of feedback from the compiler or the unit tests, every task ran ten times, and the runs took place in August and September 2025, so models released since then are not in the table.
| MODEL | FIRST ATTEMPT | AFTER 5 ROUNDS | WEIGHTS |
|---|---|---|---|
| GPT-5 | 19.28 % | 77.11 % | closed |
| Claude Sonnet 4 | 24.11 % | 74.67 % | closed |
| gpt-oss-120b | 1.44 % | 46.17 % | open, Apache 2.0 |
| gpt-oss-20b | 3.11 % | 29.33 % | open, Apache 2.0 |
| Qwen3-Coder, size not given | 11.72 % | 20.94 % | open |
| Llama 3.3 70B Instruct | 0.00 % | 20.83 % | open |
| Qwen2.5-Coder-32B-Instruct | 6.00 % | 13.00 % | open |
| Codestral-22B | 0.00 % | 0.00 % | open |
"Benchmarking Large Language Models for ABAP Code Generation", arXiv 2601.15188v1 of 21 January 2026, Table 1, read on 30 October 2026. Share of runs passing the SAP syntax check and the authors' ABAP Unit tests; runs in August and September 2025. Measurements by the authors.
Feedback is the lever. The authors call iterative compiler feedback "a decisive lever for quality improvement", and gpt-oss-120b climbed from 1.44 to 46.17 per cent with it; it still gained 4.4 points in the fifth round, by our arithmetic from Table 1, so more rounds are worth a test in your own loop. Most failures are syntax errors: in the authors' breakdown of response errors, about 95 per cent of the errors of both gpt-oss models came from the syntax check, which a loop with the SAP syntax check catches before a person reads the code. Even with feedback, the best open model stays 30.9 points behind GPT-5 and 28.5 behind Claude Sonnet 4, and the authors conclude that LLMs "are currently not reliable enough for fully autonomous code generation in the ABAP environment".
The tasks are small functions. A Z-report of several thousand lines with includes, user exits and function modules is a different job that the benchmark does not cover, and the paper did not test explanation or documentation of existing code at all. A pilot on your own programs, with the SAP syntax check and ABAP Unit as judges, is the only measurement that counts for your code.
SAP's tools decide which custom code must change
A language model does not decide which custom code must change for S/4HANA. SAP's own tools do that, and the model works through their results. SAP's community guide to the custom code migration process, last updated in April 2026, sets out four steps: scope, analyse, migrate and adapt. It recommends collecting usage data in production with SCMON and SUSG at least one year before the conversion project, because "a large part of custom code is never executed in the production", and removing unused code before anyone adapts it. The Custom Code Migration app, an SAP Fiori app, "performs SAP S/4HANA readiness checks over your custom code in the SAP ECC system", and quick fixes in the ABAP Development Tools for Eclipse require a local ATC run with those readiness checks.
For code that should follow ABAP Cloud and a clean core, the ATC check variant ABAP_
| STEP | DETERMINISTIC TOOL | WHAT THE MODEL ADDS |
|---|---|---|
| Scoping | SCMON, SUSG usage data | nothing; remove dead code first |
| Analysis | Custom Code Migration app, ATC | explains each finding in context |
| Adaptation | ATC quick fixes in ADT | drafts changes quick fixes do not cover |
| Clean core | ABAP_ | proposes released successor APIs |
| Regression | ABAP Unit | drafts tests that record behaviour |
SAP community guide to the ABAP custom code migration process (last update April 2026) and SAP's guide to checking custom code for ABAP Cloud, read on 30 October 2026. The right-hand column is our recommendation.
You can order the server alone, the setup of the model server and the check pipeline for abapGit exports alone, or both together: the server delivered with everything installed and configured; write to us and we suggest the best solution for your tasks and budget.
Getting ABAP code to the model and back
The model needs the code as text, and the answer has to go back through the SAP system's own checks.
- Export with abapGit. abapGit, an MIT-licensed "Git client for ABAP" that runs from ABAP version 702 SP 8, writes objects into a Git repository on a server in your network. SAP's migration guide recommends it for moving code to the SAP BTP ABAP environment.
- Lint outside SAP. abaplint (MIT) is "Standalone static analysis for ABAP" for code serialised with abapGit. It checks each draft in the pipeline before it reaches a development system.
- Assemble the context. A Z-program's meaning depends on its includes, the DDIC objects it reads and the function modules it calls. A script collects them with the ATC finding, so the model sees the program as a developer would.
- Loop against a development system. Each draft goes into a sandbox or development client, is activated and syntax-checked through ADT and runs against its ABAP Unit test, as in the benchmark. Errors go back to the model for a fixed number of rounds.
- Transport as usual. A developer reviews the change in ADT, and it travels through your normal transport and change process.
The SAP side stays with your SAP team: abapGit in the system, the technical user in the development client and the transports, under your SAP licence agreement. We set up the model server and the checks that run outside SAP.
Explaining an old Z-program is the place to start: an explanation changes no code, and a developer who knows the business process can judge it quickly. Characterisation tests come next, ABAP Unit tests that record what a program does today, so that a later adaptation can be checked against them. Our guide to AI test generation on-premise covers the same step for other languages.
Which GPU server an SAP team needs
The benchmark makes the first model choice simple: gpt-oss-120b was the strongest open model and gpt-oss-20b the second, both under Apache 2.0. We size by our users-per-card rule, as our guide on how many users one RTX PRO 6000 serves derives: 90 per cent of the memory the driver reports, less 3 GiB per card, less the weights. A session of 64K tokens holds a program with its includes, the finding and the compiler output.
| TIER | HARDWARE | MODEL | 64K SESSIONS | SUITS |
|---|---|---|---|---|
| Entry | 1 × RTX PRO 4500, 32 GB | gpt-oss-20b | 8 | a pilot on explanations |
| Mid | 1 × RTX PRO 6000 Workstation Edition or Max-Q | gpt-oss-120b | 9 | an SAP team of up to nine |
| Mid | 2 × RTX PRO 6000 Workstation Edition or Max-Q | gpt-oss-120b, pair | 46 (27 at 50 tok/s) | a conversion team of about 25 |
| Large | server, 4 × RTX PRO 6000 Server Edition | gpt-oss-120b, two pairs | 92 (48 at 50 tok/s) | a migration wave and night runs |
Our estimates by the users-per-card rule with 16-bit cache, not measurements. gpt-oss-120b about 65 GB (60.8 GiB), gpt-oss-20b 13.76 GB (sums of the files on Hugging Face); cache 2.25 GiB (120b) and 1.5 GiB (20b) per 64K session. Planned figures cap each session at 50 tokens per second from 1,792 GB/s (Workstation Edition, Max-Q) and 1,597 GB/s (Server Edition, NVIDIA) and about 5 GB of active weights per token, an upper bound by our estimate; rows as in our COBOL guide.
Entry, one RTX PRO 4500. The 32 GB RTX PRO 4500 Blackwell (200 W) holds gpt-oss-20b with 8 sessions of 64K. It suits a pilot that explains programs and drafts tests. A workstation with this card draws about 0.6 kW at the wall by our estimate: the card, a 350 W-class processor and 15 per cent for memory, drives, fans and power-supply losses.
Mid, one or two RTX PRO 6000. gpt-oss-120b (117B parameters, 5.1B active) needs a 96 GB card: on a 72 GB RTX PRO 5000 about 0.7 GiB would remain by our rule, not enough for one 64K session. One Workstation Edition (600 W) or Max-Q (300 W) serves up to nine people at once; a workstation with one Workstation Edition draws about 1.1 kW by the same estimate. Two cards as a tensor-parallel pair hold 46 sessions. Two Workstation Edition cards are the realistic maximum for that edition, and three or four Max-Q belong only in a chassis built for them with strong directed airflow.
Large, a server. The inference node on our AI servers page has four RTX PRO 6000 Server Edition cards, 768 GB of DDR5 ECC memory and draws about 3.4 kW by our estimate. It serves the developers by day and can document Z-programs in overnight batch runs, as our guide to batch LLM inference on-premise describes; how many per night depends on their size, the model and the number of parallel requests. For a larger coding model on eight cards, our guide to a server for coding agents has the sizing; no ABAP result for those models is published.
We build these workstations and AI servers to order; send us the number of custom objects, your SAP release and the size of your team, and our team replies with a configuration.
Keeping code, logs and transports under control
Running the model on your own hardware answers the first question of an SAP security review: the source code, with the pricing rules and interfaces in it, reaches no outside company. Logs come next. Prompts and answers contain ABAP source, so decide before the first run whether the gateway keeps them and for how long; our guide to an LLM gateway with keys and a query log covers the options. For access, we recommend that the model reads exports and writes drafts to a development system only, with no RFC user and no access to a production client. Generated code passes the same ATC checks, code review and transport approval as code a developer wrote, with the ABAP Unit tests kept beside it as evidence. Our comparison of self-hosted Copilot alternatives covers the IDE side for teams that also write Java or JavaScript next to ABAP, and our guide to an AI coding assistant policy sets out which code may go to which tool.
FAQ
Can AI write ABAP code?
Can AI explain old ABAP programs?
Which LLM is best for ABAP?
Can I use AI for the S/4HANA custom code migration on-premise?
Does Joule for developers run on-premise?
Which GPU do I need for ABAP with a local LLM?
Where can I buy a server for ABAP with a local LLM, and what does it cost?
We supply GPU servers for ABAP work alone, set up the model and the abapGit check pipeline alone, or deliver both together. Describe your task in a few sentences and our team will help. We reply within one business day. The first call is free.
Talk to an expertWe reply within one business day