cancel
Showing results for 
Search instead for 
Did you mean: 

For an Org Unit, how do we get all Reporting Org units (Also employees reporting to the sub org unit) & Employees ?

former_member22974
Discoverer
0 Kudos

Hi Experts,

I have a very common requirement in SAP HCM ABAP development.

For an Org Unit, how do we get all Reporting Org units(Also employees reporting to the sub org unit) & Employees ?

I have tried using RH_STRUC_GET_MULTIPLE_ROOTS and RHPH_STRUCTURE_READ, but the evaluation path is insufficient to get all objects under it. I tried with both O-S-P and O-O-S-P evaluation paths and as per some constraints, I can’t create a customized evaluation path for a reason.

I am using PNPCE database for user selection screen and user would be advising the Org unit. I even referred the standard transaction ‘S_AHR_61016495’ which is using PCH logical database.

I would really appreciate if anyone could provide a solution for this. (Rewards guranteed )

Kindly help.

Thank you.

-

Regards,

Mahesh Konade

Accepted Solutions (1)

Accepted Solutions (1)

former_member368169
Participant
0 Kudos

Hi Mahesh,

the function modules and evaluation paths you mentioned should give you everything you need. If they don't, the reason is probably somewhere in your org structure - or maybe in the parameters you supplied to the function module. Which values did you enter for the parameters ACT_SVECT, ACT_TDEPTH, and of course ACT_BEGDA and ACT_ENDDA? And did you take a closer look at some of the objects that don't appear in your result? Maybe some of the relations are missing or delimited?

If you want the org unit as the starting point on the selection screen, I'd suggest using the logical database PCH right away, as it will automatically do all the structure search for you.

Regards,

Alexandre

former_member22974
Discoverer
0 Kudos

Hi Alexandre,

Although I could not respond in time, thank you so much for your prompt reply.

I had used the same RHPH_STRUCTURE_READ and passed the appropriate values to it, but it did not populate the required results. I cross checked the results manually, may be some relations issue. But later I tried using RH_STRUC_GET_MULTIPLE_ROOTS and it worked fine.

Meanwhile I had done a workaround with PCH and RH_STRUC_GET and it served the purpose of getting all the Org units, it’s reporting sub-org-units, positions and persons (The deepest structure from the root org unit advised on selection screen).

The solution I used is, I captured the org-units advised on selection screen by user using PCH logical database and then by looping on sub-org units reporting to the main org-unit I populated related positions and persons holding them and assigned it to the PNPCE logical database.

Thank you so much for the help.

-

Regards,

Mahesh Konade

Answers (1)

Answers (1)

former_member221248
Active Participant
0 Kudos

Dear Mahesh,

You need to develop the customized reports if you want to see all details in one like -> Employee->Immediate Manager->Head of Department, Their department and costcenter etc.

Ask your ABAPer they will develop the report for you.

Use Funtion Modules-F4_FILENAME, GUI_DOWNLOAD, REUSE_ALV_GRID_DISPLAY

Tables-pa0001,pa0000,pa0007,teven,pa2005,pa0105,t552a.


Kindly confirm if your issues resolved or you need more information.

Regards,

meenakshi

former_member22974
Discoverer
0 Kudos

Hi Meenakshi,

You are absolutely correct about developing a custom report for getting the employee reporting structure.  I had developed one similar(as shown in screenshot) report in past using RHPH_STRUCTURE_READ and displayed strcuture along with the level of reporting position.

However, in this case I did not want the hierarchical reporting structure for an employee and his department details, but only all the employees under the root org unit(deepest structure).

I appreciate your help.

Thank you.

-

Regards,

Mahesh Konade

former_member221248
Active Participant
0 Kudos

Dear Mahesh,

Sure, you can develop in that way also. Ask you ABAPer to fetch in their program all employees under root organisation they will get you desired result in report.

In custom report, you can generate all data based on your client requirement. Happy to help you. Please let me know incase any more information required.

Regards,

Meenakshi