cancel
Showing results for 
Search instead for 
Did you mean: 

How to get assigned persons

Former Member
0 Kudos

Hi Friends,

How can i get assigned persons.

If i provide superior ( user id OR Name OR personnel number ) i need to get all persons under that superior.

Is there any BAPI or Function module or any standard report.

And let me know the parameters also.

Thanks,

Kumar.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

use the FM RH_STRUC_GET and pass the object type as S and objid as position of the manager, and pass the evaluation path as (A002 or B002 m not sure abt this), you will be able to find all employees reporting to that position.

Cheers

Saurabh Anand

imthiaz_ahmed
Active Contributor
0 Kudos

Use this FM RH_GET_LEADING_POSITION

Regards, IA

Former Member
0 Kudos

Hi IA,

Those function modules giving Hole Org unit. But my Requirement is not like that i need only Approver's below persons (Only one level).

Is it possible.

This is for ESS single level approver report. Like

A is CEO under A -> B,C are Managers.

Under B another 2 persons -> D,E

Under D another 2 persons -> F,G.

Under E another 2 Persons -> H,I.

I need functional module like if i provide D i need to get F,G

If i provide A i need to get B,C only not hole unit. I need only one level. Not all levels. I tried all functional modules. All are giving hole unit. I dont want hole unit. I want only one level.

Any inputs will be a greate help.

Thanks,

Kumar.

Former Member
0 Kudos

Hi,

Have a look into the HR table HRP1001 which stores the relationships of the persons. It would be ideal to take help of a HR consultant to be able to use this table and get the desired results of your requirement.

Hope this will help.

Regards,

Sam

Former Member
0 Kudos

Hi Samson,

Yes your are correct i need to take HR help But at present no HR is available. That is the reason i am searching alot. Can anybody help please....

Thanks,

Kumar

Former Member
0 Kudos

Hi Kumar,

Try this FM : SWI_GET_USERS_OF_ORG_UNIT

Former Member
0 Kudos

Hi,

This function module also giving hole unit. I need only one level.

Thanks in advace,

Kumar.

Former Member
0 Kudos

I think you have to find a reverse process of standard Rule 168 and 157.Please check this rules from PFAC_DIS transaction code.

Thanks

Arghadip

Former Member
0 Kudos

Hello,

I was able to get the logic to get the assigned persons using the table HRP1001. The below is the assumed logic (small modifications may be necessary).

First the PERNR of A is to be found out(if only name of userid is available) from the table PA0105. Once the PERNR is available, get the position of A using the following code.

SELECT SINGLE SOBID INTO V_SOBID

FROM HRP1001

WHERE OTYPE EQ 'P'

AND OBJID EQ OBJID

AND PLVAR EQ '01'

AND RSIGN EQ 'B'

AND RELAT EQ '008'

AND BEGDA LE DATUM

AND ENDDA GE DATUM

AND SCLAS EQ 'S'.

Now get the subordinate positions who are one level under him using the below code.

SELECT OBJID INTO TABLE I_OBJID

FROM HRP1001

WHERE OTYPE EQ 'S'

AND PLVAR EQ '01'

AND RSIGN EQ 'A'

AND RELAT EQ '002'

AND BEGDA LE DATUM

AND ENDDA GE DATUM

AND SCLAS EQ 'S'

AND SOBID EQ V_SOBID.

Now get the pernr of the subordinate positions

SELECT SINGLE SOBID INTO SOBID

FROM HRP1001

WHERE OTYPE EQ 'S'

AND OBJID EQ OBJID è from I_OBJID

AND PLVAR EQ '01'

AND RSIGN EQ 'A'

AND RELAT EQ '008'

AND BEGDA LE DATUM

AND ENDDA GE DATUM

AND SCLAS EQ 'P'.

The userid's can be obtained from the table PA0105.

Hope this will help.

Regards,

Sam

Former Member
0 Kudos

As someone mentioned earlier use RH_STRUC_GET . It can give up to any levels as desired.

Former Member
0 Kudos

Hi Samson,

Thanks for greate help.

Now get the subordinate positions who are one level under him using the below code.

SELECT OBJID INTO TABLE I_OBJID

FROM HRP1001

WHERE OTYPE EQ 'S'

AND PLVAR EQ '01'

AND RSIGN EQ 'A'

AND RELAT EQ '002'

AND BEGDA LE DATUM

AND ENDDA GE DATUM

AND SCLAS EQ 'S'

AND SOBID EQ V_SOBID.

here no entries showing HRP1001.

Thanks for help.

Thanks,

Kumar.

Former Member
0 Kudos

Hello,

If you are already aware of the PERNRs of the subordinates under A, then try this. Get the position of subordinates and use them in the OBJID field and the other fileds with the same values that are in the where condition. Leave the RSIGN and RELAT fields as blank.

Now you must be able to get the entries of A and his subordinates. Get the RELAT and RSIGN and use them in the select statement. You may have to check for the dates as well.

Hope this will help.

Regards,

Sam

Former Member
0 Kudos

HI,

Try the FM

BAPI_ORGUNITEXT_DATA_GET

Hope this helps

venu

Edited by: Venugopal Jogi on Sep 15, 2008 10:04 AM

Sorry,

I didn't see your requirement properly. Try the FM's

HRCM_GET_ORGUNITS_FOR_MANAGER to get Org. Unit of the Magr and then use the FM

HRCM_ORGUNIT_EMPLOYEE_LIST_GET

Hope this helps

venu