<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Logon to SAP System using SAPGUI Scripting in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861603#M388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ben and Jonathan for responding. I am still struggling with the openConnection method. Any example would help. If you happen to open SAPR/3 Session from scratch using this method and logon also, please provide some more information. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, thanks for the help.&lt;/P&gt;&lt;P&gt;_Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 May 2005 13:21:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-23T13:21:32Z</dc:date>
    <item>
      <title>Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaq-p/861600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to record, run and understand the SAPGUI Script when I am already loggedon the SAP System. Could anyone help me or provide me an example where I can  code the script to open a session and logon to SAP system (Using SAP Logon) and than execute the recorded transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;_M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2005 23:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaq-p/861600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-21T23:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861601#M386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not think it is possible to use eCATT SAPGUI to actually open the SAP logon pad and launch a new session, however, if you want to test roles and security you can use RFCs to logon to a specified system with a username and password.  There are other ways to test the login process but it really depends on what aspect of the system you are trying to test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 11:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861601#M386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T11:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861602#M387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The openConnection() method of the GuiApplication object will start a system "from scratch". You pass the name of an entry from your SAP Logon to it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 12:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861602#M387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T12:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861603#M388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ben and Jonathan for responding. I am still struggling with the openConnection method. Any example would help. If you happen to open SAPR/3 Session from scratch using this method and logon also, please provide some more information. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, thanks for the help.&lt;/P&gt;&lt;P&gt;_Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 13:21:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861603#M388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861604#M389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manojy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is a sample script. The first parameter is a description text from the SAPLogon dialog, the second sets the syncronous mode for OpenConnection. This means that the call will only return when a connection has been successfully made or the attempt has failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last three line set username and password, which you only need to do if you do not have Single Sign On.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example assumes that you already have saplogon.exe running. If this is not the case, than you can create a SAP GUI instance by calling &lt;/P&gt;&lt;P&gt;Set application = CreateObject("Sapgui.ScriptingCtrl.1")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set SapGui  = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;Set application = SapGui.GetScriptingEngine&lt;/P&gt;&lt;P&gt;Set connection = application.OpenConnection("XYZ [PUBLIC]", True)&lt;/P&gt;&lt;P&gt;Set Session = connection.children(0)&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/txtRSYST-BNAME").text = "MyUsername"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/pwdRSYST-BCODE").text = "MyPassword"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2005 05:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861604#M389</guid>
      <dc:creator>Christian_Cohrs1</dc:creator>
      <dc:date>2005-05-25T05:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861605#M390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to launch SAPGUI with a script. However the script block on below code lines&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Set SapGui = GetObject("SAPGUI")&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Set application = SapGui.GetScriptingEngine&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;and display the error message &amp;lt;&amp;lt;The enumerator of collection cannot find an element with the specified index.&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what is the issue and how to by-pass it? I have written several scripts and I always get the same message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards&lt;/P&gt;&lt;P&gt;Francois,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2005 11:41:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861605#M390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-05T11:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861606#M391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francois,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this sounds like the scripting profile parameter is not set. You can check this in transaction rz11, if you check the value of sapgui/user_scripting. This must be set to TRUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2005 14:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861606#M391</guid>
      <dc:creator>Christian_Cohrs1</dc:creator>
      <dc:date>2005-08-05T14:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861607#M392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am searching for a way to login through SAP GUI.  This post seemed like an answer to my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed you are using a session object to enter a username and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was attempting a similar way of logging in with the difference being that I open a connection using the SAP GUI. My understanding is that opening a connection using SAP GUI is the same as OpenConnection call in the script.  Then I attempt to enumerate sessions using scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that I get zero sessions.  Since there does not appear to be a way to get to user controls without a session, how can I enter username and password?  Why is there zero sessions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 20:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861607#M392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-24T20:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861608#M393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code works very well with Visual Basic 6. Do you know how it should looks like for VB.NET? VB.NET doesn&amp;#146;t accept fourth line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Session = connection.children(0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 08:58:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861608#M393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T08:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861609#M394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried using a VB script and even after logging in I get an error when trying to access sessions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;connection.Children(0) displays and error saying that is cannot find the index in the collection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2006 23:44:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861609#M394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-26T23:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861610#M395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason there were no sessions was because scripting was disabled on the server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Apr 2006 21:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861610#M395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-29T21:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Logon to SAP System using SAPGUI Scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861611#M396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been pretty successful doing this with an Excel macro to run various transactions.&amp;nbsp; Is this what you had in mind?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 01:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/logon-to-sap-system-using-sapgui-scripting/qaa-p/861611#M396</guid>
      <dc:creator>former_member709020</dc:creator>
      <dc:date>2013-06-18T01:08:45Z</dc:date>
    </item>
  </channel>
</rss>

