Search Results get_neu_country_code




Overview

APPS.HZ_FORMAT_PUB is the public PL/SQL API package for Global Name and Address Formatting within Oracle Trading Community Architecture (TCA). Its scope is documented as public and its product designation is HZ, with the display name "Name and Address Formatting." The package exposes reusable formatting routines that render name and address data according to configurable style formats and layouts, independent of where the underlying data is stored. This decoupling is the central design objective: callers supply name and address attribute values, and the package applies the appropriate country-specific or style-specific format template to produce a correctly ordered, localized output.

In Oracle EBS 12.1.1 and 12.2.2, this package underpins address and name rendering across many TCA-aware modules, including Customers, Suppliers, and Order Management. The ETRM metadata records that it is referenced by 38 other packages, confirming its role as a foundational utility rather than a leaf-level component. The documented reference is 120hztig.pdf, Name and Address Formatting APIs, Oracle Trading Community Architecture Technical Implementation Guide.

Key Procedures and Functions

The package exposes 17 documented public procedures and functions. The principal formatting entry points are:

  • FORMAT_ADDRESS — Formats a complete address using the applicable style format and layout.
  • FORMAT_ELOC_ADDRESS — Formats an electronic location (e-loc) address.
  • FORMAT_ADDRESS_LAYOUT — Applies a specified address layout, the object most directly associated with the user's search term "format_address_layout."
  • FORMAT_NAME — Formats a party name according to the applicable name style format.
  • FORMAT_DATA — Generic formatting routine for style-driven data output.
  • FORMAT_ADDRESS_LOV — Supports address list-of-values presentation.

Supporting utilities comprise GET_CONTEXT (returns formatting context), GET_STYLE_FORMAT (retrieves style format metadata), USE_NEU_COUNTRY_FORMAT and GET_NEU_COUNTRY_CODE (national/neutral country format handling), GET_TL_TERRITORY_NAME (territory name retrieval with translation), and GET_DEFAULT_REF_TERRITORY (default reference territory resolution). Together these determine which format template applies and supply the attribute values the formatter substitutes into that template. Two public type declarations, string_tbl_type and layout_rec_type, support multi-line output and layout caching respectively; layout_rec_type includes an attribute_value field holding the resolved value for a given attribute_code.

Tables Accessed

The package reads configuration and reference data through APPS synonyms. Style and layout definitions reside in HZ_STYLES_B, HZ_STYLE_FMT_LAYOUTS_B, and HZ_STYLE_FORMATS_B, with locale and variation control in HZ_STYLE_FMT_LOCALES and HZ_STYLE_FMT_VARIATIONS. Address data is read from HZ_LOCATIONS. Territory and language reference data come from FND_TERRITORIES, FND_TERRITORIES_TL, FND_LANGUAGES, and NLS_SESSION_PARAMETERS. Metadata about underlying tables and keys is sourced from FND_TABLES, FND_COLUMNS, FND_PRIMARY_KEYS, and FND_PRIMARY_KEY_COLUMNS, enabling dynamic SQL assembly via DBMS_SQL. The use of DBMS_SQL and the FND metadata tables indicates the package dynamically constructs queries to retrieve formatting attributes from arbitrary TCA entities.

Usage Notes

HZ_FORMAT_PUB is typically invoked from TCA-based forms (Customer and Supplier maintenance), concurrent programs that generate correspondence or printed output, and custom PL/SQL that must render addresses consistently with standard EBS behavior. Because the package is classified PUB, it is a supported integration surface, but callers should supply values rather than assume storage location. The layout_rec_type caching of HZ_STYLE_FMT_LAYOUTS columns exists specifically to improve performance across the numerous procedures needing layout access, so repeated formatting calls benefit from the package's internal caching model. Custom code should reference documented procedures only and avoid the internal layout record structure, which is declared as an internal type.