Search Results send_inventory_adjustment
Overview
INV_TRANSACTIONS_UTIL2 is an Oracle E-Business Suite PL/SQL utility package owned by the APPS schema and classified in ETRM as an OTHER API. It provides the service layer that supports inventory transaction workflows within Oracle Inventory, most notably the movement of transaction data from EBS into the Oracle Workflow / XML document delivery infrastructure and the maintenance of the transaction history table that records the outcome of those flows. The package is defined with AUTHID CURRENT_USER, meaning its unqualified object references resolve against the privileges of the calling schema rather than the owner. The documented header is INVUTL2S.pls, version 120.0.12010000.2, last modified in February 2010, which places it squarely within the 12.1.1 and 12.2.2 code lines.
The package is best understood as a supporting utility rather than a standalone business API. Its procedures are called by the transaction-processing framework to raise workflow or business events, to hand off XML documents to the outbound messaging layer, and to return transaction status information back into MTL_TXNS_HISTORY.
Key Procedures and Functions
- SEND_DOCUMENT — The generic document dispatch routine. It accepts an entity identifier and entity type, an action type, a document type, an organization identifier, a client code, and an XML document identifier, and returns a status through an OUT parameter. It forms the common delivery path for outbound transaction documents.
- UPDATE_TXN_HIST_SUCCESS_WF — A workflow callback-style procedure. It receives the workflow item type, item key, activity identifier, and function mode, and returns a result value. Its purpose is to update the transaction history record when a workflow activity completes successfully.
- UPDATE_TXN_HISTORY — Updates the status of a transaction history entry. It takes the workflow item type, item key, and transaction status as inputs and returns a status code, allowing the transaction workflow to reflect success or failure back to the inventory transaction record.
- SEND_INVENTORY_ADJUSTMENT — The procedure matched by the user's search term. It packages and dispatches an inventory adjustment document. Its signature mirrors SEND_DOCUMENT, accepting an entity identifier and type, action type, document type, organization identifier, client code, and XML document identifier, returning a status. It is the specific entry point used when an inventory adjustment must be communicated to an external or downstream system.
Tables Accessed
- MTL_TXNS_HISTORY — The primary write target. Transaction history rows are inserted and updated by the workflow callback procedures to record the disposition of each processed transaction.
- MTL_CLIENT_PARAMETERS — Read to resolve client-specific processing parameters, which drive the document dispatch logic and the client code used during delivery.
- HZ_CUST_ACCOUNTS — Referenced to resolve customer account information associated with the transaction or its trading partner context.
- PO_WF_ITEMKEY_S — The purchasing workflow item key sequence, used to generate or validate workflow item keys for the transaction event being raised.
- DUAL — Used for single-row evaluations typical of PL/SQL utility logic.
Usage Notes
INV_TRANSACTIONS_UTIL2 is not intended for direct end-user invocation. It is called from inventory transaction processing code paths, workflow background activities, and concurrent programs that drive outbound document delivery. Customizations that need to emit an inventory adjustment document should call SEND_INVENTORY_ADJUSTMENT rather than reimplementing the dispatch logic, since that procedure encapsulates client parameter resolution and XML handoff. Because the package is AUTHID CURRENT_USER, callers must hold the necessary privileges on the underlying tables and any dependent objects. Customers are advised to avoid modifying the package body; the supported extension pattern is to call its procedures from custom code or wrap them in a custom API, relying on the returned status parameter for error handling.