Search Results fnd_req_set_org_id




Overview

PN_MO_CACHE_UTILS is an Oracle Property Manager (PN) utility package in Oracle E-Business Suite that centralizes the retrieval and caching of Multi-Org Access Control (MOAC) and system setup information. Its primary business function is to determine the correct operating unit context under which Property Manager transactions execute, and to expose the Property Manager system setup options that govern numbering, accounting, and lease processing behavior. The package defines a g_MOAC_enabled global boolean initialized to TRUE and a GlobalsRecord record type that encapsulates a full row of operating unit attributes drawn from PN_SYSTEM_SETUP_OPTIONS. This record aggregates fields such as set of books name and identifier, chart of accounts, legal entity name, functional currency code, accounting option, default currency conversion type, space assignment system date option, multiple tenancy lease flag, automatic component/index/lease/variable rent numbering flags, recurring agreement and expense numbering flags, location code separator, grouping rule, and GL transfer mode. By consolidating these values in one cache, the package avoids repeated queries against setup tables during Property Manager processing.

Key Procedures and Functions

The documented API surface comprises ten program units:

  • RETRIEVE_GLOBALS — Populates and returns the cached GlobalsRecord (or its individual attributes) for the current operating unit, forming the core of the setup cache.
  • GET_PROFILE_VALUE — Retrieves a specified profile option value, supporting the MOAC and setup resolution logic.
  • CHECK_ACCESS — Validates whether the current user has access to a given operating unit within the MOAC security model.
  • CHECK_VALID_ORG — Verifies that a specified organization identifier is a valid, accessible operating unit.
  • GET_MULTI_ORG_FLAG — Returns the flag indicating whether Multi-Org (multiple operating units) is enabled for the installation.
  • IS_MOAC_ENABLED — Returns a boolean indicating whether Multi-Org Access Control is active. This is the function most commonly referenced by callers seeking MOAC status.
  • IS_MOAC_ENABLED_CHAR — The character-returning counterpart to IS_MOAC_ENABLED, providing a string value suitable for contexts where a boolean cannot be directly used (for example, SQL statements or forms fields).
  • MO_GLOBAL_INIT — Initializes the MOAC session context via the Multi-Org global (MO_GLOBAL) mechanism, establishing the operating unit for the current session.
  • FND_REQ_SET_ORG_ID — Sets the organization identifier for a concurrent request, ensuring that concurrent processing runs in the correct operating unit context.
  • GET_CURRENT_ORG_ID — Returns the organization identifier currently in effect for the session.

Tables Accessed

Through APPS synonyms the package references four tables. PN_SYSTEM_SETUP_OPTIONS is the principal source for the GlobalsRecord attributes, including set of books, accounting option, numbering flags, and location separator settings. FND_CURRENCIES supplies the functional currency code associated with the operating unit's ledger. HR_ORGANIZATION_INFORMATION supports operating unit determination and validation, linking organizations to their classification and configuration. FND_PRODUCT_GROUPS provides the product group context used in MOAC and Multi-Org resolution logic. All access is read-oriented, reflecting the package's role as a caching and validation utility rather than a transactional data store.

Usage Notes

PN_MO_CACHE_UTILS is a foundational dependency within Property Manager, referenced by 34 other packages. It is typically invoked at the start of Property Manager processing to establish the operating unit and MOAC context — most commonly through MO_GLOBAL_INIT and GET_CURRENT_ORG_ID — before setup options are read via RETRIEVE_GLOBALS. Property Manager forms and concurrent programs rely on IS_MOAC_ENABLED and IS_MOAC_ENABLED_CHAR to branch behavior: the boolean form for PL/SQL logic and the character form where a SQL-compatible or display value is required. CHECK_ACCESS and CHECK_VALID_ORG enforce MOAC security during cross-operating-unit operations, while FND_REQ_SET_ORG_ID aligns concurrent request execution with the correct organization. Custom extensions should treat this package as a read-only utility, calling the documented functions rather than querying the underlying tables directly, to preserve cache consistency and MOAC enforcement.