on 04-02-2018 12:36 PM
I am trying to use standard sample to get active session:
SapROTWr.CSapROTWrapper sapROT = new SapROTWr.CSapROTWrapper();
object objSapGui = sapROT.GetROTEntry("SAPGUI");
object objEngine = objSapGui.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, objSapGui, null);
SapGuiApp = objEngine as GuiApplication;
var sapconnections = SapGuiApp?.Connections
.Cast<GuiConnection>().ToList();
I can get connection, but see that sapconnections.FirstOrDefault().Sessions.Count or sapconnections.FirstOrDefault().Children.Count equals to 0.
Even if I am loggined in and can see window:
PS: probably session information is getting lost after Cast<GuiConnection>()
Seems that scripting was disabled on server side. Now session is getting catched. Strange. I was sure that I have enabled scripting on server side. May be also permission to record scripts was also required(?) - i have set this time this permission to true also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.