SAP VBA macro: import excel data to sap

Hey guys,

I am working with SAP and excel on daily basis. Part of the job is copy paste data frome excel to sap.

I've created macro that helps me to do that. The problem is macro copying pasting data only cel by cell.

I need to copy paste by 25 cells.

Any suggestions how can adjust my script so I can copy every 25 values and paste them?
Script is attached

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"
End If
 
Set xclapp = CreateObject("Excel.Application")
Set xclwbk = xclapp.Workbooks.Open("C:\.....\test.xlsm")
set xclsht = xclwbk.Sheets("Sheet1")
 
for i = 2 to xclapp.ActiveCell.SpecialCells(11).Row
 for j = 1 to xclapp.ActiveCell.SpecialCells(11).Column
  if j=1 then SKU =  xclsht.Cells(i,j).Value

 next

session.findById("wnd[0]").resizeWorkingPane 254,39,false
session.findById("wnd[0]/usr/tblSAPMV13GTCTRL_FAST_ENTRY/ctxtKOMGG-PMATN[0,0]").text = SKU
session.findById("wnd[0]/usr/tblSAPMV13GTCTRL_FAST_ENTRY/ctxtKOMGG-PMATN[0,0]").setFocus
session.findById("wnd[0]/usr/tblSAPMV13GTCTRL_FAST_ENTRY/ctxtKOMGG-PMATN[0,0]").caretPosition = 0
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]").sendVKey 11

  'Here follows the rest of the VBScript.
next
msgbox "All " & cstr(xclapp.ActiveCell.SpecialCells(11).Row - 1) & " Excel rows have been processed."
 
Set xclwbk = Nothing
Set xclsht = Nothing
xclapp.Quit
set xclapp = Nothing
SpiderHman ShlupsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Where would the 25 cells/values come from in the Excel worksheet and where would the y go in SAP?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.