cancel
Showing results for 
Search instead for 
Did you mean: 

How to release tasks sequential ?

Former Member
0 Kudos

Hi,

The cProject 4.0 online doc

http://help.sap.com/saphelp_ppm400/helpdata/en/03/fd1c3d2b058c4ce10000000a114084/content.htm

said:

The release of the phase leads to the release of all the tasks and checklists.

When the phase be released, we need to release the first tasks and sequential release every tasks one by one after these tasks be completed, but not to release all of the tasks once. How can cProject do this?

Which workflows of phase do controls the release of its tasks?

Best regards,

laodongdang

Accepted Solutions (0)

Answers (1)

Answers (1)

silvia_kreuzhuber
Active Participant
0 Kudos

Hi,

you could implement BAdI DPR_EVENTS method IF_EX_DPR_EVENTS~ON_EVENT for example. Here you can integrate your own logic so that not all tasks are released automatically. The filter value would be event 'RELEASED' and method 'ON_PPO_RELEASED'.

Regards,

Silvia

Former Member
0 Kudos

Hi, Silvia,

Thank you very much.

I have tried to make a sample implemenet Z_DPR_EVENTS about the BAdI DPR_EVENTS method IF_EX_DPR_EVENTS~ON_EVENT, and actived it.

METHOD IF_EX_DPR_EVENTS~ON_EVENT .

*/Assume this is an implementation for FLT_VAL = 'ON_PPO_RELEASED'.

*/ Depending on the value of the phase type some actions have to be performed.

*/From the parameter section of the event handler method

*/ ON_PPO_RELEASED:CL_DPR_EVENT_OBSERVER we learn that the parameters are

*/ SENDER and EV_PREVIOUS_STATUS. SENDER in this method is available as IR_SENDER,

*/ and IV_PARAM1 contains EV_PREVIOUS_STATUS.

*/Note:

*/ For FLT_VAL = 'ON_PPO_APPROVAL_GRANTED', e.g. IV_PARAM1 is a reference to an instance

*/ of CL_DPR_APPROVAL_O. In this case you have to assign IV_PARAM1 to a field symbol

*/ TYPE REF TO cl_dpr_approval_o!

DATA:

lv_phase_type TYPE dpr_tv_pha_type,

lr_phase TYPE REF TO cl_dpr_phase_o.

*/Cast IR_SENDER to LR_PHASE

lr_phase ?= ir_sender.

lv_phase_type = lr_phase->get_phase_type( ).

BREAK-POINT.

CASE lv_phase_type.

WHEN 'A'.

*/ Do something

IF iv_param1 = 'E0001'.

ELSEIF iv_param1 = 'E0002'.

ENDIF.

WHEN 'B'.

*/ Do something

WHEN OTHERS.

*/ Do something else

ENDCASE.

ENDMETHOD.

I want to see what happend and debug it, so I have put a BREAK-POINT in the sample code.

But when I tried to release a phase, seemingly it has not run at all, nothing happened and the all tasks that belong the released phase have release.

Best regards,

Shen Rong

thomas_berndt
Active Participant
0 Kudos

Shen Rong,

I can imagine that the reason for the BREAK-POINT not being hit is the fact that cProjects is a WebDynpro application. Debugging can be a bit tricky there...

Have you tried to set an external breakpoint from within the ABAP-editor?

If you have several servers on which cProjects is run, the breakpoints must be set on all of them. This is most conveniently achieved by using transaction srdebug (confirming the first dialog, and keeping the following one Stop Debugging?... )

Hoping this helps.

Best regards,

Thomas

Former Member
0 Kudos

Dear Thomas,

Thank you very much!

I have done something as you said set an external breakpoint and using transaction srdebug, but I'm still failed to debug the sample BAdI . I do not know if the BAdI not run at all.

Best regards,

Shen Rong

thomas_berndt
Active Participant
0 Kudos

Hello Shen,

that is strange indeed. In order to check whether your BAdI is called at all, you can set a break-point in method

CL_DPR_BADI_SERVICES->EVENTS_ON_EVENTS

at statement

CHECK lr_badi IS BOUND.

If lr_badi is not initial, some BAdI-implementation has been found and the next statement that will be executed, will then call that particular implementation.

This should provide some more insight... hoping it helps.

Best regards,

Thomas

Former Member
0 Kudos

Hello!

I had the issue a few months ago, and I noticed the filter section of the badi implementation has to be filled-in. The BADI is not triggered if you don't mention the event to be checked in the BADI implementation.

Could you try to add this and tell me the result?

Matthias

silvia_kreuzhuber
Active Participant
0 Kudos

Hello Shen,

as mentioned in my first reply, you need to define the filter with value 'ON_PPO_RELEASED', please open your implementation in change mode and go to the tab 'Attributes'. In the lower area you have a button for adding filter values ('Insert Row'). Next use the F4-help to add 'ON_PPO_RELEASED'.

And yes, you need to set 'external' breakpoints as session breakpoints will not have any effect in case of WebDynpro applications as already mentioned by Thomas.

Hope this helps.

Regards,

Silvia

Former Member
0 Kudos

Dear Silvia, Thomas and Matthias,

Thank you very mach!

The filter has been set.

I have tryed doing followed actives.

1, I opened the class CL_DPR_BADI_SERVICES in edit mode.

2, I opened the method CL_DPR_BADI_SERVICES->events_on_event.

3, I set a external break-point at line check lr_badi IS BOUND.

4, I opened a testing cProject project.

5, I run t-code srdebug, and select "all Appl.Servers" and "External breakpoints already set", and ENTER, and let the "Romote ABAP debugging" dialogue box sticked on screen.

6, I set a phase of my testing project to status "Release".

I hope to see the program stop at line check lr_badi IS BOUND.

But it did not happened.

I wander what something is wrong ?

Best regards,

Shen Rong

Edited by: Rong Shen on Jan 18, 2009 2:07 PM

silvia_kreuzhuber
Active Participant
0 Kudos

Hello Shen,

strange, I just tried it in my system and the system stopped at the breakpoint in method IF_EX_DPR_EVENTS~ON_EVENT of the BAdI when trying to release a phase.

Please make sure that both, the method ON_EVENT and the implementation of the BAdI are activated! Maybe only the method is active in your system but not the implementation itself.

If this should not help, could you please attach a screenshot of your BAdI definition, tab 'Attributes' and the debugging settings (under menu 'Utilities' > 'Settings' > 'ABAP Editor' > 'Debugging')? Maybe some setting is still missing...

Regards,

Silvia

Former Member
0 Kudos

Dear Silvia,

Thank you very much!

Since the helping of you and Thomas and Matthias, I have begun to debug the BAdI implement Z_DPR_EVENTS about the BAdI DPR_EVENTS method IF_EX_DPR_EVENTSON_EVENT. The code of the method IF_EX_DPR_EVENTSON_EVENT is just above SAP's sample code.

My objective is bypath the SAP's phase release strategy that will leading release all of the phase's tasks and checklist, instead of releasing first task and followed tasks, one by one. I found that although the BAdI implement Z_DPR_EVENTS was exculted, but SAP's standard release method still released all of the phase's tasks. My problem is, how can I bypath the SAP's standard phase release strategy and instead of my BAdI implement Z_DPR_EVENTS method IF_EX_DPR_EVENTS~ON_EVENT ?

Best regards,

Shen Rong

thomas_berndt
Active Participant
0 Kudos

Hello Shen,

from the beginning of this thread I've had doubts that it would be possible to program the BAdI to change the the standard execution of the release-process such that only the first task would be released. I wasn't completely sure, but if I'm not completely mistaken, the standard method proceeds (and therefore releases all the tasks) irrespective of what was done inside the BAdI, as it's primary purpose is to provide a means to alter some attributes, and not change the process logic.

An alternative, that you might want to consider, could be using a some status-profile that provides user statuses, that can take over the role you intend for the status 'Released'.

Best regards,

Thomas

Former Member
0 Kudos

Dear Thomas,

I and my customer very wonder of the phase process logic. I prefer that SAP do not release tasks after release phase. So, I can develop a workflow to implement any process logic that I needed. In fact, the first thing that I must to do is bypath the SAP's phase release leading release its tasks process logic.

Best regards,

Shen Rong

thomas_berndt
Active Participant
0 Kudos

Dear Shen,

I regret that this is so. But this process was designed to be that way, and it is not something that can be changed in a running release. And besides it's quite in line with other SAP products where the status changes act hierarchically top-down, as in e.g. the ProjectSystem.

Best regards,

Thomas

Former Member
0 Kudos

Dear Thomas and everyone,

Thank you very much. You are right. I have defined user status "Pre-Released" within user status profile for task, so I have controled which task will be released by phase releasing.

I think, the next thing is to developing a workflow to release the successor tasks when the predecessor task be released. I want to know others customer how to solve this problem. Do you have any good ideas?

Best regards,

Shen Rong

Former Member
0 Kudos

Hi,

I need modify release logic of the cProject's task. I am developing the phase release workflow. In this workflow I want to trigger workflow to sequential release every tasks that belong this phase. I developed a Z method of BUS2173 (Phase) and call the BAPI_BUS2173_GET_TREE, then I got Task_IDs of all of the tasks, but I do not know how to get the TASK BOR reference with these TASK_IDs.

Can I get TASK BOR reference and raise its event from a method of the PHASE BOR ?

Thanks.

Arrow Yang.