<?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 Re: Calling RFC (remote enabled function module) through excel VBA in sap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007740#M1805231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is not resolved yet. Can anybody help or is there any complete sample VBA code with steps to connect to SAP through Excel ad call RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanjana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 05:52:26 GMT</pubDate>
    <dc:creator>sanjana_lingras</dc:creator>
    <dc:date>2014-01-10T05:52:26Z</dc:date>
    <item>
      <title>Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007738#M1805229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to call Remote function module through excel for data validation on click of command button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting errors such as "user defined type not defined" for SAPFunctionsOCX.SAPFunctions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me in this? Or is there any complete docuement for this procedure to call RFC through excel VBA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sanjana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 15:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007738#M1805229</guid>
      <dc:creator>sanjana_lingras</dc:creator>
      <dc:date>2014-01-09T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007739#M1805230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 15:56:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007739#M1805230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-09T15:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007740#M1805231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is not resolved yet. Can anybody help or is there any complete sample VBA code with steps to connect to SAP through Excel ad call RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanjana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 05:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007740#M1805231</guid>
      <dc:creator>sanjana_lingras</dc:creator>
      <dc:date>2014-01-10T05:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007741#M1805232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please find sample VB script code and make changes as per needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Sub Button3_Click()&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;' Access Active X textbox value = ActiveSheet.OLEObjects("TextBox1").Object.Value&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dim Destination_System As Integer&lt;/P&gt;
&lt;P&gt;Dim objBAPIControl As Object 'Function Control (Collective object)&lt;/P&gt;
&lt;P&gt;Dim sapConnection As Object 'Connection object&lt;/P&gt;
&lt;P&gt;Set objBAPIControl = CreateObject("SAP.Functions")&lt;/P&gt;
&lt;P&gt;Set sapConnection = objBAPIControl.Connection&lt;/P&gt;
&lt;P&gt;Dim valu As String&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;sapConnection.client = "client"&lt;/P&gt;
&lt;P&gt;sapConnection.user = "username"&lt;/P&gt;
&lt;P&gt;sapConnection.Language = "E"&lt;/P&gt;
&lt;P&gt;sapConnection.hostname = "ip address of sap server"&lt;/P&gt;
&lt;P&gt;sapConnection.Password = "password"&lt;/P&gt;
&lt;P&gt;sapConnection.SystemNumber = "instance number"&lt;/P&gt;
&lt;P&gt;sapConnection.System = "system ID"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If sapConnection.logon(1, True) &amp;lt;&amp;gt; True Then&lt;/P&gt;
&lt;P&gt;MsgBox "No connection to R/3!"&lt;/P&gt;
&lt;P&gt;Exit Sub 'End program&lt;/P&gt;
&lt;P&gt;End If&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Set objUserList = objBAPIControl.Add("BAPI_SALESORDER_GETLIST")&lt;/P&gt;
&lt;P&gt;Worksheets(2).Select&lt;/P&gt;
&lt;P&gt;Cells.Clear&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Range("A1").Font.Italic = True&lt;/P&gt;
&lt;P&gt;Range("A2:E2").Font.Bold = True&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2, 1) = "SO Number"&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2, 2) = "Item No"&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2, 3) = "Material No"&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2, 4) = "Text"&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2, 5) = "Req Qty"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Worksheets(1).Select&lt;/P&gt;
&lt;P&gt;valu = ActiveSheet.Cells(1, 2)&lt;/P&gt;
&lt;P&gt;Worksheets(2).Select&lt;/P&gt;
&lt;P&gt;valu = "0000" &amp;amp; valu&lt;/P&gt;
&lt;P&gt;objUserList.exports("CUSTOMER_NUMBER") = valu&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;returnFunc = objUserList.Call&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If returnFunc = True Then&lt;/P&gt;
&lt;P&gt;Dim objTable As Object&lt;/P&gt;
&lt;P&gt;Set objTable = objUserList.Tables("SALES_ORDERS")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For i = 1 To objTable.RowCount&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2 + i, 1) = objTable.Cell(i, 1)&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2 + i, 2) = objTable.Cell(i, 2)&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2 + i, 3) = objTable.Cell(i, 3)&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2 + i, 4) = objTable.Cell(i, 4)&lt;/P&gt;
&lt;P&gt;ActiveSheet.Cells(2 + i, 5) = objTable.Cell(i, 7)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Next i&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;End If&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have installed SAP gui there there would no require other files such as&lt;/P&gt;&lt;P&gt;OCX.SAPFunctions etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel Ref Image.&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/360470" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Avirat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 07:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007741#M1805232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-10T07:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007742#M1805233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 09:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007742#M1805233</guid>
      <dc:creator>GirieshM</dc:creator>
      <dc:date>2014-01-10T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RFC (remote enabled function module) through excel VBA in sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007743#M1805234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-rfc-remote-enabled-function-module-through-excel-vba-in-sap/m-p/10007743#M1805234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-10T13:32:32Z</dc:date>
    </item>
  </channel>
</rss>

