Search Results pjm_borrow_payback




Overview

PJM_BORROW_PAYBACK is an Oracle EBS Applications (APPS) PL/SQL package body that supports the Project Manufacturing (PJM) borrowing and payback process. In project manufacturing environments, inventory and materials are frequently staged or transferred between project-related subinventories, and the borrow/payback feature allows materials to be temporarily drawn from a project's inventory or a shared location and later returned or reconciled. The package encapsulates the server-side logic that validates, processes, and records these borrow and payback transactions.

The package body is documented with a status of VALID in the APPS schema and contains four documented procedures/functions: SET_BUCKET_SIZE, BUCKET_SIZE, VALIDATE_TRX, and TRX_CALLBACK. Its functionality is closely aligned with the PJM_BORROW_TRANSACTIONS and PJM_BORROW_PAYBACKS tables, which store the transactional and reconciliation data for borrow and payback operations. The package depends on a broad set of Oracle Inventory tables, reflecting the need to validate on-hand quantities, item definitions, subinventories, and location attributes before any borrow or payback movement is committed.

Key Procedures and Functions

  • SET_BUCKET_SIZE — Configures or establishes the bucket size used when processing borrow and payback quantities. This routine likely supports the grouping or allocation of material quantities into defined buckets for validation or transaction processing.
  • BUCKET_SIZE — Returns or determines the bucket size value applied during borrow/payback calculations. It works in conjunction with SET_BUCKET_SIZE to control how quantities are aggregated or divided.
  • VALIDATE_TRX — Performs validation of a borrow or payback transaction prior to processing. This routine checks transactional data against inventory, item, subinventory, and location rules to ensure the transaction is permissible.
  • TRX_CALLBACK — Serves as a callback routine invoked during transaction processing, typically to apply custom or package-specific logic at a defined point in the borrow/payback transaction lifecycle.

The documented metadata does not include parameter lists for these procedures; their purposes are inferred from their names and the associated table dependencies.

Tables Accessed

  • PJM_BORROW_TRANSACTIONS — Stores borrow transaction records; central to the package's insert/update/query operations.
  • PJM_BORROW_PAYBACKS — Stores payback (return/reconciliation) records associated with borrow transactions.
  • PJM_ORG_PARAMETERS — Provides project manufacturing organization parameters that govern borrow/payback behavior.
  • MTL_SYSTEM_ITEMS — Supplies item definition data used to validate items involved in the transaction.
  • MTL_MATERIAL_TRANSACTIONS and MTL_MATERIAL_TRANSACTIONS_TEMP — Support creation and staging of inventory material transactions resulting from borrow/payback processing.
  • MTL_ONHAND_QUANTITIES_DETAIL — Used to verify available on-hand quantities at the relevant subinventory and locator.
  • MTL_ITEM_LOCATIONS, MTL_SECONDARY_INVENTORIES, and MTL_PARAMETERS — Provide location, subinventory, and inventory parameter data required for validation.

Usage Notes

PJM_BORROW_PAYBACK is typically invoked indirectly through Oracle Project Manufacturing forms, concurrent programs, or other PL/SQL packages that manage borrow and payback transactions. The metadata indicates the package is referenced by two other database objects, suggesting it is called programmatically rather than executed directly by end users. Customizations and extensions that need to perform borrow or payback processing should call the documented procedures rather than manipulate the underlying tables directly, ensuring that validation and material transaction logic remain consistent with standard EBS behavior.