<?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>topic Switch between two open windows simple in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-two-open-windows-simple/m-p/708173#M32541</link>
    <description>&lt;P&gt;Hey team! I need help switching between two windows in SAP using only SAP. My code is below but it keeps returning errors. I've done quite a bit of research and just can't figure it out.. If possible please modify this code to show me the correct version with an explanation. That would literally help so much.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt; 'MsgBox ("STO made.. will now attempt to post") &lt;/P&gt;
  &lt;P&gt;'Set session = application.ActiveSession(1) - TRIED THIS IT DIDN'T WORK&lt;/P&gt;
  &lt;P&gt;'sapcon.children(1).select - TRIED THIS IT DIDN'T WORK&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;
  &lt;P&gt; Set SapApp = SapGuiAuto.GetScriptingEngine &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;With SapApp.Connections(0).sessions(0) &lt;/P&gt;
  &lt;P&gt; .createsession&lt;/P&gt;
  &lt;P&gt; End With &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;k = SapApp.Connections.Item(0).sessions.Count &lt;/P&gt;
  &lt;P&gt;Set Session = SapApp.Connections.Item(0).sessions.Item(CLng(k - 1)) &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Jul 2018 18:38:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-07-21T18:38:13Z</dc:date>
    <item>
      <title>Switch between two open windows simple</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-two-open-windows-simple/m-p/708173#M32541</link>
      <description>&lt;P&gt;Hey team! I need help switching between two windows in SAP using only SAP. My code is below but it keeps returning errors. I've done quite a bit of research and just can't figure it out.. If possible please modify this code to show me the correct version with an explanation. That would literally help so much.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt; 'MsgBox ("STO made.. will now attempt to post") &lt;/P&gt;
  &lt;P&gt;'Set session = application.ActiveSession(1) - TRIED THIS IT DIDN'T WORK&lt;/P&gt;
  &lt;P&gt;'sapcon.children(1).select - TRIED THIS IT DIDN'T WORK&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;
  &lt;P&gt; Set SapApp = SapGuiAuto.GetScriptingEngine &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;With SapApp.Connections(0).sessions(0) &lt;/P&gt;
  &lt;P&gt; .createsession&lt;/P&gt;
  &lt;P&gt; End With &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;k = SapApp.Connections.Item(0).sessions.Count &lt;/P&gt;
  &lt;P&gt;Set Session = SapApp.Connections.Item(0).sessions.Item(CLng(k - 1)) &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 18:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-two-open-windows-simple/m-p/708173#M32541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-21T18:38:13Z</dc:date>
    </item>
  </channel>
</rss>

