Vibing Steampunk (vsp)
AI-Agentic Development Unlocked for ABAP — any system with ADT enabled, 7.50 upwards.
The available surface varies by release, and vsp compat reports it per system: RAP needs
S/4, AMDP needs HANA, and some ADT resources present on S/4 are absent on ERP.
ADT ↔ MCP Bridge: Gives Claude (and other AI assistants) full access to SAP ADT APIs. Read code, write code, debug, deploy, run tests — all through natural language (or DSL for automation).
New in the last three releases — the part of a root cause that never fit in a tool:
- The MIME repository, byte-exact. Every file anyone uploaded through SMW0 — images, audio, a font, a game — read back whole. The bytes are a data cluster of 255-byte lines whose last line is padded, so the cluster cannot say where the file ends;
filesizein WWWPARAMS can, and that is the step that makes it exact rather than nearly right. Nothing installed on the server.- Cluster tables, decoded. BALDAT, INDX, STXL — every table an
EXPORT ... TO DATABASEever wrote — read over plain ADT and decoded here: SAP's LZH and LZC decompressed in Go, the cluster format walked, the fields named from DD03L. What onlyIMPORTcould read, without a line of ABAP.- A dump's own why —
dumps --explainnow reads the whole ST22 document, not just the stack: the message it raised with its variables, the system fields, the failing source line, and the runtime's chosen variables per frame — so a stale handle or an unresolved pointer is on screen, not dug out by hand.- The application log with its messages, by object and date range, and the same log from a bare SE16H export of two tables.
- Spool and jobs — SP01's list decoded from TemSe, a job's steps and its log, exported for the whole night in one command.
- Where the settings are — a report's variants with the screen's own labels, SE37's saved test data, SE61 documentation as Markdown, and the IMG searched by title with the activity's transaction.
- Texts and the title, from the same call — selection texts and text symbols written as a plan with a diff, activated so they stay, and a hint after every program create that names the fields still without one; the description set without touching the source.
vsp update— the release for this platform, verified againstchecksums.txt, renamed into place of the running binary.- A response cache that turns a 4-second
sliminto 10 ms, on Go-native SQLite when it should outlive the process.And still the one that started it: the whole ABAP debugger — breakpoints, attach, stepping, call stack and variables — through SAP's own ADT resources over a classic-RFC tunnel or a plain HTTPS session, with nothing installed on the server and no SAP SDK.
See also: OData ↔ MCP Bridge for SAP data access.
Want to review or test? Start here: Reviewer Guide — 11 hands-on tasks, 6 of them fully offline.

Hot Right Now
The ABAP Debugger over RFC — Nothing Installed on the Server
The debugger needs one thing above all: a stable ABAP session.
attach_debuggee( ) returns an object reference, and step, stack, and variables
all hang off it — which is why a debug loop spread over independent HTTP calls
kept losing its debuggee. A pinned classic-RFC conversation is that session,
natively, with no ICF, no CSRF, and no WebSocket upgrade.
bashvsp rfc debug # one pinned session, held for the whole loop dbg> ebp ZADT_DEBUG_LOOP 9 # breakpoint, by object name — ADT resolves the URI dbg> eclipse 120 # listen, attach, stack — through SAP's own ADT resources dbg> elocals # the stopped frame's variables, with values dbg> estep over dbg> estack
The same six commands work in vsp adt debug, over HTTPS, against a system with
no gateway port. An integration test runs that script over both transports and
fails if they disagree about where the debuggee stopped or what it could see
(go test -tags=integration -run Conformance ./pkg/saprfc/).
From an MCP client the same loop is SetBreakpoint → DebuggerListen →
DebuggerGetVariables → DebuggerStep → DebuggerDetach. DebuggerListen
attaches for you: a debuggee is only attachable while it waits, so a caller that
has to copy an id between two tool calls loses the race.
Nothing is installed on the server for this. eclipse drives the very
resources Eclipse uses — /sap/bc/adt/debugger/listeners, /sap/bc/adt/debugger,
/sap/bc/adt/debugger/stack — tunnelled through SADT_REST_RFC_ENDPOINT. The
only reason a normal tool cannot use them is that ADT keeps the debug session in
an ABAP roll area, reachable again only through a sap-contextid cookie; over a
pinned RFC conversation the roll area is the session, so there is nothing to
correlate. You get ADT's own answers back: source URIs per stack frame, DYNP
screen frames, the authorization flags, the action catalogue — and SAP labels
the session RFC session: <instance> itself.
No RFC channel at all? Then use vsp adt debug: the identical loop over one
stateful HTTPS session. The debugger was never an RFC feature — listen, attach,
stack and step are ADT resources, and RFC was one way to carry them. What they
need is a session, and over HTTPS that is the stateful ICF session
sap-contextid selects. Verified against A4H over plain HTTPS, with a cookie or
a password and no gateway port in sight — which is the shape of every system
where you can sign on to ADT but nobody will give you an RFC user
(docs/design/http-only-systems.md).
Breakpoints need no ABAP either. POST /sap/bc/adt/debugger/breakpoints
answers 200 on both transports and writes the same ABDBG_EXTDBPS row a Z
facade would. One asymmetry is real: SAP answers the GET with 200 and an empty
body, because in ADT the breakpoint set is the IDE's state — Eclipse posts it
whole rather than asking. So a client keeps its own record, and adding one
breakpoint is a read-modify-write.
There is also a typed, smaller-payload path over a little ABAP facade
(abap/src/zadt_debug) for systems where the ADT
debugger resources are absent or blocked — and for the one thing ADT will not
answer, reading the server's own breakpoint table:
bashdbg> bp SAPLZADT_DEBUG/LZADT_DEBUGU01 9 # external breakpoint (name the include!) dbg> catch 150 # wait for a hit, attach, show the stack dbg> step over dbg> stack dbg> detach
Both paths are proven live on A4H: the breakpoint was hit by a function module
called over a second RFC connection, the stack showed the real entry chain
%_RFC_START → REMOTE_FUNCTION_CALL → the module, stepping walked it line by
line, and afterwards the debuggee ran on and committed its work.
Variables are read and written. elocals walks the debugger's variable
tree to the stopped frame's own data; eset LV_AMOUNT 900 puts a value back, and
the next statement computes with it — measured on A4H, a value that arrived from
the database as 46 became 901 downstream instead of 47. That turns the debugger
into a scenario harness: reaching a state by arranging for the system to produce
it is usually the hard part, and this skips it. It changes real execution,
database writes included, so it is not something to do in somebody else's session
without asking. eframe moves the cursor to another stack entry, so the caller's
half of a call boundary is readable too.
Customer code by default. A breakpoint set in a SAP standard program is
accepted, given an id, and then never fires: without system debugging there is
nowhere to stop. That is SAP's behaviour, not a filter of ours — esys turns it
on for the cases that need it. Staying out costs less than it sounds, because a
breakpoint on the line that calls a standard module captures what went in, and
one on the line after captures what came back.
It catches web requests. An external breakpoint fires for an ICF session just
as it does for RFC: a function module triggered through /sap/bc/soap/rfc over
plain HTTP was caught by a listener on an HTTPS debug session, with the whole web
stack visible — %_HTTP_START → HTTP_DISPATCH_REQUEST →
CL_HTTP_SERVER->EXECUTE_REQUEST → the SOAP handler → the module. An OData
request is that same path with the Gateway handler, so debugging one needs
nothing new.
The read half needs no ABAP either: vsp rfc debuggees, vsp rfc breakpoints
and vsp rfc watch read ABDBG_ACTIVATION and ABDBG_EXTDBPS directly — who is
parked in the debugger and where, short dumps included.
It is tested without a system. vsp adt debug --record captures a live
session to a cassette — every request and every answer — and the tests replay
it, so go test ./... drives the real debugger with no SAP, no RFC channel and
no Z code. The committed cassettes are real 7.58 sessions: catching a stopped
program, reading its stack, reading locals with their values, stepping into a
subroutine and back out, writing a variable, expanding a structure and a table,
and a statement-level trace. A recording is an oracle rather than a mock —
nobody writes the answers, so nobody can write them to match the code, which is
how four defects surfaced the first time it ran.
Because a cassette is taken from a live system, the recorder drops every header that carries a session and blanks the eight places a debug session names the application server, and a test re-checks the committed files on every run.
7.50 works too, and did not before. That release has no
/sap/bc/adt/debugger/stack: the listener caught a debuggee, the attach
succeeded, and the first stack read returned 404 — and since catching a debuggee
ends with a stack read, every catch was thrown away. It serves the same document
from the dispatcher instead. The shape is discovered once per session and
remembered.
AMDP debugging over plain ADT — the breakpoint fires
An AMDP method runs inside HANA, not inside ABAP, so debugging one means bridging two debuggers. ADT does that itself, and nothing has to be installed:
bashvsp adt debug -s a4h -c "astart; abp ZCL_MY_AMDP 41; aresume 12; astop" # and, while it waits, run the method from anywhere
SAP answers ON_BREAK with the position inside the SQLScript. This project
spent months concluding the opposite, through a Z service and a WebSocket
protocol built to reach what the system was already offering.
With values. alocals lists everything in scope — scope, type, and for a
table its handle and row count — and costs no request at all, because the stop
event already carries it. avar LV_I reads what a variable holds:
output ET_RESULT table[0] handle 3000001 input IV_COUNT INTEGER local LV_I INTEGER → LV_I INTEGER 1
Reading a variable is asynchronous and does not advertise it: the resource
answers 200 with an empty body and puts a request id in Location, which reads
exactly like a variable that is out of scope. The value arrives through the same
queue as everything else. Table contents are the one thing still missing — the
address is right and HANA refuses to build its data provider from it; see
AMDPTableRows for where it stands.
The trap is that answers arrive as a queue with acknowledgements at its
head. Resume once, see SYNC_BREAKPOINTS, and you conclude the breakpoint never
fired — while the debuggee is, at that moment, blocked on it. aresume waits
past them, and reports SAP's verdict on the way (state="VALID"), because a
refused breakpoint and a method that never ran look identical otherwise.
The whole choreography stays on one held session: the ADT resource keeps its handles in ABAP session memory, so a second connection finds nothing.
Reachable from an agent too: SAP(action="debug", target="AMDP_ADT_START").
Post-mortem: from a dump to what was logged around it
A debugger helps when you can reproduce the failure. Usually nobody can: there is a dump from Tuesday, a user who has moved on, and no way to make it happen again.
bashvsp -s a4h dumps --group # what keeps failing, not what failed once vsp -s a4h dumps --similar latest # what else looks like this one, and how closely vsp -s a4h dumps --explain latest --tolerance 10m # the why: message, failing line, stack, and the log around it vsp -s a4h applog --program ZCL_ORDER_POST # who logged what, and from where
--explain reads the one formatted document ST22 keeps and pulls the causal
detail out of it — no extra round trips. Before the stack it prints the message
the dump raised with its own variables (message SY 373 (type X) with -1), the
system fields that frame it (SUBRC, FDPOS, PFKEY, TITLE), and the source
line it died on with a line either side, the failing one marked. --json adds
a detail object with the full systemFields, source, and the runtime's
variables per stack frame — where a stale handle or an unresolved pointer
shows up as its value. So the answer to "why" is on screen, not reconstructed by
hand from the raw dump.
--group collapses dumps by runtime error and terminated program, which is
structural. Grouping by "the same afternoon" would make a busy hour look like
one incident.
--similar answers "is this new, and how often does it happen" on a ladder,
and says which rung each match is on:
| rung | claim |
|---|---|
| 1 | same error, same program, same line — the same bug |
| 2 | same error, same program — the same bug or its siblings |
| 3 | same error, same application component — a neighbourhood |
| 4 | same error — a class of failure |
Rungs 2 and 4 come free with the listing. Rungs 1 and 3 need the failing line
and the application component, which are in the dump detail and nowhere else,
so they cost one fetch per candidate — bounded by --deep, and skipped
entirely on a release that has the feed but not the detail resource. A rung is
an argument, not a verdict: rung 4 is the same class of failure and is not the
same bug, and the output says so on every row rather than in a footnote.
Two things the ladder refuses to do. Three different function groups on a live
system all terminate at SAPMSSY1 line 36, because that is where the RFC entry
point is — so the line alone is never rung 1 without the program. And custom
code is usually assigned to no application component, which is reported as no
neighbourhood rather than as one shared neighbourhood of everything unassigned.
--explain is the interesting one. Correlating a dump with the application log
is a time join, and a time join is where a tool starts lying — two things in the
same second is not causation. What rescues it is that a log entry records the
program that wrote it. So time is the filter and the program is the reason:
| rank | why |
|---|---|
| strongest | written by the program that dumped |
| written by a program on the dump's call stack — on the path by construction | |
| written by something a stack frame calls — where a bad value gets prepared (see below) | |
| same user, shortly before | |
| weakest | same user after the dump — error handling, not cause |
Every row states its own argument, because the argument is what lets a person overrule the ranking. A match is a candidate; "the cause" is not ours to say.
One rung does not fire yet, and the tool says so rather than leaving a gap that
looks like an answer: asking what a program calls needs
/sap/bc/adt/cai/callgraph, which is advertised on none of 7.50, 7.57 or 7.58
and answers 404. The ranking is right and only the source of callees is
missing; where-used over CROSS would supply it.
All of it over plain ADT — no RFC, no gateway, no Z code. SAP's own way into the
application log is the BAL_* function group, which cannot be called remotely
by any transport; the log's tables are ordinary tables, so free SQL reads them
instead — the headers from BALHDR, and with --messages the messages from
BALDAT, which is a cluster table and needs one more step:
bashvsp -s a4h applog --object ZDEMO_LOG --since 2026-09-01 --messages
2026-09-04 12:00:01 ZDEMO_LOG/POST log 22274 TESTUSER ZCL_DEMO_POST=================CP 000001 E ZDEMO_MSG 017 20260904100001.5909840 Order 4711 has no delivery block context ZDEMO_ORDER_KEY: 0000004711
Jobs and spool — SM37 and SP01 as tables
A night job failed. vsp jobs list --since shows it with its status, its
steps — program, variant, user — and the spool number each step wrote;
vsp spool read prints that spool, and vsp spool export writes every
matching request to a directory with an index of who wrote what, when, from
which job. All of it from TBTCO, TBTCP, TSP01 and TST03 over free SQL: the
spool content is the TemSe object decoded here — records, print controls,
the list format's escapes — checked line for line against what XBP returns.
Two things are not tables. The job log is a TemSe object most systems keep
in files, and so is spool on a system configured that way; both come over
RFC through XBP, which vsp jobs log and --via rfc do. On the MCP side:
job_list, job_log, spool_list, spool_read.
bashvsp -s a4h jobs list --program ZDEMO_NIGHTLY_RUN # every job with a step running it vsp -s a4h spool list --job ZDEMO_NIGHTLY --top 20 vsp -s a4h spool export --user TESTUSER --since 2026-09-01 --out ./spool
What is it set up to do — variants, test data, documentation, the IMG
The other half of a root cause is configuration, and it sits in tables too.
vsp variants reads a report variant as a table of fields with their labels,
kinds, types and values, from VARI and the program's selection texts; that is
what a job's step selected, without RS_VARIANT_CONTENTS. vsp fmtest reads
the Function Builder's saved test data from EUFUNC: every set's inputs, what
came back, the runtime, the interface as it was. vsp docs renders SE61
documentation as Markdown, includes resolved — data elements, reports,
function modules, classes, messages — and walks the IMG: docs img finds
activities and folders by their titles and gives the path to each, docs activity gives the transaction and the activity's own text. MCP: variants,
fm_test_data, documentation, img_search, img_activity.
bashvsp -s a4h variants ZDEMO_NIGHTLY_RUN # the variants, who made them, when vsp -s a4h variants ZDEMO_NIGHTLY_RUN MONTH_END --json vsp -s a4h fmtest STRING_CONCATENATE vsp -s a4h docs read DE BALLEVEL vsp -s a4h docs activity /IWBEP/CP_DELETE_JOB
Selection texts and text symbols, without leaving the call
A selection text is maintained in a screen three clicks from the code, and a
program created over MCP has none. vsp texts reads and writes the text pool
over ADT — selection texts (S) and headings (H) of a program, text symbols
(I) of a program or a class — and a write is a plan first: what is added,
what changes from what, what is already so, what is refused (a key the
screen does not have, a key SAP would reject, a text past 30 characters).
Nothing is locked when nothing differs.
bashvsp -s a4h texts get ZDEMO_RUN # S, I and H entries vsp -s a4h texts set ZDEMO_RUN P_DEVC="Package to scan" S_OBJ="Object names" vsp -s a4h texts set ZDEMO_RUN --kind I 001="Nothing found" vsp -s a4h texts set ZDEMO_RUN --dry-run P_DEVC="Package to scan" vsp -s a4h texts set CLAS ZCL_DEMO --kind I 001="Loaded" vsp -s a4h texts set ZDEMO_RUN --delete P_MODE # the entry a removed field left behind
The text elements are their own ADT resource with their own lock; the lock,
the write, the unlock and the activation happen in the one call. The
activation matters: the PUT lands as an inactive version, and activating the
program does not carry it — texts written without it read back unchanged
from the active version and look lost. MCP: i18n with op: texts_get /
op: texts_set, create PROGRAM takes a texts map, and after a program
is created or written the result says which screen fields still have no
text and which TEXT-xxx the source uses but never defines — with the call
that sets them.
The description, and the binary itself
The description is the short text SE38 shows as the title and prints at the
head of a list. Creating over ADT sets it once, from the file's header
comment when deploying — and SE38's own template put *& Report ZDEMO there,
which became the description of more than one program. The header line is
skipped now, and the text can be set later without touching the source:
bashvsp -s a4h description ZDEMO_XFER # what it is vsp -s a4h description ZDEMO_XFER "DPL snapshot transfer: download / upload / transplant" vsp -s a4h description CLAS ZCL_DEMO "Demo class" # PROG, INCL, CLAS, INTF, FUGR, FUNC, TABL, DDLS
MCP: edit with type: set_description, and a description on
deploy_from_file and write_program is written after the source.
A write with no transport named used to leave the choice to SAP, which
answered with a request of its own — Generated Request for Change
Recording — one per write, so a day's work on one feature ended up spread
over three requests beside the one already open. Now the write asks the
transport check what Eclipse's dialog asks it: which of your open requests
fit. The object's own request wins, then the one already holding objects of
the package, then the only candidate, then the newest; with none and
--enable-transports, one is created and the result says so. Every result
carries transport and, when the choice was made here, transportNote.
--transport-choice off (or SAP_TRANSPORT_CHOICE=off) restores the old
behaviour.
Merging requests, moving an entry is SE09's Utilities → Reorganize and
nothing in ADT — the organizer's resources add objects and release, none
removes an entry — and the function modules behind SE09 are not
remote-enabled. They are reachable through ZADT_VSP's CALL FUNCTION
bridge, which now takes JSON for structure and table parameters and turns
a dialog off when told to:
bashSAP_ENABLE_TRANSPORTS=true vsp -s a4h transport merge TR-A TR-B --into TR-C # tasks and objects move, sources are deleted SAP_ENABLE_TRANSPORTS=true vsp -s a4h transport move "PROG ZDEMO_RUN" --from TR-A --to TR-B
MCP: system with merge_transports (source, target) and
move_transport_object (object, from, to). Both need ZADT_VSP on the
system — redeploy it after this release, the bridge changed.
vsp update fetches the latest release for this platform, compares it with
the running version, verifies the download against the release's
checksums.txt, and puts it in place of the running binary — the old one is
renamed aside first, which is what Windows allows for a running executable.
bashvsp update --check # vsp 2.56.0, latest is 2.57.0: update available vsp update # download, verify, replace vsp update --version v2.55.0 --force # a particular release, newer or not
Cluster tables, decoded — BALDAT, INDX, STXL over plain ADT
BALDAT is one of a family: INDX, STXL, and every table an EXPORT ... TO DATABASE writes to. The rows are ordinary — a key, a sequence number, a byte
count and a RAW column — and ADT's data preview returns all of them. What
nothing on the SAP side does for a remote caller is turn the RAW column back
into data: it is an SAP-compressed data cluster, and only IMPORT reads it.
vsp cluster does it here. SAP's "LZH" turned out to be DEFLATE behind an
eight-byte header and a two-bit prefix, so the standard library inflates it;
"LZC" is compress(1) and is ~100 lines. The cluster itself carries a type
descriptor for every exported object — kind, length and decimals of every
field, nested for structures, a line type for a table inside a structure —
so the values come back typed: packed numbers as decimals, time stamps with
their microseconds, strings from their out-of-line segments, a table-typed
component as its rows. What it does not carry is field names. --layout
supplies them: a DDIC structure is read from DD03L, includes resolved, and
laid over the descriptor field by field — type family, byte length and
decimals checked at every leaf, so a structure that does not fit is refused
with the field named rather than guessed at. Two layouts are built in:
applog for BALDAT, and stxl for SAPscript text, which STXL gets by
default.
bashvsp cluster decode snapshot.bin --json # an EXPORT TO DATA BUFFER, downloaded, decoded offline vsp -s a4h cluster read INDX --where "relid = 'ZV'" --schema # every object, every field typed vsp -s a4h cluster read INDX --where "relid = 'ZD'" --layout ZDEMO_S_HEADER vsp -s a4h cluster read INDX --where "relid = 'ZD'" --layout "HDR=ZDEMO_S_HEADER,ITEMS=ZDEMO_S_ITEM" vsp -s a4h cluster read STXL --where "tdname = 'ZDEMO_TEXT'" # the text, lines and formats vsp -s a4h cluster read BALDAT --where "relid = 'AL' AND log_handle = '...'" --layout applog vsp cluster decode baldat.txt --layout applog # from an SE16H download, no system
The offline form is the one for a system where SE16H is all you have: export
BALHDR to find the log handles, export the matching BALDAT rows, decode them
on your machine. On the MCP side it is analyze type=cluster_read, and
application_log takes messages: true.
Verified against clusters written by a 7.58 kernel: every elementary type, compressed and not; DDIC-typed structures and tables; tables inside structures, tables inside table rows, sorted and hashed tables, tables of strings, bare strings — and against BALDAT from a 7.5x system. Version 5 clusters — what a pre-Unicode kernel wrote, and what old rows still are after a Unicode conversion — are read too, from EUFUNC and AQLDB. The same reader opens VARI (report variants, one object per parameter), LTDX (ALV layouts), MONI (workload statistics), SOC3 (SAPoffice documents), EUDB and STXL on sight, and EUFUNC gives the Function Builder's saved test data: every parameter by name, the result, the runtime, the return code.
vsp cluster decompress is the compression alone, for streams that are
not clusters — REPOSRC's source column, dumped to a file by a few lines of
ABAP, decompresses with --skip 1 --text.
Checked on 7.50, 7.57 and 7.58. 7.50 serves the dump feed but not the detail resource, so there is no call stack to read there — the correlation drops that rung and still ranks on the rest.
The MIME repository, byte-exact — SMW0 over plain ADT
Anything uploaded through SMW0 — a logo, a sound, a font, a PDF, a Z-machine game a websocket handler loads at runtime — is reachable, and comes back byte for byte.
It is not a column you can select. SMW0 writes the file into WWWDATA as an
INDX-style data cluster: LZH-compressed, split over as many rows as it takes,
and inside the cluster a table of fixed 255-byte lines. The last line is
padded with zeroes, so the cluster alone cannot say where the file ends. The
true length is the filesize parameter in WWWPARAMS, and truncating to it is
the whole difference between a file and a nearly-right file.
bashvsp -s a4h w3mi list # every MIME object with size and type vsp -s a4h w3mi list 'ZDEMO%' # SQL LIKE on the object id vsp -s a4h w3mi get ZDEMO_LOGO.PNG --out logo.png vsp -s a4h w3mi get ZDEMO_LOGO.PNG --abapgit-dir src/ # the abapGit pair, ready to commit
Both halves are ordinary table reads, so nothing goes on the server: no
abapGit, no RFC, no ZADT_VSP. --abapgit-dir writes the pair abapGit
expects — <name>.w3mi.data.<ext> plus <name>.w3mi.xml, with the object id
escaped the way abapGit escapes it (ZORK-MINI.Z3 → zork-mini%2ez3).
The filename parameter is deliberately not written into that XML, and a
test enforces it: it records the path the file was uploaded from — a user name,
a host, a directory layout — and these files are meant to be committable.
Where a wrong answer would look like a right one, it refuses instead of
guessing. A non-zero byte past filesize means filesize and the cluster
disagree; a cluster shorter than filesize means the object is truncated on
the system. Both say so rather than hand back a plausible file.
Verified on arithmetic that can fail. A 52216-byte game came out of 205 lines
of 255 = 52275, truncated to filesize, and the 59 discarded bytes were all
zero — then the file checked itself: a Z-machine v3 header declares its own
length at 0x1A and its checksum at 0x1C, and both matched what came out.
Two further extractions by different routes produced the identical md5. A
single bad byte anywhere would have broken the checksum.
What really ran: vsp trace
A static call graph is a hypothesis. ABAP resolves CALL FUNCTION lv_name,
PERFORM (f), CALL METHOD (m) and every RFC destination at runtime, so only a
measurement knows what a program actually called.
bashvsp trace run ZADT_DEBUG_LOOP --call # arm a SAT trace, fire it, print the tree vsp trace list # traces this system holds vsp trace tree <ID> --json # one JSON object per statement
SAT does the measuring and vsp reads the result, so it costs almost nothing and
runs against real workloads. The tree it produced for a two-statement module
already contains an edge no extraction would find:
PERFORM (ext) %_BEFORE_COMMIT → SAPMSSY0.
And the expensive half, for when the tree is not enough and you want the values:
bashvsp trace unit ZADT_DEBUG_LOOP --line 9 --call --values
anchors a breakpoint, waits for somebody to run the unit, then steps over its
statements — never descending into what it calls — and writes one JSON object per
stop. Against A4H that is the unit's whole data flow in seven records: line 9
with LV_LOW empty, line 14 with LV_LOW=44 once the SELECT had landed, line 15
with LV_COUNTER=45, then an exit marker. Values are redacted to «type:length»
unless --values is given, because a capture at a code boundary is business data
by construction.
It is a deliberate mode, and the numbers say why. A stop needs the step, the
stack and the variables — four round trips, since variables take two. Measured
on A4H over a LAN in August 2026 that is about 45ms a stop, some 1300 a minute.
/sap/bc/adt/debugger/batch takes them as one multipart document and works
through the tunnel: 14ms, some 4300 stops a minute on the same system. The
harness is pkg/saprfc/step_cost_test.go, behind the integration tag; the
numbers are one machine on one network, not a specification. Two other
measured limits shape it — SAP allows 30 external breakpoints per user, and
stepping past the end of a unit whose caller is standard code ends the debuggee
rather than stopping, which is why a recording ends with an explicit exit
record instead of an error.
The write-up, with everything that had to be learned on the way:
reports/debugger-over-rfc.md.
Classic RFC — Call Any Function Module, No SAP SDK
vsp now speaks classic RFC next to ADT, through the pure-Go, SDK-free open-rfc-go client — no NW RFC SDK, no native library, no cgo. Same system, second protocol: ADT reads and writes code, RFC calls the business logic.
bashvsp rfc info # RFC_SYSTEM_INFO (sysid, release, host) vsp rfc search 'BAPI_USER_*' # find RFC-enabled function modules vsp rfc describe STFC_STRUCTURE # FM interface as an MCP-tool JSON Schema vsp rfc call Z_DOUBLE '{"N":21}' # call any FM with JSON parameters vsp rfc read-table T000 --fields MANDT,MTEXT # RFC_READ_TABLE
The destination is derived from the system you already configured: host from the ADT
URL, system number from its port, gateway port 3300 + sysnr. Override per system in
.vsp.json (rfc_host, rfc_sysnr, rfc_port) or per command (--rfc-host,
--sysnr, --port). RFC logon uses rfc_user/rfc_password, else SAP_USER/
SAP_PASSWORD, else the system's own credentials.
In MCP it is one more action on the single SAP tool — the tool space stays as small
as it was:
SAP(action="rfc", params={"op":"info"}) SAP(action="rfc", target="Z_DOUBLE", params={"op":"call","args":{"N":21}}) SAP(action="rfc", target="STFC_CONNECTION") # describe (default with a target) SAP(action="rfc", target="T000", params={"op":"read_table","fields":["MANDT"],"top":5})
Types are handled end to end — scalars (incl. STRING/XSTRING, DATE/TIME, packed DEC/TIMESTAMP, FLOAT), flat and deep structures and tables (xRFC) — and both the classic and fast serializations on the wire.
And RFC does things ADT cannot:
bashvsp rfc probe # what is this system, and what may this user do here vsp rfc export ZPACKAGE -o pkg.zip # abapGit ZIP in one call vsp rfc run RSPARAM --wait 60 --spool # run a report as a background job, read its spool vsp rfc adt GET /sap/bc/adt/discovery # ADT REST tunnelled through RFC, for when ICF is closed vsp rfc debuggees # who is parked in the debugger, and where
And the debugger is only the hard case — potentially all of ADT rides RFC
SADT_REST_RFC_ENDPOINT takes a whole HTTP request, so any ADT resource is
reachable over the gateway port: source read and write, activation, ATC, unit
tests, transports, search, refactoring — the surface vsp already speaks, on a
system where ICF is closed, HTTPS terminates somewhere inconvenient, or CSRF and
cookies are a fight:
bashvsp rfc adt GET /sap/bc/adt/discovery # 200, 299 KB atomsvc vsp rfc adt GET /sap/bc/adt/programs/programs/RSUSR000/source/main vsp rfc adt POST /sap/bc/adt/atc/runs Content-Type=application/xml --body run.xml
Read paths are proven (discovery, program source with ETag/Last-Modified, a
missing object answering ADT's own 404 document). The write sequence has been
demonstrated by hand on A4H and is not yet covered by a test, so it is shown
here as a worked example rather than as a guarantee:
POST …/oo/classes/zcl_x?_action=LOCK&accessMode=MODIFY → 200, a lock handle PUT …/oo/classes/zcl_x/source/main?lockHandle=… → 200 ← a separate request POST …/oo/classes/zcl_x?_action=UNLOCK&lockHandle=… → 200 POST /sap/bc/adt/activation?method=activate → activated
An ADT lock is bound to an ABAP session — precisely what a short-lived HTTP
client cannot hold, which is why LOCK in one call and UPDATE_SOURCE in the
next fails with InvalidLockHandle, and why EditSource has to do everything
inside a single call. A pinned RFC conversation holds exactly that session, so
the handle is still valid on the next request.
And the class used for the test is one the HTTP client could not even lock:
it answers MODIFICATION_SUPPORT=NoModification, which is SAP saying "no
modification assistant needed here", not "read-only". So editing over RFC is not
merely equivalent to editing over HTTP — on that system it is strictly more
capable. (Order matters: activate after unlock, or the object's own ENQUEUE
answers 403 … is currently editing ….)
Package Analysis Suite
Five analysis commands that answer real questions about your ABAP packages:
bashvsp health --package '$ZDEV' # tests + ATC + boundaries + staleness vsp health --package '$ZDEV' --report html # full HTML report with details vsp slim '$ZDEV' --level methods # dead code detection (method-level) vsp api-surface '$ZDEV' --include-subpackages # Clean Core: which standard APIs do you use? vsp boundaries '$ZDEV' # directional boundary crossing analysis vsp boundaries '$ZDEV' --format mermaid # visual graph with package subgraphs
Transport & Change History
bashvsp changelog '$ZDEV' --since 20260101 # what changed in this package? vsp changes '$ZDEV' --attribute SAPTEST # group transports by CR attribute (E070A)
Directional Boundary Crossings
Not just "crossed" or "not crossed" — which direction the dependency flows:
| Direction | Meaning | Verdict |
|---|---|---|
| UPWARD | child → parent | OK |
| COMMON | anything → _00 package | OK |
| SIBLING | module → module | BAD — extract to common |
| DOWNWARD | parent → child | BAD — inverts hierarchy |
| EXTERNAL | cross-hierarchy | WARN — isolation violation |
| CIRCULAR | A→B + B→A siblings | BAD — coupled modules |
Export to 7 formats: text, json, md, mermaid, html, dot (Graphviz), plantuml, graphml (Gephi/yEd).
Side Effect & LUW Analysis
bashvsp -s dev effects ZCL_DEMO_ORDER # from SAP vsp effects --file ./local.abap # no system needed
LUW unsafe both commits and registers deferred work — part of what it queues is committed by each reads ZDEMO_ORDERS writes ZDEMO_ORDERS effects COMMIT WORK, IN UPDATE TASK
Also SAP(action="analyze", params={"type": "effects", ...}).
The interesting effects in ABAP are not database writes but LUW effects: a
unit calling IN UPDATE TASK has not written anything yet, and whoever calls
COMMIT WORK higher up triggers everything it queued. That is invisible
coupling, and nothing in SAP's toolchain reports it.
The analysis is local — it reads the unit's own source and nothing it calls — and every answer says so.
The parser detects transactional patterns in ABAP source:
| What | Detected |
|---|---|
| DB read/write | SELECT, INSERT, UPDATE, DELETE, MODIFY |
| LUW ownership | COMMIT WORK, ROLLBACK WORK |
| Deferred execution | IN UPDATE TASK, IN BACKGROUND TASK |
| Async | STARTING NEW TASK (aRFC), SUBMIT VIA JOB |
| External calls | RFC DESTINATION, HTTP client, APC/WebSocket |
| Transactions | CALL TRANSACTION, LEAVE TO TRANSACTION |
| Transformations | CALL TRANSFORMATION |
LUW classification: safe / participant / owner / unsafe.
Health Reports
Full health reports with test details, ATC findings, and boundary crossings:
bashvsp health --package '$ZDEV' --details # text with all details vsp health --package '$ZDEV' --report md # → _ZDEV.md vsp health --package '$ZDEV' --report html # → _ZDEV.html vsp health --package '$ZDEV' --report my.html # → my.html
Tests discover embedded local test classes across the full package hierarchy — the same as Eclipse Ctrl+Shift+F10.
More
vsp graph co-change CLAS ZCL_FOOfor transport-based co-change analysisvsp graph where-used-config ZKEKEKEfor heuristic TVARVC usage discovery.vsp.jsontransport_attributefor per-system CR correlation config- Analysis & Refactoring Guide for what these commands do
- Graph Guide for examples, data sources, and current limits
0x1D3 Stars!
Read the latest: The frontier went down a layer — since April: a rogue DIAG server a real SAP GUI draws from, the family's first SAP-LZH writer accepted by a live kernel, and the dump-RCA loop closing on itself. 467 stars, and still only 5% explored.
Earlier: Still Only 5% · VSP Is Only 5% Explored · Agentic ABAP at 100 Stars
What's New
The headline changes are in the "New in the last three releases" callout at the top of this README; the full version history is in CHANGELOG.md. Latest release: v2.57.0 — the dump's own why.
Hyperfocused Mode — 1 Tool to Rule Them All (Recommended)
Recommended for most setups. Single SAP(action, target, params) tool covers most of what the 151 individual tools do — gCTS, revision history and i18n still need --mode expert. The same tool is now registered in focused and expert too, so an agent in either can reach the analyze surface. Minimal token overhead, maximum capability.
SAP(action="read", target="CLAS ZCL_TRAVEL") SAP(action="edit", target="CLAS ZCL_TRAVEL", params={"source": "..."}) SAP(action="create", target="DEVC", params={"name": "$ZOZIK", "description": "New pkg"}) SAP(action="help", target="debug")
| Metric | Focused (100 tools) | Expert (151 tools) | Hyperfocused (1 tool) |
|---|---|---|---|
| MCP schema tokens | ~14,000 | ~40,000 | ~200 |
| Reduction | — | — | 99.5% |
All safety controls (--read-only, --allowed-ops, --allowed-packages) work identically — the universal tool routes through the same handler → ADT client → checkSafety() chain.
Thanks to Filipp Gnilyak for the hyperfocused mode concept.
Context Compression — Built-in ABAP Understanding
GetSource auto-appends a compressed dependency prologue — public API signatures of every referenced class, interface, and FM. One MCP call = source + full surrounding context.
How it works:
Compression by object type:
Ratios below are observed on real objects, not computed by a test — treat them as orders of magnitude. The 1x for interfaces is structural: an interface is already its own contract, so nothing is stripped.
| What | Keeps | Strips | Observed ratio |
|---|---|---|---|
| Class | CLASS DEFINITION + PUBLIC SECTION | Protected, Private, Implementation | 7–30x |
| Interface | Full INTERFACE...ENDINTERFACE | — | 1x (already compact) |
| Function Module | FUNCTION line + *" signature block | Body | 5–15x |
Real-world example — ZCL_ABAPGIT_ADT_LINK (abapGit codebase):
- 8 dependencies detected → 8 resolved, 0 failed
- Dependencies include:
ZIF_ABAPGIT_DEFINITIONS(massive interface),ZCX_ABAPGIT_EXCEPTION,CL_WB_OBJECT(14 methods),IF_ADT_URI_MAPPER(8 methods), etc. - All compressed to public signatures only — no implementation bodies, no private sections
Method-Level Surgery — Read and Edit Individual Methods
Why pull an entire 1000-line class when you only need one 30-line method?
# Read just the FACTORIAL method — not the whole class SAP(action="read", target="CLAS ZCL_CALCULATOR", params={"method": "FACTORIAL"}) # Edit just that method — vsp handles the rest SAP(action="edit", target="CLAS ZCL_CALCULATOR", params={ "method": "FACTORIAL", "source": " METHOD factorial.\n ...\n ENDMETHOD." })
What happens under the hood on edit:
The AI only sends/receives the method block (~30 lines). vsp fetches the full class internally, splices in the new method at the right line range, validates, and pushes back. 95% token reduction vs full-class round-trips.
Context compression scopes to the method too — when reading a single method, dependency analysis runs on that method's code only, so the prologue contains exactly the types and interfaces relevant to the method you're working on, not the entire class's dependency tree.
| Operation | Tokens (full class) | Tokens (method-level) | Savings |
|---|---|---|---|
| Read source | ~1,000 | ~50 | 20x |
| Read + context | ~1,600 | ~250 | 6x |
| Edit round-trip | ~2,000 | ~100 | 20x |
Built-in ABAP parser based on abaplint by Lars Hvam — the same parser that powers abaplint's 392 ABAP statement types.
Native Go ABAP Lexer — abaplint in Go
The abaplint lexer has been mechanically ported from TypeScript to native Go (pkg/abaplint). This is the same lexer that powers abaplint — 48 token types, all 6 lexer modes (normal, string, backtick, template, comment, pragma), with full whitespace-context encoding.
Verified via oracle-based differential testing against the real TypeScript abaplint:
=== DIFFERENTIAL KPI === Files: 29/29 passed (100.0%) Tokens: 22,612 total Full match: 22,612 (100.0%) — str + type + row + col Str match: 22,612 (100.0%) Type match: 22,612 (100.0%) Pos match: 22,612 (100.0%)
Zero dependencies, zero FFI. Pure Go, ~3.5M tokens/sec, ready for lint rules in Phase 2.
ABAP LSP — Real-Time Diagnostics
vsp lsp --stdio gives Claude Code (and other editors) automatic error detection and navigation for ABAP files. No explicit tool calls — the LSP pushes diagnostics as you type, debounced, and compressed dependency context on file open.
See LSP setup for configuration.
WASM-to-ABAP Compiler (Research)
Compile WebAssembly binaries to native ABAP — advanced prototype, verified on selected corpora. Three paths:
.wasm binary → pkg/wasmcomp (Go) → ABAP source files ← AOT compiler .ts source → pkg/ts2abap (Go) → clean OO ABAP classes ← direct transpiler .wasm binary → zcl_wasm_compiler → ABAP (on SAP itself!) ← self-hosting, 785 lines
Demonstrated on SAP A4H: QuickJS (1,410 functions) compiled to 101K lines ABAP. abaplint parser (26.5MB) compiled to 396K lines. Self-hosting compiler parses WASM, generates ABAP, and executes via GENERATE SUBROUTINE POOL — all within SAP. This is research/prototype work, not a production-ready toolchain.
| What | Size | Status |
|---|---|---|
| QuickJS → ABAP | 101K lines | Compiled |
| abaplint → ABAP | 396K lines | Compiled |
| abaplint lexer (TS→ABAP) | 495 lines | Running on SAP |
| Self-hosting compiler | 785 lines | Running on SAP |
| Batch deploy | vsp deploy *.clas.abap | 40 classes, 0 failures |
On main:
pkg/wasmcomp/andembedded/abap/wasm_compiler/. The original branchfeat/wasm-abapis kept for history. See reports/2026-03-20-001.
Full CLI Toolchain — SAP from the Terminal
35+ commands. No SAP GUI, no Eclipse, no IDE. Most work with standard ADT; lint/parse/compile work fully offline.
bash# Package analysis vsp health --package '$ZDEV' # tests + ATC + boundaries + staleness vsp health --package '$ZDEV' --report html # full HTML report vsp slim '$ZDEV' --level methods # dead code detection vsp api-surface '$ZDEV' --include-subpackages # Clean Core API inventory vsp boundaries '$ZDEV' --format mermaid # boundary crossings (visual) vsp boundaries '$ZDEV' --report dot # Graphviz export vsp changelog '$ZDEV' --since 20260101 # transport history vsp changes '$ZDEV' --attribute SAPTEST # CR-level grouping # Graph & dependencies vsp graph CLAS ZCL_FOO --direction callers # who uses this class? vsp graph co-change CLAS ZCL_FOO # transport-based co-change vsp graph where-used-config ZKEKEKE # TVARVC readers (heuristic) # Source & editing vsp source CLAS ZCL_MY_CLASS # read source vsp source CLAS ZCL_MY_CLASS --method GET_DATA # read single method vsp context CLAS ZCL_FOO --depth 2 # source + dependency contracts vsp analyze ZCL_MY_CLASS # 13 lint rules (offline) # Getting connected — before there is any config vsp detect sap.example.com # which port serves ADT, and the config to use vsp detect A4H --all # exhaustive sweep, by system id from SAP Logon vsp landscape list --probe # every system SAP Logon knows, and which answer vsp landscape import A4H --client 100 --write # turn one into a .vsp.json entry v




