cancel
Showing results for 
Search instead for 
Did you mean: 

Addon gets disconnected

dilipkumbhar
Participant
0 Kudos
434

I am using SAP B1 9.2 PL:08. We have deployed SAP on azure. The Screen Locking Time (Min.) is 600. All the users are using remote desktop for using SAP. Sometimes users minimizes remote desktop and performs some other work on his own pc. When he rejoins SAP , addon gets disconnected. I have used this code for connecting to company.

 Public Sub ConnectToCompany()
        Dim objProcess As Process

        Try
            objCompany = New SAPbobsCOM.Company
            objCompany = SBO_Application.Company.GetDICompany
            If objCompany.GetLastErrorDescription.Length > 0 Then
                SBO_Application.MessageBox(objCompany.GetLastErrorDescription)
                SBO_Application.MessageBox("Error occured while connecting to SAP.Please restart SAP.")
                WriteLog("Error occured while connecting to SAP at " & SBO_Application.Company.ServerDate & " " & SBO_Application.Company.ServerTime)
                WriteLog("Error description =Error code-" & objCompany.GetLastErrorCode & ",Error Description-" & objCompany.GetLastErrorDescription)
            Else
                WriteLog("User " & objCompany.UserName & " logged in at " & Format(Date.Now, "dd/MM/yyyy hh:mm tt"))
                GetAuthentication()
                gstrLoginName = objCompany.UserName
            End If
        Catch ex As Exception
            WriteLog(SBO_Application.Company.ServerDate & ":" & SBO_Application.Company.ServerTime & ":" & "ConnectToCompany()=" & ex.Message & vbNewLine & "Line=" & ex.StackTrace)
        Finally
            objProcess = Nothing
        End Try
    End Sub

Accepted Solutions (0)

Answers (2)

Answers (2)

dilipkumbhar
Participant
0 Kudos

When the user returns, SAP is still open.

hendraprakasa
Participant
0 Kudos

when user back to SAP, is the SAP client still open ? or closed ?

sometimes RDP services if cofigured can automatically close application if idle