OpenConnection Method
Opens a connection to the SAP system.
Syntax
sapclient.openConnection([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
Connection fields are specified in the SapConnection property .
At the very least, you must supply the SapConnectionClient, SapConnectionHost, SapConnectionUser, and SapConnectionPassword to connect to and authenticate with a server. If SapConnectionType is set to ctSOAP then you need to supply the SapConnectionSoapURL as well.
Note that it is not necessary to call OpenConnection while using SOAP, however if you do, the class will call the function RFC_PING to determine if the SOAP service specified in SapConnectionSoapURL is available.