Query to retrieve manager's direct reportees

Hi,
Am developing a custom report in OIM 11g where I have the below requirement.
I have a seach crieteria with filter manager and oraganisation. Based on the value of oraganisation and manager, I need to list the direct reportees of the manager in that particular organisation.
Is anyone implemented this sql query? It would be gr8 if u can share the query or give me an idea how I could go ahead.
Thanks in Advance

You can use this Inner Join which I have uswed in one of the projects
  SELECT A~otype
         A~objid
         A~relat
         A~rsign
         A~begda
         A~endda
         A~sclas
         A~sobid
  INTO   TABLE GT_REL
  FROM   (  hrp1008 AS B
           INNER JOIN hrp1001 AS A ON  Aplvar  = Bplvar AND
                                       Aotype  = Botype AND
                                       Aobjid  = Bobjid )
  WHERE B~bukrs IN S_BUKRS   AND
        A~plvar = '01'       AND
        A~otype = 'S'        AND
        A~relat = '012'      AND
        A~rsign = 'A'        AND
        A~aedtm IN S_AEDTM.
Do reward points if you find it helpful & contributing to resolving this problem

Similar Messages

  • Issue in direct reportees for manager in MSS Team

    Hi all,
    I have configured my system according to the document Manager Self-Service (MSS) - MSS team view, managers who do not hold chief position prepared by Mohsin Syed .
    In MSS-> Team -> Employee information I am getting the direct employees even the manager is not chief.
    But my problem is same manager cannot see the direct reportes in other places say :  attendance overview , employee course assignments-> manage participants etc..
    see the screenshots : In the same page, no direct reporting employee for attendance over view , but there is for Team calendar.
    For the same manager, if he try to book for training, there is no direct reportees.
    What I have missed ..please guide me what to do..
    Thanks,
    Namsheed

    Dear Mohsin,
    In the Table TWPC_DAATAVWGRP,  I have created the new entry 'MSS_LAV_EE1. Assigned to group of Data views in "MSS_LAV_EE_DIR1".
    Then in Object and Data Provider -> Organizational Structure Views -> Group Organizational Structure Views,
    MSS_LAV_EE -> Assign Organizational view , I have added 1 more entry MSS_LAV_EE_DIR1(Direct Reports)
    Then In NWBC I have got a new option Direct Reports and under that I have got 1 person as Absent. but 2 person at work is not showing. Actually there are 3 direct reportees to him.
    this is 1 concern
    Under Working time->Attendance overview->Select Employees, it is like this :
    1 more thing.
    Under  MSS-> Team-> Employee course Assignments-> Manage Participants : For manager who is Chief can see all direct reportees and book training for them.
    For manager who is not chief are not getting the direct reportees so that he cannot book training for them.
    If I can retrieve the direct reportees here, then all issues are solved.
    Kindly help me with what changes I have to make in system.
    Thanks a lot,
    Namsheed.

  • Is there any Fm or Bapi available to see the direct reportees of a manager

    Is there any Fm or Bapi available to see the direct reportees of a manager
    i have the managers id could i get the employees under that manager
    is there any SAp fm for the same

    Like Aditya, I have not seen such a function module. However, there is a standard evaluation path which may be suitable for your purpose. It is called BOSSORG and will give you all the employees under a manager.
    Use it with function module RH_GET_STRUCTURE or RH_STRUC_GET. The latter lets you specify parameters directly, while the former takes them in container form. None of them are released for customer use unfortunately, but I haven't found a corresponding function module that is released.

  • Disabled accounts showing up under direct reportee in AD accounts

    We are using AD server 2003. We use peoplesoft and oracle identity manager to sync user details with AD.
    We are facing a problem where some of the disabled users have manager name in their 'direct reportee' field in AD. These user accounts are admin accounts and do not have exchange features (exchange account). Also, these admin accounts are not synced by peoplesoft or exchange (We do not keep records of these admin accounts in Peoplesoft). OIM does have details about these admin accounts and also has User Principal Name value for these accounts. The status for most of these admin accounts in OIM is disabled and their exchange account is 'revoked' (just ivestigated..if this information can be of any help).
    If we clear the direct reportee field manually from these admin accounts..problem reoccurs after a few days..we do not want 'direct reportee' field to have any user's name in it for these accounts. We have consulted this issue in microsoft technet forum and were advised to contact OIM support.
    Can somebody suggest what can be root cause.
    Edited by: 998461 on Apr 6, 2013 4:34 PM

    That won't prevent the accounts from being on SharePoint, it will just prevent them from being part of the UPA sync. You could also throw them all in an OU and just de-select that OU from being synchronized. Don't forget to delete their user profile from
    the UPA after you make the change.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Dimension only query to show manager and employees in one row

    Hi Gurus,
    I am creating a dimension only report. This report will show managers and their direct reportees. Since one manager can have several employees working under him, I am getting one row in the report for each employee. But our end users want employees to appear as comma seperated value for the manager. Thus each manager will have one and only one record in the report
    Current
    ======
    Manager Employee
    M1     E1
    M1     E2
    M1     E3
    Expected
    =======
    Manager Employee
    M1     E1, E2, E3
    Env : OBIEE 10.1.3.4 & Oracle 10.2.0.3.0
    Thanks for your help in advance

    Google ask Tom for string aggregation - there is a listagg equivalent available there, create on your DB then follow the same principal as the listagg / evaluate example.
    regards,
    Robert.

  • Direct reportees for MSS

    hello gurus,
    My requirement is when a Manager logs in thru MSS he can only view the direct reportess & their details. Say a Department may have 1 head & 2 Managers. So each manager can view only the direct reportees when he logs in the MSS.
    Currently the reporting display is possible only if i assign A/012 relationship & this wud display all reportees under this dept.
    Reading the threads i assumed changing the evaluation path will help but am confused as how to do it. In SPRO under OADP there are steps to be maintained Eg - Define Rules for Object Selection. When i go to this step which std entry do i copy & wht evaluation path can i use to get the desired result.
    Pls help me.
    rgds,

    Hi siddharth,
    thnk u so much for the reply
    i have already gone thru this link & with its help made the changes.
    My requirement is when a Manager logs in MSS he can only view the direct reportees under him
    currently my observation is that the reporting structure is visible only if the Manager is assigned A/012 relationship. If i remove this relationship then there is no display of reporting structure.
    i copied the standard entries & modified acc to my requirements.
    (A) Object Selection Rule : - Z_MSS_TMV_RULE1 (Evaluation Path - SAP_MANG)
                                                 Z_MSS_TMV_RULE5 (Evaluation Path - MSSDIREC)
    (B) Selection Rule :- ZMSS_TMV_EE_DIR
                   Rule for Root Object = Z_MSS_TMV_RULE1
                   Rule for Target Object = Z_MSS_TMV_RULE5
    (C) Organizational Structure Views :- ZMSS_TMV_EE_DIR
                  Obj Sel = ZMSS_TMV_EE_DIR
                  Grp of Data Views = MSS_TMV_EE
    (D) Group Organisational Structure Views :- Z_MSS_TMV_EE
                  Org Struct View = ZMSS_TMV_EE_DIR
    I have copied the Std entry MSS_TMV_EE for the above config
    1) Can u suggest what more i need to add to the config to get the desired result
    2) Where & which FUNTION MODULE to use
    3) Which other evaluation path can i use to get the desired output?? (i tried changing the evalution path for Target Object & no data was displayed)
    3) Is is mandatory to assign A 012 relationship to the Manager?? Because i only want direct reportees & if i assign A012 then all the subordinates in the Org Unit will be dispalyed where as i only want direct reportees tobe displayed.
    all help is highly appreciated. Pls help me resolve this
    rgds,

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • Query to retrieve the number of transactions done in every 1 hour for last

    Hi,
    Could anyone help in writing a query to retrieve the number of transactions done in every 1 hour for last month.
    Case:
    I/P
    Cases Timestamp1
    case1 01-01-2008 00:00:01
    case2 01-01-2008 00:01:01
    case3 01-01-2008 01:00:01
    case1 01-01-2008 01:02:01
    case4 01-01-2008 01:10:01
    case5 02-01-2008 02:00:01
    case6 02-01-2008 02:10:01
    case7 02-01-2008 23:00:01
    case.. 31-01-2008 24:00:00
    O/P
    from time to_time cases
    01-01-2008 00:00:00 01-01-2008 01:00:00 2
    01-01-2008 01:00:01 01-01-2008 02:00:00 3
    etc
    Any help really appreciated

    We can do this using analytical functions
    Following is what I did:
    create table timestamp1 (ts date)
    select *from timestamp1
    30/10/2008 15:41:13
    30/10/2008 15:41:05
    30/10/2008 15:40:03
    30/10/2008 14:58:26
    30/10/2008 14:29:45
    30/10/2008 13:17:48
    30/10/2008 08:29:50
    30/10/2008 06:05:51
    30/10/2008 03:41:52
    30/10/2008 02:29:54
    select distinct to_char(ts,'hh24') frmhrs,
    to_char(ts,'hh24')+1 tohrs, count(ts) OVER (order by to_number(to_char(ts,'hh24')) RANGE (1/24) PRECEDING )
    from timestamp1
    where trunc(ts)=trunc(sysdate) -- I added this just to make sure I get for today's data
    order by frmhrs
    FRMHRS     TOHRS     CNT
    02     3     1
    03     4     1
    06     7     1
    08     9     1
    13     14     1
    14     15     2
    15     16     3
    You can customizeas per ur need.

  • Query to retrieve 2 level of supervisors

    Hi all,
    I am using the following query to retrieve the people who is being supervised for a given person_id... Is there any way to modify this query (below) in order to get two levels of employees? something like:
    Supervisor 1
    Employee 1
    Employee 2
    Employee 3
    Supervisor 2
    Employee 4
    Employee 5
    Employee 6
    The query is working if I pass the person_id of Supervisor 1 for example I would get Employee 1 2 and 3. But if I pass a person id which of higher hierarchy I will just get Supervisor 1 Supervisor 2 ... And I need all the people (just two levels down)
    select distinct * from(
    select distinct ppf.first_name||' '||ppf.last_name
    , ppf.last_name
    , fu.user_name
    , fu.user_id
    , ppf.person_id
    , papf.person_id supervisor_id
    , pi.image_id
    , initcap(hla.description) LOCATION
    , pb.NAME pay_basis_name
    , pax.grade_id
    , haou.name
    , employment_category
    , ppos.date_start
    from per_assignments_x pax
    , per_grade_definitions pgd
    , per_people_x ppf
    , fnd_user fu
    , per_all_people_f papf
    , per_images pi
    , hr_locations_all hla
    , per_pay_bases pb
    , hr_all_organization_units haou
    , per_periods_of_service ppos
    where ppf.person_id = pax.person_id
    and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    and fu.person_party_id = papf.party_id
    and pax.supervisor_id =papf.person_id
    and pi.parent_id (+) = ppf.person_id
    and pi.table_name(+) = 'PER_PEOPLE_F'
    and pax.person_id = ppf.person_id
    and hla.location_id (+)= pax.location_id
    AND ppf.current_employee_flag = 'Y'
    AND pb.pay_basis_id = pax.pay_basis_id
    AND haou.organization_id = pax.organization_id
    AND ppos.person_id = ppf.person_id
    AND pax.grade_id = pgd.grade_definition_id
    AND papf.person_id = :inPersonId
    UNION ALL
    select ppf.first_name||' '||ppf.last_name
    , ppf.last_name
    , fu.user_name
    , fu.user_id
    , ppf.person_id
    , papf.person_id supervisor_id
    , pi.image_id
    , initcap(hla.description) LOCATION
    , pb.NAME pay_basis_name
    , pax.grade_id
    , haou.name
    , employment_category
    , ppos.date_start
    from per_people_x ppf
    , per_grade_definitions pgd
    , fnd_user fu
    , per_all_people_f papf
    , HR_WORKING_PERSON_LISTS HWPL
    , per_images pi
    , per_assignments_x pax
    , hr_locations_all hla
    , per_pay_bases pb
    , hr_all_organization_units haou
    , per_periods_of_service ppos
    where
    trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    and fu.person_party_id = papf.party_id
    AND HWPL.owning_person_id = papf.person_id
    and hwpl.selected_person_id = ppf.person_id
    AND pi.parent_id (+) = ppf.person_id
    and ppf.current_employee_flag = 'Y'
    and pax.person_id = ppf.person_id
    AND hla.location_id (+)= pax.location_id
    AND pb.pay_basis_id = pax.pay_basis_id
    AND haou.organization_id = pax.organization_id
    AND ppos.person_id = ppf.person_id
    AND pax.grade_id = pgd.grade_definition_id
    AND papf.person_id = :inPersonId
    )order by last_name

    Hola Alejandro,
    you can play a little bit around with the one below you find more confortable with.
    /* multi level */
    select level
    ,assignment_number
    ,assignment_id
    ,supervisor_id
    ,(select full_name from per_people_x where person_id = pax.person_id)
    ,sys_connect_by_path( (select employee_number from per_people_x where person_id = pax.person_id), ' --> ')
    from per_assignments_x pax
    where primary_flag = 'Y'
    connect by prior person_id = supervisor_id
    start with person_id = 1523
    /* level 2 only */
    select (select full_name from per_people_x where person_id = pax1.person_id)
    ,(select full_name from per_people_x where person_id = pax2.person_id)
    from per_assignments_x pax1
    ,per_assignments_x pax2
    where pax1.supervisor_id = 1523
    and pax1.primary_flag = 'Y'
    and pax1.person_id = pax2.supervisor_id
    and pax2.primary_flag = 'Y'

  • Use Custom Extension Web Item to Retrieve DSO Data Directly

    Hi experts,
    Is it possible to use Custom Extension Item in BEx WAD to retrieve DSO data directly? The idea is to display master data for a line item (e.g. customer name, id, address etc.) in the header section of a Web Template. If it is possible, how can I implement that?
    If not, is there any other possibility to fulfill the requirement?
    Thanks in advance.
    Regards,
    Joon

    Hi experts,
    any update on this?
    Thanks,
    Joon

  • Order Change Management and direct manufacturing technique (SOBSL 52)

    Dear all,
    there is a statement in our SAP development team, that I can hardly believe:
    Order Change Management and direct manufacturing technique are not  fully supported in SAP standard (ECC6.0).
    Can any body help me with this issue?
    Kind Regards
    Bernd

    Dear Bernd,
    please see SAP note 436928, which descriped the restrictions from OCM.
    Regards,
    Sabine

  • Tell me select Query that HITs the database Directly  ???

    Hi,
        I have a table, for this table in the Techinical Setttings I selected Buffering allowed, and buffering type is Full Bufferd.Now, I want a Select Query which hits the database directly, without fetching records from the BUFFER.
    Except using SELECT BYPASSING BUFFER query ????
        Regards,
    V.Raghavender.

    hi,
    ·        Any SELECT with a sub query or with joins
    ·        Any set function (COUNT, MIN, MAX, SUM, AVG)
    ·        GROUP BY
    ·        HAVING
    ·        SELECT DISTINCT
    ·        ORDER BY
    Examples:
    SELECT /*@ SAP BYPASSING BUFFER */ * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ?
    SELECT * FROM MYTAB WHERE KEY1 = ?
    SELECT * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ? OR KEY1 = ?
    SELECT MAX(DATA) FROM MYTAB WHERE KEY1 = ? KEY2 = ?
    SELECT * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ? AND DATA =
       (SELECT DATA FROM MYTAB WHERE KEY1 = ? AND KEY2 = ?)
    if helpful pls award points.
    sri

  • Query to retrieve list of ledgers accessible for a given Applications User

    We've a requirement to find the list of the accessible ledgers for a given Oracle Apps User.I'm from Oracle ATG team,not familiar with GL terminologies. Can someone help with the query to retrieve the ledgers accessible for a given user.In our code flow, we may not have the complete applications context. Is it possible to retrieve that list only with the username. If so, how to do that? Do i need to access some profile values?
    Thanks,
    Senthil

    select * from usr where usr.usr_key not in (
    select usr.usr_key from oiu, usr, obi, obj, ost
    where oiu.usr_key=usr.usr_key
    and oiu.obi_key=obi.obi_key
    and obi.obj_key=obj.obj_key
    and obj.obj_name = :obj_name
    and oiu.ost_key=ost.ost_key
    and ost.ost_status not in ('Revoked'))
    -Kevin

  • Query to retrieve Identical names, same birth dates

    I have a table with these fields:
    table1 definition
    (ID varchar2(10),
    name1 varchar2(50),
    name2 varchar2(50),
    name3 varchar2(50),
    name4 varchar2(50),
    birthdt date)
    I need to write a query to retrieve the id's of those people that have identical first and last names AND were born on the same date. note that name is composed of four parts.
    I am trying this query
    (select id from table1 group by name1,name4,birthdt having count(name1)>1 and count(name4)>1 and count(birthdt)>1). I am not getting correct results.
    Any help appreciated.
    Ammar

    ¿...Doh...how could I miss that? smacks forehead
    Thanks ( for the N-th time ;) ) for setting straight, Solomon.
    Guess I wasn't completely recovered from yesterday ;)
    However, the basic approach wasn't too bad ;)
    But ofcourse the 'select *' should be 'select id'
    Using testdata:
    SQL> with table1 as ( -- generating sample data as I should have done in the first place:
      2  select 1 id, 'John' name1, 'James' name2, 'Joe' name3, 'Jameson' name4, to_date('15-05-1989','dd-mm-yyyy') birthdt from dual union all
      3  select 2 id, 'John' name1, 'James' name2, 'Joe' name3, 'Jackson' name4, to_date('15-05-1989','dd-mm-yyyy') birthdt from dual union all
      4  select 3 id, 'John' name1, 'James' name2, 'Joe' name3, 'Jameson' name4, to_date('25-05-1989','dd-mm-yyyy') birthdt from dual union all
      5  select 4 id, 'Zlad' name1, 'James' name2, 'Joe' name3, 'Jameson' name4, to_date('15-05-1989','dd-mm-yyyy') birthdt from dual union all
      6  select 5 id, 'John' name1, 'James' name2, 'Joe' name3, 'Jameson' name4, to_date('15-05-1989','dd-mm-yyyy') birthdt from dual
      7  )
      8  --
      9  -- actual query
    10  --
    11  select id
    12  from ( select id
    13         ,      name1
    14         ,      name2
    15         ,      name3
    16         ,      name4
    17         ,      birthdt
    18         ,      count(*) over (partition by name1, name2, name3, name4, birthdt) recs
    19         from   table1
    20       )
    21  where recs > 1;
            ID
             1
             5

  • Query to retrieve all saved user queries?

    Hi,
    In which table are the user queries saved?
    How can I write a query to retrieve all the user created queries?
    I need to copy all the user queries which are implemented in 1 client implementation to a different client's implementation.
    Thanks.

    Hi Rajesh
    Try This query
    select QName,QString from OUQR .
    You can use the quick copy option if you are using SAP version 9 and if lower you can use the copy express addon..
    SAP Business One 9 - Implemenation Center  Quick Copy  
    Hope Helpful
    Regards
    Kennedy

Maybe you are looking for