I use a VBScript exit in my InputScript in order to read values from a grid control. How do I get the column names of the grid control?  I need them in order to write the VBScript code.

Activate the SAP GUI script recorder. Then enlarge the column in the grid control a little bit. Save the generated .vbs file. In this file; you will find a command, e.g.:

session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").setColumnWidth "GSTRP",16

The column name is, in this case, "GSTRP", and you can use it in VBScript:

getCellValue(i,"GSTRP")