2014 Feb 21 7:18 AM
Hi,
I have a small issue when using BUPA_IDENTIFICATION_* - function modules.
When I use them within a loop I get errors saying that business partners are locked by me.
I tried using 'COMMIT WORK AND WAIT' statements after the function modules but that results in incorrect updates.
Please let me know if you have any suggestions as to how I can eliminate this error.
Thanks,
Martin
2014 Feb 21 7:58 AM
Hi Martin
Why are you using BUPA one you should use BAPI BAPI_IDENTIFICATION_ADD and after the sucesscall of it call BAPI_TRANSACTION_COMMIT
Nabheet
Hi,
I have a small issue when using BUPA_IDENTIFICATION_* - function modules.
When I use them within a loop I get errors saying that business partners are locked by me.
I tried using 'COMMIT WORK AND WAIT' statements after the function modules but that results in incorrect updates.
Please let me know if you have any suggestions as to how I can eliminate this error.
Thanks,
Martin
2014 Feb 21 7:58 AM
Hi Martin
Why are you using BUPA one you should use BAPI BAPI_IDENTIFICATION_ADD and after the sucesscall of it call BAPI_TRANSACTION_COMMIT
Nabheet
2014 Feb 21 8:02 AM
Hi Nabheet,
Thanks for your answer. I have tried that, but I get incorrect updates. I have also read in another thread that it is not recommened using the BAPI_TRANSACTION_COMMIT.
/Martin
2014 Feb 21 8:08 AM
Solved.
I used the export parameter 'WAIT' in 'BAPI_TRANSACTION_COMMIT'-
This works.
/Martin
2014 Feb 21 8:10 AM
Hi Martin
Can you please elaborate what incorrect updates you got. If you look inside the function module called inside this BUPA_IDENTIFICATION_ADD. It has perform save on commit. I believe you will have to use BAPI_TRANSACTION_COMMIT to save data. If you use it outside loop it will only save the last data.
Ofcourse you will have to put a check before calling the BAPI whether partner is unlocked or not if not unlcoked wait for sometime and try again. The reason why you have to put this is because the data is getting updated in Update mode and it may happen that you are trying to modify same partner when the previous data has not been updated.
Nabheet
2014 Feb 21 8:11 AM
Martin this wait will still not guarntee you the locks are released or not.. I will advise you put a locking check also to be on safer side
Nabheet
2014 Feb 21 12:25 PM
Hi Nabheet,
The update errors were mainly, that when adding data to identification tab on the business partner, not all entries where added.
I have implemented lock-checks now just to be on the safe side. Performance wise it is kind of heavy now, but it is not a porblem, so thanks.
Martin
2016 Jul 26 7:42 PM
Hello Nabhdeep,
I am also facing a similar issue . I have to update ID numbers on BP and i have around 2 lakh entries to be updated, when i use commit work inside the loop for each record, i get lock issues and when i use the commit work outside the loop the commit is taking reallly long time.
I am using bupa_identifiction_add FM in a loop. which is better bupa or bapi_identification_add?
Also should i use commit work or bapi_transaction_commit?
Could you please help.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |