Results for “site_use_code”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

AR_MERGE_ADDRESSES_V is a Receivables (AR) view owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It presents a consolidated, denormalized picture of customer account site addresses together with their corresponding site uses, formatted for downstream reporting, integration, and merge processing. The view joins the Trading Community Architecture (TCA) model — customer account sites, party sites, and locations — with territory and lookup reference data, and it applies the Receivables address formatting API function ARP_ADDR_PKG.FORMAT_ADDRESS to produce a single, human-readable address string. Because it exposes the ADDRESS_STYLE column and the derived CONCATENATED_ADDRESS, the view is particularly useful where address formatting rules (style) drive the appearance of bill-to, ship-to, and market site addresses.

The view is documented as VALID in ETRM 12.2.2 and can be safely used in custom reports, concurrent programs, and interfaces that require fully formatted address data without re-implementing the formatting logic.

Underlying Base Objects

The view is defined over the following documented base objects:

  • HZ_CUST_ACCT_SITES (synonym) — supplies the customer account site identifier and customer account link.
  • HZ_CUST_SITE_USES (synonym) — supplies the site use context: site use ID, code, primary flag, and the location.
  • HZ_PARTY_SITES (synonym) — bridges the account site to its underlying location.
  • HZ_LOCATIONS (synonym) — source of the address columns (address lines, city, county, state, province, postal code) and the ADDRESS_STYLE used for formatting.
  • FND_TERRITORIES_VL (view) — provides the country and territory short name, joined with an outer-join ((+)) to LOC.COUNTRY.
  • AR_LOOKUPS (view) — resolves the site use code into a user-facing SITE_MEANING.
  • ARP_ADDR_PKG (package) — referenced solely through its FORMAT_ADDRESS function to build CONCATENATED_ADDRESS.

The joins enforce a strict chain: account site to party site, party site to location, and account site to site use. The site use code filter restricts output to the BILL_TO, SHIP_TO, and MARKET uses.

Key Columns

  • ROW_ID — the rowid of the account site row, usable for identifying the source record.
  • ADDRESS_ID — the customer account site identifier (CUST_ACCT_SITE_ID); the effective key for the address.
  • CUSTOMER_ID — the owning customer account.
  • STATUS / ORIG_SYSTEM_REFERENCE — address status and the originating system reference, useful for merge reconciliation.
  • ADDRESS_STYLE — the formatting style associated with the territory; this is the column most relevant to the user's search term and controls how the concatenated address is rendered.
  • ADDRESS1–ADDRESS4, CITY, COUNTY, STATE, PROVINCE, POSTAL_CODE, COUNTRY — discrete address components from HZ_LOCATIONS.
  • TERRITORY_SHORT_NAME — territory short name from FND_TERRITORIES_VL.
  • CONCATENATED_ADDRESS — the formatted address string produced by ARP_ADDR_PKG.FORMAT_ADDRESS, using the style, the address lines, city, county, state, province, postal code, and the territory short name.
  • LOCATION / SITE_USE_ID / SITE_USE_CODE / PRIMARY_FLAG / SITE_MEANING — the site use context: location, site use, site use code, primary indicator, and its lookup meaning.
  • ADDRESS_LINES_PHONETIC / LOCATION_ID — phonetic address lines and the underlying location identifier.

Common Use Cases and Queries

The view is typically queried for reporting on formatted customer addresses across bill-to, ship-to, and market uses, and for reconciliation during customer merges. A basic query retrieving formatted addresses for a customer:

  • SELECT address_id, site_use_code, address_style, concatenated_address FROM ar_merge_addresses_v WHERE customer_id = :p_customer_id;

To list primary ship-to addresses only:

  • SELECT address_id, concatenated_address FROM ar_merge_addresses_v WHERE site_use_code = 'SHIP_TO' AND primary_flag = 'Y';

To inspect the address style in effect by territory:

  • SELECT territory_short_name, address_style, COUNT(*) FROM ar_merge_addresses_v GROUP BY territory_short_name, address_style;

Because the view performs no aggregation and applies the formatting function inline, it can be joined to customer and site use tables for integration extracts. Note the outer-join on territory: records with unmatched countries return a NULL territory and, consequently, a NULL formatted address, so callers should handle that case in their logic.