new to SAP but have done some VBA programming.
I need to automate some things in SAP GUI using Excel VBA but I am starting with baby steps and getting stumped.
All I want to do is copy data from a column in SAP GUI (table already open) into an array. Sounds simple. However it starts off well, but never finishes properly. I have a table that has 306 rows. It has gotten stuck at 85, 127, and 178. Not sure if these values mean anything. What's even more puzzling to me is why does it return a value of 0000000127?? I've been looking for an answer for hours.
Running SAP Complex and Excel 2013. Cannot locate SAPfewse.ocx
either. I've enabled almost all references in VBA Developer window. Any help/ideas would be much appreciated! I'm hoping it is something obvious.
Set Table = Session.FindById("wnd[0]/usr/cntlDISASSEMBLY_ALV/shellcont/shell")
Dim rows As Long
Dim arrRow() As Variant
Dim colName As String
Dim rowCount As Double
rows = Table.rowCount - 1
ReDim arrRow(rows)
colName = "ZZMRO_CHA"
For j = 0 To rows
arrRow(j) = Table.GetCellValue(j, colName)
Next