Fetching Supervisor of an Org Unit
Hi All,
My scenario is,
I have an employee who belongs to an Org Unit. What we need to do is, get the approval of his direct supervisor and his manager (who is the supervisor of the direct supervisor). After getting this, I need to get the supervisor of new Org Unit. I have implemented a Loop which will get the supervisor of the a particular employee. When this continues, after fetching the manager of the current Org Unit, it fetches the HR Manager not going to the supervisor of new Org Unit.
Please suggest this could be acheived.
Regards,
Sathish M
Hi Satish,
Thanks for your response. I have explained the Organization structure below.
XYZ
HR2
Branch1
Manager1
Department
Supervisor1
Branch2
Manager2
Department
Supervisor2
Employee1
we are doing a scenario of employee transfer. what we need is after getting the approval from Manager2
we need to get the approval from Supervisor1 .
Please suggest this could be acheived.
Similar Messages
-
hi all,
to fetch country grouping fron org unit i have to first read infotype 1008 then read t500p.is there any table from which i can directly fetch molga from org unit.
please help
pratyushHi,
u can use infoset queries.
regards,
shiva -
Org. Unit - Sub org Unit relationship.
Hi Gurus,
I could not see the suborg units under the root org unit when I used the relationship, belongs to. But I could see them when I used the relationship reports to. Which one is the correct relationship between an org unit and a suborg unit?
Points assured.
Thanks in advance,
Nivedita.Hi,
Org unit uses the relationship..
A/B 002Is line supervisor of
That is if you map the sub org unit to root org then u need to assign
B002 --Is line supervisor of
(meaning:root org unit is the supervisor of sub org unit)
Top Down approach
if you assigning the root orgunit to sub orunit then
A002 reporting line to.
(meaning:sub org unit reporting to root org unit)
Bottom up approach -
Fetching employees under org. units.
Hi all,
I have to obtain a list of employees which come under a selected org. unit. This org. unit could be a main org. unit which contains subordinate org. units under which an employee resides. Can anyone tell me how to do this.
regards,
HamzaHello,
This FM will be helpful for you. If you want to get the list of all the employees based on the Organizational Path. You need to know the evaluation path though.
Thanks,
Jayant -
Hi
I have created a TEM query in SQ02, based on infoset \SAPQUERY\HR_TEM_E (logical database PCH), in which I am outputting object name and date (P1000), and org unit (P8004).
The output on the org unit name corresponds to the most current version of the org unit, but my requirement is for it to match to the date that the course object exists, i.e. historical.
Would anyone know a way to code this field, or whether there is a functional solution to this?
Please do let me know.
Anyone?
Edited by: minttea on Aug 10, 2010 3:52 PMHi..
Pls check below code to fetch the tesxt of historical org unit. hope it will help.
*//Internal table declaration.
DATA : lt_00 TYPE STANDARD TABLE OF pa0000,
lt_psn TYPE STANDARD TABLE OF zhrpositions,
lt_ret TYPE STANDARD TABLE OF bapiret2,
lt_01 TYPE STANDARD TABLE OF pa0001,
lw_01 TYPE pa0001,
lw_psn TYPE zhrpositions,
lt_comps LIKE zstr_hr_comps,
lt_return LIKE bapiret2.
Thanks,
kl
Edited by: Narayana on Aug 10, 2010 10:50 AM -
Head of the Position in an Org Unit
Hi Experts,
I have created a Org Unit and a Position under that.
Within this position i have assigned 4 users, but one of them is the head.
How can i differantiate a head from the others under the same Position ?
Any suggestions ?
Thank You.Hi,
The Priority field is optional. It is used to determine the sequence in which objects are presented in Simple Maintenance and Structural Graphics.
When multiple objects are located on the same hierarchical level of a structure, these must be ordered in a specific sequence from left to right (or from top to bottom).
This is done by assigning alphanumeric priority values, where the value 1 is the highest (far left or top) and 99 the lowest priority (far right or bottom).
If you specify no priority, the system places objects according to their object IDs.
eg:
O 50004630 ABC ABC test by nachy
O 50004631 Is line supervisor of Hr Human resources
O 50004632 Is line supervisor of Payroll Payroll
O 50004634 Is line supervisor of Time Time Management
if you assign sequence no 01 to time and 02 to hr..
then
it iwll be like this
O 50004630 ABC ABC test by nachy
O 50004634 Is line supervisor of Time Time Management
O 50004631 Is line supervisor of Hr Human resources
O 50004632 Is line supervisor of Payroll Payroll
Note:do read the F1 help thst is little more clear..(above info is from f1 help) -
Org unit not displaying in Payslip
Hai all
In production, we have maintained Org Structure and assigned persons. Payroll live run is completed. But in the customized payslip, the org unit is not displaying. That org unit is there in the Org structure, in WPBP table also its displaying, but in the table T527x the same Org Unit is not there.
What could be the reason for not included in the table t527x, probably thatu2019s the reason why its not displaying in the payslip. ( the program picks the Org unit from T527x table)
But other Org units which are there in T527x table, are displaying fine in the payslip
Please suggest what to do
Thank youIf you are using OM module, then you dont have to maintain values in T527X table.
Instead, i guess some customisation is missing in the payslip to fetch the data. are you using HR forms or is it through PE51 you are creating customised form?
If through PE51, then from then, click on the Window and choose change. In the top of the window screen, where you can maintain the screen header information, you store
*Department : BTRTL_______________ *
This will help you fetch the department details i.e. org unit
Regards,
Pranitha -
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 does workflow retrieve users under an org. unit when sending email
Dear All:
Workflow supports sending email activity where you can specify the receipt type and receipt ID. For example, the email is supposed to send to the users within an organizational unit.
I am just wondering how SAP workflow determines the users within an organizational unit? Does it use HR-ORG evaluation path to get objects under an org. unit?
Many Thanks in advance!
HaifengHi,
For example, the email is supposed to send to the users
within an organizational unit.
Yes workflow template and standard task are also part of organizational unit. As you mentioned that the if the recipient type is choosen as Organizational Object then the workflow system will try to fetch the data from the organizational unit based on the recipient ID you provided in the mail step let say if you are using the recipient id as position Id then workflow system will try to get the data from the organizational unit
Org object types supported by the workflow system are US, C, S, O....
If at all the you choose the workflow recipient type as email address which can be a external address then in that case it just simply makes use of BCS communication methods and and in this case your SCOT settings must be configured properly.
The difference between the first and second is, in the first case the work items or mails/documents will be sent to sap inbox (SBWP) in the second case it depends on the mail ID you mention for example a outlook mail ID.
Regards
Pavan -
Dear Experts,
Please help on the following issue
We are unable to fetch the function details from PPOSA_BBP t-code.
for example we have an orgunit say '00000002' and for them in the details section under Functions tab we need to read the Local purchasing group and ID.
I have also attached the screen shot like which data we are trying to read in our BADI.
Please let us know any function module or DB to get the required associated valuesHi Balajisha,
If I get you correctly, your want to replace your purchasing group, with the Head of the Org unit.
So in that case for the User, under the Details, the checkbox, "Head of Organizational Unit" should be checked.
Now what you can do is, fetch the user who is assigned as head of the org unit using the FM " BBP_OM_STRUC_GET_MGR_FROM_ORG", here you will get the ID of head of the Org unit under et_manager_id. (Checkbox Head of Organizational Unit" should be checked for the User)
You can use this ID, as the username and use the FM "BBP_READ_ATTRIBUTES".
Not sure, whether this will work, but you can give it a try.
Regards,
Aakash Awasthi -
FM for getting attributes of an org unit
Hi,
I have a req. in which I need to fetch the attributes of an org unit. These attributes are maintained in the tcode ppoma_crm.
Is there any FM or some option otherwise, thru which I can get the desired info?
Thanks,
Raman.Make use of FM: RH_OM_ATTRIBUTES_READ,
Pass otype = 'O'
objid = Sales Org Number " to be fetched before you use this FM
scenraio = sales/service "based on your requirement
seldate = sy-datum
Rg,
Harshit -
Find emloyee of the org.unit
hi,
i table itab with org.unit and i wont to find the emp of the org.unit how i can do that?
RegardsHi
You can write your select statement as follows:
This select will retrive all the positions which *belong to the given org unit into itab *t_orgpositions.
Select objid
from HRP1001
into table t_orgpositions
where otype = 'S'
and plvar = '01'
and rsign = 'A'
and relat = '003'
and istat = '1'
and begda LE sy-datum
and endda GE sy-datum
and sclas EQ 'O'
and sobid = 'XXXXXXX' (your org unit).
Using the above positions fetch the holders of these positions (PERNR) using the below query.
IF NOT t_orgpositions[] is initial.
Select sobid
from HRP1001
into table t_pernr
for all entries in t_orgpositions
where otype = 'S'
and objid = t_orgpositions-objid
and plvar = '01'
and rsign = 'A'
and relat = '008'
and istat = '1'
and begda LE sy-datum
and endda GE sy-datum
and sclas EQ 'P'.
ENDIF.
In this way you can get all the Personnel numbers which belong to an Org unit.
The other method is you can use some function modules to retreive this data. Get back if the above query does not serve your piurpose. -
How to fetch responsible agents from organizational unit
Hi All,
I am new to workflow let me know your suggestion to fetch responsible agents from organizational unit in task.
Thanks,
Prasanthi.Here is some code that will give you the users and their email addresses of an org unit.
select single objid
from hrp1000
into hrp1000-objid
where plvar = '01' " Plan version
and otype = 'S' " Object type
and short = position. " position, case sensitive
select sobid
from hrp1001
into w_org-uname
where otype = 'S' " Object type
and objid = hrp1000-objid " Object ID
and plvar = '01' " Plan version
and sclas = 'US'. " Rel.obj.type
append w_org to i_org.
endselect.
loop at i_org into w_org.
select persnumber addrnumber
up to 1 rows from usr21
into (usr21-persnumber, usr21-addrnumber)
where bname = w_org-uname.
endselect. " USR21
clear adr6-smtp_addr.
select smtp_addr
up to 1 rows from adr6
into adr6-smtp_addr
where addrnumber = usr21-addrnumber and
persnumber = usr21-persnumber.
w_org-smtp_addr = adr6-smtp_addr.
append w_org to org_unit .
endselect. " ADR6
endloop. " I_ORG -
Hi,
I am using FM CRM_ORGMAN_ORGOBJECTS_FIND_3 to return the orgunit for a user. This returns the OBJID of the orgunit, but what I really need is the code of the actual orgunit. Is there another function module available that might do this for me (possibly using the OBJID)?
Thanks,
BernardHi Bernard,
You can directly fetch it from table HRP1000, pass the objid you get from the FM CRM_ORGMAN_ORGOBJECTS_FIND_3 to HRP1000, the field SHORT gives you the code of the org unit.
Hope this helps.
Regards,
Karthik. -
Report to check org units without any position display
Dear All,
I want a report which i can see only the org units in a graphical way. When i am checking through Simple maintainence mode I am getting org units along with positions also with in the graphical mode i have selected the view option under options menu there can able to see individual departments along with positions.
My request is i want to see the organization structure along with sub org units under sub org units with departments without positions. please let me know is there any standard reports available.
Regards,
HR userYes, the Report is
S_AHR_61016493-Organizational Structure-Organizational Structure
Select the first line and press F8
Maybe you are looking for
-
Default multiple values for formula variable on variable selection screen
Hi All, Suppose 'A' is formula variable with customer exit as processing type then i want four default values for this variable eg: 3, 6,9, and 12 as selection options, when we will execute query user can able to pick any one of the default value. is
-
Missing print options when using school network
I'm having an issue printing over the network here at my university. I have been able to sucessfully add the address of the printers here in our law library and have sucessfully printed documents on them. My problem is that our printers are set to du
-
Class extends JPanel ? help
i have a class that extends JPanel and i have all my buttons , textfields created on it. so how do i call the class to display the panel on a frame? asuming class is the class that extends JPanel class newPanel = new class(); f.contentPane.add(newPan
-
How to determine APNS settings are ON or OFF
Hi, How can i determine from my App whether the Push notification for my app (alerts, sounds and Badges) are switched ON or OFF. If it is OFF, I would like to warn the user and take him to the APNS Settings page from my app. How can I do that. Could
-
Mirror Image on an Officejet 4620
Where is the "horizontal flip" or "mirror image" application on my officejet 4620 all-in-one? I saw that someone else asked the same question and was directed to a link that said to click on the "features tab." There is no "features tab" under my pri