cancel
Showing results for 
Search instead for 
Did you mean: 

DiAPI disconnect delay

anrodse
Participant
0 Kudos

I use code below to disconnect my program from sap:

private void Disconnect(){
    oCompany.Disconnect();
    oCompany = null;
}

It works but it takes some time (1-5 minutes) for sap to realise that connection was close. Problem comes when the same user try to lon-on again in any other device. They have to wait until session is really closed by SAP.

I've made a very simple form that connects to SAP and disconnect using that function. If I look at connected clients in SAP, I can see how this software is registered as connected as soon as I connect, but it takes a few minutes to disappear after I disconnect.

Is it possible to force this connection to be closed faster?

* Using sap 9.2, C#, DI API

rahuljain257
Participant
0 Kudos

DI-API is slow, Try using Di-Server.

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi anrodse,

For performance reasons, DI API/DTW has their own cache mechanism which is different from SAP Business One Application.

DI has a cache mechanism and when calling DI disconnect function, the DI does not really unload but cache the OBServer for next use.

However, License Server has another mechanism to automatically close the connection of non-existing process. Therefore, when disconnecting DI API/DTW, the connection will be deleted in several minutes automatically. 2 minutes is the regular scenario. This is the current system behavior.

As a workaround, disconnect it manually via Disconnect button in Connected Clients window.

Kindly refer to SAP Note 2413866 for the same.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

anrodse
Participant
0 Kudos

Thanks for the anwser. I cannot manually disconnect clients because there are several workers moving from PC (app1) to PDA (app2) many times a day.

BTW: I cannot access to notes with my ID.

rahuljain257
Participant
0 Kudos

Thanks Sirji.

Answers (0)