Results for “ra_customer_relationships”

42 results




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

Overview

RA_CUSTOMER_RELATIONSHIPS is a single-organization (SINGLE_ORG) view within the Oracle Receivables (AR) module. It exposes the organization-scoped subset of the customer relationship data model, presenting rows from the multi-organization table RA_CUSTOMER_RELATIONSHIPS_ALL filtered by the current operating unit context. The view serves as the primary read interface through which the Receivables application and external reporting integrations retrieve relationships that exist between customers and their related parties, such as parent, subsidiary, affiliate, or other defined associations.

Because it is a SINGLE_ORG view, RA_CUSTOMER_RELATIONSHIPS applies an ORG_ID predicate derived from the session's CLIENT_INFO setting, ensuring that queries return only those relationships belonging to the operating unit in which the session is active. This makes it the appropriate object for any report, concurrent program, or integration that must respect multi-org security without requiring the developer to manually qualify the ORG_ID column.

Underlying Base Objects

The view is defined over a single underlying base object: RA_CUSTOMER_RELATIONSHIPS_ALL. No other referenced base objects are documented in the ETRM metadata for Oracle EBS 12.2.2. RA_CUSTOMER_RELATIONSHIPS_ALL is the multi-org table that physically stores relationship records, including the ORG_ID discriminator column. The view's WHERE clause filters this table using a NVL-based comparison against the login's CLIENT_INFO value:

NVL(ORG_ID, NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'), 1, 1), ' ', NULL, SUBSTRB(USERENV('CLIENT_INFO'), 1, 10))), -99)) = NVL(TO_NUMBER(DECODE(...)), -99)

This construct handles null ORG_ID values by substituting -99, effectively grouping unassigned rows with the "no organization" context. The view therefore acts as a security filter rather than a data transformation layer; all column values are passed through unchanged from the base table.

Key Columns

The most frequently referenced columns include:

Common Use Cases and Queries

The view is typically queried to resolve which customers are related to a given CUSTOMER_ID, to extract reciprocal relationships, or to drive reporting on customer hierarchies. A representative query to find all related customers for a specific customer is:

SELECT related_customer_id, relationship_type, cust_reciprocal_flag, status
FROM ra_customer_relationships
WHERE customer_id = :p_customer_id
AND NVL(status, 'A') = 'A';

A common reverse lookup — finding which primary customers reference a given related customer — inverts the predicate. Organizations building integration interfaces often join this view to HZ_CUST_ACCOUNTS or RA_CUSTOMERS to resolve customer names. It should be noted that the ETRM metadata states the view is "Not implemented in this database" for the documented instance, and no owner or referenced base objects beyond RA_CUSTOMER_RELATIONSHIPS_ALL are recorded; confirmation against the target environment is advisable before relying on it.