How would you verify AI-generated ABAP code before it goes into a business-critical process?
Say your answer out loud first.
Practise another way
The same way I verify a colleague's code, only stricter. First I read it and make sure I understand every line.
Then automatic gates: syntax check and activation, ATC with the project's clean core variant, and ABAP Unit tests whose assertions I wrote from the requirement, not copied from the AI.
Then the RAP-specific checks: buffer access, messages, authorization, locking. Then a normal code review and transport, and a test in QA with real-looking data. If I can't explain a line, it doesn't ship.
SAP's own line is useful here: in August 2026 the head of ABAP Platform said AI can produce plausible code with subtle errors.
So SAP combines human review with agent testing and keeps humans in the loop at critical steps. Your answer should show a pipeline, not a feeling.
1. Read it like a pull request. If you cannot explain a line, it does not ship. Ask the assistant to explain its own code, then check the explanation against the ABAP keyword documentation, not against the assistant.
2. Automatic gates
- Activation and syntax check in ADT; in ABAP Cloud the language version already blocks unreleased APIs.
- ATC with the project's variant (cloud readiness / clean core checks). Treat findings as blockers, not hints.
- ABAP Unit with test doubles. Write the key assertions yourself from the requirement. A generated test that asserts today's output can lock in a bug.
3. Checks an AI gets wrong most often (from reviewing generated RAP code)
- Reading the database with
SELECTinside a handler instead ofREAD ENTITIES ... IN LOCAL MODE, which misses changes in the transactional buffer. - Missing
failed/reportedentries, so the UI gets no message. - Forbidden statements in behavior implementations: the SAP cheat sheet lists
COMMIT WORK,ROLLBACK WORKand leaving the transaction withRAISE EXCEPTIONas not allowed where RAP owns the transaction. - Authorization: no
AUTHORITY-CHECKor instance authorization where it is needed. - Performance:
SELECTin a loop, no paging, full table reads.
4. Business-critical extras
- Traceability: the change sits in a transport with a reviewer; note that AI assisted.
- Test in QA with production-like volumes and edge cases (currency, time zones, empty input).
- Second reviewer for anything that posts money or changes master data.
5. For agents. The ABAP custom code migration agent records every change in transport requests and leaves lower-confidence proposals as comments: that is the model to copy for your own process.
Key message: AI changes who types the code, not who signs for it.
Describes a layered process (read, ATC, own assertions, RAP-specific checks, review, QA) with concrete examples of what AI gets wrong.
Says "I test it and if it works it's fine" or trusts the assistant's own explanation.
Letting the AI write both the code and the tests and calling it verified. That proves consistency, not correctness.
- Why is a generated unit test not enough proof?
- Which ATC variant would you run on a clean core project?
- What would make you reject AI code even if all checks pass?
4 official pages and 2 prep guides. Confidence: high. Checked 2 Dec 2026.
- Prep guide Gives the question.
- Prep guide Describes the round.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.