Code modification (v0.6.0) — the headline
The gateway can now edit ABAP code, not just read it. Three endpoints for programs, classes and function modules ({type} = prog / class / func):
# AI-style editing: unique find-and-replace + activate
curl -X POST http://127.0.0.1:3000/api/objects/prog/ZMY_REPORT/replace \
-H "Content-Type: application/json" \
-d '{"old_string":"WRITE '\''old'\''.","new_string":"WRITE '\''new'\''."}'
# Full-source write
curl -X PUT http://127.0.0.1:3000/api/objects/class/ZCL_FOO/source \
-H "Content-Type: application/json" -d '{"source":"CLASS zcl_foo ..."}'
# Syntax check WITHOUT writing (source sent inline, nothing stored)
curl -X POST http://127.0.0.1:3000/api/objects/prog/ZMY_REPORT/syntax \
-H "Content-Type: application/json" -d '{"source":"REPORT z.\nWRITE 1."}'- The full ADT write sequence — stateful session → LOCK → PUT → UNLOCK → activate — runs inside one gateway request; the lock handle never crosses requests (ADT locks are bound to the ABAP session).
- Activation failure is a logical result: HTTP 200 with
activated.problems[]("Line N: text"), not a transport error. replaceenforces a unique match (0 or >1 hits → 400 with guidance);\r\n/\ndifferences are normalized. Function-module groups are resolved automatically.- Known ADT semantics documented: FM parameter blocks are metadata-owned (anchor edits in the function body); lock conflicts return 409 with SAP's own message.
- Robustness:
panic=abortremoved from the release profile — a panicking handler now only drops that connection instead of killing the process.
Structured ST22 dump analysis (v0.5.0)
GET /api/dumps— structured short-dump list (error type, terminated program, user, time, message, key) parsed from the ADT Atom feed.GET /api/dumps/grouped— dumps collapsed by (error type, program): what keeps failing, withlatest_keyplugging straight into the detail endpoint.GET /api/dumps/{key}/detail— one dump's header, termination point (include/line/procedure) and full call stack — a few KB of JSON instead of the 45KB–1MB raw ST22 text.GET /api/functions/{name}/source?prologue=true— source plus a dependency prologue: everyCALL FUNCTION 'X'target inlined as a compact signature block. One round trip = code + the contracts of what it calls.
Universal source reading (v0.5.1)
/api/functions/{name}/sourceand/api/programs/{name}/sourcenow fall back to ADT automatically when the RPY RFCs fail (e.g. FL 180Source wider than 72 char, common in modern ABAP). The response'ssource_viafield says which channel served it.
Also in this release
- Connection-pool fix:
RFC_INVALID_HANDLE(13)added to the discard list — a dead SAP-side session no longer poisons the pool (#d619a25). - Homepage (EN/中文) and AI docs (
/agents.md) updated with all new endpoints; AGENTS.md gained a "Code modification" chapter and new pitfalls (activation semantics, FM parameter block).
Full changelog: compare v0.4.11...v0.6.0