Transaction plays a very important role in the SAP world and often times you would run into SAP BAPI’s which will not commit data till the transaction has been terminated properly. In this article I am going to cover how to call a SAP BAPI which needs to be part of transaction.
Before we begin, one key thing to remember is that when you create a SAP connection using AgilePoint SAP Connector which is to be used in a transaction, always make sure it is on type “User Authentication” i.e. you will need to configure a Connection Pool with User Authentication instead of Anonymous mode.
There is no way to reliably queue the transactions in anonymous mode since the connection handles given to the application can vary between transactions.
In order to effectively queue the transactions with the Connector, the calling app needs to pass in the credentials with every transaction so use connection pool of type user and give credential in access token.
The connection pool setting might look as following screenshot
Also the corresponding access token which you create in AgilePoint process model might look similar to the one shown below. Please note that since I indicated that connection pool uses user authentication, while configuring access token, it would ask me to enter service account username and password
With that step completed, you should be able to configure your process model to call the SAP BAPI under same transaction. Here is how it is achieved.
AgilePoint NX SAP activity group has workflow activities for handling the transaction
Firstly you would design the process model in a way that it wraps the actual BAPI call between start and end transaction.
On each of SAP activity, there is a field called “Transaction Name”. For them to be considered as part of same transaction, all shapes need to have same transaction name as indicated below
1/ Begin SAP Transaction
2/ Call SAP BAPI Configuration
3/ End SAP Transaction
With the above mentioned configuration, you would be successfully able to call a SAP BAPI under same transaction.
A modern process automation and orchestration platform that enables you to open up and seize new business opportunities, supercharge innovation, unlock new levels of efficiency and productivity, and deliver the experiences that help you win.
Platform
Automate business processes and workflows at scale. AgilePoint helps enterprises democratize and accelerate digital transformation, reduce technical debt and future-proof ROI.
Resources
© 2023 AgilePoint. All rights reserved.