Search Results convert_rel_type




Overview

HZ_HIERARCHY_PUB is a public PL/SQL API package owned by the APPS schema in Oracle E-Business Suite, classified as type PUB under the ETRM metadata conventions for release 12.1.1 and 12.2.2. It provides the supported programmatic interface for maintaining hierarchical relationships between parties within the Trading Community Architecture (TCA) model. In TCA, parent-child associations — such as corporate headquarters to subsidiary, holding company to operating entity, or organizational roll-ups used for credit and reporting purposes — are persisted as relationship records and hierarchy nodes. HZ_HIERARCHY_PUB encapsulates the business rules that govern the creation, modification, and reclassification of those links, insulating callers from the underlying table structures. As a PUB package, it conforms to the Oracle Application Object Library API standards, including the FND_API dependency visible in its dependency list, which supplies the standard return status and message-handling conventions. The package is central to any process that restructures a customer hierarchy, since it is invoked by the merge, copy, and relationship APIs rather than being restricted to a single user interface.

Key Procedures and Functions

The documented package exposes three procedures. HZ_HIERARCHY_PUB.CREATE_LINK establishes a new hierarchical association between two parties, inserting the necessary hierarchy node and relationship records and validating the resulting structure against the defined relationship types. HZ_HIERARCHY_PUB.UPDATE_LINK modifies an existing hierarchical association, supporting changes such as re-parenting a node, altering the effective dates of the link, or adjusting the classification of the relationship. HZ_HIERARCHY_PUB.CONVERT_REL_TYPE performs the conversion of existing relationship records from one relationship type to another, which is typically required during configuration changes or data remediation exercises. No parameter lists are inventoried in the supplied metadata; callers should obtain signature details from the package specification in the target instance. Each routine follows the standard FND_API error-handling pattern, returning a status and message through the conventional API output arguments.

Tables Accessed

The package operates against a focused set of TCA tables, referenced through APPS synonyms. HZ_HIERARCHY_NODES stores the node entries that represent a party's position within a hierarchy, and is the primary target for link creation and update. HZ_RELATIONSHIPS holds the reciprocal relationship rows that define how two parties are associated, including direction and role. HZ_RELATIONSHIP_TYPES supplies the valid relationship classifications used to validate links and to drive the CONVERT_REL_TYPE operation. HZ_TEMP_REL_GT is a temporary global table used for intermediate processing, typically during bulk conversion or merge-driven restructuring. PLITBLM is the standard PL/SQL index-by table used in EBS for ID list handling, supporting set-based input to the API. The package depends on FND_API and the SYS STANDARD package.

Usage Notes

HZ_HIERARCHY_PUB is not normally invoked directly from a form. The dependency data shows it is referenced by HZ_COPY_REL_PVT, HZ_CUST_ACCOUNT_MERGE_V2PVT, HZ_MERGE_PKG, HZ_PARTY_MERGE, and HZ_RELATIONSHIP_V2PUB. Consequently, the API is executed automatically whenever customer accounts or parties are merged, whenever relationship data is copied between parties, or whenever relationships are created and updated through the standard relationship API. Developers writing custom hierarchy maintenance, data conversion, or remediation scripts should call this package rather than performing direct DML on the underlying tables, so that validation logic and audit behavior remain intact. Because the procedures participate in merge processing, they are subject to the transaction and rollback semantics of the calling program, and concurrent invocations against overlapping hierarchies should be serialized to avoid conflicting node updates.