on 09-15-2008 9:18 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use this FM RH_GET_LEADING_POSITION
Regards, IA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.