I want to read a cell value on a table - example on transaction C202 below.
I can use SAP GUI Scripting Recorder to "check"
or "select"
(row = 5, column = 1)
, which is next to "0122"
and (row = 5, column = 1)
, which is next to "0125"
.
It gives me a simple code:
''' selects 0122
session.findById("wnd[0]/usr/tabsTABSTRIP_RECIPE/tabpVOUE/ssubSUBSCREEN_RECIPE:SAPLCPDI:4401/tblSAPLCPDITCTRL_4401").getAbsoluteRow(4).selected = true
'''selects 0125
session.findById("wnd[0]/usr/tabsTABSTRIP_RECIPE/tabpVOUE/ssubSUBSCREEN_RECIPE:SAPLCPDI:4401/tblSAPLCPDITCTRL_4401").getAbsoluteRow(7).selected = true
However, it varies the rows available.
Sometimes there will be :
0100, 0110, 0120, 0121, 0122, 0123, 0124, 0125, 0130, 0140
-sometimes there will be 0100, 0110, 0122, 0123, 0124, 0125, 0140
-sometimes there will be 0100, 0121, 0122, 0123, 0124, 0125, 0140
-sometimes there will be 0100, 0122, 0123, 0125, 0130, 0140
etc
I want to read column = 2 so I know if it's 0122 or 0125 and then check them.
How could I put this value inside a variable and use msgbox to display it?
PSEUDO CODE
dim readVariable as string
for row = 1 to NumberOfRows
readVariable = Table.Read (row,2)
if readVariable = 0122
msgbox "row = " & row " & " is 0122"
end if
if readVariable = 0125
msgbox "row = " & row " & " is 0125"
end if
next
I tried following Link but I can't get it to work.
Thanks a lot!!!