Search Results p_item_flex




Overview

INV_INVARPMT_XMLP_PKG is the Oracle E-Business Suite PL/SQL package that supports the Inventory physical inventory report driven by Oracle XML Publisher. The package name embeds the "XMLP" token, indicating it acts as the XML Publisher data source package for the concurrent program that produces the physical inventory count report. It gathers report parameters, executes the query logic that drives the report data model, and supplies calculated columns required to render the final XML output. The package is owned by APPS and classified as OTHER in the ETRM metadata for release 12.2.2, and the source header ($Header: INVARPMTS.pls 120.1, dated 2007/12/25) confirms it is a shipped, non-customized seed object. It is not an API in the transactional sense; it contains no business logic that creates or updates core inventory transactions. Its role is strictly report-oriented: resolving parameters such as the item flexfield range (P_ITEM_FLEX), organization identifier (P_ORG_ID), location flexfield range (P_LOC_FLEX), condition filter (P_CONDITION), physical inventory identifier (P_PHYS_INV_ID), and quantity precision for display.

Key Procedures and Functions

The package exposes eight documented procedures and functions:

  • BEFOREREPORT — Standard XML Publisher before-report hook. It initializes report state and package-level globals prior to query execution.
  • AFTERREPORT — Standard XML Publisher after-report hook. It returns Boolean and typically performs cleanup or finalization once data retrieval completes.
  • C_CURRENCY_CODEFORMULA — Returns a formatted currency code value for a currency code input, used to derive the display of currency on report output.
  • C_WHEREFORMULA — Builds the dynamic WHERE clause fragment that drives the report query, typically responding to the item, location, and condition parameters.
  • C_PHYS_INV_NAMEFORMULA — Resolves and returns the name of the physical inventory associated with the report run.
  • CF_OUTERMOST_LPNFORMULA — Returns the outermost license plate number (LPN) for a given outermost LPN identifier, supporting WMS-enabled installations.
  • CF_PARENT_LPNFORMULA — Returns the parent LPN for a supplied parent LPN identifier, again for warehouse-managed inventory scenarios.
  • CF_COST_GROUPFORMULA — Returns the cost group name or description for a given cost group identifier.

Parameter lists are not reproduced here; the package declares globals including P_ITEM_FLEX, P_LOC_FLEX, P_STRUCT_NUM, P_PHYS_INV_ID, P_REPORT_ID, P_QTY_PRECISION, and P_WMS_INSTALLED, the last defaulting to 'FALSE' to indicate whether the WMS schema is installed.

Tables Accessed

Three base tables are documented as referenced through APPS synonyms:

  • MTL_PHYSICAL_INVENTORIES — the header table for physical inventory definitions; the package reads it to resolve the physical inventory name and physical inventory identifier used by the report.
  • CST_COST_GROUPS — the cost group definition table; read by CF_COST_GROUPFORMULA to translate a cost group identifier into its display name.
  • WMS_LICENSE_PLATE_NUMBERS — the license plate number table used by the LPN formulas to resolve parent and outermost LPN values when WMS is installed.

Usage Notes

INV_INVARPMT_XMLP_PKG is invoked by the physical inventory XML Publisher concurrent program in Oracle Inventory, and is not called from Oracle Forms or from other PL/SQL packages (the metadata records zero referencing packages). Custom code that needs to reproduce the report's parameter semantics — particularly the item flexfield range held in P_ITEM_FLEX — should read the concurrent program parameters rather than calling this package directly, since its procedures are designed for the XML Publisher data template contract. Because the package relies on the P_WMS_INSTALLED flag, behavior of the LPN formulas differs between WMS-enabled and non-WMS installations. Sites on 12.1.1 and 12.2.2 should treat this as a seeded, upgradeable object; any modifications belong in a custom wrapper rather than in the shipped package body.