Results for “lock_headers”
20 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.PO_LOCKS is an internal Oracle E-Business Suite PL/SQL package body that provides centralized row-level lock acquisition for Purchasing documents. Its purpose is to serialize concurrent access to document headers, distributions, and sourcing rules so that two user sessions or concurrent programs cannot modify the same purchasing record simultaneously. The package is classified as an "OTHER" API within the ETRM repository, meaning it is not a transactional business API that creates or updates documents; rather, it is a supporting utility invoked by other Purchasing packages before they perform validation or update logic.
The package maintains private debugging and logging constants (G_PKG_NAME, G_LOG_HEAD) and works with the global temporary table PO_SESSION_GT to track document identifiers held by the current session. The header comment indicates an origin in the POXLOCKB.pls script file, a standard Purchasing module source file for lock management routines.
Key Procedures and Functions
- LOCK_HEADERS — Acquires locks on the document headers associated with a supplied set of identifiers. The procedure accepts a document type (requisition, purchase order, blanket purchase agreement, or release), a document level describing the granularity of the identifiers (header, line, shipment, or distribution), and a collection of IDs. It resolves those IDs to the appropriate header records and locks the owning document header rows in PO_HEADERS_ALL, PO_RELEASES_ALL, or PO_REQUISITION_HEADERS_ALL. Debug logging uses the progress string convention typical of Purchasing PL/SQL.
- LOCK_DISTRIBUTIONS — Acquires locks on distribution rows in PO_DISTRIBUTIONS_ALL (and, for requisitions, PO_REQ_DISTRIBUTIONS_ALL). This procedure is used when an update or delete must be protected against concurrent modification at the distribution level rather than the header level.
- LOCK_SOURCING_RULES — Acquires locks on sourcing rule definitions in MRP_SOURCING_RULES, protecting sourcing rule maintenance from concurrent changes while dependent purchasing logic executes.
Tables Accessed
- PO_HEADERS_ALL — The primary Purchasing document header table; locked for purchase orders, blanket agreements, and contracts.
- PO_RELEASES_ALL — Release headers against blanket purchase agreements, locked independently because releases are stored separately from their parent blanket.
- PO_REQUISITION_HEADERS_ALL — Requisition header records, locked when the document type is requisition.
- PO_DISTRIBUTIONS_ALL and PO_REQ_DISTRIBUTIONS_ALL — Distribution-level records for purchase orders and requisitions respectively, locked by LOCK_DISTRIBUTIONS.
- MRP_SOURCING_RULES — Sourcing rule definitions locked by LOCK_SOURCING_RULES.
- PO_SESSION_GT / PO_SESSION_GT_S — Global temporary tables used to hold the set of document identifiers acquired during the current session, supporting the level-to-header resolution logic.
- DUAL and PLITBLM — Used for PL/SQL table and numeric utility operations internal to the package.
Usage Notes
PO_LOCKS is not intended for direct invocation from forms or concurrent program definitions. It is referenced by four other Purchasing packages, which call it internally before performing document validation or update operations, ensuring the calling code holds the appropriate locks. The typical pattern is that a higher-level API determines the document type and level, passes a collection of IDs to LOCK_HEADERS or LOCK_DISTRIBUTIONS, and then proceeds with the business transaction.
Because the package relies on PO_SESSION_GT for session-scoped state and issues locks at the row level, custom code that intends to reuse it must connect as APPS, supply correctly typed collections conforming to the package's expected document type and document level conventions, and manage commit or rollback boundaries consistently with standard Purchasing behavior. The user search term "LOCKS OTHER, NSPF" corresponds to this object's ETRM classification (API type OTHER) and its role as a non-standard, non-public-form interface. Support and debugging should reference the package's internal logging conventions, which prefix messages with 'po.plsql.PO_LOCKS'.
-
PACKAGE BODY: APPS.PO_LOCKS 12.1.1
-
PACKAGE: APPS.PO_LOCKS 12.2.2
-
PACKAGE: APPS.PO_LOCKS 12.1.1
-
PACKAGE BODY: APPS.PO_LOCKS 12.2.2
-
PACKAGE: APPS.PO_LOCKS 12.1.1
-
PACKAGE: APPS.PO_LOCKS 12.2.2
-
PACKAGE BODY: APPS.PO_LOCKS 12.1.1
-
PACKAGE BODY: APPS.PO_LOCKS 12.2.2