Search Results owner_site_id




Overview

AHL_OWNER_LOCATIONS_V is a PL/SQL view owned by the APPS schema in Oracle E-Business Suite, delivered as part of the AHL (Complex Maintenance Repair and Overhaul) product family. It is classified as VALID and is available in both release 12.1.1 and 12.2.2. The view encapsulates the query used to retrieve valid owners for an Unit Configuration, presenting a unified list of candidate owners together with their associated site identifiers and formatted addresses. In EBS reporting and integration contexts, it acts as a lookup source rather than a transactional entity: it does not store data of its own but consolidates owner information from Oracle's Trading Community Architecture (TCA) and Payables supplier master. Applications, Oracle Forms LOVs, and custom concurrent programs invoke this view to populate owner selection lists, validate owner-site combinations entered against a unit configuration, and resolve an owner-site number into a displayable address. Because the view is defined in the APPS schema, it is typically referenced with the APPS prefix or through a synonym granted to the requesting responsibility.

Underlying Base Objects

The documented ETRM metadata lists the following referenced base objects: FND_GLOBAL (PACKAGE), HZ_LOCATIONS (SYNONYM), HZ_PARTIES (SYNONYM), HZ_PARTY_SITES (SYNONYM), MO_GLOBAL (PACKAGE), PO_VENDORS (VIEW), and PO_VENDOR_SITES_ALL (VIEW). Internally, the view text is a UNION ALL of two distinct queries.

  • The first branch joins HZ_PARTY_SITES, HZ_LOCATIONS, and HZ_PARTIES to return parties whose party site status is not inactive (STATUS <> 'I'). These rows are tagged with PARTY_TYPE = 'PARTY'.
  • The second branch joins PO_VENDOR_SITES_ALL and PO_VENDORS to return supplier sites that are not inactive as of the current date, tagged with PARTY_TYPE = 'VENDOR'. This branch applies multi-org security by comparing the ORG_ID column against the value derived from USERENV('CLIENT_INFO'), effectively enforcing the operating unit context established by MO_GLOBAL and FND_GLOBAL.

Consequently the view depends on TCA registry tables for party owners and on the Payables supplier views for vendor owners, with the org-striping logic supplied by the EBS multi-org framework.

Key Columns

The view exposes a compact set of columns that normalize identifiers across the two owner sources:

  • OWNER_SITE_ID — The unique site identifier. For parties this maps to HZ_PARTY_SITES.PARTY_SITE_ID; for vendors it maps to PO_VENDOR_SITES_ALL.VENDOR_SITE_ID.
  • OWNER_ID — The owner's primary identifier: HZ_PARTIES.PARTY_ID for a party, PO_VENDORS.VENDOR_ID for a supplier.
  • OWNER_NUMBER — The human-readable owner reference. Parties return HZ_PARTIES.PARTY_NUMBER; vendors return PO_VENDORS.SEGMENT1 (the supplier number).
  • OWNER_SITE_NUMBER — The site-level reference. Parties return HZ_PARTY_SITES.PARTY_SITE_NUMBER; vendors return PO_VENDOR_SITES_ALL.VENDOR_SITE_CODE. This is the column most frequently searched under the term owner_site_number.
  • PARTY_TYPE — A literal discriminator returning either 'PARTY' or 'VENDOR', indicating the origin of the row.
  • ADDRESS — A concatenated address string assembled from the respective location columns (ADDRESS1–ADDRESS4, CITY, POSTAL_CODE/ZIP, STATE, PROVINCE, COUNTRY), with semicolons inserted as separators.

Common Use Cases and Queries

Typical scenarios include populating owner LOVs for unit configuration setup, validating that a supplied owner site belongs to the current operating unit, and generating owner contact listings for maintenance work orders. A basic query to resolve a supplier site identifier is shown below.

SELECT owner_id, owner_number, owner_site_id, owner_site_number, party_type, address
FROM  apps.ahl_owner_locations_v
WHERE owner_site_number = :p_owner_site_number;

Because the vendor branch enforces the operating unit, callers must ensure FND_GLOBAL/MO_GLOBAL has been initialized for the correct org before querying; otherwise the vendor rows return no data. A commonly used variant restricts results by owner type or performs a partial match on the site code:

SELECT owner_number, owner_site_number, address
FROM  apps.ahl_owner_locations_v
WHERE party_type = 'VENDOR'
AND   owner_site_number LIKE :p_pattern || '%';

The view should be treated as read-only. Direct DML is not supported, and performance depends on the indexed columns of HZ_PARTY_SITES, PO_VENDOR_SITES_ALL, and the org-security predicates applied in the second UNION branch.