Sap Read Table
sap_read_tableRead rows from the current SAP screen table, auto-detect ALV grid or TableControl, and return column metadata or paginated data for follow-up actions.
Instructions
Read rows from a table on the current screen — ALV grid (report/list output) or TableControl (SM30 maintenance view, customizing screens).
Auto-detects the table type. The response includes a 'table_type' field ('GuiGridView' for ALV or 'GuiTableControl') so you know which type-specific tools to use next (e.g., sap_get_alv_toolbar for ALV, sap_scroll_table_control for TableControl).
Use columns_only=true for schema discovery (returns column metadata only, no data). For a TableControl it also gives each column's cell_type and a cell_id template ({row} = zero-based visible row) for sap_set_batch_fields. Use columns to fetch only specific columns (CSV). Use start_row to paginate through large tables. On a TableControl a start_row (0 included) scrolls there first; without one the read starts where the table is scrolled now (e.g. after Position...). first_visible_row says which row is on top.
A TableControl read returns at most the visible rows: page with start_row=next_start_row while has_more is true. start_row_note explains a clamped or failed scroll. total_rows counts its empty lines too (SM30 pads the view). When the read reaches the first empty row, the response has empty_rows_from, that row's absolute index: the data ends there.
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_id": "<table_id>"
},
"name": "sap_read_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | No | ||
| max_rows | No | ||
| table_id | Yes | ||
| start_row | No | ||
| columns_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||