<?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: Example pls in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254070#M777124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have tried ur idea, but its not working,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to define the SalesOrder object in SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because its giving the error as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          An Internal RFC Error occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to configure RFC or what else, pls suggest me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jan 2008 07:05:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-19T07:05:31Z</dc:date>
    <item>
      <title>Example pls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254066#M777120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          I am new to the SAP-VB connect using BAPI, Can anyone send me simple example of connecting SAP and VB using BAPI. I have tried many times but facing error, pls provide me with clear steps. pls dont forward any links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         It would be appreciatable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 06:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254066#M777120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T06:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Example pls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254067#M777121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the following linksL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="258995"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3340595"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 06:36:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254067#M777121</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T06:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Example pls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254068#M777122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check these links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/76/4a42f7f16d11d1ad15080009b0fb56/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/76/4a42f7f16d11d1ad15080009b0fb56/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapliveinfo.blogspot.com/2008/01/calling-bapis-from-visual-basic.html" target="test_blank"&gt;http://abapliveinfo.blogspot.com/2008/01/calling-bapis-from-visual-basic.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 06:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254068#M777122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T06:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Example pls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254069#M777123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Form VB.NET appliaction you have two ways to connect to SAP system and execute BAPI. Either through webservices or by using NCo. Choice depends upon you appliaction requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For starting with NCo go through &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/a9/4a57c1bac80e4e977d8cd9b3ecab89/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/a9/4a57c1bac80e4e977d8cd9b3ecab89/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS IS ANOTHER WAY TO LOGIN TO SAP THROUGH VB TRY THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logon with the SAPLogon control, Use an RFC call from the SAP Function &lt;/P&gt;&lt;P&gt;Control, and get the results with the SAP Table Factory Control. . . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must have SAPGui's FULL install on your machine for this to work (Or at &lt;/P&gt;&lt;P&gt;least SAPLogon and the RFC toolkit) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This VBScript example might help, it calls RFC_READ_TABLE in sap, and emails &lt;/P&gt;&lt;P&gt;the results back to a user from a selected query (In this case uses that are &lt;/P&gt;&lt;P&gt;locked out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should show you how this could work in practice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Will &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Email Locked out SAP users details to user in a .csv file through MS &lt;/P&gt;&lt;P&gt;Exchange / CDO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim ctlTableFactory, RFC_READ_TABLE, eQUERY_TAB, tblOptions, tblData, &lt;/P&gt;&lt;P&gt;tblFields, funcControl, objConnection, ctlLogon &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set objFileSystemObject = CreateObject("Scripting.FileSystemObject") &lt;/P&gt;&lt;P&gt;Set ctlLogon = CreateObject("SAP.LogonControl.1") &lt;/P&gt;&lt;P&gt;Set funcControl = CreateObject("SAP.Functions") &lt;/P&gt;&lt;P&gt;Set ctlTableFactory = CreateObject("SAP.TableFactory.1") &lt;/P&gt;&lt;P&gt;Set objWindowsScriptShell = CreateObject("WScript.Shell") &lt;/P&gt;&lt;P&gt;Set objConnection = ctlLogon.NewConnection &lt;/P&gt;&lt;P&gt;Set filOutputobjFileSystemObject.CreateTextFile("E:\SAP Scripts\LockedUsers.CSV", True) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;objConnection.ApplicationServerobjWindowsScriptShel l.RegRead("HKLM\Software\AccantiaEDI\SAPServer") &lt;/P&gt;&lt;P&gt;objConnection.SystemobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SID") &lt;/P&gt;&lt;P&gt;objConnection.SystemNumber = "00" &lt;/P&gt;&lt;P&gt;objConnection.ClientobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SAPClient") &lt;/P&gt;&lt;P&gt;objConnection.Language = "EN" &lt;/P&gt;&lt;P&gt;objConnection.UserobjWindowsScriptShell.RegRead("HK LM\Software\AccantiaEDI\SAPSAPUser") &lt;/P&gt;&lt;P&gt;objConnection.PasswordobjWindowsScriptShell.RegRead ("HKLM\Software\AccantiaEDI\SAPSAPPassword") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;booReturn = objConnection.Logon(0, True) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If booReturn True Then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MsgBox " Cannot log on! " &lt;/P&gt;&lt;P&gt;'MsgBox booReturn &lt;/P&gt;&lt;P&gt;filOutput.WriteLine "ERROR CALLING LOGGING INTO SAP - FAILED LOGINS &lt;/P&gt;&lt;P&gt;UNKNOWN" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stop &lt;/P&gt;&lt;P&gt;Else &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MsgBox " Logon OK." &lt;/P&gt;&lt;P&gt;funcControl.Connection = objConnection &lt;/P&gt;&lt;P&gt;Set RFC_READ_TABLE = funcControl.Add("RFC_READ_TABLE") &lt;/P&gt;&lt;P&gt;Set strExport1 = RFC_READ_TABLE.Exports("QUERY_TABLE") &lt;/P&gt;&lt;P&gt;Set strExport2 = RFC_READ_TABLE.Exports("DELIMITER") &lt;/P&gt;&lt;P&gt;Set tblOptions = RFC_READ_TABLE.Tables("OPTIONS") ' &lt;/P&gt;&lt;P&gt;Set tblData = RFC_READ_TABLE.Tables("DATA") ' &lt;/P&gt;&lt;P&gt;Set tblFields = RFC_READ_TABLE.Tables("FIELDS") ' &lt;/P&gt;&lt;P&gt;strExport1.Value = "USR02" &lt;/P&gt;&lt;P&gt;strExport2.Value = "," &lt;/P&gt;&lt;P&gt;tblOptions.AppendRow &lt;/P&gt;&lt;P&gt;tblOptions(1, "TEXT") = "LOCNT &amp;gt; 0 OR UFLAG = 128" &lt;/P&gt;&lt;P&gt;tblFields.AppendRow &lt;/P&gt;&lt;P&gt;tblFields(1, "FIELDNAME") = "BNAME" &lt;/P&gt;&lt;P&gt;tblFields.AppendRow &lt;/P&gt;&lt;P&gt;tblFields(2, "FIELDNAME") = "LOCNT" &lt;/P&gt;&lt;P&gt;tblFields.AppendRow &lt;/P&gt;&lt;P&gt;tblFields(3, "FIELDNAME") = "UFLAG" &lt;/P&gt;&lt;P&gt;If RFC_READ_TABLE.Call = True Then &lt;/P&gt;&lt;P&gt;If tblData.RowCount &amp;gt; 0 Then &lt;/P&gt;&lt;P&gt;filOutput.WriteLine "UserName,FailedLogins,LockedFlag" &lt;/P&gt;&lt;P&gt;' MsgBox tblData.RowCount &lt;/P&gt;&lt;P&gt;For intRow = 1 To tblData.RowCount &lt;/P&gt;&lt;P&gt;filOutput.WriteLine tblData(intRow, "WA") &lt;/P&gt;&lt;P&gt;Next &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filOutput.WriteLine "NO FAILED LOGINS OR LOCKED USERS" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If &lt;/P&gt;&lt;P&gt;Else &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filOutput.WriteLine "ERROR CALLING SAP REMOTE FUNCTION CALL - &lt;/P&gt;&lt;P&gt;FAILED LOGINS UNKNOWN" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set filOutput = Nothing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MailProfile = "MS Exchange Settings" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set objSession = CreateObject("MAPI.Session") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LogonOK = objSession.Logon(MailProfile) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set objMessage = objSession.Outbox.Messages.Add &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;objMessage.Subject = "SAP Users Report - Locked Users + Failed Logins" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strSetMessage = "There are " &amp;amp; tblData.RowCount &amp;amp; " users that are &lt;/P&gt;&lt;P&gt;either locked due to failed logins, or have at least 1 failed login attempt &lt;/P&gt;&lt;P&gt;on system " &amp;amp; objWindowsScriptShell.RegRead("HKLM\Software\Accant iaEDI\SID") &lt;/P&gt;&lt;P&gt;&amp;amp; vbcrlf &amp;amp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 06:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254069#M777123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Example pls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254070#M777124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have tried ur idea, but its not working,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to define the SalesOrder object in SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because its giving the error as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          An Internal RFC Error occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to configure RFC or what else, pls suggest me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 07:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-pls/m-p/3254070#M777124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T07:05:31Z</dc:date>
    </item>
  </channel>
</rss>

