cancel
Showing results for 
Search instead for 
Did you mean: 

What is wrong with this?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

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.