Search Results update_geo_rel_type




Overview

HZ_GEOGRAPHY_STRUCTURE_PUB is a public PL/SQL API package in the Oracle E-Business Suite Trading Community Architecture (TCA) / Geography layer within the Applications (APPS) schema. It provides the programmatic interface for defining and maintaining the structural and relational metadata that underpins geography hierarchies in Oracle EBS. Specifically, it manages geography types, geography structures, geography structure levels, geography relationship types, and zone types. These definitions determine how addresses and geography elements are classified, how parent-child geographic containment is modeled, and how geographic zones (such as tax or sales territories) are declared. The package header is defined as a PUBLIC API, meaning that it is intended for supported external invocation by forms, concurrent programs, and custom code rather than being restricted to internal use. The package body carries a header revision identifying it as ARHGSTSB.pls, a TCA geography structure module.

Key Procedures and Functions

The documented package metadata identifies seven public procedures exposed by HZ_GEOGRAPHY_STRUCTURE_PUB. Each corresponds to a discrete structural maintenance operation:

  • CREATE_GEOGRAPHY_TYPE — Creates a new geography type definition, establishing the classification used to categorize geography elements and their underlying address validation behavior.
  • CREATE_GEO_STRUCTURE — Defines a geography structure, which binds geography types into a hierarchical containment model used to represent the levels of a geographic tree.
  • DELETE_GEO_STRUCTURE — Removes an existing geography structure definition, reversing the hierarchy configuration created by CREATE_GEO_STRUCTURE.
  • CREATE_GEO_REL_TYPE — Creates a geography relationship type, which governs the permissible relationship semantics between geography records.
  • UPDATE_GEO_REL_TYPE — Updates an existing geography relationship type. In the package body this is implemented through a private worker procedure, do_update_geo_rel_type, which accepts a relationship type identifier, a status value, and an object version number for optimistic concurrency control, returning a return status. The public UPDATE_GEO_REL_TYPE wrapper supplies standard API parameters including p_init_msg_list, x_msg_count, and x_msg_data, and is the entry point users invoke to change the status or definition of a geography relationship type.
  • CREATE_ZONE_TYPE — Defines a zone type used to categorize geographic zones created for grouping geographies.
  • UPDATE_ZONE_TYPE — Modifies an existing zone type definition.

The package body also declares private helper procedures, including do_create_geography_type, do_create_geo_rel_type, do_create_geo_structure, and validate_geo_element_col. The validation helper confirms that a geography type with multiple parents maintains a consistent value for the geography element column, protecting structural integrity.

Tables Accessed

Through APPS synonyms, the package reads and writes the core TCA geography and structure tables. HZ_GEOGRAPHY_TYPES_B stores geography type definitions created and updated by the geography type procedures. HZ_GEO_STRUCTURE_LEVELS and HZ_GEO_STRUCT_MAP / HZ_GEO_STRUCT_MAP_DTL hold the geography structure hierarchy and its level mappings. HZ_RELATIONSHIPS and HZ_HIERARCHY_NODES support relationship and hierarchy persistence. HZ_GEOGRAPHIES, HZ_GEOGRAPHY_IDENTIFIERS, HZ_GEOGRAPHY_RANGES, and HZ_GEO_NAME_REFERENCES (with HZ_GEO_NAME_REFERENCE_LOG) hold the geography master data and audit trail. HZ_ADDRESS_USAGES links geographies to address usage context. FND_OBJECTS, FND_OBJECT_INSTANCE_SETS, and FND_OBJECT_INSTANCE_S_S supply the object metadata and instance set infrastructure used when registering geography and zone objects in the common object framework.

Usage Notes

HZ_GEOGRAPHY_STRUCTURE_PUB is invoked whenever geography hierarchy configuration is created or amended. Typical callers include the TCA geography setup forms, concurrent programs that load or seed geography structures and zone types, and custom integration code that must define geography types or relationship types during implementation or data migration. The UPDATE_GEO_REL_TYPE and UPDATE_ZONE_TYPE procedures accept an object version number passed in and out, enabling optimistic locking so that concurrent updates to a relationship or zone type are detected and rejected. Standard API conventions apply: callers should pass p_init_msg_list to control message-stack initialization and must inspect x_return_status and the x_msg_count / x_msg_data outputs to determine success or failure. Because the package is classified PUB, these procedures are supported for direct use, and it is referenced by five other packages within the TCA geography stack.