C# gui应用程序子项为空

C# gui应用程序子项为空,c#,sap,C#,Sap,我需要一些帮助来理解为什么GuiApplication的Children属性为空 我会这样做: var engine = SapRot.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, SapRot, null); var connection = (engine as GuiApplication).OpenConnection(connectionSt

我需要一些帮助来理解为什么GuiApplication的Children属性为空

我会这样做:

var engine = SapRot.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, SapRot, null);
var connection = (engine as GuiApplication).OpenConnection(connectionString);
var session = connection.Children.ElementAt(0) as GuiSession;
所有这些对象(引擎、连接和会话)都是我不太熟悉的共同对象和连接。子对象总是空的。但是,在运行应用程序时,我看到它确实连接到SAP登录和SAP应用程序

提前谢谢。

我发现了问题(是的,复数。两个不同的客户有两个问题)

在一个客户中,这是因为SAP服务器不允许脚本编写,您可以通过以下方法解决此问题

在另一个客户中,这是因为SAP版本。显然,SAP 6不支持像我的问题描述中那样编写脚本