Search Results initialize_ou_rec




Overview

APPS.CSI_ORGANIZATION_UNIT_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Customer Intelligence (CSI) module. It provides the internal implementation layer for maintaining organization unit definitions and their associated history records within the CSI installation and asset tracking data model. Organization units represent the hierarchical organizational structures assigned to inventory items and installed base instances, and this package encapsulates the low-level logic required to create, modify, expire, and reconstruct those units and their column-driven attribute values.

The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema rather than the defining schema. As a PVT package, it is not intended to be called directly by external consumers; it supports the public CSI APIs and datastructure packages (notably csi_datastructures_pub) that expose organization unit functionality to application forms and concurrent programs. The package relies heavily on the dynamic SQL facility of DBMS_SQL and on the CSI datastructure record types (org_units_header_rec and org_units_header_tbl) to move organization unit data between layers.

Key Procedures and Functions

  • INITIALIZE_OU_REC_NO_DUMP — Initializes an organization unit header record from history, beginning with the first record and returning the earliest non-dump timestamp.
  • INITIALIZE_OU_REC — Reconstructs an organization unit header record from its history, using a history identifier and returning the nearest full-dump date.
  • CONSTRUCT_OU_FROM_HIST — Rebuilds a collection of organization unit header records as of a supplied timestamp, enabling point-in-time reconstruction of organization unit state.
  • DEFINE_OU_COLUMNS — Defines the columns that make up the organization unit structure for use in dynamic SQL operations.
  • RESOLVE_ID_COLUMNS — Resolves identifier columns, mapping the internal ID-based column references used by the dynamic SQL machinery to their actual meanings. This is the procedure most relevant to the search term resolve_id_columns.
  • GET_OU_COLUMN_VALUES — Retrieves the current values of organization unit columns for a given unit.
  • BIND_OU_VARIABLE — Binds organization unit variables into a dynamic SQL cursor, supporting the flexible column model.
  • GEN_OU_WHERE_CLAUSE — Generates the WHERE clause used by dynamic queries over organization units.
  • CREATE_ORGANIZATION_UNIT — Creates a new organization unit record.
  • UPDATE_ORGANIZATION_UNIT — Updates an existing organization unit record.
  • EXPIRE_ORGANIZATION_UNIT — Expires (logically end-dates) an organization unit, preserving history.
  • GET_ORG_UNIT_HISTORY — Returns the history rows associated with an organization unit.

Tables Accessed

  • CSI_I_ORG_ASSIGNMENTS — The base table holding organization unit assignment definitions; this package creates, updates, expires, and queries rows here.
  • CSI_I_ORG_ASSIGNMENTS_H — The corresponding history table; the initialization and construction procedures read this table to reconstruct organization unit state and to return history listings.
  • DBMS_SQL — The Oracle-supplied dynamic SQL package used to define, bind, and execute dynamically generated statements over the organization unit columns.
  • PLITBLM — The PL/SQL table management utility package referenced for internal table handling.

Usage Notes

As a PVT package, CSI_ORGANIZATION_UNIT_PVT is invoked indirectly through the public CSI APIs and datastructure packages rather than from customer code. It is referenced by four other packages, reflecting its role as an internal service layer. In practice, its procedures are triggered when organization unit data is maintained through the CSI setup forms or extension points, and when historical organization unit information must be reconstructed for reporting or validation. The dynamic SQL components (DEFINE_OU_COLUMNS, RESOLVE_ID_COLUMNS, BIND_OU_VARIABLE, and GEN_OU_WHERE_CLAUSE) reflect the flexible, metadata-driven nature of the organization unit model, allowing columns and identifiers to be resolved at runtime without hard-coded references. The procedures named in the search term resolve_id_columns — specifically RESOLVE_ID_COLUMNS — form part of this dynamic column resolution mechanism, ensuring that stored identifier values can be translated into meaningful references before queries and updates are executed against CSI_I_ORG_ASSIGNMENTS and its history table.