Skip to Content
0
Jan 11, 2023 at 09:46 AM

Determine whether a row in a SAP GUI GridView is chosen.

79 Views Last edit Jan 17, 2023 at 05:39 PM 2 rev

I have a GridView in SAP GUI and want to check if a line is already selected or not.

The following code checks if the grid contains data. But I struggle with the check if a specific row is selected:

<code>Set objGRID1 = SAPSession.findById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell")

If objGRID1.RowCount = 0 Then
    MsgBox "Keine Daten vorhanden!!" & Chr(10) & "Makro wird beendet!", vbCritical
    End
End If

For dblZeile = 0 To objGRID1.RowCount - 1

????

Next dblZeile

Can somebody assist me with this?

best wishes Veera