<?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: Scripting with Vbscript against SAPGUI in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317569#M3635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the purpose of trying to create scripts using the sap api scripting guide, is because, im involved in the functional testing field. So im trying to create a new way to script against sap using descriptive programming style, without using the gui&lt;/P&gt;&lt;P&gt;i would like to browse across sap tcodes, fields, etc, and automate any process i.e. creating a sales order, usign functions of the api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might sound a little bit strange, but that is my job, lol,&lt;/P&gt;&lt;P&gt;so, did i explain what im trying to get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2006 23:39:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-16T23:39:44Z</dc:date>
    <item>
      <title>Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaq-p/1317567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im new in this field, the thing is that i want to create scripts with vbscript in order to automate some business processes.&lt;/P&gt;&lt;P&gt;I have been reading the SAP GUI Scripting API guide, and some other documents, but i dont know how to use the classes, methods, functions, etc. of the sapfewselib.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody, know how to make reference to this library in order to use it on Vbscript??&lt;/P&gt;&lt;P&gt;If you can put some code examples, that will be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2006 17:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaq-p/1317567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-08T17:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317568#M3634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillermo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you tell us more about your Business Case?&lt;/P&gt;&lt;P&gt;I think a possible solution can also be Batch Input which can be recorded in Transaction SHDB. From this recording you can create a Program or Function Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gregor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 22:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317568#M3634</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2006-06-16T22:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317569#M3635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the purpose of trying to create scripts using the sap api scripting guide, is because, im involved in the functional testing field. So im trying to create a new way to script against sap using descriptive programming style, without using the gui&lt;/P&gt;&lt;P&gt;i would like to browse across sap tcodes, fields, etc, and automate any process i.e. creating a sales order, usign functions of the api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might sound a little bit strange, but that is my job, lol,&lt;/P&gt;&lt;P&gt;so, did i explain what im trying to get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 23:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317569#M3635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T23:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317570#M3636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillermo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP provides an integrated Testing Tool called CATT. I think you should have a look at the CATT Weblog Series from &amp;lt;a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/37984"&amp;gt;sapna Modi&amp;lt;/a&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gregor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2006 09:46:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317570#M3636</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2006-06-17T09:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317571#M3637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gregor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, i have been using ECATT tool, which i found useful, but it is a little bit difficult for people who is not involved in the sap world to understand or use it. That is way i would like to learn how to use the sap api with VB or VBscript in order to create automated scripts, easy to understand and use for people who is not involved with sap but know vb or vbscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to use sap api, with these tools? (VBscript, VB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 17:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317571#M3637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-21T17:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317572#M3638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillermo Riojas ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also have the same requirement. Did you get any solution for this. Please can you share some more inputs on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2006 04:35:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317572#M3638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-27T04:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317573#M3639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find sapfewse.ocx&lt;/P&gt;&lt;P&gt;(C:\Program Files\SAP\FrontEnd\SAPgui\sapfewse.ocx)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and try this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim sap As New GuiApplication&lt;/P&gt;&lt;P&gt;Set conexion = sap.OpenConnection("name_of_the_server_in_SAP Logon")&lt;/P&gt;&lt;P&gt;Set sesion = conexion.Children(0)&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "Client"&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "User" ' &lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "password"&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]/usr/pwdRSYST-BCODE").SetFocus&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]/usr/pwdRSYST-BCODE").caretPosition = 8&lt;/P&gt;&lt;P&gt;sesion.findById("wnd[0]").sendVKey 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set gi = CreateObject("SAPGUI.ScriptingCtrl.1")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the better way to work with SAP GUI Scripting is with a record. Please go to RZ11 transaction and change the following parameter to TRUE:&lt;/P&gt;&lt;P&gt;sapgui/user_scripting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then Logoff an Logon again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then Alt+F12 (Customizing for Local Layout), click in Script Recording and Playback and record some transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the generated code is itself executable and you can modify o attach this code to another software that supports VBScripting like MSExcel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Not IsObject(application) Then&lt;/P&gt;&lt;P&gt;   Set SapGuiAuto  = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;   Set application = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If Not IsObject(connection) Then&lt;/P&gt;&lt;P&gt;   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;   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;   WScript.ConnectObject session,     "on"&lt;/P&gt;&lt;P&gt;   WScript.ConnectObject application, "on"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/tbar[0]/okcd").text = "/nMM01"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 0&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/cmbRMMG1-MBRSH").key = "1"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/cmbRMMG1-MTART").key = "ROH"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/cmbRMMG1-MTART").setFocus&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/tbar[1]/btn[5]").press&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/tblSAPLMGMMTC_VIEW").getAbsoluteRow(0).selected = true&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/tbar[0]/btn[0]").press&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP01/ssubTABFRA1:SAPLMGMM:2004/subSUB1:SAPLMGD1:1002/txtMAKT-MAKTX").text = "TEST"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP01/ssubTABFRA1:SAPLMGMM:2004/subSUB2:SAPLMGD1:2001/ctxtMARA-MEINS").text = "UN"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP01/ssubTABFRA1:SAPLMGMM:2004/subSUB2:SAPLMGD1:2001/ctxtMARA-MEINS").setFocus&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP01/ssubTABFRA1:SAPLMGMM:2004/subSUB2:SAPLMGD1:2001/ctxtMARA-MEINS").caretPosition = 2&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/tbar[0]/btn[11]").press&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any doubts please feel free to send me an email, I have worked some years with SAP GUI Scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arturo Bernal&lt;/P&gt;&lt;P&gt;abmemail@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2007 14:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317573#M3639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-08T14:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317574#M3640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i have a question. I have a code in VBa, where Combobox selection is showing error, ie not list is being loaded to the combobox. Plz tell me how to fix the problem&lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;P&gt;Rajkumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 02:58:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317574#M3640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-21T02:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317575#M3641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. Please open a new thread for your issue. Provide code used and more Details about issue. May an screenshot will help People to understand your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 08:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317575#M3641</guid>
      <dc:creator>holger_khn</dc:creator>
      <dc:date>2015-07-21T08:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting with Vbscript against SAPGUI</title>
      <link>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317576#M3642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillermo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a similar scripting for attaching a file in mm03 or mm43&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 03:13:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/scripting-with-vbscript-against-sapgui/qaa-p/1317576#M3642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-27T03:13:49Z</dc:date>
    </item>
  </channel>
</rss>

