Search Results inv_invtrhan_xmlp_pkg




Overview

APPS.INV_INVTRHAN_XMLP_PKG is the generated PL/SQL package that backs the Oracle E-Business Suite concurrent program "Transaction Historical Summary" (report short name INVTRHAN). It is an Oracle Reports XML Publisher (XMLP) integration package, produced automatically when a Reports .rdf executable is converted to an XML Publisher definition. The package owns the report's bind and lexer parameters, its selection dialog values, and the PL/SQL formula columns and format triggers that Oracle Reports invokes during execution. In both EBS 12.1.1 and 12.2.2 the package is owned by APPS and classified by ETRM as OTHER, indicating it is a report-support object rather than a callable API. It reads inventory transaction history for a given organization, date range, item range, category range, and subinventory range, and prepares the data set consumed by the XML Publisher template. Because it is generated code, it should never be hand-modified in a supported environment; changes must be made to the underlying report definition and the package regenerated.

Key Procedures and Functions

The 27 documented program units fall into four groups. The first comprises entry points and phase handlers: BEFOREREPORT, AFTERREPORT, BEFOREPFORM, and AFTERPFORM. BeforeReport initializes the report context, and BeforePForm resolves the parameter form values; the After counterparts release or post-process those values. The second group is the query-building formulas: C_WHERE_CATFORMULA, C_WHERE_SUBINVFORMULA, C_FROM_CATFORMULA, and C_CAT_SET_NAMEFORMULA. These assemble the dynamic WHERE and FROM clauses for the category, subinventory, and category-set prompts, driven by bind variables such as P_WHERE_CAT, P_VIEW, and P_CAT_FLEX. The third group supplies derived report columns: C_SOURCE_TYPE1FORMULA through C_SOURCE_TYPE5FORMULA map transaction source type codes to display labels; C_TARGET_QTY_VALFORMULA and CUR_QTY_VALFORMULA format quantity values against P_QTY_PRECISION; C_CHANGE_QTYFORMULA and C_CHANGE_VALFORMULA format transaction change quantities and their indicator; C_CURRENCY_CODEFORMULA resolves the currency; and C_CAT_PADFORMULA handles category segment padding. The fourth group contains the validation trigger P_VIEW_PUTVALIDTRIGGER, which validates the P_VIEW_PUT parameter value (defaulting from P_VIEW = 'txn_analysis_view') before the report proceeds.

Tables Accessed

All access is through APPS synonyms. MTL_MATERIAL_TRANSACTIONS is the primary fact table, supplying transaction history. MTL_PARAMETERS supplies the organization-level defaults, including quantity precision and currency. MTL_SECONDARY_INVENTORIES validates and describes subinventory prompts, while MTL_CATEGORY_SETS drives the category set list of values used by the category flexfield parameters (P_CAT_SET_ID, P_CAT_STRUCT_NUM). MTL_TXN_SOURCE_TYPES is the lookup behind the five source-type formulas. USER_VIEWS is referenced by P_VIEW_PUTVALIDTRIGGER to confirm that the requested transaction analysis view actually exists in the database before the report runs — the key check connected to the search term p_view_putvalidtrigger.

Usage Notes

The package is invoked exclusively through the Inventory "Transaction Historical Summary" concurrent program and its parameter form. It is not referenced by any other documented package, and ETRM reports zero dependent packages, confirming its role as a leaf report-support object. There is no supported custom-code call interface: developers needing different output should copy and modify the report definition rather than call INV_INVTRHAN_XMLP_PKG directly. The P_VIEW_PUTVALIDTRIGGER logic is the practical reference point when diagnosing failures where the report aborts because a named transaction view is missing or invalid in USER_VIEWS. Standard version checks apply for 12.1.1 versus 12.2.2, but the package header revision ($Header ... 120.2) is shared across both releases.