Session.findById("wnd/usr/tabsFUNC_TAB_STRIP/tabpTABLES").select
Session.findById("wnd/usr/tabsFUNC_TAB_STRIP/tabpCHANGE").select Session.findById("wnd/usr/tabsFUNC_TAB_STRIP/tabpEXPORT").select Session.findById("wnd/usr/tabsFUNC_TAB_STRIP/tabpIMPORT").select Session.findById("wnd/usr/tabsFUNC_TAB_STRIP/tabpHEADER").select Session.findById("wnd/usr/btnBUT3").press Session.findById("wnd/usr/ctxtRS38L-NAME").caretPosition = 14 Session.findById("wnd/usr/ctxtRS38L-NAME").text = "RFC_READ_TABLE" Here the script which automates the TAC SE37. Session.findById("wnd/usr/ctxtDATABROWSE-TABLENAME").caretPosition = 5 Session.findById("wnd/usr/ctxtDATABROWSE-TABLENAME").text = "TADIR" Set session = connection.Children(CLng(ses)) Last but not least a for loop that does the same thing over and over again, totally senseless. Then we have the standard sequence for establishing the connection to the session, with use of the passed arguments. First the connection and session number of the arguments are read. Here the script which automates the TAC SE16. Set session_SE37 = GetSession(connection, "SE37") '-Detects the session with TAC SE37 and calls an external script. Set session_SE16 = GetSession(connection, "SE16") '-Detects the session with TAC SE16 and calls an external script. Session.findById("wnd/tbar/okcd").text = "/oSE37" Session.findById("wnd/tbar/okcd").text = "/oSE16" '-Open different sessions with different TACs. If connection.DisabledByServer = True Then
'- Detects a session by transaction code (TAC) ObjShell.Run "YourScript." + TAC + ".vbs " + con_no + " " + ses_no Set objShell = Wscript.CreateObject("WScript.Shell") '-Extracts connection and session number. '- Starts external script with the connection and session numberĭim objShell, RegEx, Matches, con_no, ses_no Starts an external script with the connection and session number as parameters. Loops over all the sessions of the connection to detect the session with the transaction code and delivers the session object. After that the session object via GetSession is detected, based on the transaction code, and an external script is started via Action. Then two additional sessions are opened with different transaction codes, in our example the SE16 and SE37. VBScript is actually no longer recommended, but for the presentation of the basics here quite suitable.Ĭonnects the open session, just like the standard does. In this blog post one possible approach is shown.įor easier understanding I have created the example in VBScript. In this context it is worth to taking a look at the parallelization capabilities of the SAP GUI Scripting. The SAP GUI scripting, as an automation interface to the SAP GUI for Windows, is a basis for many RPA platforms.
To be able to process a higher amount of data in the same time, parallelization is a valid approach.