<%@ Language=VBScript %>
<html>
<head>
<%
DIM oLogonControl
DIM oBapiControl
DIM oConn
DIM oCompanyCode
Dim otabCompanyCodes
Dim oReturn
Dim oCol
Dim oRow
sub Main()
set oBapiControl=CreateObject("SAP.BAPI.1")
set oLogonControl=CreateObject("SAP.LogonControl.1")
set oConn=oLogonControl.NewConnection
oConn.ApplicationServer="aaa.bb.cc.dd"
oConn.System="00"
oConn.Client="190"
oConn.User="XXXX"
oConn.Password="YYYYYYYY"
oConn.Language="EN"
retcd=oConn.Logon(0,true)
Response.Write(retcd)
Response.Write("<BR>")
if(retcdtrue)then
Response.Write("no logon")
stop
else
Response.Write("logon OK")
oBapiControl.Connection=oConn
Set oCompanyCode=oBapiControl.GetSAPObject("CompanyCode")
end if
End Sub
%>
</head>
<body>
<% Call Main() %>
</body>
</html>