I have a problem to assign the number of every line value of the material number from Excel file, code of VBA as below:
Dim m, n%
m = 2
n = 6
While Not IsEmpty(Cells(m, "B")) ‘loop, detect the not empty cell and assign the value into SAP
session.findById("wnd[0]/usr/sub:Z807SL00_P10_V2:0160/ctxt*RC29P-IDNRK[n,9]").Text = Cells(m, "B")
session.findById("wnd[0]/usr/sub:Z807SL00_P10_V2:0160/txt*RC29P-MENGE[n,29]").Text = Cells(m, "C")
m = m + 1
n = n + 2
Wend
But, the "n" will not work but an exact number, if so the loop will not possible.
Purpose: I want to assign the value from Excel into the BOM creation.
Very appreciate your answer!
The SAP GUI script with "n" doesn't work, is the data type is wrong? or SAP GUI script doesn't recognize it?