I am trying to write a script which posts invoices in SAP through Excel (fairly new to this), and am running into the following error:
The control could not be found by id
The error is coming up at the below line:
session.FindById("wnd[0]/usr/subITEMS:SAPLFSKB:0100/tblSAPLFSKBTABLE/ctxtACGL_ITEM-HKONT[1,w_counter]").Text = w_glacc
Here, I am trying to pass the GL account number in the first row. There can be multiple rows, so I was hoping that instead of passing ctxtACGL_ITEM-HKONT[1,0]").Text
, ctxtACGL_ITEM-HKONT[1,1]").Text
etc. I wanted to initialize a counter and pass that value into this method.
Is there any way this can be achieved?