cancel
Showing results for 
Search instead for 
Did you mean: 

OADP Exclude Managers is excluding non-managers

0 Kudos

I created a new OADP view for a Team Calendar. One of the rules I created has a new Evaluation Path that specifies a S BZ03 S relationship where Z03 is a new custom relationship. The problem I am facing is that it only picks up the related positions if the "Exclude Managers" flag is off. The scenario is that we have position linked to a manager via custom relationship Z03.

The complete Evaluation Path is as follows:

10 O B 003 S

20 S A 008 P

30 S B Z03 S

In my rule for object selection, if I have "Exlcude Managers" on then I do not get the holder of the S linked by Z03 but if I turn the "Exclude Managers" flag off then I do. The holder of the position is not a manager but is being excluded.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I found the reason,

There is a Badi that gets called if the Exclude Managers flag is on. If there is no custom implementation of the Badi then a standard function is called by the standard implementation of the Badi..

The function is HRWPC_OADP_EXCLUDE_MANAGER and this function determines which objects in your hitlist should be deleted. It correctly identified my manager positions and holders. The problem comes in when the function calls function hrwpc_oadp_remove_objects to actually remove the objects. It calls the function with a flag XDELETESUBTREE = 'X'.

If this flag is on then the function looks at all objects to be deleted and deletes any objects that have field PUP linked to them.

Because the position S is linked to my managers position via relationship Z03, in the structure the PUP field of the position points to my managers position and because the function is called with the option to delete subtrees it gets deleted.

So the solution is to implement my own Badi, copy the code from standard and make one small change - call function HRWPC_OADP_EXCLUDE_MANAGER with the parameter XDELETESUBTREE = ' '.