Application Development 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: 

HR ABAP - Reporting Employees

Former Member
0 Kudos
129

Hi All,

I want to enter personnel number as input and I want to get all reportees to that employee .

Can anyone provide me the code of Function Module ?

Does it is same for all Organizations?

Thanks,

Srinivas

1 ACCEPTED SOLUTION

Former Member
0 Kudos
99

Hello,

U can use the logical database PNP for your output daata.This LDB gives you full options to retrive whatever kind of data is required.

Regards,

Neeraj

9 REPLIES 9

Former Member
0 Kudos
100

Hello,

U can use the logical database PNP for your output daata.This LDB gives you full options to retrive whatever kind of data is required.

Regards,

Neeraj

0 Kudos
99

Hi,

Thanks for your early reply.

But your answer is very brief . Can you provide me code .

Regards,

Srini

0 Kudos
99

Any help on this ?

Srini

0 Kudos
99

Check the Function module

RH_STRUC_GET

0 Kudos
99

Can you please provide me what input I need to give?

My requirement is , I need to give Pernr, I should get the employees reporting him

What input values should I give to the FM you mentioned?

Regards,

Srini

0 Kudos
99

pass ACT_OTYPE , ACT_OBJID and ACT_WEGID

to the FM to get the persons reporting ..

to know the values for WEGID(Evaluation Paths) look at table

T778A ..

ACT_OTYPE = 'P'

ACT_OBJID = pernr

ACT_WEGID = enter the valid path ...

0 Kudos
99

Hi,

Thanks for your answer, But still I am not meeting my requirement.

I passed, P,10011,BOSSORG ( as input , as you mentioned)

The Export tables for the function modules are :

RESULT_TAB (Result : 0 entries)

RESULT_OBJEC (Result : 1 entry )

RESULT_STRUC (Result : 1 entry )

Which export table will give my required result ? Which fields I have to retrieve.

Regards,

Srini

0 Kudos
99

get the Org unit for that pernr ..

and use

CLEAR : it_result_tab , it_result_tab[].

CALL FUNCTION 'RH_STRUC_GET'

EXPORTING

act_otype = 'O'

act_objid = v_sobid2

act_wegid = 'PERS-O'

act_begda = sy-datum

act_endda = sy-datum

TABLES

result_tab = it_result_tab.

LOOP AT it_result_tab WHERE otype = 'P'.

it_detail-pernr = it_result_tab-objid+0(8).

APPEND it_detail.

CLEAR it_detail.

ENDLOOP.

Former Member
0 Kudos
99

Use FM : RH_STRUC_GET