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

BAPI_PROJECT_MAINTAIN commit problem

abhishek_katti
Explorer
0 Likes
811

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

4 REPLIES 4
Read only

Former Member
0 Likes
618

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.

Read only

0 Likes
618

Hi,

As Sajan says, use BAPI_TRANSACTION_COMMIT or use COMMIT AND WAIT.

Regards

Subramanian

Read only

abhishek_katti
Explorer
0 Likes
618

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

Read only

0 Likes
618

Hi Abhishek,

I'm just facing the the same crazy thing.

did you get a solutionen to avoid this 5 sec wait

thx Erwin