cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing values in ALV grid with VB script

Former Member
0 Kudos

I have been using WSH to run VB scripts that access data in SAP screens. I have a need to get the values from an ALV grid and am having trouble. I use the function "Session.FindByID" to get values from most controls. However, I can't get that to work for the ALV grid. I found a function "getCellValue" but do not know the syntax to get it to work. Are there VBscripting examples on how to use the functions in the SAPGUI Scripting API?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Alan:

I don't use VBScript to interact with the GUI anymore, but the getCellValue functionfof the Grid control has the following signature:

getCellValue (ByVal row as Long, ByVal column as String) As String

Not sure if that helps but I tested it out using C# code and it worked fine.

You would use the FindById method to get a handle to the grid control and then use the getCellValue function of the object to return the value you are looking for.