Search Results get_parent_nodes




Overview

HZ_HIERARCHY_V2PUB is a public PL/SQL API belonging to the Oracle E-Business Suite Trading Community / Customer Relationship Management (CRM) foundation schema, APPS. Its object classification is PUB, indicating that the package exposes a supported, publicly callable interface for external consumers such as Oracle Forms, concurrent programs, Oracle Workflow, and custom extensions. The package provides programmatic access to the hierarchical relationships defined within the Trading Community Architecture (TCA), allowing callers to traverse and validate the structure of organizational hierarchies, party hierarchies, and other node-based relationship trees maintained in the HZ schema.

Hierarchies in TCA are represented as a collection of nodes linked by parent-child relationships recorded against hierarchy nodes and relationship types. The HZ_HIERARCHY_V2PUB API abstracts the underlying table joins and recursion logic, giving developers and integrators a reliable, versioned entry point for querying hierarchy structure without needing to construct complex recursive SQL against the base tables. The package is designated "V2" to distinguish it from the original HZ_HIERARCHY_PUB family, reflecting the second-generation public interface convention used across the HZ schema.

Key Procedures and Functions

The documented public interface exposes five procedures and functions:

  • IS_TOP_PARENT — Determines whether a specified hierarchy node represents the topmost (root) parent of its hierarchy, returning a Boolean or status indicator so that callers can detect the apex of a tree.
  • CHECK_PARENT_CHILD — Validates and confirms the parent-child association between two nodes, allowing callers to test whether a given relationship exists before performing dependent operations.
  • GET_PARENT_NODES — Retrieves the set of parent nodes for a given hierarchy node, supporting upward traversal of the hierarchy from a starting point.
  • GET_CHILD_NODES — Retrieves the set of immediate or descendant child nodes for a given hierarchy node, supporting downward traversal.
  • GET_TOP_PARENT_NODES — Returns the top-level parent node or nodes associated with a given hierarchy, effectively identifying the root(s) of the tree being queried.

These procedures together provide the core primitives for hierarchical navigation: identifying roots, validating links, and walking either upward or downward through the node structure.

Tables Accessed

The package operates against the following documented tables, referenced through APPS synonyms:

  • HZ_HIERARCHY_NODES — The primary store of hierarchy node records; the source of the nodes returned by the GET procedures and validated by CHECK_PARENT_CHILD.
  • HZ_RELATIONSHIP_TYPES — Defines the relationship type metadata that governs how nodes are classified and linked, used to constrain and interpret hierarchy links.
  • FND_OBJECTS and FND_OBJECT_INSTANCE_SETS — Oracle Application Object Library metadata tables that define the registered object and instance-set definitions used when the API operates within the context of a defined object set.
  • PLITBLM — An internal PL/SQL index-by or temporary table construct used by the package for intermediate result handling.

Usage Notes

HZ_HIERARCHY_V2PUB is typically invoked from Oracle Forms and OAF pages within the Customers and Trading Community modules, from concurrent programs that process or report on hierarchy structure, and from custom PL/SQL code that needs to traverse TCA hierarchies. The package depends on FND_API, so callers should expect standard Oracle API conventions such as message- and error-handling behavior. It is referenced by one other package as documented, and internally delegates to the HZ_HIERARCHY_V2PUB and HZ_HIERARCHY_V2PUB_JW implementations. Because it is a PUB-classified API, it should be treated as a supported interface, and direct DML against HZ_HIERARCHY_NODES is discouraged in favor of this package's procedures.