cancel
Showing results for 
Search instead for 
Did you mean: 

Include Phase for Phase with role task assignment in cProjects

0 Kudos

Hi,

When I include a Phase with different tasks and the tasks with Role assignment in to a project, the task-role assignment is not gettting copied.

But when I use a Project template with the same Phase-task-Role task assignments, every thing is getting copied. But for Include phase the task-role assignments are not getting copied.

Can anybody help me how to achieve this functionality?

Thanks and regards,

Jashua

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jashua,

Indeed, the standard include function do not cover the role-task assignments.

To achieve this, one option would be to implement BADI dpr_attributes, method set_defaults_upon_copying, and re-create the role-task assignments from the template data in that step.

Regards,

Matthias

0 Kudos

Hi Matthias,

Thank you very much for your reply.

Here I have a question. Because the method ''SET_DEFAULTS_UPON_COPYING' of the class 'CL_DPR_TASK' is being called in the both cases Create project from template and include a phase in to an existing project. So, if I implement the BAdI method I think it would effect both the times. wouldn't it create the role task assignments twice at the time of project creation.

Also please give me some more details about creating the role-task assignments in this BAdI.

Thanks and regards,

Jashua

Edited by: Jashua Andra on Jan 4, 2012 12:42 PM

Former Member
0 Kudos

Hi,

You're right, the BADI is called in both cases.

What you can do is first to check if the task has any role assignments with method from class cl_dpr_task: lr_task->mr_participant_links->get_all( ).

If populated ==> it means you are creating the task from template, nothing to do.

If empty ==> you can implement your logic to rebuild the role assignment.

To create a role assignment, you can use method: lr_task->mr_participant_links->add

Matthias

ladinca
Participant
0 Kudos

Hi Matthias,

We have the same problem and we cannot understand how to copy from the template the role-assignment with the Include function.

It seems to us the method ''SET_DEFAULTS_UPON_COPYING" can only set a default role and it is not  possible to copy the role coming from the source task. I have input parameters that are not useful to get the role assignment from template.

Can you suggest us anything?

Thank you.

Laura