'The following variables are set to define the SAP Client GUI as an object, enable the SAP Scripting Engine, define the SAP Connections, and Sessions to search through for the window title that matches the windowMatchString. Set SapGuiAuto = GetObject("SAPGUI") Set application = SapGuiAuto.GetScriptingEngine Set connection = application.Children(0) Set session = connection.Children(0) ' Retrieve the window title from the app plan as it runs windowMatchString = "Enter vendor invoice: Company code 1000" 'The following For Each Statement will cycle through all of the open SAP Client Windows 'and find the window that matches the windowMatchString variable and was last active. For Each Session in connection.Children If session.activeWindow.handle = FindWindow(windowMatchString) Then 'Pulls the document for the correct window that is active. 'found the matching session set window = session.activeWindow ' 'Define fields accepted from SAP 'Vendor Number set VendorNumber = application.findById("/app/con/ses/wnd/usr/ctxtINVFO-ACCNT") 'Vendor Name set VendorName = application.findById("/app/con/ses/wnd/usr/txtADRS-LINE0") 'Invoice Number set InvoiceNumber = application.findById("/app/con/ses/wnd/usr/txtINVFO-XBLNR") End If Next
|Disconnecting old WiFi and connecting to the new WiFi through scripting and GPO||8||56|
|If not exist vbs error||4||37|
|Enable Intel-VT on a IBM Yoga||7||30|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
6 Experts available now in Live!