Hello,
I started doing scripts to connect to SAP automatically and I wish to better understand Connection, Session, and Children.
How are they related to each others, counted, etc?
example with the classic begenning before connection:
'Connection--------------------------------------------
Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
Set SAPCon = SAPApp.OpenConnectionByConnectionString("/SAP_CODEPAGE=1100 /FULLMENU /M/peadbe0.eu.corp/S/3690/G/SAP_LAN /UPDOWNLOAD_CP=2", True)
Set Session = SAPCon.Children(0)
So it seems:
Upper level is the connection to a server. There can be multiple connection to same server by multiple users.
These users create always one session at minimum but can open parallel SAP windows to run parallel transaction for example. Hence they create more session.
Am I right? And then, what about the children? What means the "Set Session = SAPCon.Children(0)"?
Thanks for the help