cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting via system name rather then IP

Former Member
0 Kudos

Currently our system connects to SAP by passing through the IP address, client number and their individual logon details. I'm sure there was a way to connect by using the system name rather then the IP with the SAP COM objects but so far i've been unable to achieve this with the .NET connector. When I supply a value for the SAPSystemName in my Destination object I get "Open file 'C:\WINDOWS\sapmsg.ini' failed" as an error message. I do not have a sapmsg.ini file in C:\WINDOWS\ and this is obviously why the error is occurring. What i would like to know is if there is anyway of doing this without having the sapmsg.ini file?

My fall back plan would be to interrogate the SAPLogon.ini file myself and determine the IP for the given system name however this isn't an ideal solution though so I would prefer to find a better way of retrieving this information.

Any suggestions or comments would be greatly appreciated.

Thanks,

Charles

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Whooops....figured it out myself. For those that are interested:

SAPLogonDestination destLogon = new SAPLogonDestination();

destLogon.DestinationName = destLogon.GetDestinationNameFromPrintName( SystemID_ );