Mapping GridView controls
GridViews are dynamic components of SAP GUI that might wrap tables and toolbars. Keep in mind that a component is another name for controls or elements of an application. See details about general controls related to SAP on Introduction to controls and selectors in SAP automation.
GridView mapping starting on version 23.0.3 or up
Starting from version 23.0.3, IBM RPA Studio's recorder can map GridView elements and their inner elements.
You don't need to know how to manually edit selectors for these controls as in versions prior to 23.0.3. Use the recorder to automatically map controls from SAP applications and add commands to your scripts instead. For more information, see Recording desktop applications.
GridView mapping from versions prior to 23.0.3
GridView cells are the only element mapped by the recorder on versions prior to 23.0.3. If you want to use the recorder to map all GridView controls, consider upgrading to version 23.0.3.
The following samples show how you can edit a selector to handle GridView controls in IBM RPA:
wnd[0]/usr/cntlG_CONTAINER_SELECTION/shellcont/shell
When a GridView has toolbar buttons, you can make your bot click it by adding /<THE_BUTTON_ID>
at the end of the selector. For example:
wnd[0]/usr/cntlG_CONTAINER_SELECTION/shellcont/shell/&SORT_ASC
Some examples of IDs of toolbar buttons include: &SORT_ASC, &GRAPH, and REFRESH.
To make your bot interact with toolbar buttons inside a GridView, add /<BUTTON_ID> at the end of the GridView ID selector, replacing <BUTTON_ID> with the button's ID. For example:
wnd[0]/usr/cntlG_CONTAINER_SELECTION/shellcont/shell/&MB_EXPORT&XXL
To interact with a cell within the GridView control, add the cell position reference as /Cell(<ROW_INDEX>,<COLUMN_NAME>)
at the end of the GridView ID selector. For example:
wnd[0]/usr/cntlG_CONTAINER_SELECTION/shellcont/shell/Cell(2,EXAMPLE)