<?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: Excel VBA Single Sign On script in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678675#M151007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update - I've attempted to use the NwbcPropertyCollector.exe tool to read the field, but it doesn't recognize the SAP Logon Launcher as a valid session.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2016 15:17:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-05-26T15:17:30Z</dc:date>
    <item>
      <title>Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaq-p/11678672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been searching these forums with not much luck - most scripts seem to be using a form of connection with SAP that involves hard coding one's username and password, either into the excel spreadsheet or into the VBA itself. I'm trying to find some sort of way to utilize the "SAP Logon 740" launcher that is prompting me to input an environment (think "PRD" or "QRA"), which will then either automatically roll out the SAP session if only one client exists for that environment, or prompt another selection for the client within an SAP session. As this second step is inside an active SAP session, I've been able to record and run a script to select the proper client. I just need to be able to utilize single sign on from the launcher to kick off a session for a given environment - it's really just highlighting one text search field and inputing a passed string variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/955715" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Launching the application isn't a problem, but since I cannot figure out a way to record a macro with the launcher itself I can't get from point A (launching the application) to point C (being able to execute my macros). Point B, navigating to the proper environment/client, is not something I'm able to find good logic for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your help experts - this is important as our sessions seem to get bogged down after running macros for 40-50 iterations. Whether that's due to behind the scenes transaction tracking or something else, we find that refreshing the session manually every 10-15 minutes significantly speeds up our net processing. We're hoping to automate this refreshing process so this will be a large upgrade to our overall macro performance. Appreciate urgent guidance on this and I will do my best to be timely in my response to assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 21:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaq-p/11678672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-18T21:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678673#M151005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome to the forum. The problems with the speed during the execution of macros come very familiar to me. We do not work with single sign on. Therefore, coming from me only a suggestion of how to realize it. Please see this link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="3270803" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="error while logging to sap through excel" href="https://community.sap.com/" modifiedtitle="true" title="error while logging to sap through excel"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following commands, you can ignore likely:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "myMandant"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "myName"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "myPW"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;session.findById("wnd[0]").sendVKey 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 12:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678673#M151005</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2016-05-25T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678674#M151006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Script Man,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found that thread in previous searching, but it never resolved the problem. I can get it to launch my SAP Logon but never get it to select an environment to connect to. I receive the following when I attempt to appropriate your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/962077" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I think what I need is a way to determine how to insert a string into this field and send a carriage return - that's it. One of your commented lines of code, such as session.findByID("wnd[0]/usr/txtRSYST-LANGU").Text = "EN" for example. If I could figure out what the ID is for the below field I could get this thing to do what I need it to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/962099" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The issue being I have no idea how to identify what that points to, as I can't run a script recording from this window and I've been completely reliant on that tool up until now. Nor does using F1 seem to return any viable information on the field name like it would inside the SAP GUI normally. Do you know of a way to find out how to reference that input field for a string insert?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 15:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678674#M151006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-26T15:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678675#M151007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update - I've attempted to use the NwbcPropertyCollector.exe tool to read the field, but it doesn't recognize the SAP Logon Launcher as a valid session.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 15:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678675#M151007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-26T15:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678676#M151008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about the following system name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set Connection = SAP_applic.openconnection("Prod Systems Single Sign On")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 16:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678676#M151008</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2016-05-26T16:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678677#M151009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ScriptMan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No luck, but thanks for your continued attempts to help. I tried to send the enter key via Excel VBA with the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application.SendKeys ("{ENTER}")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While the SAP Logon screen was activated with PRD selected manually - to see if it would even accept an input. Do we know if the SAP Logon launcher even has an Interface that Excel can talk to? Or are we attempting to use a different function with your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 17:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678677#M151009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-26T17:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678678#M151010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I said I have no experience with SSO. But if you feel like it, you can view the following links. Maybe this can give you an important suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="3763970" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="Using VBScript for Automated Login to SAP" href="https://community.sap.com/" modifiedtitle="true" title="Using VBScript for Automated Login to SAP"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://scn.sap.com/thread/3215701" title="https://scn.sap.com/thread/3215701"&gt;Connect via RFC from VB with SSO | SCN&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="2142369" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="Logon to SESSION MANAGER in SAP with VBA" href="https://community.sap.com/" modifiedtitle="true" title="Logon to SESSION MANAGER in SAP with VBA"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/37236396/vba-excel-sso-to-sap-runtime-error-70-access-denied/37372388#37372388" title="http://stackoverflow.com/questions/37236396/vba-excel-sso-to-sap-runtime-error-70-access-denied/37372388#37372388"&gt;http://stackoverflow.com/questions/37236396/vba-excel-sso-to-sap-runtime-error-70-access-denied/37372388#37372388&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My recommendation: Do not continue please the way through the SendKeys method. This will not lead to the goal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 05:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678678#M151010</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2016-05-27T05:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678679#M151011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hi there,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I've been searching pretty extensively this morning and this is among the related posts I have found.&amp;nbsp; Last night we upgraded our SAP GUI from 7.20 (I think, not sure of the version etc.) to 7.40 (7400.2.7.1112, running on Windows 7 Enterprise 6.1 (7601)).&amp;nbsp; Prior to last night, I had an Excel sheet that ran a VB script every night on a timer that connected to SAP, copied some data to a sheet, then closed and wait for the next night to run again.&amp;nbsp; Since the update, it no longer works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The basic part of the script that (used to) make the connection to SAP is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Sub SAP_Connect_basic()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;If Not IsObject(SAPguiApp) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;If Not IsObject(Connection) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Connection = SAPguiApp.OpenConnection("&amp;lt;text string in Logon pad describing the connection&amp;gt;", True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;If Not IsObject(Session) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Session = Connection.Children(0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 45px; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;If you run the script once, you get popup from MS Visual Basic:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run-time error '1000':&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SAP Logon connection entry not found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;If you terminate it and run it a second time, you get a new error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run-time error '601':&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sapgui cannot be initialized.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I’m not sure what is happening, it was working fine until the update (we are using SSO, so no need for userID or password), the ONLY change I can see is a change in the text description of the connection in the “System Connection Parameters” box, but I have tried both the “new” and “old” descriptions and both produce the same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I’m stumped!&amp;nbsp; We use this data top provide some performance metrics, I’m hesitant to go back to the “old” way of doing it (via manual dumps to Excel) as it is time consuming and inefficient.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Any help would be greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Mark&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;PS we are running MS Office Professional Plus 2010, in case that matters.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 18:05:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678679#M151011</guid>
      <dc:creator>markhamlyn</dc:creator>
      <dc:date>2016-07-28T18:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Single Sign On script</title>
      <link>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678680#M151012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SSO solution I created that has worked for me.&amp;nbsp; It opens your SAP connection via the Logon Pad (thus allowing SSO to do it's work).&amp;nbsp; &lt;/P&gt;&lt;P&gt;First it checks through Shell to see if the Logon Pad has been launched, and launches if it is hasn't.&lt;/P&gt;&lt;P&gt;It then strikes ENTER to open the top SAP connection.&lt;/P&gt;&lt;P&gt;Finally, this sample will start transaction VA03 (for me, that is Read-Only Orders) and Echo a confirmation that it has started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key caveat here is that I have my SAP connections saved to my Favorites folder, which by default is loaded on the Logon Pad.&amp;nbsp; Then, I only need to use the top connection.&amp;nbsp; If you are able to move your two to favorites, and know that they will always be in the same position, you can sendkeys to select them depending on which instance you need to run. (DOWN DOWN DOWN ENTER, for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably not the most efficient way, but it works 100% of the time for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;/P&gt;&lt;P&gt;If Not IsObject(application) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Number &amp;lt;&amp;gt; 0 Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Goto 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set WshShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oExec = WshShell.Exec(_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not wshShell.AppActivate("SAP Logon 740") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Sleep 500 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WshShell.sendkeys "~"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set application = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not wshShell.AppActivate("SAP Easy Access") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Sleep 500 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Goto 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set application = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;/P&gt;&lt;P&gt;If Not IsObject(connection) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set connection = application.Children(0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Number &amp;lt;&amp;gt; 0 Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Goto 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set WshShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oExec = WshShell.Exec(_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not wshShell.AppActivate("SAP Logon 740") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Sleep 500 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WshShell.sendkeys "~"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set application = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not wshShell.AppActivate("SAP Easy Access") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Sleep 500 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Goto 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set connection = application.Children(0)&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If Not IsObject(session) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set session = connection.Children(0)&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If IsObject(WScript) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; WScript.ConnectObject session,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "on"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; WScript.ConnectObject application, "on"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session.startTransaction "VA03"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WScript.Echo "VA03 Started"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/excel-vba-single-sign-on-script/qaa-p/11678680#M151012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-01T16:21:49Z</dc:date>
    </item>
  </channel>
</rss>

