Results for “related_customer_id”

50+ results




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

Overview

The APPS.JAI_OM_CUST_ADDRESS_V view is a lightweight database view shipped as part of the Oracle E-Business Suite applications schema. It presents customer account relationship information drawn from the Oracle Receivables / Trading Community Architecture (TCA) data model. The view is documented in the ETRM repository for both EBS 12.1.1 and 12.2.2 and is owned by the APPS schema. Its role is to expose a normalized, two-row-per-relationship representation of reciprocal customer account associations, which is useful in reporting, integration, and order management contexts where a customer-to-related-customer mapping must be resolved without directly querying the underlying TCA relationship table.

The object is a view rather than a table, and therefore carries no persistent data of its own. It is defined purely as a UNION ALL query, meaning it acts as a transformation layer over TCA relationship data. The name prefix JAI reflects a localization or regional extension convention (commonly associated with country-specific distributions of Oracle applications), while the OM segment suggests an Order Management affiliation and CUST_ADDRESS indicates that the view is consumed in customer/address resolution logic.

Underlying Base Objects

The view is defined over a single documented base object: HZ_CUST_ACCT_RELATE_ALL, referenced through a synonym. HZ_CUST_ACCT_RELATE_ALL is the TCA table that stores relationships between customer accounts, including reciprocal, hierarchical, and other relationship types. The view reads the CUST_ACCOUNT_ID, RELATED_CUST_ACCOUNT_ID, and CUSTOMER_RECIPROCAL_FLAG columns from this table and reshapes them into a symmetric relationship listing. Because the object is a view over a synonym, it inherits the security and access characteristics of the underlying TCA table, and any row-level or org-level restrictions applied to HZ_CUST_ACCT_RELATE_ALL will propagate to queries against this view.

Key Columns

The view exposes three columns. Their meaning derives directly from the union structure defined in the view text:

  • RELATED_CUSTOMER_ID — In the first branch of the union, this is populated from RELATED_CUST_ACCOUNT_ID. It identifies the counterparty account in the reciprocal relationship.
  • CUSTOMER_ID — In the first branch, this is populated from CUST_ACCOUNT_ID. It identifies the primary account in the relationship.
  • CODE — A literal discriminator with a value of 1 or 2 indicating which branch of the UNION ALL produced the row.

The critical behavioral characteristic is that the view presents each reciprocal relationship twice in mirrored form. The first branch emits rows only where CUSTOMER_RECIPROCAL_FLAG = 'Y', mapping RELATED_CUST_ACCOUNT_ID to RELATED_CUSTOMER_ID and CUST_ACCOUNT_ID to CUSTOMER_ID. The second branch omits the flag filter entirely and reverses the column mapping, so that CUST_ACCOUNT_ID becomes CUSTOMER_ID. The CODE column allows consumers to distinguish the two orientations.

Common Use Cases and Queries

The view is typically used to resolve related or reciprocal customer accounts for a given account. A common query retrieves all related customers for a specific account:

  • SELECT customer_id, related_customer_id, code FROM apps.jai_om_cust_address_v WHERE customer_id = :p_cust_account_id;
  • Filtering on code = 1 returns only the reciprocal-flagged relationships in the primary orientation.
  • Joining to HZ_CUST_ACCOUNTS on related_customer_id enriches the result with account names and numbers.

Because the metadata is limited to the view definition, consumers should note that the object provides no address columns despite its name; address resolution must be performed separately against TCA address tables. The view should be treated as a relationship mapping helper rather than an address source.