Run ABAP Class (Console)
abap_run_classExecutes an active ABAP class implementing IF_OO_ADT_CLASSRUN and returns its MAIN method's console output; use runId to collect output from long-running runs.
Instructions
Run a class that implements IF_OO_ADT_CLASSRUN (ADT's 'Run as ABAP Application (Console)') and return what its MAIN method wrote to OUT. Runs the class's current active version, in a session of its own. The class decides what happens — it can post documents and commit — so read it before running it. Never retried automatically after a lost session. A run that takes longer than waitSeconds keeps running in SAP and answers with a runId: call again with runId to wait for it and get the output.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "abap_run_class"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | Collect a run that was still going (from an earlier answer) instead of starting one. | |
| className | No | Class name, e.g. ZCL_MY_RUNNER. Must implement IF_OO_ADT_CLASSRUN and be active. Starts a new run. | |
| waitSeconds | No | How long this call waits for the run to finish (default 25, max 40); the run itself keeps going. | |
| connectionId | No | SAP system connection ID |