Search Results enabled_orgs_exist




Overview

APPS.PO_GA_PVT is a private PL/SQL package in Oracle E-Business Suite that supports the Global Agreements (GA) feature of Oracle Purchasing. Global agreements allow a single purchasing document to be shared across multiple operating units within an organization hierarchy, where one operating unit is designated as the owning organization and others consume the agreement as requesting or purchasing organizations. PO_GA_PVT encapsulates the validation, resolution, and lookup logic that forms, concurrent programs, and other purchasing APIs require in order to determine the global nature, validity, approval status, and organizational scope of a given purchasing document. The package is declared with AUTHID CURRENT_USER and dates to the 11i codebase (header revision 115.17, 2003), and remains in place in EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes a set of BOOLEAN- and scalar-returning functions that answer organizational and status questions for a purchasing document, together with a small number of procedures that return multiple values or perform synchronization work.

  • GET_ORG_ID — returns the operating unit (ORG_ID) associated with a purchasing header.
  • GET_CURRENT_ORG — returns the current session's purchasing organization from system parameters.
  • IS_OWNING_ORG — indicates whether the current organization is the owning organization of a global agreement.
  • GET_ORG_NAME — returns the display name of an organization given its ORG_ID.
  • IS_GLOBAL_AGREEMENT — determines whether a given PO header is a global agreement.
  • IS_ENABLED and ENABLED_ORGS_EXIST — test whether the agreement is enabled for use by organizations, and whether any enabled organizations exist for the owning org.
  • IS_REFERENCED — checks whether a line has been referenced (for example, by a release or downstream document) and therefore cannot be modified or deleted.
  • GET_GA_VALUES — returns the global agreement flag, owning organization ID, and owning organization name for a header.
  • IS_EXPIRED — evaluates whether a line has passed its effective end date.
  • IS_APPROVED — returns whether a line is in an approved state; this is the function referenced by the search term is_approved.
  • IS_GA_VALID — validates that a line belongs to a usable global agreement for the current context.
  • IS_DATE_VALID — validates a supplied date against the agreement's effective dates.
  • VALIDATE_ITEM, IS_SHIP_TO_ORG_VALID, GET_VENDOR_SITE_ID, GET_CURRENCY_INFO, RATE_EXISTS — provide item, ship-to, vendor site, currency, and rate validation and lookup support.
  • SYNC_GA_LINE_ATTACHMENTS and REFERENCE_ATTACHMENTS — manage propagation of attachments between the global agreement and its referenced downstream documents.

In total, ETRM documents 33 program units in this package. The names above reflect the documented set of validation and resolution routines.

Tables Accessed

The package reads and writes a defined set of purchasing and shared tables through APPS synonyms. PO_GA_ORG_ASSIGNMENTS stores the mapping of global agreements to enabled organizations and is central to the IS_ENABLED and ENABLED_ORGS_EXIST logic. PO_HEADERS_ALL and PO_LINE_LOCATIONS_ALL supply header, organization, and shipment data, while PO_LINES_ALL and PO_LINES_DRAFT_ALL provide line-level information used by IS_APPROVED, IS_EXPIRED, IS_REFERENCED, and IS_GA_VALID. PO_SYSTEM_PARAMETERS and FINANCIALS_SYSTEM_PARAMETERS/FINANCIALS_SYSTEM_PARAMS_ALL provide the current organization and financials context returned by GET_CURRENT_ORG. HR_ALL_ORGANIZATION_UNITS_TL is joined to resolve organization display names for GET_ORG_NAME. FND_ATTACHED_DOCUMENTS, FND_ATTACHED_DOCUMENTS_S, and FND_DOCUMENTS support the attachment synchronization routines. MTL_SYSTEM_ITEMS and MTL_ITEM_REVISIONS_B supply item and revision validation data used by VALIDATE_ITEM and related checks.

Usage Notes

PO_GA_PVT is an internal (PVT) package rather than a public API, and Oracle's documented guidance is that private packages should not be called directly by custom code because their signatures may change between releases. It is invoked by Oracle Purchasing forms and by the broader Purchasing API stack — ETRM records that it is referenced by 24 other packages — to answer global agreement questions during entry, validation, approval, and attachment processing. In practice, customizations that need global agreement information should call the supported public APIs in PO_GA (or the corresponding public Purchasing APIs) rather than PO_GA_PVT. Where direct inspection is required, the most commonly referenced functions include IS_GLOBAL_AGREEMENT, IS_APPROVED, IS_ENABLED, and IS_GA_VALID, each of which returns BOOLEAN and therefore must be handled within PL/SQL rather than invoked from SQL. Because the package is compiled AUTHID CURRENT_USER, behavior depends on the invoking schema and session context, and the current organization must be set correctly for functions such as IS_OWNING_ORG and GET_CURRENT_ORG to return meaningful results.