‎2007 Feb 21 3:39 AM
Hi,
I'm creating my projects thru BAPI_PROJECT_MAINTAIN which is working fine.
After creation of project, I'm submitting one program to create the partners assingment to this newly created project.
But for this I have to use the statement Wait upto 5 seconds, otherwise it creates the project but doesnot creates partner assignments, hardcoding wait statement may create problems in future.
How I should code to recognise whether project data is updated in databases or not. so as per that wait logic i can trigger the another program.
Your Help will be appreciated.
Thanx.
Abhishek
‎2007 Feb 21 4:33 AM
hi Abhishek,
after the BAPI_PROJECT_MAINTAIN call, if SY_SUBRC = 0,
call BAPI_COMMIT (or BAPI_TRANSACTION_COMMIT), to ensure that the database is updated. After this, you can trigger the next program using submit.
Hope this helps,
Sajan Joseph.
‎2007 Feb 21 4:48 AM
Hi,
As Sajan says, use BAPI_TRANSACTION_COMMIT or use COMMIT AND WAIT.
Regards
Subramanian
‎2007 Feb 21 4:54 AM
Hi friends, Thanks, But I used both methods still it is giving the problems. As commit and Wait is not used for any bapi transaction update it is not waiting for project creation & updation in database it immediately triggers my external program.
Waiting for any other solution.
Thanks.
Abhishek
‎2009 Sep 06 11:38 AM
Hi Abhishek,
I'm just facing the the same crazy thing.
did you get a solutionen to avoid this 5 sec wait
thx Erwin