Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reporting structure in OM

pkb
Participant
0 Likes
717

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
656

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,

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

3 REPLIES 3
Read only

Former Member
0 Likes
656

Hi,

You try to use the FM RH_READ_INFTY_1001 or FM RH_STRUC_GET. Will surve your purpose.

regards

divya

Read only

Former Member
0 Likes
657

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.

Read only

0 Likes
656

Hi Srini,

I used your suggestion along with FM RH_READ_INFTY to get proper result. Thank you.

-pkb