Skip to Content
avatar image
Former Member

Connecting via system name rather then IP

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 20, 2004 at 02:31 PM

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

    SAPLogonDestination destLogon = new SAPLogonDestination();

    destLogon.DestinationName = destLogon.GetDestinationNameFromPrintName( SystemID_ );

    Add comment
    10|10000 characters needed characters exceeded