09-01-2008 11:45 AM
hi all,
my requirement is find the manager in PA reporting.
Retrieve the Manager Personnel number from the HRP1001 table.Use this personnel number and retrieve Name (ENAME) from IT0001 and Email ID (USRID) from IT0105 SUBTYPE as u20180010u2019
how to find the manager position and his relation ship.
09-01-2008 12:15 PM
hi,
you can use the FM "HRCM_ORGUNIT_MANAGER_GET". the input for this is the org unit. org unit of a person can be found from IT 0001. using this org unit, you will get the PS no of the Manager of that org unit. done.
you can use the alternate solution as follows.
from IT 0001 you will get the org unit (O) of the person.
using this O (org unit) and relation 012 (managed by) and related object type as S (position) u will get the value of S (position of the manager of org unit).
using this S in HRP1001 and relation 008 (holder of position) and related object type as P (person) u will get the PS no of the manager (as required).
Edited by: vikram shah on Sep 1, 2008 4:45 PM
FM name added
09-01-2008 11:47 AM
Hi,
To get the position of the manager -
Use the FM
RH_READ_INFTY_1001
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
AUTHORITY = 'DISP'
WITH_STRU_AUTH = 'X'
plvar = '01'
otype = 'P'
objid = fs_pa0000-pernr (manager's id)
subty = 'B008'
begda = fs_pa0000-begda
endda = fs_pa0000-endda
TABLES
i1001 = t_i1001
OBJECTS =
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
wrong_parameters = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF t_i1001 TO t_pos.
this table t_pos holds the postion.
Regards
Lekha
09-01-2008 11:49 AM
09-01-2008 12:15 PM
hi,
you can use the FM "HRCM_ORGUNIT_MANAGER_GET". the input for this is the org unit. org unit of a person can be found from IT 0001. using this org unit, you will get the PS no of the Manager of that org unit. done.
you can use the alternate solution as follows.
from IT 0001 you will get the org unit (O) of the person.
using this O (org unit) and relation 012 (managed by) and related object type as S (position) u will get the value of S (position of the manager of org unit).
using this S in HRP1001 and relation 008 (holder of position) and related object type as P (person) u will get the PS no of the manager (as required).
Edited by: vikram shah on Sep 1, 2008 4:45 PM
FM name added