sap_get_screen_info
Retrieve the current SAP GUI screen details, including transaction, program, screen number, active window, and status bar message, to confirm what the user sees and detect popups after actions.
Instructions
Get current SAP screen info: transaction, program, screen number, window title, and status bar message (success/error/warning text).
Reads from session.ActiveWindow so the response always reflects
what the user sees. The active_window field tells you which
window is in focus (e.g. wnd[0] for the main screen, wnd[1]
for a popup). The title comes from the active window.
Every action tool (press_button, send_key, select_menu, etc.) returns this same screen info, so you always know when a popup appears. Use sap_get_popup_window for full popup content (texts, buttons).
Present only when true: message_has_long_text (sap_press_button on 'wnd[0]/sbar' opens it) and message_as_popup (the message also sits in a popup that must be closed first).
Present only when set: subscreens, the sub-screens on the active window as "program:dynnr", outer first (program / screen_number name only the main screen, so an RF step, a tab page or a detail area that changes shows only here), and cursor, the ID of the field the cursor is in. A screen redisplayed without a message, e.g. for an empty required field, still moves the cursor to that field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||