Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Commit and wait after BUPA_IDENTIFICATION_ADD FM?

Former Member
0 Likes
3,934

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

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
2,737

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 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

7 REPLIES 7
Read only

nabheetscn
SAP Champion
SAP Champion
2,738

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

Read only

0 Likes
2,737

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

Read only

0 Likes
2,737

Solved.

I used the export parameter 'WAIT' in 'BAPI_TRANSACTION_COMMIT'-

This works.

/Martin

Read only

0 Likes
2,737


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

Read only

0 Likes
2,737

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

Read only

0 Likes
2,737

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

Read only

0 Likes
2,737

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.