If the connection doesn't throw an exception, you'll know that the connection has been established. If there is a problem with the connection, the class will throw an appropriate exception.
How to check if the connection has been established using SAP.net coonector
-
31-07-2022 - |
Question
I am trying to connect to my clients SAP system. I am using the following code to connect, but how do i come to know that the connection has been successfully established.
protected void Page_Load(object sender, EventArgs e)
{
try
{
SAPSystemConnect sapCfg = new SAPSystemConnect();
RfcDestinationManager.RegisterDestinationConfiguration(sapCfg);
RfcDestination rfcDest = null;
rfcDest = RfcDestinationManager.GetDestination("Dev");
}
catch (Exception ex)
{
lbl.Text=ex.Message;
}
}
No correct solution
OTHER TIPS
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow