How it works
How the export becomes documentation you can check.
A read-only ABAP report exports your custom code and the context around it. From that export, CodeGraphAI builds an evidence graph, re-checks every relationship and every citation, and generates the documentation. This page walks through each step: what it produces, and where its limits are.
A catalogue page generated without AI from our synthetic demo system.

01From a process question
Start from a process question, end at the line of code.
A process owner asks what happens when an order arrives by IDoc. The documentation answers with a statement about the process, and every statement leads to the line of code and the exported row behind it.
- The questionWhat happens when an order arrives by IDoc?
- The process readingInbound IDoc message type ORDERS is processed by ZSD_ORDER_IDOC_IN, which calls ZSD_ORDER_CREATE.
- The code readingFunction module ZSD_ORDER_IDOC_IN calls ZSD_ORDER_CREATE at line 34 of include LZSD_ORDERU03. Line 2 of the exported file cg_cfg_edifct.tsv registers ZSD_ORDER_IDOC_IN for message type ORDERS, inbound.
From there, the process flow follows the next steps in the order of the code: the credit check, the creation of the sales order and the log entry.
What happens when an order arrives by IDoc?The question
Order arrives
Inbound IDoc message type ORDERS is processed by ZSD_ORDER_IDOC_IN, which calls ZSD_ORDER_CREATE.
Function module ZSD_ORDER_IDOC_IN
Line 34 of include LZSD_ORDERU03CALL FUNCTION 'ZSD_ORDER_CREATE'- CODE:
lzsd_orderu03 .abap:34 - EXPORT:
cg_cfg_edifct .tsv:2 - GRAPH:PROCESSED_BY
- CODE:
Line 2 of the exported file cg_cfg_edifct.tsv
FCTNAM ZSD_ORDER_IDOC_IN · IDOCTYP ORDERS05 · MESTYP ORDERS · DIRECT 2
Function module ZSD_ORDER_IDOC_IN is registered for message type ORDERS, IDoc type ORDERS05, inbound.
From our synthetic demo system. The code line is quoted exactly as exported, numbered as in the ABAP editor (SE80). The stage name is added for this page.
02The exportTechnical
One read-only report, installed in about 5 minutes.
It reads code, dictionary definitions and configuration. It reads no transactional data and no user names, and it changes nothing: its only output is the export files, written to a directory you choose.
| What | In detail |
|---|---|
| Custom source code | Programs and includes (reports, module pools, user-exit includes), classes and interfaces (every include), function groups and their function modules, enhancement implementations and CDS view sources. |
| ABAP Dictionary definitions | The structure, not the table contents: customer tables, views, structures, appends, data elements, domains with fixed values and table types. Also the definitions of the SAP tables your code uses. |
| The SAP where-used index | Both directions: who calls your code from SAP, and what your code references. |
| Transactions | Customer transaction codes with their program, screen, parameters and text. |
| Screens | Flow logic and field names. |
| Background jobs that run customer programs | Job name, step, program, variant name, number of runs in the period (default 90 days), last run date, periodic flag and statuses. No user names. |
| Process configuration (customizing) | IDoc process codes; IDoc partner profiles (included by default; one checkbox leaves them out, see the stated limit below); payment methods and payment medium formats; customer DMEE trees; CMOD projects; classic and new BAdI implementations; table maintenance dialogs (SM30); the SAP modification log (names of modified SAP objects only). |
| Texts | Object, package and message texts: in the selected language, then the master language, then English. |
| Inventory | Every customer object of the selection, of all object types, flagged with whether its content was exported. |
What the export reads
Custom source code
Programs and includes (reports, module pools, user-exit includes), classes and interfaces (every include), function groups and their function modules, enhancement implementations and CDS view sources.
ABAP Dictionary definitions
The structure, not the table contents: customer tables, views, structures, appends, data elements, domains with fixed values and table types. Also the definitions of the SAP tables your code uses.
The SAP where-used index
Both directions: who calls your code from SAP, and what your code references.
Transactions
Customer transaction codes with their program, screen, parameters and text.
- ScreensFlow logic and field names.
Background jobs that run customer programs
Job name, step, program, variant name, number of runs in the period (default 90 days), last run date, periodic flag and statuses. No user names.
Process configuration (customizing)
IDoc process codes; IDoc partner profiles (included by default; one checkbox leaves them out, see the stated limit below); payment methods and payment medium formats; customer DMEE trees; CMOD projects; classic and new BAdI implementations; table maintenance dialogs (SM30); the SAP modification log (names of modified SAP objects only).
Texts
Object, package and message texts: in the selected language, then the master language, then English.
Inventory
Every customer object of the selection, of all object types, flagged with whether its content was exported.

What it never reads or changes
- SAP standard source code. The one exception is described below.
- User names. Author, scheduler, changed-by and every other user-name column are removed from every file. The object inventory has no user column either. Source code is exported as written, so a comment can still contain a name or an SAP user ID; before any AI step, personal data in comments and string literals is redacted.
- Transactional data. It never reads orders, invoices, postings or similar data.
- Your database. The report contains no database INSERT, UPDATE, MODIFY, DELETE or COMMIT.
IDoc partner profiles are included by default and contain partner numbers (customer, vendor and bank numbers). One checkbox, “Include IDoc partner profiles”, leaves them out. The documentation never writes partner numbers. An optional field, “Extra config tables (content)”, reads only the tables you add to it; it is empty by default.
The one exception
The user-exit includes that you list on the selection screen are read, because they hold customer code inside SAP frames. In the synthetic demo system, the user-exit include MV45AFZZ is documented like any other custom code:
MV45AFZZ calls ZSD_ORDER_STATUS_UPDATE GRAPH:CALLS CODE:
17FORM userexit_save_document.18 CALL FUNCTION 'ZSD_ORDER_STATUS_UPDATE' IN UPDATE TASK19 EXPORTING20 iv_vbeln = vbak-vbeln21 iv_status = 'S'.| Authorization object | Access |
|---|---|
S_DEVELOP | Display |
S_TABU_NAM / S_TABU_DIS | Display |
S_DATASET | Write, for the output directory |
S_GUI | Only for a download to a PC folder |
Tables the user may not display are skipped and logged.
Installing and running it
- Installation
- About 5 minutes: create, paste, save, activate. It is a local object (package
$TMP), so no transport is needed. - Output
- The export files, written to a server directory (AL11) or a PC folder that you choose.
- In the background
- A system with a few thousand custom objects takes minutes. A manifest and a log record what was exported, what was skipped and why.
- Releases
- The pilot ran on a productive SAP S/4HANA system. The report is syntax-checked for ABAP 7.40 SP08, 7.50 and 7.55. Release-dependent parts (CDS, DMEE, BAdI tables) are read dynamically and skipped with a log entry when they do not exist. Ask us about your release.
- Selection
- By default, all customer objects (
Z*,Y*). You can add your own namespace (for example/ABC/*) and narrow the selection by package.
Installation
About 5 minutes: create, paste, save, activate. It is a local object (package
$TMP), so no transport is needed.Output
The export files, written to a server directory (AL11) or a PC folder that you choose.
In the background
A system with a few thousand custom objects takes minutes. A manifest and a log record what was exported, what was skipped and why.
Releases
The pilot ran on a productive SAP S/4HANA system. The report is syntax-checked for ABAP 7.40 SP08, 7.50 and 7.55. Release-dependent parts (CDS, DMEE, BAdI tables) are read dynamically and skipped with a log entry when they do not exist. Ask us about your release.
Selection
By default, all customer objects (
Z*,Y*). You can add your own namespace (for example/ABC/*) and narrow the selection by package.
03The evidence graphTechnical
Every relationship points to the line or row that proves it.
One relationship per evidence site, stored with how it was detected, the file, the line and a confidence tier. Each one is re-verified automatically.
One catalogue line, two pieces of evidence
ZSD_ORDER · Calls to other code
LZSD_ORDERU01 calls BAPI_SALESORDER_CREATEFROMDAT2 GRAPH:CALLS CODE:
The code line
33CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'34 EXPORTING35 order_header_in = is_headerThe where-used row
- direction
- from_custom
- type
- F
- name
- BAPI_SALESORDER_CREATEFROMDAT2
- include
- LZSD_ORDERU01
Stored with every relationship
- how it was detected
- file
- line
- confidence tier
| Confidence tier | How the relationship was established |
|---|---|
| Resolved | Resolved against the export or the SAP where-used index. |
| Configuration or dictionary | Taken from configuration or the ABAP Dictionary. |
| Name only | Matched by name only. |
Unresolved points are listed, never forced into the graph
What static analysis cannot resolve appears as an unresolved point in Coverage:
CALL FUNCTION gv_fm in ZWM_PICK_LABEL: the function name is computed at run time. Listed in Coverage, never guessed.
Absence statements say what stays invisible
A sentence such as “no code updates this table” is written only after checking, and it always states what the check cannot see.
Checked first
- database statements
- where-used rows
- names in the source
What stays invisible, for example
- dynamic names
- code outside the export
- SAP standard code
- a stale where-used index
The evidence graph, drawnTechnical
From a transaction to the table it writes, every hop cited.
A slice of the evidence graph of a synthetic demo system. Every solid line is a recorded relationship; the dashed line marks an unresolved point, listed rather than recorded. One path is lit.
8UPDATE zsd_order_log SET status = iv_status9 aedat = sy-datum10 WHERE vbeln = iv_vbeln.LZSD_ORDERU04 updates ZSD_ORDER_LOG
GRAPH:WRITESSCHEMA:DDIC:
Evidence for each hop
- STARTSEXPORT:cg_transactions.tsv:15
- CALLSCODE:zwm_pick_label.abap:40
- WRITESCODE:lzsd_orderu04.abap:8
- TCODEZWM_LABELPrint picking labels
STARTSEXPORT:
cg_transactions .tsv:15 - PROGZWM_PICK_LABEL
CALLS, IN UPDATE TASKCODE:
zwm_pick_label .abap:40 CALL FUNCTION gv_fm: the function name is computed at run time. Listed in Coverage, never guessed. CODE:zwm_pick_label .abap:32 - FMZSD_ORDER_STATUS_UPDATE
WRITESGRAPH:WRITESCODE:
lzsd_orderu04 .abap:8 - TABLEZSD_ORDER_LOG
8UPDATE zsd_order_log SET status = iv_status9 aedat = sy-datum10 WHERE vbeln = iv_vbeln.LZSD_ORDERU04 updates ZSD_ORDER_LOG
GRAPH:WRITESSCHEMA:DDIC:
Every relationship in this slice, with its evidence
ZSD_STATUSSTARTSSAPLZSD_ORDEREXPORT:cg_transactions .tsv:3 SAPMV45AINCLUDESMV45AFZZEXPORT:cg_xref_includes .tsv:2 ZWM_LABELSTARTSZWM_PICK_LABELEXPORT:cg_transactions .tsv:15 ORDERSPROCESSED_BYZSD_ORDER_IDOC_INEXPORT:cg_cfg_edifct .tsv:2 ZSD_DELIVERY_NIGHTLYRUNSZSD_DELIVERY_DUEEXPORT:cg_jobs .tsv:2 SAPLZSD_ORDERCALLSZSD_ORDER_STATUS_UPDATECODE:lzsd_orderi01 .abap:4 MV45AFZZCALLSZSD_ORDER_STATUS_UPDATECODE:mv45afzz .abap:18 ZWM_PICK_LABELCALLSZSD_ORDER_STATUS_UPDATECODE:zwm_pick_label .abap:40 ZWM_PICK_LABELUNRESOLVED POINTCALL FUNCTION gv_fmCODE:zwm_pick_label .abap:32 ZSD_ORDER_IDOC_INCALLSZSD_ORDER_CREATECODE:lzsd_orderu03 .abap:34 ZSD_ORDER_STATUS_UPDATEWRITESZSD_ORDER_LOGCODE:lzsd_orderu04 .abap:8 ZSD_ORDER_CREATECREATESZSD_ORDER_LOGCODE:lzsd_orderu01 .abap:55 ZSD_DELIVERY_DUECREATESZSD_DLV_QUEUECODE:zsd_delivery_due .abap:53
CALL FUNCTION gv_fm): listed, never guessedPoint at or focus a box to see its relationships and their evidence. A box with a link opens the line or row that the sample page cites; the others are not cited there.04VerificationTechnical
Every relationship and every citation is checked again.
Two checks run on what was built, and there is no AI in this step. The web app shows the citation check next to each citation.
Every relationship
Graph verifier
Replays every relationship against its cited source line or exported row.
Every tag
Citation auditor
Re-checks every tag on every catalogue page. It is a deterministic script, not an AI.
Next to each citation
In the web app
The app shows the result of the check next to each citation: checked, or a warning.
- 19SELECT SINGLE vbeln_so FROM zsd_dlv_queue
- 20 WHERE vbeln = @p_vbeln
- 21 INTO @gv_vbeln_so.
- 22SELECT SINGLE channel FROM zsd_order_log (cited line, checked by the citation auditor)
- 23 WHERE vbeln = @gv_vbeln_so
- 24 INTO @gv_channel.
- 39UPDATE zsd_dlv_queue SET label_printed = abap_true WHERE vbeln = p_vbeln.
- 40CALL FUNCTION 'ZSD_ORDER_STATUS_UPDATE' IN UPDATE TASK (cited line, checked by the citation auditor)
- 41 EXPORTING
- 42 iv_vbeln = gv_vbeln_so
- 43 iv_status = 'L'.
cited line, checked by the citation auditor

Every factual line carries a citation
Five tags and one marker, each with one meaning.
- CODE
- The exact line of your ABAP or CDS source, numbered as in the ABAP editor (SE80).
- GRAPH
- A recorded relationship in the evidence graph, for example this program reads that table. It is always paired with the code line or exported row it came from.
- SCHEMA
- The ABAP Dictionary definition: a table, field, data element, domain or message.
- EXPORT
- A specific row of an exported file: configuration, the SAP where-used index, the transaction or job list, or the object and package inventory.
- INFERRED
- A deduction or a stated limit, clearly marked as not evidence.
- SME-REVIEW-REQUIRED
- A question for your subject-matter expert when evidence is insufficient. It is never filled in by guessing.
Every factual line carries a citation
Five tags and one marker, each with one meaning.
- CODE
- The exact line of your ABAP or CDS source, numbered as in the ABAP editor (SE80).
- GRAPH
- A recorded relationship in the evidence graph, for example this program reads that table. It is always paired with the code line or exported row it came from.
- SCHEMA
- The ABAP Dictionary definition: a table, field, data element, domain or message.
- EXPORT
- A specific row of an exported file: configuration, the SAP where-used index, the transaction or job list, or the object and package inventory.
- INFERRED
- A deduction or a stated limit, clearly marked as not evidence.
- SME-REVIEW-REQUIRED
- A question for your subject-matter expert when evidence is insufficient. It is never filled in by guessing.
Stated limitRe-verification proves that each citation points to real evidence that matches it. It does not prove that a business interpretation is correct. That is why Validation Packages end with sign-off by your subject-matter expert.

05Pilot figures
The pilot, in figures.
Automated analysis of a productive SAP S/4HANA system.1 The notes under the figures say what each one covers, and what it does not.
- 313,202lines of ABAP analyzed
- 2,3872custom objects inventoried
- 13,4803relationships with verified evidence
- 04failures when re-verifying each relationship
- 1 day5from export to documentation
Notes on the pilot figures
- 1
Pilot: a productive SAP S/4HANA system. Automated analysis, re-verified with no failures.
- 2
Inventoried: every customer object of the selection, of all object types, flagged with whether its content was exported. Not every inventoried type is documented in depth; the coverage register states which are.
- 3
Each relationship stores file, line and confidence. Where the 13,480 come from is shown above.
- 4
“0 failures” means every relationship re-checked against its cited line or row. It does not prove that a business interpretation is correct; that is what expert sign-off is for.
- 5
“1 day” covers export to documentation; process documents take longer. It covers the evidence graph, the catalogue and the web app. Validation Packages need AI runs and expert sign-off.
Where the 13,480 relationships come from
| 12,739 | from a line of ABAP / CDS code | cited as CODE |
|---|---|---|
| 535 | from an exported configuration row | cited as EXPORT |
| 206 | from the SAP where-used index | cited as EXPORT |
| 13,480 | relationships, 0 failures |
Plus: 14,571 ABAP Dictionary facts (tables and fields).
Code and configuration, connected
- 84payment methods
- 55payment formats
- 7DMEE trees
- 19implemented BAdIs
- 9CMOD projects
- 4IDoc message types
- 327BAPI calls
- 83maintenance dialogs
- 4,867SAP modification log entries
06What it produces
Four things built from the same evidence.
The catalogue and the process map are generated without AI. Validation Packages and Ask AI use AI, only with your recorded authorization. The roles that write and review Validation Packages run on Anthropic Claude or on OpenAI; the verified Spanish translations of Validation Packages, and Ask AI, use OpenAI.

Built without AI
A cited catalogue, one page per object
- Module, dictionary and index pages (transactions, jobs, entry points, enhancements and exits, configuration, SAP modifications, interfaces and SAP dependencies), an object inventory and a coverage register.
- Every factual line is cited. It states what the code and the configuration do and where, never business purpose.
- Plain Markdown pages with wiki-links, which can also be built as a static website for offline reading. Ask us whether the files are part of your engagement.
Built without AI
A process map, proposed from the evidence
- A deterministic algorithm groups the custom code into business processes. Every hand-written object belongs to exactly one process.
- Each process is anchored on what starts it (transactions, jobs, configuration, SAP callers) and ranked into tiers A, B and C.
- Names come from texts recorded in SAP. The grouping is a proposal, not a statement of business purpose.
AI, with your recorded approval
Validation Packages your experts sign off
- One business domain or process end to end, in eight fixed sections, from the overview to the validation checklist.
- Three automated gates run before an expert sees it, and the runner cannot skip or waive a gate.
- Your subject-matter expert confirms the points marked SME-REVIEW-REQUIRED and signs off, which publishes the document.
Validation Packages, in detailFrom the draft to publication
- Documentation Validator
- Validation Triad
- Citation Auditor
- Expert sign-off
AI, off by default
Ask AI, answered with numbered evidence
- Questions in plain language, in any language. The answer comes in the language selected in the web app.
- Ask AI cites numbered evidence and cannot add evidence of its own. Each item is re-checked by the citation auditor and linked to its source line.
- An answer with no evidence is labeled “unverified”. Ask AI stays off until your authorization is recorded.
07RefreshTechnical
After each release, run the export again.
There is no live connection to SAP. A refresh is a new export, built and verified separately before it goes live.
- Run the export again.After a release, you run the same read-only report and hand over the new archive.
- Rebuilt and re-audited.The graph, the catalogue and the process map are regenerated, and every citation is re-audited. The new version is built and verified separately, in each language.
- Switched over, with a way back.The previous version is archived and can be rolled back. User accounts, approvals and Validation Packages are kept across refreshes.
Stated limitValidation Packages are not rewritten automatically. A Validation Package that is regenerated must pass the gates again.
Two versions, one live

The subscription covers this: refresh after every release, AI included, plus support.
08The CodeGraph method
One method, applied to SAP.
CodeGraphAI for SAP is built on CodeGraph, a technology-agnostic method for evidence-based documentation of software systems.

The five phases
- Source ingestionThe evidence graph, with the evidence recorded on every relationship.
- Domain documentationValidation Packages with three gates: Documentation Validator, Validation Triad (Defender, Challenger and Judge) and Citation Auditor.
- Reference layerFor SAP, the cited catalogue: one page per object, generated without AI.
- Process discoveryFor SAP, the process map: custom code grouped into business processes, without AI.
- Vault assemblyFor SAP, the catalogue assembled as plain Markdown pages with wiki-links, which can also be built as a static website.
Its core practices
- Evidence is recorded when each relationship is created.
- The graph is queried through fixed templates.
- The parts that write documentation are kept separate from the parts that check it.
- Gaps are stated honestly, as SME-REVIEW-REQUIRED questions for your expert.
Beyond SAP. Today SAP is the method’s only implementation. Have another technology? The same method applies to any codebase once a parser for its language is built.
“CodeGraph” on its own names only the method. The product is CodeGraphAI for SAP.
| The method needs | For SAP |
|---|---|
| A source export with stable line numbers | The read-only report, which keeps SE80 numbering |
| A parser or extractor for the language, emitting objects and relationships with source, file, line and confidence | An ABAP extractor plus a graph builder |
| Schema definitions of the database | The ABAP Dictionary |
| Optionally, a compiler cross-reference for the most reliable relationships | The SAP where-used index |
| The configuration or wiring that starts code | Transactions, jobs, IDoc, payment, BAdI and CMOD |
| A graph store, a deterministic cited catalogue generator, a graph verifier and a citation auditor | The evidence graph, the catalogue, the verifier and the auditor described on this page |
| AI roles with gates for the business documents, plus human expert review | Validation Packages and sign-off by your subject-matter expert |

Bring your questions about how your processes run.
A guided demo with our team: the web app, the evidence graph and a cited catalogue page on our synthetic demo system, then your questions. About 30 to 45 minutes, in English, Spanish or Portuguese. We reply by email to schedule it.
or write to hello@codegraphai.com