Application Development 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: 

is there any bapi to save the changes

Former Member
0 Kudos

hai i am using bapi after calling tha bapi i want to save the changes is there anjy bapi to do it,bcos i want to call the same bapi once again, bcos of not delay it is giving me error that the transaction is in progres, but if i debug it is working fine bcos of delay which i am getting due to debugging , so any solution for that

thanx in advance

afzal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Check whether you are using the bapi

BAPI_TRANSACTION_COMMIT

after the execution of the main BAPI to save the changes

Regards

Anji

3 REPLIES 3

Former Member
0 Kudos

Hi

Check whether you are using the bapi

BAPI_TRANSACTION_COMMIT

after the execution of the main BAPI to save the changes

Regards

Anji

0 Kudos

hai anji reddy i did that also and then used commit work and wait but even then it is not allowingn , bcos my scenario is that i am using same bapi to create project then wbs and all , so each time i am calling for different components it is giving that project is currently editing

afzal

0 Kudos

In this case after each BAPI call fm BAPI_TRANSACTION_COMMIT - but make sure that you pass paramter WAIT = 'X' in this call.

If u use BAPI_TRANSACTION_COMMIT without WAIT = 'X' and then perform "commit work and wait" in your calling program this will not solve the problem because BAPI_TRANSACTION_COMMIT called without WAIT = 'X' starts commit in update task and in this case u never know when it finishes.

For the same reason make sure that u have no commit statements between your BAPI calls and the BAPI_TRANSACTION_COMMIT.

This should solve the problem.

But if not, there's one more tricky way: u can use statement "set update task local" before BAPI calls - this makes system perform all updates in the same process which call "commit", not in a separate update task process.