Sap Set Field
sap_set_fieldSet a single SAP form field by visible label, CSS selector, or element name and fill it with a specified value, without filling an entire form.
Instructions
Set a single SAP form field by label, CSS selector, or element name. Finds the field dynamically and fills it with the given value.
The label parameter can be:
Visible label text (e.g., 'Last Name', 'Nachname') — works on both backends
CSS selector (WebGUI, e.g., '#M0:46:1:1::0:21')
SAP GUI element name (Desktop, e.g., 'BUT000-NAME_LAST')
This is simpler than sap_fill_form for single fields.
Session parameter:
session=None (default): Uses primary session ("s1")
session="s2": Targets specific session (for parallel agents)
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": {
"label": "<label>",
"value": "<value>"
},
"name": "sap_set_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Field label text (e.g., 'Last Name'), CSS selector on WebGUI (e.g., '#M0:46:1:1::0:21'), or SAP GUI element name on Desktop (e.g., 'BUT000-NAME_LAST') | |
| value | Yes | Value to set in the field (for dropdowns: exact option text) | |
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| agent_id | No | Agent identifier for binding check. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if success=False | |
| label | No | Label or selector used to find the field | |
| popup | No | Present when a popup dialog is active on screen | |
| value | No | Value that was set | |
| success | No | Whether the operation succeeded | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| selector_used | No | CSS selector that matched the field | |
| available_options | No | For dropdown fields: list of valid options when requested value was not found |