09-19-2007 2:23 PM
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
09-19-2007 2:29 PM
Hi
Check whether you are using the bapi
BAPI_TRANSACTION_COMMIT
after the execution of the main BAPI to save the changes
Regards
Anji
09-19-2007 2:29 PM
Hi
Check whether you are using the bapi
BAPI_TRANSACTION_COMMIT
after the execution of the main BAPI to save the changes
Regards
Anji
09-19-2007 2:42 PM
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
09-19-2007 9:24 PM
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.