'过去我在SAP中遍历过表,但是我无法弄清楚以下代码中的区别。
Dim Row_Numb
Dim i_col
Dim j_col
Dim k_col
Row_Numb = 0
i_col = 0
j_col = 1
k_col = 2
While items_in_class <> ""
i_col = CStr(i_col)
j_col = CStr(j_col)
k_col = CStr(k_col)
'Original line from Script recording. This works
'Cells(6, 3).Value = SapSession.FindById("wnd[0]/usr/tabsTABSTR/tabpMERK/ssubSUB:SAPLCLMO:0130/tblSAPLCLMOMERKMAL/txtRMCLM-SMERKB[1,1]").Text
'Replacing [1,1] with variables Row_Num and variable to iterate. It doesn't work
Cells(6, 3).Value = SapSession.FindById("wnd[0]/usr/tabsTABSTR/tabpMERK/ssubSUB:SAPLCLMO:0130/tblSAPLCLMOMERKMAL/txtRMCLM-SMERKB["&Row_Numb&"."&i_col&"]").Text