SAP Connection with ASP
hi all,
M working on one ASP project where i have to get data from SAP RFC Function.
I have successfully made the connection to SAP but now as soon as m adding function to sap object my system hangs no error msg nothing.
pl help wat to do...?
my code as below:
Public theFunc
Public con
Public sapObj
Dim returnFunc
Set sapObj = CreateObject("SAP.Functions")
Set sapConnection = CreateObject("SAP.Logoncontrol.1")
Set sapConnection = sapConnection.NewConnection
sapConnection.System = "00"
sapConnection.ApplicationServer = "10.27.1.252"
sapConnection.client = 300
sapConnection.user = "TMRAHIL"
sapConnection.Password = "ENGLAND1"
sapConnection.language = "EN"
'**************************************
'Log On to the SAP System
'**************************************
Set functionCtrl = server.CreateObject("SAP.Functions")
retcd=sapConnection.Logon(0,true)
If RetCd = False Then
Response.write "SAP Logon Failed."
Response.End
else
Response.write "SAP Logon Succeeded."
end if
UPTO THIS MY SYSTEM WORKS FINE BUT AFTER THAT SYSTEM HANGS.
*****************************************
Set theFunc = functionCtrl.Add("ZPOMDRREP")
theFunc.Exports("EBELN") = "3019380"
returnFunc = theFunc.Call
If returnFunc = True Then
Set docs = theFunc.tables.Item("MAT_INFO")
Response.write "SAP Data found."
else
Response.write "SAP Data NOT found."
end if
Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
__________________
Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
|