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

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top