cancel
Showing results for 
Search instead for 
Did you mean: 

Sap GUI Scripting - How to get text from selected cell in a table?

Former Member
0 Kudos

I am a newbie to Sap GUI Scripting,

I am trying to get the text from a selected cell in a sap table.

For example u201Cwnd[0]/usr/tblZ_CIC0_SEARCHCTRL/txt[0,1]u201D .

The table will have a number of entries but I only need the information in the one cell that is selected. I will not know ahead of time which cell the customer will select.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_brutigam2
Active Participant
0 Kudos

Hi,

IN that case you first have to let the Macro know when the User has selected the Cell-

in SAP you dont have any events like Clicked or Selected-

If that is no problem you can get the "Address" of the Cell if you call


adress = session.findbyId("wnd[0]/usr/tblZ_CIC0_SEARCHCTRL").SelectedCells
'and then you can get the Value
msgbox session.findbyId("wnd[o]/usr/tblZ_CIC0_SEARCHCTRL/" & Cstr(adress) & ").Text

If there is another table you have to replace the "tblZ..." too ...

Regards

Thomas Br