cancel
Showing results for 
Search instead for 
Did you mean: 

Update company code on project definition creation

Former Member
0 Kudos

Dear all,

We use PPM 5.0 and PS Project synchronization to automatically create PS Project upon some status change in cProject.

PS Project definition creation itself works fine. Now we would like the company (field 'PBUKR' of PRPS) to be also synchronized with the portfolio element linked to the cProject.

Today, when the PS Project is automatically created, the company is set to the one defined in the project profile. We would like to replace its value as soon as the PS Project is created.

How to do this?

I tried with BAdI WORKBREAKDOWN_UPDATE, but this BAdI has no output/changing parameters, and I can see no way to update the company using it (same with BAdI PROJECTDEF_UPDATE).

Inside this BAdI, I also tried to update the project definition using FM BAPI_PROJECTDEF_UPDATE and BAPI_PROJECT_MAINTAIN, but it didn't work. I presume it didn't work because at the time the BAdI is called, the project definition is not actually stored in the Database.

Any idea?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am not sure, but have checked the possibilty to update it using substitution?

In substitution, write the code to replace the existing company code with the company code which is there in cProject.

I think it should be possible this way.

Regards,

Mahendra

Former Member
0 Kudos

Thank you for your reply.

Yes, we thought about this solution, but we would prefer to not use it. And I'm not sure we would be able to retrieve the cProject linked to the PS Project, as the external ID would probably not be set at that time.

sanjeevc
Active Contributor
0 Kudos

Execute OPSA project profile don't put company code which already set as you said and mark required field PROJ-VBUKR in field selection for PD.

below link may be give you some ideas for how to change company code or alternate solution.

http://scn.sap.com/message/7177668

Rest wait for expert comments.

Regards,

Sanjeev

Former Member
0 Kudos

Thank you for your reply!

I'm pretty new to PS Project, and I'm not sure to understand what you mean by "mark required field PROJ-VBUKR in field selection for PD".

By the way, I'm not sure it was very clear in my previous message, but the company code will not be a constant, it will depend on a custom field stored in the RPM item (table /rpm/item_d) linked to the project.

Finally, are you able to confirm/infirm that I couldn't change the company code in the WORKBREAKDOWN_UPDATE BAdI using the BAPI_PROJECTDEF_UPDATE function module BECAUSE at the time the BAdI is called the project definition is not actually stored in the Database?


Do you know if there is a FM or a method that could do it, i.e. that would work with the buffer instead of working with the database?