on 12-13-2005 3:25 PM
Module Module1
Sub Main()
Dim destination1 As SAP.Connector.ConfigDestination = New SAP.Connector.ConfigDestination
Dim SAPProxy As SAPProxy1 = New SAPProxy1
Dim s As String
destination1.Username = "XX"
destination1.Password = "XX"
destination1.Client = "XX"
destination1.AppServerHost = "XX"
destination1.SAPSystemName = "XX"
destination1.SystemNumber = 0
SAPProxy.CustName = "A*"
SAPProxy.CustNo = ""
SAPProxy.Connection = New SAP.Connector.SAPConnection(destination1.ConnectionString)
SAPProxy.Ping()
SAPProxy.Rfc_Customer_Get()
s = "ole"
End Sub
End Module
Im getting a "Cannot open C:\windows\sapmsg.ini" exception. I've searched the forum for sapmsg.ini but couldn't find anything.
I can call SAP from a web application using the SAPLogon.aspx, but don't seem to be able to do it on my own.
Tks
Replace ConfigDestination with Destination and remove the line "destination1.SAPSystemName = "XX"". Then it should work.
ConfigDestination tries to read setting according to the value in web.config - based on a given "DestinationName". Therefore your connection string in incomplete.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.