SAP CodeJam Discussions
Visit the SAP CodeJam group to connect and collaborate with other CodeJam attendees, instructors, and experts. Join ongoing discussions and start your own.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cycling through a table?

Former Member
0 Kudos

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.

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

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
1 REPLY 1

abdel_dadouche
Active Contributor
0 Kudos

Hi,

Is your question related to the CodeJam program? You might want to update the associated tags to get your answer.

Regards