Drill down logic to capture Sub Org Unit's which doesn't have chief

Hello Gurus,
I am wondering to get logic for following scenario. Any ideas are appreciated.
I have one Cheif Org Unit say '50000000'. This org unit can have two sub Org Units for ex
55000000 and 56000000 (Here Org unit 55000000 has chief and 56000000 doesn't have a chief). I need to capture only 56000000 which doesn't have a chief. Again, assume 56000000 has three more sub Org Units for ex
56000001, 56000002 and 56000003 (Here Org Unit 56000002 only has chief and the rest two doesn't have chief). Then I need to capture 56000001 and 56000003.
so on and so forth drill down to the level where all sub org units have chief's which ends my iteration.
Result:
I am interested in only org units which does not have chief...In above example
56000000
56000001
56000003
and ....
I know that we can make use of B002 relation in HRP1001 and O-O and to check if org unit has chief, use relation
B012 in hrp1001 with O-S....but I am unable to put this in iteration..Appreciate any ideas or logic..
Thanks in advance..
Kim

Hi Kim,
Please follow the logic below:
*Select all organizational units.
SELECT * INTO IT1_HRP1000 FROM HRP1000 WHERE OBJTYPE = 'O'.
LOOP AT IT1_HRP1000.
*Check if that org unit is sub unit for another one
SELECT * FROM HRP1001 where rsign eq 'B' and relat eq '002' and objid eq IT1_HRP1000-objid.
*if true
if sy-subrc eq 0.
*check whether that org unit has a chief or not.
SELECT * FROM HRP1001 where relat eq '012' and objid eq IT1_HRP1000-objid.
*if false
if sy-subrc ne 0.
GET THIS OBJID
endif.
endif.
ENDLOOP.
ENDSELECT.
Regards,
Dilek

Similar Messages

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

    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

    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

  • Org. Unit - Sub org Unit relationship.

    Hi Gurus,
    I could not see the suborg units under the root org unit when I used the relationship, belongs to. But I could see them when I used the relationship reports to. Which one is the correct relationship between an org unit and a suborg unit?
    Points assured.
    Thanks in advance,
    Nivedita.

    Hi,
    Org unit uses the relationship..
    A/B 002Is line supervisor of
    That is if you map the sub org unit to root org then u need to assign
    B002 --Is line supervisor of
    (meaning:root org unit is the supervisor of sub org unit)
    Top Down approach
    if you assigning the root orgunit to sub orunit then
    A002 reporting line to.
    (meaning:sub org unit reporting to root org unit)
    Bottom up approach

  • Explanation about PPOSE (display of sub org unit)

    Hi everybody,
    I am beginner in Sap HCM OM and I don't understand something in transaction ppose.
    There is Org unit 50271758.
    This org unit has different sub org units .
    But depending on the start date and the preview period I set in the setiings, the sub org units appers or disappears.
    The view of the sub org unit and the objects depends on that but I don't understand the logic.
    I would really apprecitae if somebody helps me because I am completely lost.
    Sometimes I see an arrow before the sub org 'Object to be removed'  Object to be added' and I don't understand why.
    Thanks very much in advance for your help

    Hi,
    Please check:
    http://help.sap.com/erp2005_ehp_05/helpdata/en/3f/083b37b0fd2e71e10000009b38f936/frameset.htm
    Source: help.sap.com
    Hope this helps.
    Donnie

  • Shift One sub org unit to different higher level Org unit

    Dear All,
    I have requirement of shifting few Org units to different higher Org units, is it possible through PPOME, PPOSE (By drag and drop)or by any other transaction.
    the Org unit which we want to shift is having position and attched holders also...
    Reply awaited..
    Regards,
    Kumar

    Hi,
    Thanks for the reply, but one more Query if position(obviously some person must be attached with this position) is moved to another Org unit,
    somewhere we have to make changes like IT0001 for that Employee.
    Regards,
    Kumar

  • Re: installing Logic Pro X on a second computer that doesn't have much internet bandwidth

    I have two complete studios, two locations, two Mac minis. The first has full internet bandwidth and I've installed Logic Pro X with all the additional content. The second is in a rural location where I have very limited, very slow and very expensive internet. How can I install Logic Pro X without downloading all the additional content? Can the content files be copied to a drive and then to the second computer?

    I'd take the second Mac to a place with a better connection. That's probably your best bet.
    You could try to copy the files in:
    Macintosh HD/Library/Application Support/Logic
    Not sure what the result would be. Maybe copy the files first, then install? I think either way LPX has to do this. Another way possibly, install it, then when it requires the content download, close it, copy the files over, then re-open?
    Let me know. This is all a guess.

  • How to find delimited ORG unit in a report?

    Hi All I need to find the org unit's which doesn't have end date as 12/31/9999 and delimited within 2 years in my report?
    How can we achieve this ...waiting for reply
    PS: I believe there is no LDB required..
    Regards
    Sas

    >
    > Hi,
    > Where are you stuck?
    >
    >
    HRP1000 table, field - OTYPE(check for "O" for org unit).
    > get the difference between BEGDA and GDATE(delimited on) and check if it's more than two years.
    >
    > Regards,
    > Sumit
    I want ORG UNITS whose END DATE is within 2 years????
    I Will give you scenarios
    If HRP1000 table has changed for some reasons'  and 5000(ORG UNIT) will create 2 records
    Ex: 5000  jan 1 2005 dec 31 2009
                    jan 1 2010 12/31/9999
    This 5000 should't pick up as it has end date 12/31/9999 ok...
    EX: 5001         JAN 1 2006  OCT 1 2007
                           OCT 1 2007   MAY 5 2009
    Last record:    MAY 6 2009  Feb 6 2010
    So this 5001 org unit should pick up as this last date is FEB 6 2010.
    Sas
    Edited by: saslove sap on May 3, 2010 1:59 PM

  • Org unit employees time depend

    Hello Experts,
    I need a help how to build DSO which gives all the employees in org unit & what the position for each employee between 2 dates
    Thanks

    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

  • Report to check org units without any position display

    Dear All,
    I want a report which i can see only the org units in a graphical way. When i am checking through Simple maintainence mode I am getting org units along with positions also with in the graphical mode i have selected the view option under options menu there can able to see individual departments along with positions.
    My request is i want to see the organization structure along with sub org units under sub org units with departments without positions. please let me know is there any standard reports available.
    Regards,
    HR user

    Yes, the Report is
    S_AHR_61016493-Organizational Structure-Organizational Structure
    Select the first line and press F8

  • Function Module to show all jobs in that Org Unit.

    Does any one know is there any Function Module which gives all the jobs that comes under that Org Unit. for example if org unit 10 has 2 Sub Org Units(11 and 12) and 3 jobs(20, 21 and 22) under it. and the Sub Org Unit 11 and 12 has 1 job each( 30 and 40). When you run for org unit 10 it should give all 5 jobs (20, 21, 22, 30 and 40).

    Hi Fayyaz
    Well you use a FM RH_READ_INFTY_1001 to discover the relationships between an ORG Unit and Jobs.
    Alternative, you can write a simple query to extract data from HRP1001 to find the jobs under an Org Unit. Because Jobs are related to an Org Unit and this relationship is stored in Infotype 1001/HRP1001.
    Reward Points, If helpful.
    Regards
    Waz

  • How to find out the main org units in the system

    Hi,
    I want to find out the all main org units in the system. It means that i have to know all the parent org units not the sub org units.
    Can you please let me know .
    Regards
    Rajesh

    Hi,
    As I understood about your query, go to PA30, select the position field, select the structure search tab, go to find(Ctrl+F), select the object type S-position, give the position no, then it will give position place and root org, unit of the position and it will expand the structure.
    Regards
    Devi

  • Best Practice - Changing description for Org Unit/Position or creating new?

    Hello Freinds,
    I just want to know from your experience what's normally practiced in your implementations for OM :-
    For scenarios where there is a need to change the description of a particular org unit or position, do u
    1. just change the description effective a particular date (to maintain history) or
    2. put an end date to those objects and create new ones ?
    Solution 1 is quick and easy, but in IT0001 the description displayed is as on start date of that infotype which is normally a date prior to the change in desc of those objects. As a result this infotype keeps displaying old description.
    Is there any way to change this display to show the current description instead of the description as on start date of this infotype ???
    Solution 2 calls for a lot of related activities, say if i create a new org unit and delemit the old one - then i have to move all the sub org units and positions into this new one ... which is quite time consuming and doesn't really seem practical.
    How do u manage such scenarios ?
    Thanks
    Allen

    We use option #1, although I am not sure this is best practice.  Using option 1 for positions makes it challenging when it comes to reporting on length of time in position.  We frequently have the scenario where a person is reorged not because they applied for another position, but just because the big wigs want to move around the chess pieces.  In these cases we simply modify the position attributes and then run a PA action.  Then if you run a query and use the standard delivered Length of time in position field, it appears as if the person has been in the same position for years (which they have), but their position has been retitled, re-graded, and re-orged numerous times.  This makes it very difficult to get to an employee's length of time in their role. 
    This is a great discussion question I hope more people respond with what they do and why.

  • Org Unit Field in IT 0001

    Hi Folks-
    The Org Unit field in IT 0001in PA is not capturing the ORG unit stored in OM.Integration is active between OM and PA currently.The Job and position fields are carrying over without any issues.
    Used RHINTE30- and the org unit is allready there in Table T527X. What is the solution?

    Hi,
    I got the same prob, and resolved with the following. Replied for general help purpose.  As this  post is from Dec, hopfully u hv already done.
    please do the following steps.
    **Go to Tcode SA38
    1- Run report RHINTE10
    program allows you to create object types in Personnel Administration (HR-PA) which have already been set up in Personnel Planning and Development (HR-PD) and which are needed for integration. dont forget to uncheck "Test" check box.
    The following object types are relevant to integration:
    PD  PA
    Work center (object type A) Tables T528B, T528T
    Job (Object type C) Tables T513, T513S
    Position (Object type S) Tables T528B, T528T
    Organizational unit (Object type O) Table T527X
    2) Run RHINTE20
    This program can be used to check whether the relevant object types for integration have been created in both Personnel Administration (HR-PA) and Personnel Planning and Development (HR-PD).
    The entries in the HR tables T513/T513S (job), T528B/T528T (position, work center) and T527X (organizational unit) are compared with the corresponding objects that have been created in the HRPnnnn file for PD in the integration plan version.
    Objects that are missing either in PA or PD can be created immediately
    3- Also check ur org struct in PPOME.  Hope ur prob will b ok with 1st two task
    regards,

  • How to creat a cross - Org unit(different root org unit) reporting in OM

    Hi All,
         I would like to know how to creat a Cross reporting strecture  in OM between 2 different Org units( Root org units  or Sub-org Units) for they existing positions in OM.
    Thanks in advance,
    Regards,
    Surya

    HI,
    You can try this relationship " ALSO REPORTS TO"
    cheers
    rafi

  • Org Unit with more than one Chief Position

    Hi,
    we have implemented MSS via the portal using a one-to-one relationship between Org Units and Chief Positions, and we would now like to have multiple Chief positions attached to one Org Unit.
    As far as I can tell from the SAP documentation, this should be straightforward, but the results we are getting do not seem correct.
    I have an Org Unit that has position 1 and position 2 assigned to it with relationship A/B 012 denoting that they are Chief Positions.
    User 1 is holder of position 1 and user 2 is holder of position 2. 
    Both users have the same security roles.
    The views used on the portal are configured using the MSS Object and Data Provider functionality, using the standard ORGEH view, evaluation path for root objects SAP_MANG and evaluation path objects SBES.  The checkbox 'Excl. Managers' is ticked.
    The problem is this - both users can see all the subordinate employees in the Org Unit when they log on to MSS but user 1 can also see user 2 in his list of employees, which is not correct as user 1 and user 2 are both chiefs.  User 2 cannot see user 1 in his list of employees, which we would expect.
    The only logic we can see for user 1 being able to see user 2's details is that user 1 must be somehow defined as the 'superior' Chief Position, but we have not defined this as far as we know.
    Any ideas as to why this is happening for us?
    Many thanks,
    Fran.

    Hi Fran,
    Sounds like you have set up the reporting structures and MSS properly.  I do question why two chiefs for one org unit.  As you stated, both can see all employees and so both can approve time, give pay increases, etc. without the approval of the other.  If this is want you want, then you have set it up properly.  Usually, one has to approve the actions of the other, thus, is in a superior relationship.  This can be handled by having a higher level new org unit with the higher person as chief and the lower stay as head of the lower org unit which reports to it. 
    As you have it now, both individuals have the same rights and access.  They should both be excluded from iViews if you checked the "Excl. Managers" box.  Since, you just recently made one a manager, have you checked for any date dependencies?  If the Chief #1 is selecting a view for "Current Year", for example, he would be able to see all persons who reported to him for this year, which includes Chief #2.  There are no 'superior chief' designations (except by structure), so without being able to view your configuration, my suggestion is to check all dates for the assignments and relationships vs. dates of the view.

Maybe you are looking for

  • No message-icon after update

    Hello!  Updated my z1 yesterday and now I have a problem to see if I have received a message or not when I've "locked" the screen... There's no message-icon on the top of the screen as it was before update. This means I have to enter my phone passwor

  • How to open Camera RAW (CR2) files in Photoshop CS3 and CS4? (Mac)

    I have a Canon 7D. I prefer to shoot in raw format, but the CR2 files cannot be opened by either Photoshop CS3 on my Mac in the office OR by Photoshop CS4 on my iMac at home. I have tried dowloading the Adobe DNG Coverter and Camera Raw 4.6 update (w

  • How to show/hide a form field?

    Hi all, Is it possible to programaticlly show/hide a from input field at runtime? best

  • Append two structures in an internal table.

    hi,      if i join two tables by innerjoining will it effect the performance?If such,how i can join these with better performance?can i get the data from different tables in a single internal table by appending different structures in this case?Pleas

  • Is there a way to adjust the feet on the iq500 so monitor sit on better angle

    I read up on the documentation and best possible angle is 10 degrees, I was wondering if the feet are angled at roughly by 10 degrees or less in the oppisite direction to the monitor the monitor can safely sit at a better angle than what it currently