clientLockSession

The service locks an RFC connection to your session so that you always exclusively use this RFC connection for subsequent calls.

Input parameters
serverName
Alias of the SAP system to which the connection must be established. The name must match a configured RFC connection alias at SAP® ERP.
$client
Optional. Client for the session. If no client is specified, the default client is used.
$user
Optional. Username 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

Note: This service locks a session to trigger a commit work command inside the SAP system. This causes a database commit. The service just works with SAP systems version 4.0A and higher because BAPIs do not write data directly to the database. However, use the posting engine inside the SAP system and the start of the processing of posted data.
The data is not written to the database until the client triggers a commit work command. 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 BAPIcommitor BAPIrollback service.
  • Call the clientReleaseSession service to release the exclusive connection to the SAP system and clean up used resources on IBM® webMethods Integration.