Results for “hz_cust_acct_relate_all”

50+ results




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

Overview

HZ_CUST_ACCT_RELATE_ALL is a transactional and reference table owned by the AR (Receivables) schema in Oracle E-Business Suite, holding the defined relationships between customer accounts. It is the central store for the model that describes how one customer account relates to another — for example, a parent/child hierarchy, a bill-to relationship, or a ship-to relationship. Because it is an "_ALL" table, it is partitioned by operating unit through the ORG_ID column, though the table itself is maintained in the AR schema and is exposed through the Trading Community Architecture (TCA) model that underpins Receivables, Order Management, and related modules.

Under the heuristic Data Vault classification derived from its foreign key structure, this object behaves as a link table. It does not describe an entity in its own right; instead it resolves a many-to-many association between two customer accounts, each of which is a hub. Modeling it as a link is a reasonable suggestion, since both its foreign keys point back to HZ_CUST_ACCOUNTS.

Key Information Stored

Each row represents one directional relationship between two accounts, identified by a surrogate primary key and validated by a unique index on the same column.

Common Use Cases and Queries

Typical scenarios include customer hierarchy reporting, resolving bill-to/ship-to defaults during order entry, and validating related-account mappings loaded through TCA interfaces. A basic query to enumerate all relationships for a given account:

  • SELECT r.cust_acct_relate_id, r.cust_account_id, r.related_cust_account_id, r.relationship_type, r.status FROM hz_cust_acct_relate_all r WHERE r.cust_account_id = :acct_id;

A join to resolve account names for both ends of the relationship:

  • SELECT a.account_number src_acct, b.account_number rel_acct, r.relationship_type FROM hz_cust_acct_relate_all r, hz_cust_accounts a, hz_cust_accounts b WHERE r.cust_account_id = a.cust_account_id AND r.related_cust_account_id = b.cust_account_id AND r.org_id = :org_id;

Because BILL_TO_FLAG and SHIP_TO_FLAG drive downstream defaults, these columns are frequently filtered in order-capture and invoicing reports. The STATUS column should generally be constrained to active records in production reporting.

Related Objects

The most significant related objects, per the documented FK metadata, are:

  • HZ_CUST_ACCOUNTS — referenced twice, via CUST_ACCOUNT_ID and RELATED_CUST_ACCOUNT_ID; this is the primary parent entity.
  • HZ_CUST_ACCT_RELATE_ALL_M — a child table that references CUST_ACCT_RELATE_ID, holding additional relationship attributes.
  • HZ_CUST_ACCT_RELATE_PK and HZ_CUST_ACCT_RELATE_U1 — the primary key and unique index enforcing row identity.
  • The TCA public APIs (for example the Customer Account relationship APIs in the HZ schema) that insert, update, and validate rows in this table, and should be used in preference to direct DML.

Consumers should treat this table as the authoritative source for account-to-account relationships and always route changes through the supported TCA API layer.