clientReleaseSession
The service releases a locked session on an SAP system.
- Input parameters
-
- serverName
- SAP system alias on which the locked session is located. The name must match a configured RFC connection alias at SAP® ERP.
- $client
- Optional. Client for the session. If no client is specified, the client that is specified in the SAP system alias settings is used.
- $user
- Optional. User name for the session. If no user is specified, the default user is used.
- $pass
- Optional. Password for the session. If the password is not specified, then the user and password must be looked up in the SAP User store.
- $language
- Optional. Language used during the session. If no language is specified, the default language is used.
- Return values
- None
Example 1
The service releases a session after a commit work or rollback work command is triggered inside
the SAP system.
Note: This service just works with SAP systems version 4.0A and higher because BAPIs
do not write data directly to the database but use the posting engine inside the SAP system.
To call a BAPI that writes data, you must follow the following steps on webMethods Integration.
- Call the clientLockSession service to get an exclusive connection to the SAP system.
- Run the BAPI calls.
- Call the BAPIcommit or BAPIrollback service.
- Call the clientReleaseSession service to release the exclusive connection to the SAP system and clean up used resources on webMethods Integration.
Example 2
You also need this service if you want to lock and change a certain database object. Follow the
following steps.
- Call the clientLockSession service to get an exclusive connection to the SAP system.
- Lock an object by calling a BAPI_*_ENQUEUE.
- Make your changes by starting other BAPIs.
- Release the object by calling a BAPI_*_DEQUEUE.
- Call the clientReleaseSession service.