Free checklist · from the book
AI-written ABAP: a 10-point verification checklist
An AI assistant writes clean, well-structured ABAP at remarkable speed. It is reliable about the shape of things and unreliable about the specifics it can't see: the real name of a table or routine, the values in a status field, the release your system runs. Where it doesn't know, it fills in what is typical, in the same confident voice, and the code often activates anyway.
So the review has to change. Style and structure are rarely the problem. These ten checks target the mistakes that do get through: names nobody verified, values nobody looked at, paths nobody tested.
They are 10 of the 26 verification rules in Appendix B of Build in SAP with AI, rewritten for this page. Each rule says which chapter tells the story behind it.
1 / 10
Every name comes from the system, not from the assistant
An assistant fills in what it can’t see with what is typical: the usual table name, the usual spelling. The result often looks more correct than the real object, and does not exist.
What to check
- Every custom table, field, class, method, routine, message number and customizing value in the change has been read from the dictionary or the source.
- Nothing was taken from an old analysis document, a spec or the assistant’s summary without checking the object itself.
- If the assistant can’t find an object in the system, treat it as not existing.
PERFORM extract_weekly_data USING lv_rack_type." sic: real routine name, read from the program source
PERFORM extract_weelky_data USING lv_rack_type.From Chapter 2 of Build in SAP with AI (Appendix B, rule 1)
2 / 10
Every name is marked as read or assumed
The assistant rarely says when it is guessing, but it will if you make it part of the job. Assumed names then arrive labeled, so they are caught before they reach code.
What to check
- Your standing instructions ask the assistant to say, for every system-specific name, whether it read it in this session or is assuming it.
- For names that matter, the conversation shows a tool call that actually read the object. No call means the name came from memory.
For every table, field, routine, class or value that belongs
to this system, say whether you read it from the system in
this session or are assuming it. If assuming, say so first.From Chapter 2 of Build in SAP with AI (Appendix B, rule 2)
3 / 10
Values are checked against real data, not against the field name
A field can exist and still hold values the assistant didn’t expect. If it assumes status “C” means confirmed and in your system it means cancelled, the code activates cleanly and does the wrong thing.
What to check
- Every literal compared with a status, type or indicator field has been checked against the domain’s fixed values or customizing, and against real rows.
- Magic values are replaced by named constants that say what was verified.
" keep confirmed requests
DELETE lt_requests WHERE status <> 'C'." Domain ZSTATUS: C = cancelled, F = confirmed (checked in data)
CONSTANTS c_status_confirmed TYPE zstatus VALUE 'F'.
DELETE lt_requests WHERE status <> c_status_confirmed.From Chapter 7 of Build in SAP with AI (Appendix B, rule 3)
4 / 10
The code runs on your release, not the newest one
Assistants have read far more about the latest ABAP than about the release your system runs. They will suggest syntax, classes and annotations that don’t exist on it yet.
What to check
- The assistant was told the exact SAP_BASIS release (and UI5 version, for frontend work) at the start of the session.
- Anything that looks new (syntax, a released class, a CDS annotation, a RAP feature) has been checked against the documentation for your release, or simply activated.
SELECT matnr, mtart FROM mara
WHERE mtart = @lv_type
INTO TABLE @DATA(lt_mara).TYPES: BEGIN OF ty_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
END OF ty_mara.
DATA lt_mara TYPE STANDARD TABLE OF ty_mara.
SELECT matnr mtart FROM mara
INTO TABLE lt_mara
WHERE mtart = lv_type.From Chapter 2 of Build in SAP with AI (Appendix B, rule 5)
5 / 10
Every filter and parameter is tested, not just the one in the example
An assistant builds what your example shows and fills the rest with whatever is simplest. A filter that is never read can’t fail, so nothing tells you it is being ignored.
What to check
- Each business rule has a unit test with the worked example’s inputs and expected result, written before the implementation.
- Every filter, parameter and option the code accepts has a test, not only the one in the example.
- In a RAP custom query, every incoming filter is applied, and an unknown filter raises an error instead of being dropped.
DATA(lt_filter) = io_request->get_filter( )->get_as_ranges( ).
DATA(lr_plant) = VALUE if_rap_query_filter=>tt_range_option(
lt_filter[ name = 'PLANT' ]-range OPTIONAL ).
SELECT * FROM zplan_week
WHERE plant IN @lr_plant
INTO TABLE @DATA(lt_rows).DATA(lt_filter) = io_request->get_filter( )->get_as_ranges( ).
LOOP AT lt_filter INTO DATA(ls_filter).
IF ls_filter-name <> 'PLANT' AND ls_filter-name <> 'STORAGELOCATION'.
RAISE EXCEPTION NEW zcx_query( filter = ls_filter-name ).
ENDIF.
ENDLOOP.
DATA(lr_plant) = VALUE if_rap_query_filter=>tt_range_option(
lt_filter[ name = 'PLANT' ]-range OPTIONAL ).
DATA(lr_sloc) = VALUE if_rap_query_filter=>tt_range_option(
lt_filter[ name = 'STORAGELOCATION' ]-range OPTIONAL ).
SELECT * FROM zplan_week
WHERE plant IN @lr_plant
AND storagelocation IN @lr_sloc
INTO TABLE @DATA(lt_rows).From Chapter 7 of Build in SAP with AI (Appendix B, rule 9)
6 / 10
The assistant’s assumptions are listed, and none went into the code unasked
Whatever you didn’t specify, the assistant decided for you, quietly. Usually that is harmless; occasionally it is the one line that costs an evening, or changes a business rule.
What to check
- You asked the assistant to list everything it decided that wasn’t stated in the request.
- Each assumption that touches business behavior went to whoever owns the rule (an open question), not straight into the code.
After the code, list every assumption you made that
wasn't stated above, e.g. "a request with no week
belongs to the current week".From Chapter 7 of Build in SAP with AI (Appendix B, rule 10)
7 / 10
The system is the judge, not the conversation
The compiler is the cheapest verifier you have. When you and the assistant disagree about whether something works, trying it ends the argument faster than discussing it.
What to check
- The code was activated in the development system, not only reviewed in the chat.
- Syntax check, ATC (or Code Inspector) and the unit tests ran clean on the real system.
- Claims like “this works on your release” or “this is the standard behavior” were tested, not accepted.
From Chapter 2 of Build in SAP with AI (Appendix B, rule 11)
8 / 10
Check the parts you didn’t ask to change
If your request contains a wrong assumption, the assistant implements it perfectly. A result that suddenly looks right can mean something else just broke.
What to check
- After a fix, results that were already correct are re-checked, not only the one you were fixing.
- Logic that should apply to one case (one row type, one document type) is restricted to it, not applied to everything.
- The diff contains only the changes you asked for.
LOOP AT lt_rows ASSIGNING FIELD-SYMBOL(<ls_row>).
<ls_row>-quantity = to_weekly( <ls_row> ).
ENDLOOP.LOOP AT lt_rows ASSIGNING FIELD-SYMBOL(<ls_row>)
WHERE row_type = c_row_type_stock.
<ls_row>-quantity = to_weekly( <ls_row> ).
ENDLOOP.From Chapter 7 of Build in SAP with AI (Appendix B, rule 12)
9 / 10
Measure before explaining
Ask an assistant why a result is wrong and you get a plausible explanation, then another, each with a fix. With no data in front of it, it gives you the most common cause of the symptom, not yours.
What to check
- Before accepting a diagnosis or a fix, a query showed the actual data behind the wrong result.
- A suspected defect was reproduced with a real case before it was fixed.
Why are the forward weeks empty for plant 1000?SELECT plant, planningweek, COUNT(*) AS row_count
FROM zplan_week
WHERE plant = @lv_plant
GROUP BY plant, planningweek
ORDER BY planningweek
INTO TABLE @DATA(lt_check).From Chapter 7 of Build in SAP with AI (Appendix B, rule 13)
10 / 10
Two users on the same record: the second one is stopped
Generated update logic usually works perfectly for one user. Locking is the part nobody demos, and a missing lock object only shows up as a short dump or a silent overwrite.
What to check
- Every table the code updates has a lock object, and it exists in the system (it isn’t only called by name).
- Two users open the same record and both try to change it. The second is stopped with a clear message: on edit with drafts, on save with an ETag.
- The first user’s change is still there afterwards.
From Chapter 9 of Build in SAP with AI (Appendix B, rule 22)
Use it in your reviews
The whole list as Markdown. It works as a pull request template for abapGit or gCTS repositories, or as a comment on any change where an assistant wrote part of the code.
## AI-written ABAP: verification checklist
- [ ] **Every name comes from the system, not from the assistant.** Every system-specific name (tables, fields, classes, routines, messages, customizing values) was read from the system, not taken from the assistant or a document.
- [ ] **Every name is marked as read or assumed.** The assistant marked each system-specific name as read or assumed, and every assumed name was checked before use.
- [ ] **Values are checked against real data, not against the field name.** Every status, type or indicator value the logic depends on was checked against the domain or customizing and against real table rows.
- [ ] **The code runs on your release, not the newest one.** The code uses only syntax, classes and annotations available on our exact release; anything new-looking was checked or activated.
- [ ] **Every filter and parameter is tested, not just the one in the example.** There is a test for every filter and parameter the code accepts, and (in custom queries) unknown filters fail loudly instead of being ignored.
- [ ] **The assistant’s assumptions are listed, and none went into the code unasked.** The assistant listed its assumptions; any that affect business behavior were confirmed by the rule owner before being coded.
- [ ] **The system is the judge, not the conversation.** The code was activated and its unit tests and ATC checks ran on the development system; claims about behavior were tested, not taken on trust.
- [ ] **Check the parts you didn’t ask to change.** Results that were already correct were re-checked after the change, and the diff contains only what was asked for.
- [ ] **Measure before explaining.** Any bug fix in this change is based on data that was queried and looked at, and the defect was reproduced before it was fixed.
- [ ] **Two users on the same record: the second one is stopped.** Tested with two users on the same record: the second is stopped with a clear message and the first user’s change survives.
<sub>10 of the 26 rules in *Build in SAP with AI* (Davide Mancuso). Details and examples: https://www.automateandgraduate.com/sap-ai/ai-abap-checklist</sub>
Appendix B has all 26
Build in SAP with AI
The other 16 rules, with worked examples, are in the book: reading before you ask, documents about the system, the landscape, frontend and UI5, proving the new code against the old, and working with a connected assistant. Each one comes with the project story of what skipping it cost, plus the pre-flight checklist, the prompts and the templates.
Want to practice the reviewer's eye? Try Review the AI: eight real situations where an assistant was confidently wrong. Rules 1 and 2 are much easier with an assistant that can read the system: how to connect one to SAP, read-only.
Code snippets are short illustrations with generic or standard names; adapt them to your system and release. Checklist text is free to reuse under CC BY 4.0 with a link to this page. SAP and ABAP are trademarks of SAP SE; this checklist is independent and not affiliated with or endorsed by SAP SE.