Search Results p_include_rej_items




Overview

APPS.INV_INVARPAR_XMLP_PKG is the PL/SQL packaged implementation for the Oracle EBS concurrent program "Physical Inventory Adjustments Report" (also referenced in Oracle documentation as the Inventory Adjustments Report / physical inventory adjustments). The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the invoking user rather than the definer, which is the standard convention for XML Publisher (BI Publisher) report packages in the EBS 12.1.1 and 12.2.2 releases.

In the Oracle EBS architecture, XML Publisher concurrent programs are registered against a report definition, and the executable is generated by Oracle Reports or by a PL/SQL wrapper package. This package contains:

  • Global variables that hold concurrent program parameters passed in at runtime.
  • Two mandatory reporting hooks, BEFOREREPORT and AFTERREPORT, which the XML Publisher engine invokes at the start and end of report execution.
  • A set of formula functions used by the report's data template/group to derive display values for columns that cannot be computed directly in the report's SQL query.

The parameter P_INCLUDE_REJ_ITEMS is a documented global variable of type NUMBER, paired with P_INCLUDE_REJ_ITEMS_OPT (VARCHAR2). These control whether rejected/physically rejected inventory items are included in the physical inventory adjustment output; P_REJ_OPT_TITLE supplies the label rendered on the report for that option. The user search term "p_include_rej_items" therefore maps directly to a runtime parameter of this report package that governs rejection-item inclusion in the report output.

Key Procedures and Functions

The ETRM metadata documents the following program units in this package. Parameter lists should not be assumed beyond what the source declaration shows.

  • BEFOREREPORT — Returns BOOLEAN. Standard XML Publisher before-report hook. Executes initialization logic prior to the report SQL query, including resolving install-state flags (P_WMS_INSTALLED, which defaults to 'FALSE' and indicates whether Warehouse Management System is in use) and preparing global parameter values for use during reporting.
  • AFTERREPORT — Returns BOOLEAN. Standard XML Publisher after-report hook, invoked after the report data set has been generated. Typically used for cleanup or post-processing.
  • C_PHYS_INV_NAMEFORMULA — Returns VARCHAR2. Formula column supplying the physical inventory name for the report output.
  • C_CURRENCY_CODEFORMULA — Returns VARCHAR2; takes the currency code as an input argument. Returns the report's display currency code value.
  • C_SORTFORMULA — Returns VARCHAR2. Formula column that yields the sort key or sort indicator used by the report layout.
  • CF_COST_GROUPFORMULA — Returns CHAR; receives P_COST_GROUP_ID as an argument (per the documented bug#11737196 change of function argument). Derives the cost group description/label from the cost group identifier.
  • CF_OUTERMOST_LPNFORMULA — Returns CHAR; receives P_OUTERMOST_LPN_ID. Derives the outermost license plate number (LPN) display value from the LPN identifier.
  • CF_PARENT_LPNFORMULA — Returns CHAR; receives P_PARENT_LPN_ID. Derives the parent license plate number display value.
  • CF_APPROVER_FORMULA — Returns CHAR; receives EMP_ID. Resolves the approver's display name from the employee identifier.
  • CF_APPROVERFORMULA — Returns CHAR; receives EMP_ID. Companion approver formula that resolves the approver's display designation for the report.

Tables Accessed

Per the ETRM metadata, this package references the following objects through APPS synonyms:

  • MTL_PHYSICAL_INVENTORIES — The core physical inventory header table. Used to resolve the physical inventory name and to identify the physical inventory to which the adjustment report relates (governed by P_PHYS_INV_ID and P_BREAK_ID).
  • CST_COST_GROUPS — The cost group definition table, referenced to resolve the cost group identifier (P_COST_GROUP_ID) into a display value via CF_COST_GROUPFORMULA.
  • WMS_LICENSE_PLATE_NUMBERS — The Warehouse Management license plate number table. Accessed only when the WMS installation flag (P_WMS_INSTALLED) is true, to support the outermost-LPN and parent-LPN formula columns. This explains the conditional handling of WMS-specific columns in the report.

Usage Notes

This package is not a public application programming interface. It is invoked implicitly by the Oracle EBS concurrent manager whenever the associated Physical Inventory Adjustments report concurrent program is submitted. Typical invocation flow is:

  • The concurrent program request is submitted, and the EBS report runtime binds the submitted parameters into the package-level global variables (P_ORG_ID, P_PHYS_INV_ID, P_BREAK_ID, P_INCLUDE_REJ_ITEMS, and so on).
  • The XML Publisher / Oracle Reports engine calls BEFOREREPORT to initialize runtime state.
  • The report query executes, calling the formula functions to render derived columns.
  • AFTERREPORT executes at completion.

Because the package is registered as an "OTHER" API classification and is referenced by zero other PL/SQL packages, it should be treated as report-internal. Customizations should be limited to registered report file changes or template changes rather than direct calls to the package. Calling the package or its formula functions directly from custom code is not supported and bypasses the concurrent program request contexts that populate the global variables. The presence of P_INCLUDE_REJ_ITEMS and related variables indicates that the report parameter screen exposes a rejection-items inclusion option whose accepted values are constrained by the concurrent program parameter value set.