Search Results get_object_version_number




Overview

APPS.HR_ORGANIZATION_INTERNAL is a private Oracle E-Business Suite PL/SQL package body that provides the core business logic for creating and maintaining Internal organizations, with particular emphasis on Operating Units. In Oracle EBS 12.1.1 and 12.2.2, an Operating Unit is modeled as an organization classified as an "Internal" organization, linked to a Business Group and further qualified by organization information records such as "Exp Organization Defaults." This package encapsulates the validation, duplicate detection, and DML operations required to upload or create such organizations programmatically and consistently, rather than relying on ad hoc inserts into HR_ALL_ORGANIZATION_UNITS and HR_ORGANIZATION_INFORMATION.

The package source header indicates the file hrorgbsi.pkb at version 120.5.12000000.2, confirming that the implementation is part of the HR foundation layer shared across EBS releases. The package is classified as OTHER in the ETRM catalog, meaning it is not a formally published, supported public API but an internal implementation package whose documented surface is limited to a single procedure.

Key Procedures and Functions

The ETRM metadata documents one procedure for this package:

  • HR_ORG_OPERATING_UNIT_UPLOAD — Creates or uploads an Operating Unit organization. Its declared parameters cover the organization name, the organization identifier (as an IN OUT NOCOPY number, allowing the procedure to return the newly generated ID), effective dates (p_date_from, p_date_to), the internal/external flag, and the operating unit number supplied as a VARCHAR2 that is converted internally using fnd_number.canonical_to_number. The body declares local variables for object version numbers at the organization, organization information, and aggregate levels, plus validation flags such as the internal/external check, operating unit check, and name check.

Within the procedure body, two cursors are declared. The first, check_ou_exists, selects from HR_ALL_ORGANIZATION_UNITS and HR_ORGANIZATION_INFORMATION to determine whether the Operating Unit has already been assigned and to retrieve the relevant org_information_id and object_version_number values. The second, get_internal_external_flag, verifies that the internal/external flag cannot be updated once the organization has been created — an important control preventing reclassification of an existing organization.

Because the ETRM metadata lists only this single documented procedure, no other public or documented subprogram is exposed for caller use. Any additional procedures or functions exist as private implementation details and are not part of the documented interface. No parameter list is invented here; only the documented signature and stated purpose are described.

Tables Accessed

  • HR_ALL_ORGANIZATION_UNITS — The primary organization definition table. The package reads existing rows to detect duplicates and to enforce the internal/external flag restriction, and writes new organization rows when uploading an Operating Unit.
  • HR_ORGANIZATION_INFORMATION — The flexible organization information store associated with each organization. The package reads this table via the check_ou_exists cursor (using context 'Exp Organization Defaults') to confirm whether the Operating Unit setup has already been applied, and writes the corresponding organization information records during upload.

Both tables are referenced through APPS synonyms, and access is governed by the standard HR security and Business Group model. The get_object_version_number search term maps directly to the local variables l_object_version_number_org, l_object_version_number_inf, and l_object_version_number declared in the procedure, which are populated from the cursors to support optimistic concurrency control against the two tables.

Usage Notes

HR_ORGANIZATION_INTERNAL is not a supported public API and should not be called directly by customer code without understanding the version dependency (120.5.12000000.2). It is typically invoked from Oracle HRMS and EBS forms and concurrent programs that manage organization setup, Operating Unit creation, and related multi-org configuration. The procedure is notable for returning the organization identifier through its IN OUT parameter and for guarding against duplicate Operating Unit creation and against post-creation changes to the internal/external flag. Customizations should prefer formally documented APIs where available; where this package must be used, callers should pass a properly canonicalized operating unit number and respect the effective date window to avoid validation errors.