Search Results hz_cust_acct_relate_all




Overview

The HZ_CUST_ACCT_RELATE_ALL table is a core data object within Oracle E-Business Suite (EBS) 12.1.1 and 12.2.2, specifically for the Receivables (AR) module. It serves as the central repository for defining and storing relationships between customer accounts. These relationships are established within the Trading Community Architecture (TCA) model to represent complex business hierarchies and associations, such as parent-child relationships, corporate hierarchies, or linked accounts for consolidated billing and reporting. Its role is critical for enabling business processes that depend on understanding customer account linkages, including consolidated dunning, credit management across related entities, and hierarchical customer reporting.

Key Information Stored

The table's primary purpose is to link one customer account (CUST_ACCOUNT_ID) to another related customer account (RELATED_CUST_ACCOUNT_ID). The primary key for the relationship is the CUST_ACCT_RELATE_ID. While the provided metadata specifies these core foreign key columns, a complete implementation typically includes additional attributes to define the nature of the relationship. These often include a RELATIONSHIP_TYPE column to categorize the link (e.g., 'PARENT_OF', 'BILL_TO', 'SOLD_TO'), a STATUS column to indicate if the relationship is active, and standard WHO columns (CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE). The table supports multi-organization access control through its '_ALL' suffix, implying data is partitioned by ORG_ID.

Common Use Cases and Queries

A primary use case is generating a report of all related accounts for a given customer, essential for credit reviews or account management. For example, to find all accounts related to a specific customer account ID, one might use: SELECT related_cust_account_id, relationship_type FROM hz_cust_acct_relate_all WHERE cust_account_id = :p_cust_acct_id AND status = 'ACTIVE';. Another common scenario is in data validation or migration scripts to ensure relationship integrity. Developers often query this table when building custom logic for consolidated transaction reporting, where transactions from multiple related accounts must be aggregated. It is also frequently joined in views that provide a flattened hierarchy of customer accounts for simplified reporting and analysis.

Related Objects

The table has direct foreign key dependencies on the central TCA customer account table, as documented in the metadata. The key relationships are:

  • HZ_CUST_ACCOUNTS: The CUST_ACCOUNT_ID column in HZ_CUST_ACCT_RELATE_ALL references HZ_CUST_ACCOUNTS.CUST_ACCOUNT_ID, identifying the primary account in the relationship.
  • HZ_CUST_ACCOUNTS: The RELATED_CUST_ACCOUNT_ID column also references HZ_CUST_ACCOUNTS.CUST_ACCOUNT_ID, identifying the linked account.
This table is foundational for APIs and views within the TCA and AR modules that expose customer hierarchy information. It is commonly joined with HZ_CUST_ACCOUNTS and HZ_PARTIES to retrieve full descriptive details for both sides of a customer account relationship.