getObjectSource
Fetch ABAP object source code, specify active version to see live code, and page through large sources with startLine and maxLines.
Instructions
Retrieves source code for ABAP objects. ADT serves the INACTIVE version by default, so reading your own edit back proves nothing about what runs - pass version="active" to see the live code. For large objects, use startLine/maxLines to page through the source instead of retrieving it all at once.
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": {
"objectSourceUrl": "<objectSourceUrl>"
},
"name": "getObjectSource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Deprecated. JSON object of raw abap-adt-api source options, e.g. {"version":"active"}; prefer the version parameter. | |
| version | No | Which version to read: "active" (what the system executes), "inactive" (the working version, ADT default) or "workingArea". Omit for the ADT default. | |
| maxLines | No | Maximum number of lines to return from startLine. Omit to return the rest of the source. | |
| startLine | No | 1-based line number to start from (default 1). Use with maxLines to page through large sources. | |
| objectSourceUrl | Yes |