Search Results trx_callback
Overview
PJM_BORROW_PAYBACK is an Oracle EBS PL/SQL package owned by APPS that supports the Project Manufacturing (PJM) borrow/payback business process. Borrow/payback enables a project-oriented organization to temporarily transfer material from one project or task to another and subsequently return it. The package validates inventory transactions performed in the context of borrow/payback and project transfer, and it records the resulting borrow and payback activity in the PJM borrow/payback tables. It is declared AUTHID CURRENT_USER, meaning its unqualified object references resolve against the privileges and schema of the invoking session rather than the package owner.
Although the package header carries a historical revision marker ($Header: PJMBWPYS.pls 115.9), the object remains available in Oracle EBS 12.1.1 and 12.2.2 and is classified as a supporting API in the ETRM repository. The package is referenced by two other packages, indicating that it acts as a shared validation and callback layer rather than a stand-alone end-user feature. Its separation of a bucket-size control mechanism, a transaction validator, and a transaction callback suggests it is designed to be called both directly by inventory-processing code and indirectly through the Oracle Inventory transaction interface.
Key Procedures and Functions
The documented package interface exposes four procedures and functions.
- SET_BUCKET_SIZE — Assigns a value to the package global variable G_Bucket_Size. It is used by callers to control the grouping or batching granularity applied during borrow/payback processing.
- BUCKET_SIZE — Returns the current value of G_Bucket_Size as a number. It is declared with PRAGMA RESTRICT_REFERENCES (WNDS, WNPS), confirming that it neither writes database state nor package state, so it may be safely invoked from SQL contexts.
- VALIDATE_TRX — Validates a transaction in the context of borrow/payback and project transfer before it is submitted. It accepts transaction type, transaction action, organization, subinventory and locator details on both the source and destination sides, item and revision information, primary quantity, transaction date, and payback date, and returns a numeric result with an error code out parameter. Its purpose is to confirm that the proposed movement is legal for borrow/payback before inventory is affected.
- TRX_CALLBACK — The callback invoked during transaction processing. For a borrow transaction it inserts the corresponding borrow records and performs the associated bookkeeping required to keep the PJM borrow/payback tables synchronized with the inventory transaction. This is the object most directly associated with the search term "trx_callback".
Tables Accessed
The package reads and writes a defined set of inventory and PJM tables through APPS synonyms.
- MTL_MATERIAL_TRANSACTIONS and MTL_MATERIAL_TRANSACTIONS_TEMP — Source and staging of the inventory transaction being validated and processed.
- MTL_ONHAND_QUANTITIES_DETAIL — On-hand balances used to confirm availability for the movement.
- MTL_SYSTEM_ITEMS and MTL_ITEM_LOCATIONS — Item and locator validation.
- MTL_SECONDARY_INVENTORIES and MTL_PARAMETERS — Subinventory and organization-level inventory setup validation.
- PJM_BORROW_TRANSACTIONS and PJM_BORROW_PAYBACKS — The PJM tables where borrow and payback records are created and maintained.
- PJM_ORG_PARAMETERS — Determines whether PJM borrow/payback is enabled for the organization.
Usage Notes
PJM_BORROW_PAYBACK is not intended for ad hoc invocation. It is normally called from Project Manufacturing borrow/payback forms and from Oracle Inventory transaction processing flows, where VALIDATE_TRX is invoked prior to commit and TRX_CALLBACK is invoked as part of the transaction processing callback sequence. Because it is referenced by two other packages, customizations should extend or wrap the package rather than modify it directly. Custom code that calls TRX_CALLBACK must ensure the inventory transaction context is fully populated — organization, item, revision, subinventories, locators, quantities, and dates — since the callback depends on that context to insert and reconcile PJM borrow records. In 12.1.1 and 12.2.2 the same interface is expected; the AUTHID CURRENT_USER declaration means grants on the underlying MTL and PJM tables must be available to the invoking schema.
-
PACKAGE: APPS.PJM_BORROW_PAYBACK
12.1.1
-
PACKAGE: APPS.PJM_BORROW_PAYBACK
12.2.2
-
PACKAGE BODY: APPS.PJM_BORROW_PAYBACK
12.2.2
-
PACKAGE BODY: APPS.PJM_BORROW_PAYBACK
12.1.1
-
APPS.PJM_BORROW_PAYBACK dependencies on PJM_BORROW_TRANSACTIONS
12.1.1
-
APPS.PJM_BORROW_PAYBACK dependencies on PJM_BORROW_TRANSACTIONS
12.2.2