cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a BAPI to Include a Staffed Role from a template?

ladinca
Participant
0 Kudos

Dear experts,

We have the need to replicate the behaviour of the "Include Role" standard functionality.

We looked for a BAPI but we could not find anything useful.

We need a piece of code that allows to retrieve a Role from a Template and copy it into a Project, including the already staffed resources.

We have SAP Portfolio and Project Management 5.0

Thank you inadvance for your answer.

Laura

Accepted Solutions (1)

Accepted Solutions (1)

judith_gabriel
Contributor
0 Kudos

Dear Laura,

you can use BAPI BAPI_BUS2178_GET_DETAIL to receive the role details of a template. Then
you can use the BAPI BAPI_BUS2177_CREATE to create the role and BAPI BAPI_BUS2177_STAFFING_ADD to add some staffings.

Best regards,
Judith

ladinca
Participant
0 Kudos

Dear Judith,

Thank you very much for your help.

Best Regards

Laura

ladinca
Participant
0 Kudos

Dear Judith,

Where do I find the value for PROJECTROLE_TMPL_GUID parameter ?

I mean, which table?

Thank you

Kind Regards


Laura

judith_gabriel
Contributor
0 Kudos

Dear Laura,

below you can find the steps to find the GUID for the role in the project-template.

You have a Project template ID: ZJGA_ROLE1 where you can find the project GUID in table

DPR_PROJECT.
External ID: ZJGA_ROLE1

GUID: 6CAE8B774ED61ED4BDFD601A4AFEE92F

The role is available in table CGPL_ENTITY for the project-guid.

Table: CGPL_ENTITY
Project_Guid: 6CAE8B774ED61ED4BDFD601A4AFEE92F
Object_type: MTG

The result is the following:

GUID: 6CAE8B774ED61ED4BDFD61EBCC526931
EXTERNAL_ID: 180000000000000047732015
OBJECT_TYPE: MTG
PROJECT_GUID: 6CAE8B774ED61ED4BDFD601A4AFEE92F

Then you can start BAPI BAPI_BUS2178_GET_DETAIL with PROJECTROLE_TMPL_GUID = 6CAE8B774ED61ED4BDFD61EBCC526931.

Best regards,
Judith

ladinca
Participant
0 Kudos

Thank you Judith!

My best regards.

Laura

Answers (0)