Sap Get Screen Elements
sap_get_screen_elementsDiscover all elements on the current SAP screen to locate field IDs and filter results by element type or changeable fields.
Instructions
Discover all elements on the current SAP screen.
Useful for finding field IDs when working with a new screen.
Use type_filter and changeable_only to reduce response size on complex screens (e.g. type_filter="GuiTextField,GuiCTextField" to find only input fields).
Trees, ALV grids, text editors and HTML viewers report type GuiShell and a subtype (Tree, GridView, TextEdit, HTMLViewer, Toolbar, ...). type_filter finds them by their class (GuiTree, GuiGridView, ...), by the bare subtype, or all of them by GuiShell. They can sit deep (16 levels were seen): scan from container_id='wnd[0]' with a large max_depth such as 30, together with a type_filter.
max_depth controls how deep to recurse into containers (default 2). Use max_depth=1 for a quick overview, max_depth=3+ for deeply nested layouts (splitter containers, tab strips with sub-containers). When max_depth stopped inside containers that still have children, the response carries depth_limited (also when the result is empty): raise max_depth, or pass one of its examples as container_id.
Pass container_id='wnd[0]/mbar' to discover the menu bar structure.
Radio buttons and checkboxes report selected (true/false); a dropdown reports its selected key.
A table control (SM30-style) is ONE element here, not one per cell: use sap_read_table(columns_only=true) for its columns and cell_id templates. A classic list (report WRITE output, SE16 standard list, F4 hit list) is left out and reported under 'lists': read it with sap_read_list. expand_tables=true lists every visible cell of both (large).
Docking containers sit BESIDE the user area, not inside it: the dialog-structure tree of a view cluster (SM34, most IMG activities) and the SE80 tree are under 'wnd[0]/shellcont'. When the window has any, the response lists them as docking_containers; discover them with that id, or pass container_id='wnd[0]' (max_depth=1) for all top-level areas.
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": "sap_get_screen_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_depth | No | ||
| type_filter | No | ||
| container_id | No | wnd[0]/usr | |
| expand_tables | No | ||
| changeable_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||