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

Project is currently being processed Problem

Former Member
0 Likes
2,470

Hi Friends,

I am creating projects using BAPI 'BAPI_PROJECTDEF_CREATE' and passing these Projects to BAPI 'BAPI_PROJECT_MAINTAIN'

for creating WBS elements. but when i am uploading legacy data throuch my program to create projects and WBS elemets throrch IDOC Process, sometimes i am getting an IDOC ERROR is " Project is currently being processed " is coming in IDOC status 51. but when i am see in proj table the failure idocs projects are created.

i am written 'BAPI_TRANSACTION_COMMIT' only after BAPI 'BAPI_PROJECTDEF_CREATE not for BAPI BAPI_PROJECT_MAINTAIN.

so if i write 'BAPI_TRANSACTION_COMMIT' after BAPI 'BAPI_PROJECT_MAINTAIN' the above error will be solved?

Kindly advice.

Regards,

Kumar.

4 REPLIES 4
Read only

Former Member
0 Likes
1,472

Check the user from the return message who is currently processing the Proj def. If its the same user the Idoc's are processed by, then you have to check for the locking of the Proj before 'BAPI_PROJECT_MAINTAIN' and some logic to delay and check again if lock is released for limited number of times.

Read only

raviahuja
Contributor
0 Likes
1,472

Hi,

I would suggest you to use COMMIT after each BAPI call but this can hinder your performance as well. So please before applying that.

Also, call BAPI_PROJECT_MAINTAIN inside a DO loop like DO 3 TIMES and if it returns that project is locked, apply some delay using WAIT statement. If not, then simply exit the DO loop and proceed,

Thanks.

Ravi

Read only

Former Member
0 Likes
1,472

Hi,

This is a very common problem in PS (Project Systems) during the creation of projects. Actually the cause of this is, once you have created the project, there are a number of database updates going on in the background corresponding to the new project that has been created. Even before all these updates are over, your program is calling the function module to create the WBS elements under it. Hence the message comes as the 'Project is currently being processed by 'user ID (your user ID)'.

In order to avoid this keep a 'Wait until 2 seconds' statement after you have used BAPI_TRANSACTION_COMMIT' for project creation and before calling the function module to create WBS elements under the project. This will solve the problem.

Read only

Former Member
0 Likes
1,472

Hi Friend,

Thanks for your reply.

Now its working fine..... thanks alot....

regards,

Kumar.