Execute Data Query
execute_data_queryRun read-only ABAP SQL SELECT queries against dictionary tables or CDS views and return rows as an aligned text table or JSON; non-SELECT statements are rejected.
Instructions
Run one freestyle SELECT (ABAP SQL, as in the ADT data preview) against dictionary tables or CDS views and return the rows as an aligned text table or JSON. Statements containing INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, EXEC, EXECUTE, TRUNCATE or MERGE are rejected, and the query must start with SELECT. Use read_table_contents for a plain table read and describe_database_table to learn the field names. Needs data preview and table read authorization (S_TABU_DIS); returns at most maxRows rows.
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": {
"sql": "<sql>"
},
"name": "execute_data_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ABAP SQL SELECT statement starting with SELECT (e.g. SELECT matnr, mtart FROM mara WHERE mtart = 'FERT' UP TO 10 ROWS, or SELECT * FROM t001w). Table names are those of the ABAP dictionary. | |
| format | No | table (default): aligned text, cells cut at 50 characters. json: { columns, rows } with every value in full | |
| maxRows | No | Maximum rows to return (default: 100) | |
| connectionId | No | SAP system connection ID |