on 2022 Feb 09 5:23 AM
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
When the user returns, SAP is still open.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when user back to SAP, is the SAP client still open ? or closed ?
sometimes RDP services if cofigured can automatically close application if idle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
9 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.