SAP: selector 'tableCol' no longer working

Hello, few days ago I could identify a single cell within SAP table with such selector:
<sap id='usr/SOMETABLE' tableRow='0' tableCol='2' />
But for some reason it is not working anymore, selector is not found.

Right now I have to specifically provide column name like this:
<sap colName='DEFAULT' id='usr/SOMETABLE' tableRow='0' />

But if I add to it tableCol then it breaks again:
<sap colName='DEFAULT' id='usr/SOMETABLE' tableRow='0' tableCol='2' />

Property tableCol is visible within UI Explorer but breaks the whole selector whenever used. Has somebody encountered similar issue?

Hi @loxyms,

In SAP there are 2 types of tables, grids and tables, and they look very similar but are totally different controls. For grids we generate and use selectors using colName and tableRow and for tables tableRow and colTooltip (but you can also use tableCol here).
From your selectors it seems that you are indicating in a grid.

To be 100% sure and on the same page, could you please indicate a cell in the table/grid using UiExplorer with the full selector visible?

Please be sure to also include in the screenshot the following element attributes (bottom left by default - Property Explorer): sapTransaction, type

Thank you and looking forward to your reply!


Hi @raduc,

It is a custom transaction so it won’t be helpful for you. But you are right it is a grid:
type = GuiGridView and id=usr/cntlGRID*. Yet I remember that I was checking the very same table before the weekend and it was working with tableCol, but maybe I remember wrong. Anyway, I understand all grids are showing tableCol attribute (like in the ss below) but it simply cannot be used in a selector. Is there any chance that it will be somehow improved in the future?

Also, basing on the info from Supported SAP WinGUI Elements ( I would understand that on tables we cannot scrap data (because for grids it is explicitly mentioned that scrapping works), but it seems to be working fine.

Scraping should work for both grids and tables and even text-based tables (ALV reports). See “Data Scraping” section from your link: Supported SAP WinGUI Elements

Regarding your screenshot, it seems there’s a bug in 22.10 and before that makes tableCol show in the selector attribute list. From 22.12 it is fixed.

Could you please clarify your use case for column index as opposed to column id? Column id is the most reliable way of identifying a column (and the reason we also introduced colTooltip for tables) because column order can change (columns can be rearranged by the user) and you will potentially get completely different data.
After I better understand your use case, I can discuss with @LevKushnir and we can take it into account.

Just the phrasing in this article is making it sound as if data scraping was available for grids but not tables. But maybe only I would understand it that way.
(data scraping is not mentioned above)

As to my use case: I want to have a generic activity to check if given row (indicated by tableRow) is visible on the screen. So I don’t care what is the name of the first column. Visibility attribute is not available for the whole row, only cell. I already did a workaround - scrap table’s first row to get column name and later use it to check visibility. I was also reading on the forum that some tables have attribute indicating how many rows is visible, but not my grids.

On a side note, unfortunately in my tested grids the first row which is not available is having visibility status as if it was visible. But I understand that this is purely SAP thing.

@LevKushnir Could you please check the wording @loxyms indicated?
@loxyms For your use case you can skip the colName altogether and you will get a selector to the row selection checkbox

Hi @loxyms

This is an SAP Standard table and I am not expecting you or even it is not prebuilt from SAP to extract data here. The table is suitable for ENTRY or EDIT of data. Therefore no Data Scrapting.

This is SAP GRID TABLE, suitable for Data Extraction and SAP is also a giving the option to extract data. Therefore Data Scraping supported.

Best regards, Lev

1 Like