Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add On DI API Connection Problem

former_member835745
Discoverer
0 Kudos
413
  • SAP Managed Tags:

HI there,

i've facing problem with my web app di api integration,

in a random times, my current active login sometimes seems logged out and it showed the error as this picture attach picture error.


if i try to reconnect, sometimes it can and sometimes it cannot.

here is the code i've done.

Private Shared Sub ConnectCompany(ByRef pCompany As SAPbobsCOM.Company)

If Not pCompany.Connected Then

pCompany = New SAPbobsCOM.Company

pCompany.Server = CompanySettings.Server

pCompany.LicenseServer = CompanySettings.LicenseServer

pCompany.language = CompanySettings.language

pCompany.DbServerType = CompanySettings.DbServerType

pCompany.CompanyDB = CompanySettings.CompanyDB

pCompany.DbUserName = CompanySettings.DbUserName

pCompany.DbPassword = CompanySettings.DbPassword

pCompany.UserName = CompanySettings.UserName

pCompany.Password = CompanySettings.Password

Try

Dim retval As Integer = pCompany.Connect()

If retval <> 0 Then

Throw New ArgumentException("1 - " & retval & pCompany.GetLastErrorDescription)

End If

Catch ex As Exception

Throw New ArgumentException(ex.Message & " - 2 - " & pCompany.GetLastErrorDescription)

End Try

End If

End Sub

Currently We have 2 Add On Application, deployed in different server. First is Add On Barcode for picklist (deployed in server 01), second is Add On Sales Quotation (deployed in server 02) -> Issue occurred in this add on. Both of them using same User ID that attached with license: SBO Indirect Access User.

We also apply ownership authorization in SAP B1.

Please any advice because this error really pain for our user.

Thankyou

1 REPLY 1

former_member835745
Discoverer
0 Kudos
341
  • SAP Managed Tags:

Case Closed. I already find the answer