cancel
Showing results for 
Search instead for 
Did you mean: 

how to get postions and chief position based on org unit?

Former Member
0 Kudos

Hi experts,

I m very new to HR ABAP...

I got a requirement i.e. report.

In this.. i need to display the staff list of the organization..may be it is basic in HR abap.. as i m new.. i need ur guidance..

requirement is as below....

1)Based on org unit or sub org unit (endda = 31129999)------->get all the positions(incorporates) and chief position(managed by) of the org unit...

2)Get Text of postions(MC_SText) from HRP1000 for obj type 's'

3)Get Holder of the positon ----->get emp code--->get name(from pa0002)--->get email id(pa0105).....

Finally all this fields i need to display in the output.. as a report...

How to get organizational unit and sub org. unit.

in selection screen after selection of org unit and period only remaining things will populate and o/p wil be displayed....

In this do we need to use any logical databases and macros?

so please guide me .....

points will be given......

Thanks in advance

Ramana

Accepted Solutions (1)

Accepted Solutions (1)

former_member182041
Active Contributor
0 Kudos

Hello,

Basically you need to read various relationships of objects from HRP1001.

This can be done with the standard FM's or selection from the table. Using FM's is better.

1. To read position for org. units read HRP1001 with relationship as: B003 (incorporates), B012 (managed by). Otype field will have 'O', Objid will have your org's id, Subty will have the relationship. (these fields are in table HRP1001).

FM's to be used are like RH*READ*INFTY*. Pass parameters appropriately and you get the positions.

2. To get the text of positions, HRP1000 has to be read. Again use FM RH*READ*INFTY* . Pass the position id and the text is known. Use Otype as 'S' and Objid as position id. (position id is known from point 1)

3. To read the holder of the position, HRP1001 has to be read with Otype as 'S' and Objid as position id and relationship as 'A008'. You get the holder or employee number.

4. Email can be read by using FM HR_READ_INFOTYPE, infotype 105 and subty 0010. Name can be read using the same FM with Infotype as 0002.

You may see the HRP1000, HRP1001 tables, relationships (top-down, bottom-up), related transactions like PP01 etc. and get a clearer idea before getting to the code.

Regards,

Kumud

Former Member
0 Kudos

Hi kumud,

Thanku for your information.....

I got every thing wat u specified... But the thing is in selection screen i nee org unit and selection period(for this refer report RHXSTR02). For org unit i m using  pchdy-objid_str but i m not getting the F4 help which is coming in standard report RHXSTR02.. if selection screen is done everything wil be fine... Please help me regarding this...

Thank you,

Ramana

former_member182041
Active Contributor
0 Kudos

Hello Ramana,

I saw the report RHXSTR02 and tried replicating F4 help in a Z* report. I could do it.

RHXSTR02 uses macros etc. to display a pop-up screen with hierarchical Organizational display.

To begin with you may put /h in command prompt and press F4 on the Organisation input field (select option) and you would see the events and macros being called from there. You may have to make a copy of standard include RHXMACRO and remove the contents not required by you like selection-screen parameters. There is no use in me pasting the code I did as it's a part of report RHXSTR02.

Do try coding after debugging RHXSTR02 and let me know.

Regards,

Kumud

Former Member
0 Kudos

Hi Kumud..

Thank you so much... 

Now i got the information.... There is a function module 'RH_OBJID_REQUEST_46A' used for F4 help..

So as of now let me work on this.. if i get any doubt or get solution, i wil let u know...

Thank you,

Ramana

Answers (1)

Answers (1)

former_member193210
Active Contributor
0 Kudos

Have you tried the Adhoc Queries (t-code S_PH0_48000510), with User Group 43 (/SAPQUERY/HO) ?

Former Member
0 Kudos

Hi Remi,

As i told u i m very new to HCM.. so i dont know about adhoc queries.. can u please drive me how to use adhoc query regarding this scenario...

Thank you,

Ramana

Former Member
0 Kudos

Please check below link for adhoc queries

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=30083

Sushilkumar