0 Replies Latest reply: Sep 4, 2013 4:31 AM by Adit102 RSS

    PO Buyer Name

    Adit102

      Hi,

       

      I am trying to extract Buyer's information from PO_AGENTS table in R12. Below is the query

       

      SELECT pa.agent_id,

                  papf.person_id,

                  papf.employee_number,

                  papf.email_address,

                  pa.category_id,

                  pa.location_id,

                  papf.effective_start_date,

                  papf.effective_end_date

      FROM po_agents pa, per_all_people_f papf, hr_all_organization_units haou

      WHERE pa.agent_id = papf.person_id

           AND papf.business_group_id = haou.business_group_id

           AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

           AND papf.effective_end_date > SYSDATE

           AND haou.business_group_id = 83                              -- CURRENT

       

      Here, I am using business_group_id from per_all_people_f because the organization_id I require is not available in per_all_assignments_f table. But this query does not return data specific to my organization. Which joins do I need to add to get the data?

      Is there any other way I can join po_agents or per_all_people_f with hr_all_organization_units?

       

      Thanks in advance,

      Aditya