Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Routing Messages Through Adapter for SAP | Routing BAPIs Through Adapter for SAP | BAPI XML Transaction Commit
 
BAPI XML Transaction Commit
When running a BAPI call with Adapter for SAP in some cases the SAP system expects a commit command to execute the call.
*To commit the transaction directly over HTTP
1. Call lockSession with empty POST over HTTP.
http://<host>:<port>/invoke/pub.sap.client/lockSession
2. Call the BAPI in the same session using HTTP.
3. Commit the service with an empty POST using HTTP.
http://<host>:<port>/invoke/pub.sap.bapi/commit
4. Release the session by sending an empty POST using HTTP.
http://<host>:<port>/invoke/pub.sap.client/releaseSession
Note:
With the HTTP requests in steps - you need to resubmit the cookie that you got with the response in step 1. Otherwise, Integration Server cannot assign these requests to the same user session and the “commit” does not know which transaction to commit.