Search Results get_ou_shortcode




Overview

APPS.PO_MOAC_UTILS_PVT is a private PL/SQL package body within the Oracle E-Business Suite Purchasing application, classified under the PVT (private) API category. Its name reflects its role as a utilities package supporting MOAC (Multi-Org Access Control) functionality for the Procurement module. MOAC allows a single user responsibility to access and transact across multiple operating units without requiring separate responsibilities per organization. This package provides the underlying programmatic machinery that resolves operating unit context, validates organization identifiers, and establishes the policy and request context needed for multi-org aware processing throughout the Purchasing and Requisitioning modules.

The package depends on standard EBS infrastructure components including FND_API, FND_REQUEST, MO_GLOBAL, MO_UTILS, PO_LOG, PO_MESSAGE_S, and STANDARD. It is referenced by more than one hundred other database objects, indicating it is a foundational utility layer called by higher-level Purchasing APIs and concurrent programs rather than being invoked directly by end users.

Key Procedures and Functions

The ETRM metadata documents fourteen procedures and functions within this package. These are as follows:

  • NAME — A descriptive or naming utility, typically returning the package or component name for diagnostic and logging purposes.
  • GET_CURRENT_ORG_ID — Returns the current operating unit identifier, resolving context based on session or policy state.
  • GET_OU_NAME — Retrieves the descriptive name of a specified operating unit.
  • GET_OU_COUNT — Returns the number of operating units accessible to the current user or responsibility.
  • GET_DEFAULT_OU — Determines and returns the default operating unit when context is not explicitly set.
  • GET_VALID_ORG — Validates and returns a usable organization, ensuring the requested unit is accessible.
  • INITIALIZE — Performs package-level setup and initialization of internal state.
  • SET_POLICY_CONTEXT — Establishes the Multi-Org policy context so that subsequent queries are properly filtered by operating unit.
  • CHECK_ACCESS — Verifies whether the current user or responsibility has access to a given organization.
  • GET_OU_SHORTCODE — Returns the short code (abbreviated identifier) for an operating unit.
  • SET_REQUEST_CONTEXT — Configures context for concurrent request processing, ensuring the correct operating unit is applied during background execution.
  • GET_ENTITY_ORG_ID — Resolves the organization identifier associated with a specific business entity or document.
  • VALIDATE_ORGID_PUB_API — Acts as a public-facing validation wrapper that checks an organization identifier using the package's internal logic.

Tables Accessed

The package reads from and writes to several core Purchasing and HR tables via APPS synonyms. HR_ALL_ORGANIZATION_UNITS, HR_ALL_ORGANIZATION_UNITS_TL, and HR_ORGANIZATION_INFORMATION supply operating unit definitions and classifications. PO_HEADERS_ALL, PO_LINES_ALL, PO_LINE_LOCATIONS_ALL, PO_DISTRIBUTIONS_ALL, and PO_RELEASES_ALL provide purchasing document and distribution data used in entity organization resolution. PO_REQUISITION_HEADERS_ALL, PO_REQUISITION_LINES_ALL, and PO_REQ_DISTRIBUTIONS_ALL cover the requisitioning side. PO_DOCUMENT_TYPES is consulted for document classification.

Usage Notes

PO_MOAC_UTILS_PVT is normally invoked indirectly. Higher-level public Purchasing APIs and validation routines call its functions to establish operating unit context before executing multi-org aware queries or DML. Concurrent programs use SET_REQUEST_CONTEXT to bind the correct operating unit during background processing. Forms-based transactions in Purchasing and iProcurement rely on the policy-context functions to filter data by the user's accessible organizations. Because the package is private and referenced widely, customizations should call the public wrapper VALIDATE_ORGID_PUB_API rather than internal procedures, and should never modify the package body directly.