Sap Se16 Query
sap_se16_queryQuery SAP table data through SE16N Data Browser for complex dynamic filters or when ADT is unavailable.
Instructions
Query SAP table data via SE16N (Data Browser). If sap-adt is available, prefer its run_query tool for simple queries. USE THIS for complex queries with dynamic filtering or when ADT is unavailable.
Filters: If a filter cannot be applied (e.g. the field is unknown or not offered by SE16N), the call fails before running the query; the error lists the SE16N selection fields when they could be read. On the WebGUI backend a filter goes into the row whose technical name matches, and only the first ~30 rows of the selection grid are rendered, so a field further down a wide table cannot be filtered (the error says so).
Performance: ~7 rows/second due to pagination.
100 rows: ~14 seconds
500 rows: ~1.5 minutes
1000 rows: ~2.5 minutes
5000 rows: ~12 minutes
For large results, use output_file to write JSON to disk and receive a summary.
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": {
"table": "<table>"
},
"name": "sap_se16_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name to query (e.g., "MARA", "T000", "TSTC") | |
| filters | No | Optional filter dict {field_name: value} - uses technical field names. A field that is unknown or not offered by SE16N makes the call fail (both backends); on the WebGUI backend fields beyond the first ~30 selection rows cannot be reached. | |
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| agent_id | No | Agent identifier for binding check. Optional. | |
| max_hits | No | Maximum rows to return (default 100) | |
| output_file | No | If provided, write full results to this JSON file within the configured output directory (OUTPUT_DIR, default: current working directory) and return summary |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |