admin管理员组文章数量:1122832
I am using C# code to automate a task in SAP.
The SAP Logon 770
installed provides a list of systems that I can logon to.
When I double click on any system, SAP will detect my login id and try to log me in without a password. If I want to provide a different credentials, I have to right-click the system and choose (SNC Logon Without Single Sign-On Shift-Enter
). There I am allowed to type a user id, and password.
The code below almost works except that it defaults to the Single Sign-On option, which does not allow me to provide the password, failing the login process.
using SAPFEWSELib;
GuiApplication app = new GuiApplication();
GuiConnection conn = app.OpenConnection("01. SYSTEM DESC. HERE", true);
GuiSession session = (GuiSession)conn.Sessions.Item(0);
// this works fine
GuiTextField user = (GuiTextField)session
.ActiveWindow
.FindByName("RSYST-BNAME", "GuiTextField");
// the following line causes an exception, since the password field is not found
// it is only found on the non-single-sign-on screen
GuiTextField passwd = (GuiTextField)session
.ActiveWindow
.FindByName("RSYST-BCODE", "GuiPasswordField");
How can I tell SAP Gui Scripting to open a Non-Single-Sign-On logon screen? Or better yet, How can access an already existing session that has been signed on?
I tried the following but none worked for me:
GuiConnection conn = (GuiConnection)app.Connections.Item(0);
本文标签: cHow can I create a nonSingleSignOn SAP GUI sessionStack Overflow
版权声明:本文标题:c# - How can I create a non-Single-Sign-On SAP GUI session? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311767a1934856.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论