2011 Jul 07 5:53 AM
Hi,
I want to find out reporting structure in OM. Suppose in my organization employee A and B report to C and C reports to employee D. Now I want a function module (FM) where I can pass the employee code of D and FM will return all the employee under him/her i.e. A, B and C or when enter employee code of B then it will return all its reporting officers employee codes i.e. C and D. I have already used select statement to get the same result from PA0001 and HRP1001 but not able to get accurate result.
-pkb
2011 Jul 07 7:02 AM
Hi,
Use FM : RH_READ_INFTY_1001_EXT ..
pass the below parameters :
lw_hrsobid-plvar = '01'.
lw_hrsobid-otype = 'S'.
lw_hrsobid-sobid = '<managers position>'. " say D's position
APPEND lw_hrsobid TO lt_objects.
CALL FUNCTION 'RH_READ_INFTY_1001_EXT'
EXPORTING
subty = 'B002'
begda = sy-datum
endda = sy-datum
TABLES
i1001 = lt_hri1001
OBJECTS = lt_objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
Regards,
Srini.
Hi,
Use FM : RH_READ_INFTY_1001_EXT ..
pass the below parameters :
lw_hrsobid-plvar = '01'.
lw_hrsobid-otype = 'S'.
lw_hrsobid-sobid = '<managers position>'. " say D's position
APPEND lw_hrsobid TO lt_objects.
CALL FUNCTION 'RH_READ_INFTY_1001_EXT'
EXPORTING
subty = 'B002'
begda = sy-datum
endda = sy-datum
TABLES
i1001 = lt_hri1001
OBJECTS = lt_objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
Regards,
Srini.
2011 Jul 07 6:28 AM
Hi,
You try to use the FM RH_READ_INFTY_1001 or FM RH_STRUC_GET. Will surve your purpose.
regards
divya
2011 Jul 07 7:02 AM
Hi,
Use FM : RH_READ_INFTY_1001_EXT ..
pass the below parameters :
lw_hrsobid-plvar = '01'.
lw_hrsobid-otype = 'S'.
lw_hrsobid-sobid = '<managers position>'. " say D's position
APPEND lw_hrsobid TO lt_objects.
CALL FUNCTION 'RH_READ_INFTY_1001_EXT'
EXPORTING
subty = 'B002'
begda = sy-datum
endda = sy-datum
TABLES
i1001 = lt_hri1001
OBJECTS = lt_objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
Regards,
Srini.
2011 Jul 07 3:00 PM
Hi Srini,
I used your suggestion along with FM RH_READ_INFTY to get proper result. Thank you.
-pkb
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |