Skip to main content

Get selected item

Read what is selected in a drop-down list, tab strip, tree or grid.

Command in the SAP GUI toolkit · id ooa.sap/get_selected_item · 3 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
IDStringYesScripting id from the SAP script recorder, e.g. wnd[0]/usr/ctxtVBAK-AUART.
ConnectionNumberNo0SAP connection number (0 = first open system).
SessionNumberNo0Session (window) number within the connection (0 = first).

Outputs​

OutputTypeWhat it is
keyStringKey of the entry, id of the tab, node key, or the selected grid rows (e.g. 0,3-5).
textStringDisplayed text of the selection.
indexNumber0-based position of the entry or tab; -1 when it does not apply.