Get the top org unit

Is there any function module to get the top or root org unit id? thanks!

Just because an org currentlly is not reported to another org necessary means that it's the top org (i.e. it could just mean the org hasn't been assigned the org relationship just yet). The above function is to traverse the org from the 'bottom up' all the way to the top org.
Depending on what your company set up of org, they could have a 'D'ivision' as the highest org for example, and set up a relationship such as 'A020'  between these org to the type of related object 'D'ivision . If this is the case, you could easily query org with these kind of relationhips to identify top org.

Similar Messages

  • Not able to view reports by users under top org unit- Interactive Reports

    HI,
    We are using CRM interactive reports.
    In my project the client is having 3 Sales Org with two sales office and two sales group for each office respectively.
    When the document is created by the  sales Executiv, he and his manager is able to see it in the reports but the top person of that org unit is not able to see  the report.
       Some say the report can be viewed by only employee responsible and his manager. In my project the core team is sitting in the top ORG unit. They want to see the reports of all the sales org units.
    With Regards,
    Selvam T

    Dear Luke,
    I am not able to see that navigation icons within an org chart box - The org unit that is displayed on clicking the orgchart does have branches in SAP but i am not able to see these navigation icons that lead me to these branches.
    Is there any specific step that needs to be done to see these branches.
    By the way what is the log file you are refering to is it the "PresentationResources.xml " or is it any other log file.
    Regards
    Hkishan

  • 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

  • Determine the superior Org Unit for a given Organisation Unit.

    Hi,
    I am using the Sequential Access method of accessing the PCH Logical Database.
    Is there any macro available to determine the superior Org Unit of the current Organisation Unit being looped at using the GET OBJEC statement.
    I cannot access the STRUC internal table as I do not want to use structural access.
    At the moment I am using the function module RH_ENTH_READ_STRUCTURE. Is this a good way of doing this or is there any PCH functionality for this?
    Any help would be much appreciated.
    Thanks and regards,
    Priya

    Thanks for the input.
    I just was concerned if either way would cause a performance issue while i'm already in the GET OBJEC loop.
    Anyway, for now I think I'll continue using the function module. I guess a direct SELECT on HRP1001 would require explicit authority check.
    If someone else has a comment on this topic do post it in. I have time till next week to finalize on my approach.
    Thanks once again Suresh!!!
    Regards,
    Priya

  • FM to get the root org id

    Hi,
    My requirement is to pass the Username and get the root Org id for the same.
    Is there any FM available for this purpose.
    Kindly provide your inputs.
    Thanks ,
    Mani

    Hello Mani,
    Using RH_STRUC_GET function module, you will get the root unit of your organizational plan.
    For this, populate importing parameter as follow:
    ACT_OTYPE = 'S' (Position object type)
    ACT_OBJID = user's Position obtained with BBP_OM_STRUC_GET_POS_FROM_USER MF,
    ACT_WEGID = 'P-S-O-O' (evaluation path 'Direct or indirect organizational assignments of a person').
    In exporting parameter RESULT_OBJEC, you will have all organization units upper than user one until root unit.
    Regards.
    Laurent.

  • 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

  • How to get the amout(menge),unit price(netpr) and sum of  consignment PO

    hi expert:
          Because there are no  netpr and netwr of consignment PO in EKPO table, i want to know that how i can get the amout(menge),unit price(netpr) and sum(netwr)  of the material in this consignment PO between a definite time.
          would you like to give me some code?thanks a lot.

    Hi
    Net price for the consignment process is saved in info-records. So you can get the netpr for the material in EINA & EINE tables Or other tables related to infor-records.
    Thanks & Regards
    Kapil Nanda

  • Need to get the Top visitors for a site in SP 2013

    Hi all,
    I have to get the top visitors of a website which has been migrated from 2010 to 2013, Since the web analytics has been depricated in 2013, i cant find a way to get the data of the visitors count for a website, i cant create a list and store the names of
    the users in that as my site would be visited by many
    I have heard about using AUDIT LOGS, just wanted to reconfirm if i can do with it.
    If yes, i would like to know the way too.
    Thanks in advance

    maybe this topic can help you :
    http://social.technet.microsoft.com/Forums/lync/en-US/72eb0aaf-a34a-47a4-83c4-ec9d8527bc30/how-can-i-show-top-visitors-of-site-in-web-part-on-home-page-of-sharepoint-2013-site?forum=sharepointdevelopment
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

  • Using SetLeaf seteaf to get the top hierarchy of the setnode its setname

    hi,
    using setleaf I have to set its setnode. I have to get the top standard hierarchy setname of that setnode. Is there any function module developed or is there anyway i can get the data.
    Kamlesh

    Take a look at SAP program RGSEX001 - good example of several Set related functions.  Also other RGSEX* programs.
    Andrew

  • Critical abap hr req - How to find the previous org unit of the employee?

    Hi Experts ,
    I need small inputs from your end...
    I need to find the employee org unit based on the latest one.....
    i just want to know if an employe is Transfered from the org unit .....we can check it from the ORG unit.
    My requirement is to now capture only the org unit of IT folks not for the employees who are transfered to NON-IT department.....
    sop if an empployee 5000 org unit belongs to IT of employee 1000 and NOW he transfered out of IT with current 6000 org unit then how can we read that 5000 ?
    now i am using PCH logical data base...
    Based on evaluation path(Pers-0)  i will pick up the pernr 1000.
    now when i check the org unit it is 6000 with end da 12/31/9999.
    then i loop
    select * from pa0001 into itab where pernr = objec--objid and otype = 'P'.
    enselect.
    loop at itab where pernr = objec-objid.
    Here in the loop what is the logic we need to write to pick up the previous org unit please suggest
    endloop.
    Regards
    sas

    >
    Faisal Altaf wrote:
    > Hi,
    >
    > Please Test the following Sample Code hope it will solve out your problem,
    >
    >
    TABLES: pa0001.
    >
    > DATA: it_pa0001 LIKE STANDARD TABLE OF pa0001 WITH HEADER LINE,
    >       begda TYPE begda.
    >
    > SELECT SINGLE begda FROM pa0001 INTO begda
    >   WHERE pernr = '00000001'
    >     AND endda = '99991231'.
    >
    > begda = begda - 1.
    >
    > SELECT * FROM pa0001
    >   INTO CORRESPONDING FIELDS OF TABLE it_pa0001
    >   WHERE pernr = '00000001'
    >     AND endda = begda.
    >
    > Please Reply if any Issue,
    >
    > Best Regards,
    > Faisal
    Hy Faisal...what is the begda value there?
    Regards
    sas

  • I have to find the 10,000 levels below the Child Org unit based on Parent o

    Hi,
    My requirements is that Use enters a Root organisation in the selection screen , based on which I have to find out and display
    the Child org units upto 10,000 levels. Can anyone pls tell me how to proceed ??.

    You can use SAP function 'RH_STRUCT_GET'with objectype = 'O', objid = provided org, evaluation path (ACT_WEGID) = 'A002', depth (ACT_TDEPTH) = 1000 .
    Rgds.

  • Getting the top & left of a textbox placed inside a table

    hai brainees
    i need a sampel code to get the top & left of a textbox placed inside a table so that i can display a dropdownlistbox ih that place.its very important.
    Thanks
    anieshuk

    Thanks. I asked a friend and he told me about the %but I still had a problem. Your expression solved my problem
            private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = Math.floor(mouseX / tileSize) * tileSize;
                tile.y = Math.floor(mouseY / tileSize) * tileSize;
                stage.addChild(tile);
    That way every tile is centered every 50 pixels

  • How do I get the top banner to always be viewed while scrolling? (fixed header)

    How do I get the top banner to always be viewed while scrolling? (fixed header)

    Have you tried pinning the banner as an element?
    http://tv.adobe.com/watch/muse-feature-tour/muse-pin-objects-to-the-browser-window/

  • Function Module to get the TOP N PRODUCTS

    Hi Experts,
      Can you please let me know how can i get the top n products configured using programming?
    Please help.
    Thanks,
    Neeraj

    Hi Neeraj,
    Check Out this Function module : CRM_MKT_TOPN_PPR_PRODUCT_RULE
    Hope this helps!!
    Regards,
    Anubhav

  • How to get the TOP MAT from a component material of BOM list?

    I only kown a sub material of a BOM Llist & not sure its level in the TOP MAT's BOM.
    How can i get the TOP MAT of this sub material?
    Any BAPI or Function?
    TKS a million~~~

    HI .. in my view you should ask your ABAP to help you with a small program to solve your purpose, i am not aware of any system available t-code/ program ..... hence this is what we also did at client place.

Maybe you are looking for

  • Help finding Media Encoder CC download

    I can not find a download icon for Media Encoder CC. I am a complete CC member, and it doesn't show up in my application manager. I have tried searching through the site and google for any sort of link. I come up empty. Any help would be appreciated.

  • How can i upload a image file to server by using jsp or servlet.

    Hi, I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code. Pls send me anyone. Regards, Gurumoorthy.

  • Excel to Z tables

    Hi,   We have created Z tables in SAP and want to migrate data from excel to Z tables the excel contains more than 30000 records. Any one suggest me which method is best to use and steps to do it. Thanks and regards, Vimal

  • Where should the Debug Database.txt file go for AE CS6 on windows 7?

    Hi, I'm trying to use this work around to get cuda working when using aerender from the command line. It says to edit the Debug Database.txt, but I have searched my whole computer and it doesn't exist. So I guess I can create one in the right place,

  • Reg Exp - not as expected

    Not often I ask questions myself, and perhaps my mind's just gone fuzzy this morning, but I'm having trouble doing a simple replace with regular expressions... In the below example I just want to replace all occurences of "fred" with "freddies"... SQ