cancel
Showing results for 
Search instead for 
Did you mean: 

FPM: Close connection for model

Anmol_Kumar
Participant
0 Kudos

Hi,

In my FPM component I want to ensure Connections are closed for each model.

I had written a method disconnectModel() in Fc - CC where I am disconnecting my models ( fpm.disconnectModel(model) )

Where I need to call this method in FPM so that my all connections to models are closed?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you are getting connection explictly then you must call JCO.releaseClient(jcoClient)

If you are getting connection implictly via Adaptive RFC model then you should not close it but call disconnecteIfAlive on the model.

wdcontext.currentelement().modelObject().modelInstance().disconnectIfAlive();

it will close your connection to the SAP R/3.

Regards

Padma N

Anmol_Kumar
Participant
0 Kudos

Hi,

I had written a method disconnectModel() in Fc - CC where I am disconnecting my models ( fpm.disconnectModel(model) )

Where I need to call this method in FPM so that my all connections to models are closed?

former_member197348
Active Contributor
0 Kudos

Hi Anmol,

You need to call this, immediately after executing RFC/BAPI in FC's execute method. It will release the JCo connections used for the RFC call.

Regards,

Siva

Former Member
0 Kudos

Hi,

Go through this thread..it will help you

Regards,

Padma N

Answers (0)