SAP GUI Java GetCellValue

Viewed 16

For one of my project, we are migrating SAP VBScript into java code.

The script will extract SAP GUI grid and preform some tasks for each rows.

The method bellow is how Retrieve a cell value from the grid. Regarding the documentation, the method GetCellValue expecting a long and a string.

Regarding what I have in the library, the method Invoke which is needed to call SAP GUI methods does not support String Long String as parameters...

Do you have any idea how to manage this case?

enter image description here

I tested with the 4th invoke possible which expect String, String, Int. It's not working..

1 Answers

To fix this issue, the last invoke prototype need to be used.

One variant have to be created for each parameters and variants can all be send like this :

Variant a = new Variant();
a.putLong(i);
Variant b = new Variant();
b.putString(plannedOrderQtyId);
String plannedOrderQty = gridView.invoke("GetCellValue", a, b).getString();
Related