Read Table Contents
read_table_contentsRead rows from one ABAP dictionary table or view, optionally filtered by a WHERE clause and capped by maxRows, for quick table data inspection.
Instructions
Read the rows of one ABAP dictionary table or view by name, optionally filtered with a WHERE clause, up to maxRows. Use it for a quick look at one table; use execute_data_query for joins, selected columns, aggregates or ORDER BY, describe_database_table for the field list, and customizing_read for a customizing table filtered on one key field. Read-only. The optional whereClause filter requires the ADT Data Preview service (SICF node /sap/bc/adt/datapreview, SAP_BASIS ≥ 7.40 SP08) to be active. If whereClause returns an error, use execute_data_query with a full SELECT ... WHERE ... UP TO n ROWS statement instead — that uses a different ADT endpoint and works on all supported SAP versions.
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": {
"tableName": "<tableName>"
},
"name": "read_table_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxRows | No | Maximum rows (default: 100) | |
| tableName | Yes | ABAP table or view name (e.g. MARA, EKPO, Z_MY_TABLE) | |
| whereClause | No | Optional WHERE clause without the WHERE keyword (e.g. MATNR LIKE 'Z%'). Requires SICF /sap/bc/adt/datapreview to be active — use execute_data_query if this fails. | |
| connectionId | No | SAP system connection ID |