<?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 Bapi Object method Connection in VBA excel marco in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640475#M607817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone let me know the reasons why method connection fails in VBA excel macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic used so far in excel VBA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create SAP connection&lt;/P&gt;&lt;P&gt;2) Connect to BAPI ( this is a custom bapi created and released in BOR)&lt;/P&gt;&lt;P&gt;3) Populate the method parameters&lt;/P&gt;&lt;P&gt;4) Pass the parameters to the method (&amp;lt;b&amp;gt;this is where it fails in the dev envi but works fine in sandbox&amp;lt;/b&amp;gt;) &lt;/P&gt;&lt;P&gt;5) logoff bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any feedback would be a lot of help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Kshamatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2007 02:18:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-23T02:18:58Z</dc:date>
    <item>
      <title>Bapi Object method Connection in VBA excel marco</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640475#M607817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone let me know the reasons why method connection fails in VBA excel macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic used so far in excel VBA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create SAP connection&lt;/P&gt;&lt;P&gt;2) Connect to BAPI ( this is a custom bapi created and released in BOR)&lt;/P&gt;&lt;P&gt;3) Populate the method parameters&lt;/P&gt;&lt;P&gt;4) Pass the parameters to the method (&amp;lt;b&amp;gt;this is where it fails in the dev envi but works fine in sandbox&amp;lt;/b&amp;gt;) &lt;/P&gt;&lt;P&gt;5) logoff bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any feedback would be a lot of help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Kshamatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 02:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640475#M607817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T02:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Object method Connection in VBA excel marco</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640476#M607818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had tried to call RFC FMs from Excel - here is some sample code - might be helpful for u- &lt;/P&gt;&lt;P&gt;Sub Get_Report_List()&lt;/P&gt;&lt;P&gt;Dim SAPFunCtl As New SAPFunctions&lt;/P&gt;&lt;P&gt;Dim RFCFunc As New SAPFunctionsOCX.Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim I_QUERY_TABLE&lt;/P&gt;&lt;P&gt;Dim T_OPTIONS&lt;/P&gt;&lt;P&gt;Dim T_FIELDS&lt;/P&gt;&lt;P&gt;Dim T_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim Row As Integer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Pop up for Automatic Logon.&lt;/P&gt;&lt;P&gt; SAPFunCtl.AutoLogon = True&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'Set the Function Module to be called&lt;/P&gt;&lt;P&gt; Set RFCFunc = SAPFunCtl.Add("RFC_READ_TABLE")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'Set the Import, Export &amp;amp; Table Parameters&lt;/P&gt;&lt;P&gt; Set I_QUERY_TABLE = RFCFunc.Exports("QUERY_TABLE")&lt;/P&gt;&lt;P&gt; Set T_OPTIONS = RFCFunc.Tables("OPTIONS")&lt;/P&gt;&lt;P&gt; Set T_FIELDS = RFCFunc.Tables("FIELDS")&lt;/P&gt;&lt;P&gt; Set T_DATA = RFCFunc.Tables("DATA")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'Query Table TRDIR&lt;/P&gt;&lt;P&gt; I_QUERY_TABLE.Value = "TRDIR"&lt;/P&gt;&lt;P&gt; T_OPTIONS.AppendRow&lt;/P&gt;&lt;P&gt; T_OPTIONS(1, "TEXT") = "NAME LIKE 'Z%'"&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; T_FIELDS.AppendRow&lt;/P&gt;&lt;P&gt; T_FIELDS(1, "FIELDNAME") = "NAME"&lt;/P&gt;&lt;P&gt; T_FIELDS.AppendRow&lt;/P&gt;&lt;P&gt; T_FIELDS(2, "FIELDNAME") = "SUBC"&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  If RFCFunc.Call = True Then&lt;/P&gt;&lt;P&gt;    If T_DATA.RowCount &amp;gt; 0 Then&lt;/P&gt;&lt;P&gt;    'Clear Sheet3 - Data&lt;/P&gt;&lt;P&gt;        Sheet3.Cells.Clear&lt;/P&gt;&lt;P&gt;        For Row = 1 To T_DATA.RowCount&lt;/P&gt;&lt;P&gt;        Sheet3.Cells(Row, 1) = T_DATA(Row, "WA")&lt;/P&gt;&lt;P&gt;        Next Row&lt;/P&gt;&lt;P&gt;        Sheet3.Activate&lt;/P&gt;&lt;P&gt;    End If&lt;/P&gt;&lt;P&gt; Else&lt;/P&gt;&lt;P&gt;    MsgBox "Connection failure."&lt;/P&gt;&lt;P&gt; End If&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 13:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640476#M607818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T13:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Object method Connection in VBA excel marco</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640477#M607819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the reply it was an rfc auth problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-object-method-connection-in-vba-excel-marco/m-p/2640477#M607819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T22:48:25Z</dc:date>
    </item>
  </channel>
</rss>

