cancel
Showing results for 
Search instead for 
Did you mean: 

Rule for Head of Department.

Former Member
0 Kudos

Hi all,

My requirement is to find the HOD of a particular department whose any eployee's id I have.

Can anyone suggest me a rule which actually gets me the Chief of that particular department for which I m passing any user id.

Thanks and Regards,

Sudipto.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudipto ,

Try rule AC00000157 . Bind the user name with ORG_OBJECT . I think that should sovle your problem .

Thanks ,

Sonu .

Former Member
0 Kudos

Hi Sudipto,

I think Sonu is talking about to BIND the user name with ORG_AGENT not ORG_OBJECT.

Former Member
0 Kudos

Hi Sonu,

Thanks for ur reply...

I feel u r suggesting Rule: 157. But this rule is giving the posiions of immediate superiors instead of the HOD for that dept.

So it does not solve my purpose.

Moreover Rule 168 also gives the persons of immediate superiors.

So my problem......

Thanks,

Sudipto.

Former Member
0 Kudos

Hi Sudipto,

Here is the correct link:

Hope it helps.

Regards,

Akshay

Former Member
0 Kudos

Hi Akshay,

Thanks for the link....

But it is for Rule No.168 which fetches immediate boss. But my req. is for the HOD of the initiator's dept.

So this doesn't solve my problem....

Thanks and Regards,

Sudipto.

Former Member
0 Kudos

Hi Sudipto ,

There one other way to get Head of dept . You maintain it in the table through some relation . Create a FM that will read the relationship and give you the user name .

Assign this FM to custom role .And this newly created role to the task .

You will need to use following FMs :

'RH_GET_ACTORS' , 'RH_STRUC_GET' etc.

Hope this helps .

Thanks ,

Sonu M

Message was edited by: Sonu M

Former Member
0 Kudos

Hi Sonu,

I’m sure there is a better way to do this, but I’ll give you the solution that does not require any ABAP coding.

That is to create a role to specifically determine the Director of an Org Unit.

The role should check the Initiator’s Org Unit and Return the Director of that org unit.

So you will need to setup one Role that contains many responsibility – each responsibility is a org unit and you will assign a director to that org unit via POSITION assignment.

Do this by:

1. Create a Role through PFAC.

2. Role Definition = Responsibility.

3. Goto Container Tab and add element of Organizational Unit (P0001-ORGEH). This is your test criteria.

4. Goto Responsibility tab and create and NEW Responsibility -> In the Organizational Unit field enter an Org Unit number and SAVE.

5. Click on the Responsibility you have created and INSERT AGENT ASSIGNMENT -> Assign the Director of that Org unit by Position Number.

6. Repeat steps 4 and 5 for each of the Org Units in your company.

7. Save and Test (simulate role resolution) – When you enter an Org Unit, the Role should return the Director of that Org Unit.

8. Place this Role into your Decision Step (Approval Step) and ensure you bind the Org Unit of the Initiator to the Role (You may need to create an attribute for Org Unit in your Employee BOR if you have not done so already – This may require very minimal coding).

This way is quite simple because you only have a handful of Directors and maintenance would be minimal as you are assigning agents through position numbers.

Cheers,

Tom

Former Member
0 Kudos

Hi Sudipto,

If your problem is still not solved, would like to suggest following:

Create a custom rule using FM RH_GET_STRUCTURE.

Use evaluation path US_CHEF.

For Binding container elements, from workflow to rule container, pass value of respective user to element Org_Agent of rule. In return this rule will give you position of user's chief.

Hope this helps.Let me know if you need anything on this.

Regards,

Akshay Bhagwat

Note: Pls mark helpful answer and close the thread if problem is solved.

Former Member
0 Kudos

Hi Tom!!!

Superb!!!

U solved my problem. Though I had developed ABAP prog for methods which also solved my purpose. But this is much easier.

Thanks and Regards,

Sudipto.

Former Member
0 Kudos

You're welcome Sudipto.

Cheers,

Tom

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sudipto,

I'll give my comments as well..

From your replies I understood that for the input employee, the HOD might not be assigned to the same organizational unit as the employee or that there can be multiple managers and only one HoD in an org unit, right? And this is why you can't retrieve the immediate superior with the standard rules, right?

The main question here is that how do you then identify that a manager or a manager position is an HoD. Is the HoD assigned to a manager position in the next upper organisation unit, does he have special authorizations or other characteristics which differentiate him from normal superiors assigned to manager positions or is there another rule how the HoD can be determined from the org chart?

When the business logic of the retrieval is clearly defined, you can then code the logic with ABAP and retrieve the correct agent to the workflow. The code itself could be using e.g. a mixture of evaluation paths and standard function modules but the logic has to be defined first.

Hope this helps,

Mikko

Former Member
0 Kudos

Hi Sudipto,

Refer SDN thread :

It should also help you on how to use this rule.

Regards,

Akshay

Note: Pls mark helpful answers.

Former Member
0 Kudos

Hi Akshay,

Thanks for replying...

But the SDN thread u have mentioned is for this page only....

Regards,

Sudipto.