Results for “set_pad_char”

8 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OKC_TREE_INDEX is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified as an "OTHER" API within Oracle's ETRM repository. It belongs to the Oracle Knowledge Center (OKC) module family, which underpins contract terms, templates, and hierarchical clause structures. The package provides a utility layer for constructing tree index strings — encoded, ordered representations of a node's position within a hierarchical tree — that allow hierarchical data to be sorted, queried, and compared using ordinary SQL string operations rather than recursive hierarchical queries. This is a common EBS pattern: by materializing each node's path as a delimiter-separated index string, treewalks, ordering, and level-based filtering become simple, index-friendly operations.

The package header documents that tree index construction can be customized through a default separator ('.') and a default pad character (' '), both of which may be overridden at runtime. A p_tree_id parameter exists to disambiguate multiple tree statements processed within a single query where parallel treatment of the statements is a hazard; normally the default value should be relied upon.

Key Procedures and Functions

  • GET_ID — Constructs a tree index string for a numeric leaf index. It accepts a level from the treewalk query and a key entry that becomes part of the returned index, with an optional tree identifier.
  • GET_ID_LPADED — The function referenced in the user's search. It performs the same numeric tree index construction as GET_ID, but left-pads each key entry up to a caller-specified digit width, ensuring consistent lexicographic ordering of numeric segments. Accepts level, key entry, pad width, and tree identifier.
  • GET_LABEL — Constructs a tree index string for a character (label) leaf index, taking the level, the label key entry, and the optional tree identifier.
  • GET_LABEL_RPADED — The character-oriented counterpart to GET_ID_LPADED; right-pads each label key entry up to a caller-specified character count so that string-based ordering remains stable.
  • SET_SEPARATOR / SET_PAD_CHAR — Session-level configuration procedures that override the default segment separator and padding character used by the index-building functions.
  • SET_ROOT_ID / GET_ROOT_ID — Maintain the root identifier context for tree index generation and retrieval.
  • NESTED_ROWNUM — Supports numbering of nested nodes, typically used to generate sibling sequence values during treewalks.

Tables Accessed

The documented ETRM metadata for OKC_TREE_INDEX does not enumerate any base tables accessed through APPS synonyms. The package is predominantly a computational utility: it formats and returns index strings based on parameters supplied by its callers rather than reading or writing application data directly. Any table access occurs in the calling SQL statements — for example, treewalk queries over OKC clause, term, or template structures that pass level and key values into these functions.

Usage Notes

OKC_TREE_INDEX is referenced by three other packages, indicating it serves as shared infrastructure rather than an end-user-facing API. It is typically invoked from within SQL SELECT lists in treewalk queries, from other PL/SQL packages that maintain hierarchical contract structures, and from custom code performing ordered traversal of OKC hierarchies. Because the index-building functions are pure formatting utilities, they are safe to call repeatedly within a query, subject to the parallel-processing hazard noted for p_tree_id. Developers searching for "get_id_lpaded" are generally working with numeric hierarchy nodes that must sort correctly; GET_ID_LPADED is the correct choice whenever key entries vary in digit length and consistent ordering is required.