Get Employees under a manager
Hi,
How to get all the employees reporting to a manager based on the manager's personnel number.
How to use this FM RH_STRUC_GET to find all the employees reporting to a manager with the pernr of the manager.
Please reply at the earliest.
Thanks
Hi
Give the following inputs for the FM RH_STRUC_GET
ACT_OTYPE : O
ACT_OBJID :Manager's Org unit ID
ACT_WEGID : MSSDIREC-Evaluation path(If you are looking only at the direct reportees)
This combination gives you the Direct reportees of the Manger.
Hope this helps you.
Regards
Devi
Similar Messages
-
Fm to get employee under manager of all org unit
hi,
i have requirement that i need list of all employee under particular manager i know abt HRWPC_PNP_MANAGED_EMPLOYEES but i don't know how to use it is thr any fm reg it .
thanks in advanceHi Rajan,
Below is the sample code for your reference...
REPORT zrnd.
*database tables used
TABLES:pa0001, "Infotype 0001 (Org. Assignment)
hrp1001, "Infotype 1001
pa0002. "Infotype 0002 (Personal Data)
*internal tables declaration
**----internal tables for holding
DATA:t1001 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1002 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1003 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1004 LIKE p1001 OCCURS 0 WITH HEADER LINE,
t1222 LIKE p1222 OCCURS 0 WITH HEADER LINE,
t0001 LIKE p0001 OCCURS 0 WITH HEADER LINE,
t0002 TYPE p0002 OCCURS 0 WITH HEADER LINE.
DATA: w1222 TYPE hrp1222 .
DATA : z1222 TYPE hrt1222 OCCURS 0 WITH HEADER LINE.
DATA: res TYPE swhactor OCCURS 0.
DATA: wa_res TYPE swhactor.
Data : f_code type ABTNR,
p_code type ABTNR,
f_text type VTEXT,
p_text type VTEXT,
s_pernr type Pa0001-PERNR,
s_name type pa0001-ename.
*variable declaration
**---0 to capture the id of the object "may be orgunit, position, persion.
DATA: g_sobid1 LIKE p1001-objid,
g_sobid2 LIKE p1001-objid,
g_sobid3 LIKE p1001-objid,
* *--to capture the personnel number
g_pernr LIKE pa0002-pernr.
Constants : c_function type c value 'F',
c_Proces type c value 'P'.
*selection screen paramters
**----enter a valid personnel number
PARAMETERS:p_pernr LIKE pa0002-pernr.
*start of selection
START-OF-SELECTION.
*Get the Position for entered Personnel number
*----RH_READ_INFTY function module is used for the OM infotypes ..starting with HRP
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'P'
objid = p_pernr
infty = '1001'
subty = 'B008'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1001
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
IF sy-subrc = 0.
* MESSAGE 'this number is not maintained in hrp1001' TYPE 'I'.
ENDIF.
*Get the latest record reading T1001 with following values
SORT t1001 BY begda DESCENDING .
READ TABLE t1001 WITH KEY objid = p_pernr "personnel number
otype = 'P' "Person
rsign = 'B' "hirarchy top down
relat = '008' "Holder
sclas = 'S'. "Position
IF NOT t1001[] IS INITIAL.
g_sobid1 = t1001-sobid. "ID of Related Object
*Get Org unit for the position obtained from above
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'S'
objid = g_sobid1
infty = '1001'
subty = 'A003'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1002
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
IF sy-subrc = 0.
ENDIF.
ENDIF.
SORT t1002 BY begda DESCENDING .
READ TABLE t1002 WITH KEY objid = g_sobid1
otype = 'S' "Position
rsign = 'A' "bottom up
relat = '003' "Belongs to
sclas = 'O'. "org unit
IF NOT t1002[] IS INITIAL.
g_sobid2 = t1002-sobid.
*Get position for the Org unit (Manager)
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'O'
objid = g_sobid2
infty = '1001'
subty = 'B012'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1003
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
ENDIF.
SORT t1003 BY objid.
READ TABLE t1003 WITH KEY objid = g_sobid2
otype = 'O' "org unit
rsign = 'B' "hirarchy top down
relat = '012' "Manages
sclas = 'S'. "Position
IF NOT t1003[] IS INITIAL.
g_sobid3 = t1003-sobid.
*Get Personnel number for the Manager
CALL FUNCTION 'RH_READ_INFTY'
EXPORTING
plvar = '01'
otype = 'S'
objid = g_sobid3
infty = '1001'
subty = 'A008'
begda = sy-datum
endda = sy-datum
TABLES
innnn = t1004
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.
* if sy-subrc <> 0.
* MESSAGE 'this number is not maintained in hrp1001' TYPE 'I'.
* endif.
ENDIF.
READ TABLE t1004 WITH KEY objid = g_sobid3
otype = 'S' "Position
rsign = 'A' "bottom up
relat = '008' "Holder
sclas = 'P'. "Person
IF NOT t1004[] IS INITIAL.
g_pernr = t1004-sobid+0(8).
**--Get name of Manager(Supervisor)
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = g_pernr
infty = '0001'
TABLES
infty_tab = t0001
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SORT t0001 BY pernr begda.
READ TABLE t0001 INDEX 1.
IF NOT t0001[] IS INITIAL.
write t0001-pernr to s_pernr.
write t0001-ename to s_name.
ENDIF.
Perform get_function_code using g_sobid2 .
ENDIF.
PERFORM display_results.
*& Form get_function_code
* text
* -->G_SOBID1 text
FORM get_function_code USING org_unit.
PERFORM get_obj USING org_unit.
PERFORM get_ab USING w1222-tabnr.
PERFORM get_text tables z1222.
IF z1222-attrib IS INITIAL.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'O'
act_objid = org_unit
act_wegid = 'A002'
* ACT_INT_FLAG =
* ACT_PLVAR = ' '
act_begda = sy-datum
act_endda = sy-datum
act_tdepth = 0
act_tflag = 'X'
act_vflag = 'X'
authority_check = 'X'
* TEXT_BUFFER_FILL =
* BUFFER_MODE =
* IMPORTING
* ACT_PLVAR =
TABLES
result_tab = res
* RESULT_OBJEC =
* RESULT_STRUC =
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT res INTO wa_res.
PERFORM get_obj USING wa_res-objid.
PERFORM get_ab USING w1222-tabnr.
PERFORM get_text tables z1222.
ENDLOOP.
ENDIF.
ENDFORM. "GET_TEXT
*& Form GET_OBJ
* text
* -->P_OB text
* -->P_OJ text
FORM get_obj USING p_oj.
SELECT SINGLE * FROM hrp1222 INTO w1222 WHERE otype = 'O'
AND objid = p_oj.
ENDFORM. " GET_OBJ
*& Form GET_AB
* text
* -->P_TAB text
FORM get_ab USING p_tab.
SELECT * FROM hrt1222 INTO table z1222 WHERE tabnr = p_tab.
ENDFORM. " GET_AB
*& Form GET_TEXT
* text
* -->P_Z1222_LOW text
FORM get_text tables p_txt STRUCTURE hrt1222.
loop at p_txt.
if p_txt-low+0(1) = c_function.
write p_txt-low to f_code.
SELECT single vtext FROM zfunctiont INTO f_text WHERE abtnr = p_txt-low.
ELSEIf p_txt-low+0(1) = c_Proces.
write p_txt-low to P_code.
SELECT single vtext FROM ZPROCESST INTO p_text WHERE abtnr = p_txt-low.
endif.
endloop.
ENDFORM. " GET_TEXT
form display_results.
write :/ s_pernr,
30 s_name.
WRITE :/ f_code,
30 f_text.
WRITE :/ p_code,
30 p_text.
ULINE.
endform.
Thanks,
Chidanand -
How to get employees PERNR,ENAME,MAIL information under manager
Dear Experts,
is they have any standard function module to find employees information under the manager.
I need empnumber(PERNR), Ename, Mailid employees information under the manager..
please help me.
RegardsCALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'O'
act_objid = w_objid
act_wegid = 'B002'
ACT_INT_FLAG =
ACT_PLVAR = ' '
act_begda = w_begda
act_endda = w_endda
ACT_TDEPTH = 0
ACT_TFLAG = 'X'
ACT_VFLAG = 'X'
AUTHORITY_CHECK = 'X'
TEXT_BUFFER_FILL =
BUFFER_MODE =
IMPORTING
ACT_PLVAR =
TABLES
result_tab = it_result
result_objec = it_objec
result_struc = it_struc
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
try this u will get positions of employee under the manager
then u can get pernr from IT-0001 or from IT-1001 for that positions,
then get required data from IT-0002 & IT-0105(email address if maintained check subtype).
reward points if found helpful. -
How to list the employees working under one manager in the same row.
Hi,
my emp table has the following data.
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
I want to group all the employees under one manager and list their names in the same row. IS that possible. When i tried the query below,
select mgr, count(*) employees from emp where mgr is not null group by mgr, ename;
I got the result as
MGR EMPLOYEES
7566 2
7698 6
7782 1
7788 1
7839 3
7902 1
Additionally, would I be able to display the names of the employees under one manager in a row? or atleast in some other way? Pls share your ideas.A summary of different string aggregation techniques can be found here
http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php -
Hi all,
I have a requirement where I need to fetch all the direct employees under a manager. These direct employees would mean all the employees directly assigned in the manager's org unit and also the manager/chief of the sub org units. I would not need the employees within the sub org unit.
Example: Org_Unit1 has 3 positions & 3 persons and 3 other org units assigned to it.The 3 sub org units would have other positions/persons & managers of its own. I need to capture the 3 persons in the Org_Unit1 and also the managers of the 3 sub org units.I don't need the employees in the 3 sub org units.
Is there are a function module or an evaluation path for this case.
I actually tried looking up in SDN and found the following thread which has a very similar requirement, but was not complete......
Re: How to find manager's direct employees
Any thoughts and suggestions would be highly appreciated.
ThanksDid you try these.
[employees under manager|https://forums.sdn.sap.com/click.jspa?searchID=20985606&messageID=5881649]
[employees in org unit|https://forums.sdn.sap.com/click.jspa?searchID=20985545&messageID=6513228] -
Please help. My ipod classic could not be recognised by itunes when I connect my ipod to PC. Previously it has been recognised before I updated. This was a while ago now and so I removed all apple files and re installed the latest itunes but am having the same problem.
When I download itunes, it says that Ipod Service failed to start. I checked the services under task manager and when I try to start it, it says access denied. How to I get access and for the ipod service to start and run?Some anti-virus programs (e.g., McAfee) have this rule that can be invoked under the "maximum protection" settings: PREVENT PROGRAMS REGISTERING AS A SERVICE. If that rule is set to BLOCK, then any attempt to install or upgrade iTunes will fail with an "iPod service failed to start" message.
If you are getting this problem with iTunes, check to see if your anti-virus has this setting and unset it, at least for as long as the iTunes install requires. Exactly how to find the rule and turn it on and off will vary, depending upon your anti-malware software. However, if your anti-virus or anti-malware software produces a log of its activities, examining the log may help you find the problem.
For example, here's the log entry for McAfee:
9/23/2009 3:18:45 PM Blocked by Access Protection rule NT AUTHORITY\SYSTEM C:\WINDOWS\system32\services.exe \REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\iPod Service Common Maximum Protection:Prevent programs registering as a service Action blocked : Create
Note that the log says "Common Maximum Protection: Prevent programs registering as a service". The "Common Maximum Protection" is the location of the rule, "Prevent programs registering as a service" is the rule. I used that information to track down the location in the McAfee VirusScan Console where I could turn the rule off.
After I made the change, iTunes installed without complaint. -
Finding all employees who come under the manager
Hi experts,
I have created a report which is attahced in MSS. So i want to restrict the manager to view the details of only the employees who come under this manager. At present the report is showing the details of all employees. So pls tell me whehter i can use O-S-P relation for finding all direct and indirect employees of the mnagaer by passing the org unit of the manager (or) should i need to find all position holders who report to the manager's position?.. If so, how?
Finding the list of all employees who come under manager org unit is same as finding the list of position holders who report to the manager position? Pls telll me which is correct and how to find the same?hello shanthi,
mashhour is right, it largely depends on how data is being maintained in your system.
first, you are generally mixing two concepts together of finding "direct" & "indirect" employees for a manager. In standard implementations, typically the data is maintain in such a way where only 1 method is appropriate to find a manager's employee, and the most common scenario is where the employee has an indirect relationship with their manager.
So typically the two are not used together. In certain circumstances companies will implement both to create matrix like scenarios, but they are better ways to handle this.
The indirect method: is called this way, because the manager has a relationship to an org unit as the chief (a012), and his/her employees are in positions, which have relationships to those same org units, hence no direct relationship.
In the direct method, a relationship is created directly between the manager's position and any subordinates positions using the A/B 002 relationship.
Assuming that you are using indirect only, then O-S-P with no depth defined, will all employees belonging to that entire org structure. this is assuming your program knows the root ID of the manager relationship, which is the a012 to the root org unit.
best regards,
michael -
Nakisa embedded org chart-Team view, employees under Reporting line is empty
Hello,
I am trying to enable Nakisa embedded org chart, but when i go to Team view, employees under Reporting line is empty. And also i am not able to view the employees under Org.Unit.
Can anyone please help me with this.
Attached screen shots.
Thanks in advance.
Geohi george ,
activate the NAKISA in SICF and chk once in portal the settings and kindly configure OADP settings in MSS u can get the structure in the Team view of MANAGER heirarchy , and chk the HCM_PD_UI_1 is active in SFW5
SM30 --- V_THV_APP_C
CLICK ON Activate Hierarchy visualization option for MSSBIZVIEW AND FOLLOW BELOW THREADS
1823692 - MSS Team View isn´t displayed on the portal
MSS Team View is blank
MSS Team - On Behalf of Applications -
Function Modules, for listing Cost centers Under a manager
Hi All,
1. Can any one please suggest me any Function Module available for listing the cost center under a manager, given only the Manager's username or pernr.
2. And also the Function Group which has the collection of Function Modules which deals with operations and reporting on Cost centers from a Manager's Role (basically on budjet Monitoring aspects).
Thanks and Regards,
GirimuruganIf this is the followup of the previous post (responsible person) and you wanted to get a list of cost centers based on that using a FM , i doubt that there is a FM available for that. You have to read the table to get the info.
When you say manager, he could be a manager for a HR organisation but the cost organization may be different. in a typical set up it would be a cost center group (which will have set of cost centers under it) and this will be linked to a hr organization.
All this is purely based on how cost center hierarchy (standard hierarchy) and hr organization maintained and how they are linked.
Regards
Raja -
Printer Profiles under Color Management
We are running a copy of CS5 where the printer profiles are not showing up. We are using illustrator to send jobs to a Universal Laser system. The laser system uses the working RGB color space, but that option is not showing up under Color Management of the Print Dialog box in Illustrator. The only options we have available are the Dot Gain and b/w settings.
The Laser behaves like a normal usb printer. it came with a driver, but the driver does not include any ICC profiles since it would simply use the sRGB IEC61966-2.1.
How do i get the sRGB IEC61966-2.1 option to show up in the color management of the print dialog box in illustrator CS5?Thank you for the reply. But this does not explain how to fix my issue.
The pull down menu under color management of the print dialog box should have a long list of availble printer profiles. Instead i'm only getting assorted Dot Gain settings, Gray Gamma, B & W and sGray ( refer to image in original post). There should be a sRGB or working RGB option associate with the selected device along with a list of other profiles.
This is preventing illustrator from sending the correct color information to my laser cutter. The cutter is dependent upon the color information in the art file. Instead, illustrator is sending b & w color data becuase of the profile selected under color management. -
Find the Employees for whom Manager is not available
Hi
I wish to find all the Find the Employees for whom Manager is not available?
Can anyone Pls throw some light how I can?
Regards,
SreeramHi
Get all the Positions without "A002 - Reports" Relationship from table HRP1001 (excluding A002 from input screen).
After finding the positions, get ee no.s for those positions from table PA0001.
Hope this helps.
Best Regards
Reddy -
NO Entries under Entry Management in OID
Hi,
After connecting to the OID through ODM(Oracle9i on Win2k Professional),there are no nodes(entries) under "Entry Management".i.e there is no DIT under that.
There were no errors during the installation though.
I was wondering wherez the cn=orcladmin entry(if not under the sitting which has to exist because as i could already login to OID using the same through ODM.
Also ,do i need to run any additional script to create the entries?
Any pointers as to what could be wrong.
Thanx for ur help in advance..
ArifThanx Steve and Andrew for the reply.
I tried to search for the entry orcladmin and the search fails with an Error code 106(Search criteria doesnt match any entries.This bamboozled me completely as iam logged into the OID thru ODM but cant find the orcladmin entry...something bad....
Then I relaised that my SSO COnfiuration Assistant/Internet Directory Configuration Assistant must have failed.
This is what is happening.
My Oracle Internet Directory Server(OID) is running on port 389(non-ssl default) and the configuration assistants are trying to connect to port 4032.
I Tried 2 WorkArounds which failed
WorkAround 1: Tried Runnning the OID on port 4032
I tried to run the OID on port 4032 using
(oidctl connect=iasdb server=oidldapd instance=1 flags='-p 4032' start)
but it fails.I could see it from the LDAP LOGS ($ORACLE_HOME\ldap\logs\oidmon.log)..The OID Monitor just adds that instance and deletes it from the registry as it is unable to start the OID Server..
But other instances could be started on port 389 though...
WorkAround 2:
I tried to run the SSOConfigAssistant from the command line as :
java -jar D:\oracleinfra\sso\lib\ossoca.jar D:\oracleinfra orasso orasso
hydtrn01.mydomain.com 389 "orcladmin" welcome hydtrn01.mydomain.com 1521
iasdb AMERICAN_AMERICA.WE8MSWIN1252
But this throws me off giving an error.
Failed to obtain OiD password. Exception is :java.lang.Exception: Version mismat
ch!.
where is the SSoConfigAssistant trying to get the OID Passwd from.
Iam not sure as to how to proceed frm here other than Reinstalling...Also the Unistallation isnt clean as it leaves a lot of entries in the registry on win2k..
Any help would be mightly appreciated
Thanx in Advance. -
Salary of employees of respective manager
i have manager_id,last_name,salary from employees table i need to print the managers name and the lowest salry of the respective employee working under the manager
think about it. You want the lowest salary of an employee with this manager. Do we have a function that returns the lowest value? Why yes, it's MIN.
So we want our where clause to include
and a.salary = (SELECT min(salary) from employees c from this manager (a))
I leave you to do the simple join from c to a. -
How to obtain a list of a manager's direct employees and the manager
Hi
Currently I am using the evalutaion path "MSSDIREC" for various reports, i.e. phonelist. We now want the reports extended so they not only shows the employees directly under the manager, but also the manager him-/herself.
Is there a standard evaluation path for this purpose. I have tried with O-S-P, but it also returns the employees of organizations under the manager, which is not what we want. We only want the first level under the manager.
Any suggestions?
/JakobHi Jakob,
Go to SM30 - T778A table.
Create a new evaluation path as follows:
01 S A 003 O
02 O B 003 S
03 S A 008 P
Regards,
Dilek -
Strange device under Device manager(KT4VL)
Hi, under device manager, there is a device called the PCI Simple Communications Controller. It is under the other devices section and says it needs a driver, what is this device and where do I get the driver? Thanks!
i don't know if this is it BUT riser modem slot is a real
short PCI type slot on your M/B and it's enabled from inside Bios.The setting in bios is under integrated peripherals normally near the onboard sound Setting,if you don't have a riser modem,Disabled It.(It's the MC'97 modem line,i've just checked my M/B book)
When it is enabled and NO modem,your op system looks for the modem and gives two modems or problems sometimes.
Cheers lonfa
Maybe you are looking for
-
i want to know whether the remote system state on or off. any body help me to find remote system on or off state using java.net package. no need to use RMI concepts.
-
How do you get your imessage to start working again after getting IOS6? On your ipod
I recently updated my ipod 4th generatiom to IOS6, imessage was first working great and now it has seemed to stop working... Does anyone know how to this fix this? Iv tried resetting the network connections and signed in and out of imessge
-
Audio out from internal speaker, how?
I purchased iPhone 3G 8GB, before that I have been using iPod touch. With iPod touch audio from games etc came out from internal speaker if I did not plug earphones. But for some reason that does not work with iPhone 3G. Only very few apps uses inter
-
Copying and pasting Arabic text in InDesign CS4 ME
We have an arabic document in pdf and word formats and we have InDesign CS4 ME and we are trying to copy and paste text from the pdf/word document but the font isn't transferring, there is nothing only boxes. We have turned on the arabic keyboard and
-
I was working in Photoshop and trying to resize an image to fit into the the Large Album iPhoto book. Photoshop's Image Resize Assistant asked me which halftone screen (LPI) will be used to print the image. It offered me the choice of 65, 85, 133, 15