Searching the Org. structure

Hi all,
SRM 5.0, R/3 ECC 6.0
I'm working on the n step BADI for the approval workflow for SC.
The requirement is that I need to search the org structure to get the superiors of the creator of the shopping cart.
The approach should be a bottom up approach where I start looking from the position of the creator and go searching upwards. I though of using the FM RH_STRUC_GET but we need to provide the user which is mandatory. There could be a case where there could be no immediate superior say no managers but there could be senior managers who are a level above. in that case I won't be able to use the above mentioned FM.
Are there any tables or FMs where we can perform this kind of search?
Regards
Kishan

Hello Kishan,
You can use FM RH_STRUC_GET for your scenario with ACT_WEGID parameter. You can define evaluation path in OOAW transaction. Here is some sample I developed in the past.
3)get manager from Org unit
  WHILE lt_manager is initial.
    CALL FUNCTION 'BBP_OM_STRUC_GET_MGR_FROM_ORG'
      EXPORTING
        IV_ORGUNIT               = lv_objid
        IV_SEL_DATE              = SY-DATUM
      IV_SELECT_BUPA           = ' '
      IV_PPOMA_CALL            = ' '
      IV_AUTHORITY_CHECK       = 'X'
    IMPORTING
       ET_MANAGER_ID            = lt_manager
     EXCEPTIONS
       INTERNAL_ERROR           = 1
       NO_ROOTS                 = 2
       NOT_FOUND                = 3
       OTHERS                   = 4
  if lt_manager is initial.
    CALL FUNCTION 'RH_STRUC_GET'
      EXPORTING
        ACT_OTYPE              = 'O '
        ACT_OBJID              = lv_objid
        ACT_WEGID              = 'A002'
      ACT_INT_FLAG           =
      ACT_PLVAR              = ' '
        ACT_BEGDA              = SY-DATUM
        ACT_ENDDA              = SY-DATUM
        ACT_TDEPTH             = 2
        ACT_TFLAG              = 'X'
        ACT_VFLAG              = 'X'
      AUTHORITY_CHECK        = 'X'
      TEXT_BUFFER_FILL       =
      BUFFER_MODE            =
    IMPORTING
      ACT_PLVAR              =
     TABLES
        RESULT_TAB             = lt_agent
      RESULT_OBJEC           =
      RESULT_STRUC           =
     EXCEPTIONS
       NO_PLVAR_FOUND         = 1
       NO_ENTRY_FOUND         = 2
       OTHERS                 = 3
    IF SY-SUBRC eq 0.
      loop at lt_agent into lwa_agent.
        lv_objid = lwa_agent-objid.
      endloop.
    ENDIF.
  endif.
ENDWHILE.
Regards,
Masa

Similar Messages

  • How to get PNP Org Structure to reflect the org structure as of key date?

    I created a custom program using the PNP logical database.  I defined a custom report category indicating the selection period = employee selection period and allowing org.structure.  I’m also using the standard SAP PNP_DEFAULT selection view. 
    Inside my ABAP I initialize the pnpbegda and pnpbegps to reflect 20060930.  Upon Execution the key date reflects 09/30/2006.  I click on the org.structure button.  The org.structure displayed reflects the one as of today rather than as of Sept-30. 
    During run debug I see that the RP_PNP_ORGSTRUCTURE  program, LRPPNU11, calls function 'RH_TYPE_STRUC_HELP' to get the org.structure.  The call to this function passes 09/30/2006 for the begda and endda, but it still returns the latest org.structure.  I did some playing with this function and found that if I also pass the ACT_SEARCH_WEGID as ORGEH it works.
    Any idea on how I can get the LRPPNU11 program to pass the ACT_SEARCH_WEGID or the subsequent called functions to process for ORGEH?

    thanks. but maybe I don't describe my problem well.
    I use javascript to get some information such as position, sytle of each elements and then pass these to javafx. So the besides the dom tree, I can get more information about elements.
    I need to pass them back to javafx.
    if node support setUserData, I can associate them to each Node/Element. But webkit don't support this feature.
    BTW, If javascript pass a object to javafx. it can only deal with primary types such as string, numeric. But I need pass back a complicated javascript object like:
    {name:"parent", children:[{name:"child1"},{name:"child2"}]
    I can use (String)JSObject.getMember("name"); and JSObject children=JSObject.getMember("children");
    but I can't cast children to Object[] or JSObject[].
    so I have to use some tricky to convert Javascript Object to json string and then in javafx convert it back to Object tree.
    Edited by: user12956197 on 2013-3-11 上午4:27

  • Integrate the Org structure and employees SAP HR system to CRM via ALE

    Hi All,
    We want to integrate the organization structure and employees from mySAP HR system to mySAP CRM system. We are also aware that the same can be achieved through ALE Interface between both these systems.
    In addition to the HR Organization Structure from HR system, can we also bring over the Sales Organization Structure from R/3 using transaction CRMC_R3_ORG_GENERATE?
    1) Can someone , please let us the possible challenges which might occur when we download HR Org structure from SAP HR to SAP CRM.?
    2) What is the implication of maintaining an HR org structure and CRM Sales Org structure within the SAP CRM 52 system?
    3) Any _precautions) should we take before doing the download via ALE??
    Please get back, suitable points will be awarded.
    Regards
    Ritvij

    Hi Ritvij,
    Couple of things that spring to mind are:
    1) When you do the initial data load (PFAL) try to ensure that no one is amending the Org structure as Objects can be locked and therefore not transferred. (on one of our test loads the top level was locked and therfore all subsequent levels were just transfered and we didn't have a top level)
    2) Keep the 'forms of address' in CRM the same as the R/3 ones
    3) Keep the same Employee and Org Unit IDs but prefix with (for exmaple) EM and OU in CRM. (Through the HR integration config in CRM). This may also (apparantley) aid you if set up something like an Employee interaction centre in the future.
    I will update when other stuff springs to mind.
    Cheers
    Gaz

  • Save the ORG structure

    Hi SAP GURUS,
    Facing some problem in saving the Organisation structure .However it is saved in .PS format and can be viewed in Post script viewer. The problem is the PS viewer is not depicting the Exact org structure from the .PS file
    Is there any other ways to save the ORG Structure or to open the .PS files.
    Best Regards,
    Srikanth S

    Sameer,
    Thanks for the Response.Even the .ps File is opening in the Post script viewer and the Structure is not depciting correctly.It was getting cropped.and some of the Org units were not at all seen.
    will check in Acrobat writer and get back to you.
    Best Regards,
    Srikanth S

  • Moving users in the org structure

    Dear Experts,
    Whenever, I move my user in PPOMA_BBP, it brings inconsistency that cannot be repaired.
    What could be the possible reason(s).
    Regards
    Mick

    Hi
    Which SRM version are you using ?
    You can repair the users using the same transaction.Even after that some times the inconsistency persists then delete the employee data and assign the user to the required Org. unit in the Org. structure using USERS_GEN transaction. Also check for the BBP_CONSISTENCY_CHECK transaction for this user (you will get list of errors in Consistency check ).
    <u>Related link -></u>
    How to re-instate the deleted Position of the user into Org structure.
    <b>Please go through the following SRM Reports which will help -></b>
    Program Name                   Report title                                                                               
    RHXSTR00                       Organizational Structure                                         
    RHXSTR01                       Organizational Structure with Positions                          
    RHXSTR02                       Organizational Structure with Persons                            
    RHXSTR03                       Organizational Structure with Work Centers                       
    RHXSTR04                       Report Structure with Persons                                    
    RHXSTR05                       Report Structure Without Persons                                 
    RHXSTR06                       Work Centers per Organizational Unit                             
    RHXSTR07                       Activity Profile for Positions Along Organizational Structure    
    RHXSTR08                       Activity Profile of Positions with Persons Along Org. Structure 
    <u>Also, go through the tables HRP1000 / HRP1001 in SRM.</u>
    <b>Look for "CHDAT" field in this Case, which will give Last changed by ehich user on which date..</b>
    <u>Some related Database Views</u>
    View name                      Short text                                                                               
    HRV1222OT                      Infotype 1222 (OTJID)              
    HRV5500OT                      EBP Function (OTJID)               
    HRV5501OT                      EBP Product Responsibility (OTJID) 
    HRV5502OT                      EBP Location (OTJID)  
    To change the Organization Unit of User, Try this FM - "RH_BUF_GEN_USER_POSITION_ORG" which will assign new org. unit to new position.
    <u>Related links -></u>
    mass user movement from one org. unit to another in SRM org. structure
    Table name of the organization plan
    Org. structure transport via RHMOVE30
    Re: How to get busines partner number from organization id ?
    Re: Org structure table
    How get the Last changed date of Busness Partner
    Report for Org structure change
    Hope this will definitely help.
    Do let me know.
    Regards
    - Atul

  • How to see the Org Structure??

    Hi
    Could anyone please let me know how can we look at the org structure..??
    I know how to create pa,psa,eg,esg..but how to look at the org structure and the hierarchies of diff pers areas is wot i am looking for.
    Thanks in advance
    Kushagra

    Hi Kapoor,
    Follow the path:
    SAP Easy Screen> HR > Info Sys > Reporting Tools > HIS
    Follow the T Code: PPIS
    If found useful please award points
    Reagards,
    Madhu Sudhanan

  • Asset exclusion is selected though it is excluded in the org. structure.

    Hi SRM gurus,
    We are working on a Standalone scenario (SRM 4.0) where we have assets and asset classes.
    In our org. structure we have excluded two asset classes with the exclusion indicator to the corresponding attributes of the purchasing organisation.( Asset class - ANK). But when we create a SC all the assets are selected in the Item details --> Cost assignment ---> dragdown (asset).
    From our case it seems there is no effect of the exclusion indicator/ we made something wrong somewhere.
    Can we get few suggestions/sap notes from the group that what went wrong?
    Thnx. & Reg.,
    Sridhar.

    Hi Mani,
      Thanks a lot for your reply.
    If the exclusion indicator is maintained at user level also it is not working.( all
    assets are selected from the list and there is no difference between the others)
    May I get any further suggestions on this issue pls.
    Thx. & reg.,
    Sridhar.

  • Holder missing in the org structure ( PPOM_OLD) simple maitainance mode

    Hi all
    I have uploaded the HR Master data using BDC.
    Everythin is fine in the HR Master data , the Org assignments all r fine.
    The problem is the holders are not reflected in the Organizational structure in the simple maitainance mode ppom_old.
    I know there are way to rectify this , by running RHINTE00/10/20/30 , some reports like this.
    But im not getting the actual thing to be done .
    Im still stuck with that.
    Some help me out with the exact step by step procedure.
    thanks in advance

    hi
    Run Rhinte30 in tcode se38
    uncheck the open personal number check mark,
    select the period correctly , give your employee number range , then execute it , it will create a batch job , you will have to execute the batch job , after execution the position will reflect the holder.
    regards
    sameer

  • Assigning a "Job" to a User in the Org Structure

    Hi,
    I'm trying to assign a Job to a User in PPOMA but don't know where this data is created or maintained? (SRM 5)
    Any info would great.
    Regrds,
    S

    Hi
    <b>Which SRM version are you using ?</b>
    <u>First go to the HRT1222 with the technical name of the attribute and the valor. Then go to HRP1222 with the reference number and you should see the user.
    Also Look in table HRP1001 and T770MATTR (also check in transaction PO10, P013 ).</u>
    <b>Related links -></b>
    PPOMA_BBP - Changes analysis
    Log of changes in PPOMA_BBP ?
    Log of changes in PPOMA_BBP ?
    Re: Tracking Chngs made to the SRM Organisation Structure.
    Regards
    - Atul

  • ITS_DEST attribute is used for in the org structure

    Hi All,
    There is an attribute for the EBP Organization " ITS_DEST" (current ITS of user),
    What is the necessity of this attribute.
    Here in my case, previsouly there is an URL assigned to this attribute.
    Recently we have changed the ITS seraver, now the new URL is there for accessing the browser, but still in EBP Org., attributes old URL is there and is function fine.
    Client wants to know what exactly the significance of that attribute.
    Can any one let me know about it.
    Thanks in advance,
    Thanks & Regards,
    Krish,

    Hi Krish,
    In SRM most of the email notification sent out contain URL links in their mail body. This URL in most cases is picked up from the user attributes. Here they play a very vital role.
    One example say bid inviations; In the include
    LBBP_BID_PUBF01
    These attributes are being read for
      move 'EXT_ITS' to ls_attr_list-attr_id.
      append ls_attr_list to lt_attr_list.
      move 'ITS_DEST' to ls_attr_list-attr_id.
      append ls_attr_list to lt_attr_list.
      call function 'BBP_READ_ATTRIBUTES'
        exporting
          iv_partner              = lv_portal_id
          iv_scenario             = 'BBP'
          it_attr_list            = lt_attr_list
        importing
          et_attr                 = lt_attributes
        exceptions
          object_id_not_found     = 1
          no_attributes_requested = 2
          attributes_read_error   = 3
          others                  = 4.
    Hope this solves your problem.
    Regards
    Kathirvel

  • Can a user exist in the org structure multiple times?

    With one user id / single sign on?  If so what are the impacts?  Eg: when they log on what attributes get picked up?
    Thanks

    Hi,
    it is possible, but if you have a 50-50 assignment you can't steer what attributes are taken into account, so you might be lucky, or you won't .
    You can change the assignment of the CP to the S to something like 51-49, the 51 position will then be used to determine the attribute values.
    If you want to buy for multiple companies/plants, maintain the BUK attribute and the extended attributes for locations.
    The only real problem shows up when a user should be allowed to buy cross backend system. This is not possible. Then you should start thinking about a buy on behalf scenario or multiple user accounts.
    Regards,
    Robin

  • Org Structure chosen within HR report

    I hope I have this question in the right forum.  Within a HR report built using the Logical database PNP,  you can choose a Report Category that will will allow you to choose 1) Further Selections 2) Search Helps, 3) Sort Order 4) Org Structure. These are buttons at the top of the selection screen.
    My question relates to choosing the Org Structure and if the user selects multiple Org Units when clicking on the Org Structure button.  The PNP logical will take care of selecting the correct employees based on the Org Units selected.
    Is there a way, when the program is executing to determine what the user chose from this Org Structure tree?  It's not the PNPORGEH parameter on the selection screen.
    Thanks
    John

    Nevermind.  I wasn't looking hard enough.

  • RE: Org Structure in HR

    Hi Gurus,
    I am new to HR. I have ECC 6.0/windows 2003/oracle on my desktop. I am trying to create a Org Structure using PPOCE and when i saved it asked for the trasnport request. I have created this transport request. when i get out of T-code PPOCE and come back again I am unable to find my org structure that was created earlier. Can you guys help me how to find my org structure.
    Points will be awarded for the useful answers. I appreciate your help.
    Thanks,
    Peapully

    Peapully,
    Org structure is client dependent and it cannot be transported. I am not really sure why it is prompting for a transport when you save a Org structure. Ideally it shouldn't. And about viewing the created Org structure did you try the transactions PPOME or PPOSE --> from the left navigation pane Structural search. Hope you will be able to find the org structure with PPOME, PPOSE.
    Regards,
    Naveen

  • Creating Org Structure in OM

    Hi Gurus,
       I am new to SAP HR, and hence pardon me if my question seems very basic. I tried searching for a solution on the forum but couldnt get a decent hit. The question is we have a organization structure as follows:
    Unit
    Function
    Department
    and in some cases teams within departments
    Positions.
    We implement this schema by means of Organizational Unit and Positions. but we are not able to replicate the exact structure in SAP as the levels cannot be defined for Organzational Units. We need this information for reporting purpose when we need to find where exactly a prticular position or employee is in the Org Structure.
    Also there is no way of identifying the managerial poisition of employees in the company. What we get based on reporting structure  is only the employee and his immediate supervisor. We have following Hierarchy in our organization:
    CEO
    Senior Vice President
    Vice President
    Department Manager
    Team Leader
    Employee
    How can we maintain this information in OM? We are struggling with our reporting and help will be highly appreciated.
    Best Regards,
    Imran

    Greetings,,
    from what i understood from what you have wrote here is couple of hint that might help you.
    use PPOCE to create a new root organization i.e. the main organization in the company, if you already did use PPOME to create sub orgs, positions and jobs.
    if you maintain this, you can maintain OM relationships in PO10 "for organization units" PO13 "for positions" and PO03 "for jobs"
    In general, to get the reporting structure "and show whom report to who" you need to maintain couple of relations in OM infotype 1001 "Relationships"
    here is a list of couple of usefull relationship that you need to maintain:
    B|012 is managed by "position"
    B|002 is reports line to "org unit"
    scroll the standard relationships that you might benefit from it.
    Edit: Regarding reporting tools, if the standard reports of SAP didn't satisfy your needs, you always can take help of ABAP'ers to get a custom reporting tools.
    also, you can create custom OM infotypes where you can create what you need from OM structure and tailor it based on your needs.
    Edited by: Fahad Al-Angari on Apr 20, 2011 11:50 AM

  • Copy back of Prodution Error on Org Structure

    Please can any of you guru's out there help.
    We have just done a copyback from production to SR2 (QA system) and there is an error with the org structure.
    We use extended Classic Scenrio and we replicate the org structure from ECQ to SRQ. (integrated)
    All the org structure units appear when you search for them, but there is no link between any of the units, purchasing org units or groups. 
    The error we encounter when we try to  to select one level up is the following:-
    There are "no  objects superior to the current start object" .
    Please can you advise if you have ever come across this type of problem or any possible solution.
    Thanks in advance
    Sharon

    It looks infotype for the Unit relationship is missing. How did you copy back or replicate it ?
    Regards,
    Masa

Maybe you are looking for