on 05-15-2019 2:30 PM
Hello everybody,
Can problems arise (at booking or lock) if the BAPI_TRANSACTION_COMMIT is called by default? No matter if necessary or not for the BAPI.
For example, in a chain of BAPIs after every single BAPI.
Furthermore, can it also be a problem if a commit is already set in a Z-BAPI and then BAPI_TRANSACTION_COMMIT is called again?
Best regards,
Christian
Hi Christian,
@ nawanandana.edirisinghe explained well what happens if you do not call the BAPI_TRANSACTION_COMMIT after invoking an Update/Creation BAPI.
After a READING one, things are a bit more complex: invoking a DB update has no effect on the BAPIs themselves, but you should ask yourself if it could effect your custom code (i.e. some kind of Z-table writing).
If I'd be you, I'd remove all the useless BAPI_TRANSACTION_COMMIT and, if I was you, I'd also add the BAPI_TRANSACTION_ROLLBACK instead of COMMIT one if you face an error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Your problem not much clear , Simplify If you used standard BAPI to update SAP transactional data, most of the time you have to place BAPI_TRANSACTION_COMMIT to commit.
If you need more information kindly look at the bellow blog.
Regards,
Nawa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Example: A large number of BAPIs are called one after the other at the target system (process chain of BAPIs).
Not all of them require a BAPI_TRANSACTION_COMMIT - e.g. a read-only BAPI.
Nevertheless, a BAPI_TRANSACTION_COMMIT is made behind every BAPI.
Can these unnecessary BAPI commits create a problem while booking or locking.
Hi Christian Kutsch,
Answer to your question Its depend of the situation where you use commit function.
Ex: if you have 10 GL document to post using BAPI_ACC_DOCUMENT_POST , you can run this FM 10 time without committed . finally you need to committed to update database. then only it will update 10 document in database.
If you used BAPI_GOODSMVT_CREATE FM , each time you have to commited otherwise you can't proceed.
So for you if you think its necessary commit statement available , you can remove it.
If you have any issue with locked object follow the below link.
https://blogs.sap.com/2008/04/19/abap-pitfalls-part-1-lock-objects-and-commit-work/
Regards,
Nawa.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.