Write ABAP Object Source
write_abap_object_sourceWrite or update ABAP object source by locking the object, saving the code, verifying the write, and releasing the lock; optionally keep it locked for later activation.
Instructions
Write/update the source code of an ABAP object: locks, writes, reads back to verify, and releases the lock (keepLock: true to keep it). Give the code as source, or — for large sources — sourcePath, an absolute path to a local file under your home directory (UTF-8, at most 5 MB) that is sent as it is; exactly one of the two. The new source is the inactive version until abap_activate. Transport: a transport you pass is checked and used; an object already locked into a request uses it; createTransport: true creates a new one; otherwise the transport already used for this piece of work (workItem, else this session) is reused; otherwise exactly one open request is used, several are listed for you to choose, none offers creation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "write_abap_object_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ADT object URL (e.g. /sap/bc/adt/programs/programs/Z_MY_PROG) | |
| source | No | New ABAP source code to write. Give this or sourcePath, not both. | |
| keepLock | No | Keep the object locked after writing (default false). A kept lock belongs to this conversation and lasts until abap_activate, unlock_abap_object or the end of the conversation. | |
| workItem | No | Name of the piece of work (e.g. HPM, a ticket). Keeps using the same transport for it across calls and sessions until you pass another. | |
| sourceUrl | No | ADT source URL — defaults to <url>/source/main | |
| transport | No | Workbench request to record into. Checked before use; becomes the transport for this piece of work. | |
| sourcePath | No | Absolute path of a local file under your home directory holding the new source (UTF-8, at most 5 MB) — read instead of source, so large sources need not pass through the conversation. Give this or source, not both. | |
| connectionId | No | SAP system connection ID | |
| createTransport | No | Create a NEW Workbench request (only when you mean it; existing requests are preferred). |