Sap Close Popup
sap_close_popupCloses an active SAP popup dialog by clicking a specified button, accesskey, or the X close button, so you can dismiss prompts and return to the main transaction screen.
Instructions
Close an active popup dialog by clicking a button. Use when active_window shows 'wnd[1]' or higher and you want to dismiss the dialog. Note: Not all popups need closing - if the popup is a form you need to fill, use sap_discover_fields and sap_fill_form instead (they automatically target the active window). Specify button by label ('Ja', 'Nein') or accesskey ('J', 'N'), or use close=True to click the X button if available.
Session parameter:
session=None (default): Uses primary session ("s1")
session="s2": Targets specific session (for parallel agents)
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_close_popup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| close | No | Click the X close button instead of a specific button | |
| button | No | Button label (e.g., 'Ja', 'Nein') or accesskey (e.g., 'J', 'N') | |
| 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 | |
| popup | No | Present when a popup dialog is active on screen | |
| success | No | Whether the operation succeeded | |
| popup_closed | No | Whether popup is now gone | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| button_clicked | No | Label of button that was clicked | |
| status_bar_type | No | Status bar message type after closing popup | none |
| status_bar_message | No | Status bar text after closing popup |