BLOG · GUIDE ·

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 BRIEF
  • 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.

QUESTIONJOULE FOR DEVELOPERSLOCAL OPEN MODEL
Where the model runsan SAP cloud serviceyour GPU in your network
Systems namedS/4HANA Cloud Private Edition 2025, Public Editionany system abapGit can export
ABAP Unit testsgenerated for ABAP and CDSdrafted, then checked by ABAP Unit
IntegrationABAP Development Tools for EclipseabapGit, 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.

MODELFIRST ATTEMPTAFTER 5 ROUNDSWEIGHTS
GPT-519.28 %77.11 %closed
Claude Sonnet 424.11 %74.67 %closed
gpt-oss-120b1.44 %46.17 %open, Apache 2.0
gpt-oss-20b3.11 %29.33 %open, Apache 2.0
Qwen3-Coder, size not given11.72 %20.94 %open
Llama 3.3 70B Instruct0.00 %20.83 %open
Qwen2.5-Coder-32B-Instruct6.00 %13.00 %open
Codestral-22B0.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_CLOUD_READINESS flags uses of APIs that SAP has not released, such as direct reads of the tables MARA and KONV, and names the released successor from SAP's Cloudification Repository where one exists: for KONV, SAP's example names the CDS view I_SLSPRCGCONDITIONRECORD.

STEPDETERMINISTIC TOOLWHAT THE MODEL ADDS
ScopingSCMON, SUSG usage datanothing; remove dead code first
AnalysisCustom Code Migration app, ATCexplains each finding in context
AdaptationATC quick fixes in ADTdrafts changes quick fixes do not cover
Clean coreABAP_CLOUD_READINESS variantproposes released successor APIs
RegressionABAP Unitdrafts 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

TIERHARDWAREMODEL64K SESSIONSSUITS
Entry1 × RTX PRO 4500, 32 GBgpt-oss-20b8a pilot on explanations
Mid1 × RTX PRO 6000 Workstation Edition or Max-Qgpt-oss-120b9an SAP team of up to nine
Mid2 × RTX PRO 6000 Workstation Edition or Max-Qgpt-oss-120b, pair46 (27 at 50 tok/s)a conversion team of about 25
Largeserver, 4 × RTX PRO 6000 Server Editiongpt-oss-120b, two pairs92 (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?
Yes, with checks. In the ABAP benchmark by TH Köln and CONSILIO (January 2026), GPT-5 passed 77.1 per cent of 180 tasks and the open gpt-oss-120b 46.2 per cent after five rounds of syntax-check and unit-test feedback; at the first attempt no open model passed more than 11.7 per cent. Every draft needs the SAP syntax check, ABAP Unit and a developer's review.
Can AI explain old ABAP programs?
Yes, and it is the safest first use: an explanation changes no code, and a developer who knows the business process can judge it quickly. SAP lists "ABAP Program Explain" among the custom code migration features of Joule for developers; a local model does the same for code that has to stay in your network. The ABAP benchmark did not measure explanation quality, so try it on a handful of your own Z-programs first.
Which LLM is best for ABAP?
Among open models in that benchmark, gpt-oss-120b led with 46.17 per cent after feedback, followed by gpt-oss-20b with 29.33 and Qwen3-Coder with 20.94; the paper does not state the Qwen3-Coder size. Closed models led overall. Test a model on your own programs before you rely on it.
Can I use AI for the S/4HANA custom code migration on-premise?
Yes. SAP's tools find the work: usage data, the Custom Code Migration app and ATC with the S/4HANA readiness checks. A local model on your own GPU then explains each finding, drafts adaptations and ABAP Unit tests, and the SAP syntax check and your review decide what is transported.
Does Joule for developers run on-premise?
SAP's pages we read name S/4HANA Cloud Private Edition 2025 and the Public Edition, and the product page describes it as an AI offering in an underlying SAP cloud service, whose commercial terms SAP confirms for your contract. They do not say whether on-premise S/4HANA systems are covered or where selected code is processed; ask SAP in writing.
Which GPU do I need for ABAP with a local LLM?
One RTX PRO 6000 Workstation Edition or Max-Q with 96 GB holds gpt-oss-120b with 9 sessions of 64K tokens by our users-per-card rule. One RTX PRO 4500 with 32 GB holds gpt-oss-20b for a pilot, and a server with four RTX PRO 6000 Server Edition cards serves a conversion project.
Where can I buy a server for ABAP with a local LLM, and what does it cost?
From us. We supply RTX PRO workstations and AI servers built to order across the EU, with or without the model and the check pipeline set up. We quote the exact configuration in writing; the price depends on the cards, their number, memory, storage and the software setup.

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 expert
Talk to an expert

We reply within one business day

By sending this form you agree that we process your details to answer your enquiry; see our privacy policy.

request@eurokommerz.at
Jordangasse 7, 1010 Vienna