Search Results hz_cust_account_v2pub




Overview

HZ_CUST_ACCOUNT_V2PUB is a public PL/SQL API package in the Oracle E-Business Suite Receivables and Trading Community Architecture (TCA) modules, owned by the APPS schema and classified as a PUBLIC API. It provides the programmatic interface for creating and maintaining customer account records in the TCA registry. In the EBS 12.1.1 and 12.2.2 data models, the customer account is the entity that represents the financial relationship between a party and a business unit — the "account" a customer transacts against — and this package exposes that lifecycle as a set of callable PL/SQL entry points. It is the standard supported route for custom code, forms, and interfaces to insert or update rows in HZ_CUST_ACCOUNTS without bypassing TCA validation, party usage, and business event logic. The package body is reported as VALID and internally delegates much of its work to helper packages such as HZ_ACCOUNT_VALIDATE_V2PUB, HZ_CUST_ACCOUNTS_PKG, HZ_PARTY_V2PUB, HZ_ORIG_SYSTEM_REF_PUB, and HZ_BUSINESS_EVENT_V2PVT.

Key Procedures and Functions

The documented API surface comprises nine procedures and functions. The public entry points most commonly used are:

  • CREATE_CUST_ACCOUNT — Creates a new customer account for an existing party, assigning the account number, business unit context, and related attributes, and returning the generated customer account identifier.
  • UPDATE_CUST_ACCOUNT — Modifies an existing customer account's attributes, applying TCA validation and raising business events where configured.
  • GET_CUST_ACCOUNT_REC — Retrieves the full record of a customer account, typically used to read current values before an update or for integration extraction.
  • CREATE_CUST_ACCT_RELATE — Establishes a relationship between customer accounts, such as a parent-child or bill-to/ship-to association.
  • UPDATE_CUST_ACCT_RELATE — Modifies attributes of an existing customer account relationship.
  • GET_CUST_ACCT_RELATE_REC — Returns the details of a defined account relationship record.

Each API follows the TCA standard calling convention of X_RETURN_STATUS and X_MSG_COUNT/X_MSG_DATA parameters, and accepts and returns primary key values through IN/OUT parameters. Parameter lists are not reproduced here; consult the ETRM package specification for exact signatures.

Tables Accessed

The package reads and writes the core TCA customer account tables through APPS synonyms:

  • HZ_CUST_ACCOUNTS — the primary table holding the customer account record; inserted, updated, and queried by the create, update, and get APIs.
  • HZ_CUST_ACCT_RELATE / HZ_CUST_ACCT_RELATE_ALL — the account relationship tables maintained by the relate APIs, including the MLS-enabled _ALL variant.
  • HZ_CUSTOMER_PROFILES — customer profile information linked to the account.
  • HZ_PARTIES — the party that owns the account; referenced to validate and associate the party.
  • HZ_ORIG_SYS_REFERENCES — original system reference mapping maintained via HZ_ORIG_SYSTEM_REF_PUB to support legacy and external source keys.

Write operations are logged through FND_LOG and FND_MSG_PUB, and message text is resolved through FND_MESSAGE, consistent with standard TCA error handling.

Usage Notes

HZ_CUST_ACCOUNT_V2PUB is typically invoked from the Receivables Customers form, from concurrent programs and open interfaces that load customer data, and from custom PL/SQL that must create or amend customer accounts in a supported manner. It is referenced by 27 other database objects, reflecting its role as a building block for higher-level customer APIs. Because the package performs TCA validation, party usage checks, and fires business events, direct DML against HZ_CUST_ACCOUNTS should be avoided in favor of these APIs. Callers should always check X_RETURN_STATUS and inspect X_MSG_DATA on error. The presence of MO_GLOBAL among dependencies indicates multi-org (MOAC) awareness; the correct operating unit context must therefore be initialized before invocation.