Repository navigation
Code Editing
stud0709 edited this page May 11, 2026
·
16 revisions
This set of tools enables the agent to effectively edit and syntax-check ABAP sources. The editing workflow:
- Fetch the file from SAP
- Edit and check syntax in a local file
- On write-enabled systems: push, activate. On read-only systems: the user is responsible for pushing the source to SAP
- Currently, the agent cannot create new artifacts, only change the source code of the existing once. It's on you to you to create an empty class, report, function ... first.
- Every code push is recorded in the internal version control system. You can diff the versions and restore them to SAP system whenever needed.

| Tool Name | Description |
|---|---|
sap_activate_object |
Activates an inactive ABAP object (draft) in the SAP backend. - Gate: Fails with WRITE_DISABLED if the user hasn't enabled writes. - Output: Automatically returns ABAP syntax errors via the chkl:messages payload if activation fails. - Schema: Uses standard object_name and object_type (or object_uri) for URI resolution. |
sap_ast_query |
Surgically locate structural node coordinates (Method, Form, Variable) using offline AST without loading massive payload dumps. |
sap_ast_replace |
Structurally mutates the AST by cleanly replacing or deleting specific node constructs without regex strings. |
sap_check_syntax |
Runs a native ADT syntax check matching Eclipse engine logic to validate ABAP code without saving. |
sap_diff_versions |
Compares two source versions of an SAP object and returns a unified diff. - Baseline: Set from_version=0 (or omit) to compare against the oldest fetched baseline. - Live Backend: Set to_version=-1 to compare the draft against the live SAP backend. |
sap_fetch_inactive_objects |
Fetches the list of all inactive objects currently held by the authenticated user from the SAP backend. |
sap_push_source |
Pushes local ABAP source code to the SAP backend as an inactive version. - Auto-Unlocks: The object lock is automatically released upon success. Do not call sap_unlock_source. - Errors: Fails with WRITE_DISABLED if the user hasn't enabled writes, or TRANSPORT_REQUIRED if a task number is missing. - Orchestration: Consult .agents/skills/sap-dev/references/SOURCE_PUSH_GUIDE.md for complex ETag collision recovery and ATC queue arrays. |
sap_scaffold_interface |
Orchestrates native AST-driven generation of a formatted implementation skeleton for any SAP Interface. Pings ADT's JSON logic engine offline. Provide the system_id, the source interface, and your destination definition. |
sap_simulate_snippet |
Accepts a raw, un-wrapped block of ABAP code, dynamically injects it into Z_AGENT_SANDBOX, and executes ADT syntax validation cleanly. |
sap_syntax_quick_fix |
Evaluates native SAP Syntax Quick Fixes for an offending source block. - Evaluation: Pass object_uri, code, and finding_uri to evaluate available fixes. - Extraction: Pass fix_index to retrieve the suggested replacement code snippet without mutating the backend. |