Skip to Content
avatar image
Former Member

Close the SAP R/3 connection after BAPI call

Dear All,

In our scenario, we use the JCO in WebDynpro to make connection with SAP R/3 to access the BAPIs.

For every BAPI call in the Portal, a new connection is established with SAP R/3.

The number of connections established through the portal can be viewed using the SAP transaction SM04 in SAP R/3.

The connections get closed only if the user log off from the portal.

If the user closes the portal without logging off, then the connections are not closed.

Is there any method/procedure to close the SAP R/3 connection explicitly in the WebDynpro source code after executing each BAPI call?

best regards,

Thangesh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 22, 2006 at 09:56 AM

    Hi Maran,

    Add

    jcoclientobject(of type JCO.Client).disconnect() in ur code

    Thanks

    Fahad Hamsa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 21, 2006 at 02:57 PM

    Hi,

    Try this.

    wdContext.current<BAPI INPUT>Element().modelObject().modelInstance().disconnectIfAlive();

    This might helps you.

    thanks,

    Lohi.

    Add comment
    10|10000 characters needed characters exceeded