Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I get the Manager For a Particular Personal Number

former_member70391
Contributor
0 Kudos

Hi Friends,

Could you please help me on this issue. I got a requirement where I need send an vacation report email to the Manager and all the employees below them.

Example: If I taking leave then email should go to my PL then all the employees in the same project who works under the PL.

I know that we can get this information from table HRP1001 but I am not pretty sure how Do I get that information.

Thanks & Regards,

Nagaraj

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Nagaraj,

By passing the orgunit..

1 Get the manager of the organization unit using O-B012-S relationship from infotype 1001

2 Get the person holding the manager position using S-A008-P relationship from infotype 1001.

regards

gowri

9 REPLIES 9

GauthamV
Active Contributor
0 Kudos

Plz SEARCH in SCN before posting.

[Manager For a Particular Personal Number|https://forums.sdn.sap.com/click.jspa?searchID=26421318&messageID=5895810]

Former Member
0 Kudos

Hi Nagaraj,

By passing the orgunit..

1 Get the manager of the organization unit using O-B012-S relationship from infotype 1001

2 Get the person holding the manager position using S-A008-P relationship from infotype 1001.

regards

gowri

0 Kudos

Hi Guatham/ Gowri,

Here is my requirement. Assume that I have following organization structure.

CEO

-


M1 M2

-


PL1 PL2

-


TL1 TL2

-


100 TM 100 TM

Now in the Selection Screen I enter the Personal Number of 10 Team Memebrs(TM). Now report should fetch the Vacation details of 10 TM and it should send the details to 100 TM, TL2(Team Lead), PL1(Project Leader) and M2(Manager) except CEO.

Could you please assist me on this issue.

Thanks & Regards,

Nagaraj Kalbavi

0 Kudos

Hi,

Check this Fm RH_GET_LEADER

You need to pass the Pernr's position to this FM you can get the position value from pa0001

0 Kudos

Hi Avinash,

Thank you for the reply. I want to know is there any FM available which would give me the Employees above the Personal No(Like Team Leaders, Managers etc except CEO) and employees below Personal Number(Like Team Memebrs).

Thanks & Regards,

Nagaraj

0 Kudos

HRWPC_RFC_GET_OBJECTS,

Former Member
0 Kudos

Hi Nagaraj,

1) Take Org unit of the pernr from table PA0001-ORGEH.

2) Now write a query on HRP1001 by taking

otype = 'O'

objid = PA0001-ORGEH

rsign = 'B'

relat = '012'

Here you will get the position that is SOBID.

3) Again write a query on HRP10001 by taking

otype = 'S'

objid = SOBID (Position)

rsign = 'A'

relat = '008'

Here you will get the person(Manager). Here SOBID is the Manager pernr.

Regards,

Kumar Bandanadham

former_member70391
Contributor
0 Kudos

Resolved

0 Kudos

Please let me know which method you used?