Skip to Content

Cycling through a table?

Sep 14, 2017 at 06:12 AM


avatar image

I am trying to create a macro within excel to copy over data (from the excel file) into the SAP table.

Using the script recording tool, I get the following to identify the first cell of the SAP table.


I pass my excel data through by equating that line with whatever cell I need.

I can cycle through my excel data with a for loop.

I do not know how to cycle through the SAP rows. If I change the first 0 above to a variable within my VBA code, I get an error when I try to execute the code.

How can I cycle through this? Or is there a way to paste a data array into SAP?

Any help would be appreciated. Apologize as I am new to this.

 For i = 2 To LastRow Step 1 

Op = Sheets("Output").Cells(i, "A") 

session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,0]").Text = Op 

y = y + 1  

Next i
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers