<html>
<head>
<title>Calling SAP From Javascript</title>
<meta name="JAVASCRIPT" content="Active-X for SAP">
<meta name="AUTHOR" content="Axel Angeli Logos! Informatik GmbH">
<link rel="stylesheet" href="../../style.css" type="text/css">
<meta NAME="keywords"
CONTENT="SAP,R/3,javascript,logosworld,logos!,axel, angeli, axelangeli, activex,IDoc, IDoc, EDI, ALE,RFC, remotefunctioncall,Workflow
, ABAP IV, ABAB IV">
<meta NAME="description"
CONTENT="Axel Angeli's Logosworld - Example how to call SAP R/3 from JavaScript">
</head>
<body>
<h2>Calling SAP From Javascript</h2>
<p>This HTML document contains a small JavaScript which creates an Active-X object for SAP
Automation GUI. When you click on the button below it will try to call the transaction
VA02 using an RFC to the function RFC_CALL_TRANSACTION_USING. You must have SAP Automation
GUI DLLs installed, otherwise you will receive a message, that the Active-X object cannot
be created. To try it out you better install the complete SAP GUI including the RFC SDK. </p>
<p>You will be asked for userid and password. This example works with any ABAP function
that has RFC enabled. </p>
<hr>
<p><script language="JavaScript"><!--
retcd = 0;
exceptions = 0;
function SAPlogon()
{
fns = new ActiveXObject("SAP.Functions");
trans = fns.Transactions;
conn = fns.connection;
conn.System = "DEV";
conn.user = "FIXIONGF";
conn.password = "11894";
conn.Client = "400";
conn.Language = "E";
conn.tracelevel = 6;
conn.RFCWithDialog = 1; </