Case File 02Clickable DocumentationReverse Engineering · SAP HCM · ABAPDelivered in Production Case File 02Clickable DocumentationReverse Engineering · SAP HCM · ABAPDelivered in Production
◑ The Workshop
Case File 02  ·  Client engagement

100,000 lines of undocumented ABAP, turned into a site you click through.

A 25-year-old SAP HCM system, and a documentation project its own team had assessed as not achievable. The fix was to stop treating it as a writing problem: generate the documentation from the system rather than write about it, and keep the model away from the facts.

25+ yrsof SAP HCM, its ABAP changed many times over
100K+lines of code and configuration across 90+ files
6 × 3 moplanned for the documentation — called unachievable
30%off the planned project timeline
My role
Designed and built the system, parser and decompiler
Client footprint
None — no server, database or licence
Domain
Legacy modernization & knowledge management
Outcome
Delivered ~30% under plan

The challenge

Every long-lived enterprise system arrives at the same place. The people who built it move on or retire, and the knowledge goes with them. The documents go stale, because nobody on the technical side sees value in keeping them current. Then the bill arrives as technical debt: days to identify a root cause, weeks or months to assess the blast radius of a change, and nobody who can see the system end to end.

This client ran SAP HCM on a system more than 25 years old, with many rounds of change to its ABAP. A project of 6 people for 3 months had been set up to produce the functional documentation. The material was more than 100,000 lines of code and configuration across 90-plus files: Dynamic Actions for the infotypes, BAdIs, User Exits, Screen Exits and custom routines.

Having read into it, the team's own assessment was that the plan could not be met. And I did not want to solve it by handing over another binder — a document written once would be out of date by the next transport.

Why the chat models did not hold up

The team had already tried the obvious route: pasting the ABAP into a chat window, with GPT 5.6 and Claude Opus 4.8. It failed for three reasons, none of which was model quality.

A better model fixes none of those. Structure around the model fixes all three.

Treating it as reverse engineering

So I stopped treating it as a writing problem and treated it as a reverse-engineering problem: generate the documentation from the system's own artifacts instead of writing about them. I designed and built an agentic system that does this in six stages.

  1. IngestTake in the Dynamic Actions for the infotypes, the BAdIs, User Exits, Screen Exits and custom routines, as exported from the system.
  2. ParseRead the ABAP source and the configuration exports into a structured form.
  3. DecompileA purpose-built decompiler turns that code and configuration back into logic: trigger field, event, condition, action, target infotype and field, routine called, tables accessed. These facts are recovered, never generated.
  4. ConnectLink infotype to infotype, rule to routine, and each exit or BAdI to the objects it touches — producing the dependency model of the whole landscape.
  5. ExplainThe model turns each decompiled rule block into a business-language description, one block at a time, in a fixed structure. Small inputs solve the prompt-length problem; the fixed structure solves consistency.
  6. PublishGenerate a static website: dashboard, business rules, process map, dependency graph, a page per object, references that decode coded values on click, the raw inputs for verification, and a gaps page.

The site has no footprint at the client. No server, no database, no licence — they open a folder in a browser.

How the output earns trust

  • The model never states a fact. Every condition, action, target and call relationship comes from the decompiler. The model only explains what was recovered.
  • The source is one click away. Raw inputs are published as readable tables, so any explanation can be checked against what was ingested.
  • Gaps are listed, not hidden. A gaps page names every routine and block whose explanation is thin or generic, so functional leads review where it matters instead of re-reading everything.
  • Same structure every run, so review is a repeatable step rather than a judgment call.

What it delivered

 Manual projectAgentic system
Plan6 people for 3 months; assessed by the team as unachievableDelivered about 30% under the planned timeline
How the system is understoodRead 100,000+ lines across 90+ files and cross-reference by handParsed, decompiled into logic and connected automatically; people review
CoverageAs far as the team could read in the timeEvery Dynamic Action, BAdI, User Exit, Screen Exit and custom routine in the 90+ files
DependenciesHeld in people's headsNavigable links between infotypes, rules, routines and exits
"What triggers this?"Read the ABAP and the configurationClick through the process map or the dependency graph
"What will this change touch?"Weeks to months of impact assessmentFollow the links from the object's page
ConsistencyVaries by author, and by chat sessionSame structure every run
OutputA document that starts ageing on deliveryA static website, regenerated from the system when it changes
Footprint at the clientn/aNone: no server, database or licence

The project came in about 30% under its planned timeline, against a plan the team had called unachievable. The lasting result is the site itself: developers, DBAs and functional consultants answer questions about the system by navigating it, and the documentation can be regenerated rather than rewritten when the system changes.

The approach is not specific to SAP HCM. The core does not care what it is parsing — it needs a parser per technology, and the same method applies anywhere the truth lives in the code and the configuration.

The decisions that mattered

Documentation goes stale because it is written. The fix is not more discipline — it is a different source.

What I would do differently

Capture the before-and-after time on root-cause and impact-assessment tickets from day one. The project saving is a number I can state; the operational saving — the part that compounds every day the client runs the system — is the one I can only describe.

My role, and the team's

I designed and built the system, including the ABAP parser and the decompiler. The project team were the functional experts: they reviewed the output, closed the gaps and took the documentation to sign-off. My job was to change the work from writing to reviewing.

← Back to case files