<?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: [ActiveX] SAP.Functions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447453#M212206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "True" parameter in the command below will result in supprising the logon window.  &lt;/P&gt;&lt;P&gt;sapConn.Connection.logon(0, True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example should work:&lt;/P&gt;&lt;P&gt;sapConn.Connection.ApplicationServer = "10.241.1.20"&lt;/P&gt;&lt;P&gt;sapConn.Connection.Client = "200"&lt;/P&gt;&lt;P&gt;sapConn.Connection.System = "C10"&lt;/P&gt;&lt;P&gt;sapConn.Connection.SystemNumber = "00"&lt;/P&gt;&lt;P&gt;sapConn.Connection.User = "USERNAME"&lt;/P&gt;&lt;P&gt;sapConn.Connection.Password = "password"&lt;/P&gt;&lt;P&gt;sapConn.Connection.tracelevel = "6" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sapConn.Connection.logon(0, True) &amp;lt;&amp;gt; True Then 'Try Logon&lt;/P&gt;&lt;P&gt;   MsgBox "Cannot Log on to SAP"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2006 11:58:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-23T11:58:36Z</dc:date>
    <item>
      <title>[ActiveX] SAP.Functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447451#M212204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I would like to call SAP from JavaScript using ActiveX "SAP.Functions". I manage it all the way with the following JavaScript code (same thing can be done using Visual Basic) :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var retcd      = 0;
var exceptions = 0;
  
function SAPlogon() {
  fns   = new ActiveXObject("SAP.Functions");
  var trans = fns.Transactions;
  var conn  = fns.connection;
  
  conn.ApplicationServer = "xxxx"
  conn.System            = "xx" 
  conn.SystemNumber      = "00"
  conn.UseSAPLogonIni    = "false"
  
  conn.user              = "smith";
  conn.password          = "azerty";
  conn.client            = "200";
  conn.language          = "E";
  conn.tracelevel        = 6;
  conn.RFCWithDialog     = true;   
  
  conn.logon(0,0);                  
  exceptions = 0;
}

function SAPlogoff() {
  conn.logoff(0, 0);                  
  exceptions = 0;
}

function SAPcallTransaction(tcode) {
  exceptions = 0;

  callta = fns.add("RFC_CALL_TRANSACTION_USING");
  callta.exports("TCODE") = tcode;
  callta.exports("MODE") = "E";
  retcd = callta.call;
  conn.logoff();                 

  SAPcallTransaction = retcd;
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But, i am facing 2 issues:&lt;/P&gt;&lt;P&gt;1) I would like to have &amp;lt;b&amp;gt;silent logon&amp;lt;/b&amp;gt;, and somehow, the &amp;lt;i&amp;gt;RFCWithDialog = False&amp;lt;/i&amp;gt; approach triggers an error&lt;/P&gt;&lt;P&gt;2) To &amp;lt;b&amp;gt;avoid placing credentials "hard-coded"&amp;lt;/b&amp;gt; (not the best especially in a Web environment), I would like to &amp;lt;b&amp;gt;use the SAP Logon Ticket&amp;lt;/b&amp;gt; the BSP page has generated&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;Best regards,&lt;/P&gt;&lt;P&gt;Guillaume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : I have already read really useful "SAP Automation RFC and BAPI Interfaces (BC-FES-AIT)" &lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/39/7e11e0ac6011d189c60000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/39/7e11e0ac6011d189c60000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 14:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447451#M212204</guid>
      <dc:creator>guillaume-hrc</dc:creator>
      <dc:date>2006-06-15T14:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: [ActiveX] SAP.Functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447452#M212205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Try logging in JAVA Forum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 15:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447452#M212205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: [ActiveX] SAP.Functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447453#M212206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "True" parameter in the command below will result in supprising the logon window.  &lt;/P&gt;&lt;P&gt;sapConn.Connection.logon(0, True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example should work:&lt;/P&gt;&lt;P&gt;sapConn.Connection.ApplicationServer = "10.241.1.20"&lt;/P&gt;&lt;P&gt;sapConn.Connection.Client = "200"&lt;/P&gt;&lt;P&gt;sapConn.Connection.System = "C10"&lt;/P&gt;&lt;P&gt;sapConn.Connection.SystemNumber = "00"&lt;/P&gt;&lt;P&gt;sapConn.Connection.User = "USERNAME"&lt;/P&gt;&lt;P&gt;sapConn.Connection.Password = "password"&lt;/P&gt;&lt;P&gt;sapConn.Connection.tracelevel = "6" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sapConn.Connection.logon(0, True) &amp;lt;&amp;gt; True Then 'Try Logon&lt;/P&gt;&lt;P&gt;   MsgBox "Cannot Log on to SAP"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:58:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/activex-sap-functions/m-p/1447453#M212206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:58:36Z</dc:date>
    </item>
  </channel>
</rss>

