SAP Scripting Help needed!

Cime14

New Member
Joined
Dec 19, 2017
Messages
30
Hello!

I need to copy data from Excel (Column A, Rows are dynamic) to SAP and use it as variable.
How can I replace fixed variable e.g. "10S1.21.02.40.01" with dynamic and make sure all active rows in Column A will be used in SAP (data need to be extracted)?

VBA Code:
session.findById("wnd[0]").resizeWorkingPane 133,39,false
session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell").selectedNode = "F00053"
session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell").doubleClickNode "F00053"
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").text = [B]"10S1.21.02.40.01"[/B]
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").setFocus
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").caretPosition = 16
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").text = [B]"20S1.20.66.08.01"[/B]
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").setFocus
session.findById("wnd[0]/usr/ctxt*PRPS-POSID").caretPosition = 16
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/tbar[0]/btn[3]").press
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,500
Messages
6,131,016
Members
449,615
Latest member
Nic0la

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top