Search Results c_where_optionformula
Overview
The APPS.INV_INVARPTS_XMLP_PKG package is a generated PL/SQL package that supports an Oracle EBS XML Publisher (BI Publisher) report within the Oracle Inventory application. The package name suffix _XMLP_PKG indicates that it was produced by the XML Publisher concurrent program generator, which automatically creates a supporting package of user-defined report formulas, data-binding functions, and before/after processing hooks for a report defined against a specific data template.
In this instance, the report concerns physical inventory adjustments — the "INVAR-PTS" report, which summarizes physical inventory counts, adjustment values, and variances by subinventory, tag, and organization. The package is declared AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking user rather than the package owner, a standard security posture for generated XML Publisher support packages. It is owned by APPS and classified under ETRM as an OTHER API type, reflecting that it is not a public callable business API but a report-internal utility package. The header indicates a last revision date of 2007 and a noship status flag for the shipped source revision.
Key Procedures and Functions
The package exposes 10 documented program units. The public data variables mirror the report's concurrent program parameters, including P_ORG_ID, P_CONC_REQUEST_ID, P_STRUCT_NUM, P_CONDITION, P_PHYS_INV_ID, P_REPORT_OPTION, and P_SUBINV_NAME.
- BEFOREREPORT — Executes once at the start of the report run; initializes session context, resolves the concurrent request, and prepares data for the report.
- AFTERREPORT — Executes at the end of the report; performs cleanup and returns control.
- C_CURRENCY_CODEFORMULA — Derives the currency code displayed on the report.
- C_PHYS_INV_NAMEFORMULA — Returns the descriptive physical inventory name.
- C_ADJ_PCTFORMULA — Computes an adjustment percentage from an adjustment value and a count value input.
- C_VAR_PCTFORMULA — Computes a variance percentage from an absolute variance and a count value.
- C_ADJ_PCT_SUMFORMULA — Computes the summary adjustment percentage across aggregated values.
- C_VAR_PCT_SUMFORMULA — Computes the summary variance percentage across aggregated values.
- C_WHERE_OPTIONFORMULA — Builds the dynamic WHERE clause fragment used by the report query based on the selected report option.
- C_NUM_TAGSFORMULA — Returns the number of tags for a given subinventory.
The search term "count_value" corresponds directly to the COUNT_VALUE parameter declared on the C_ADJ_PCTFORMULA and C_VAR_PCTFORMULA functions, where it serves as the denominator for percentage calculations.
Tables Accessed
Through APPS synonyms, the package references two Inventory tables:
- MTL_PHYSICAL_INVENTORIES — the parent physical inventory header, providing the physical inventory name, organization, and scheduling context displayed on the report.
- MTL_PHYSICAL_INVENTORY_TAGS — the individual count tags, supplying counted quantities, adjustment values, and variance data used in the percentage formulas and tag-count functions.
Usage Notes
This package is not intended for direct invocation by custom code. It is called automatically by the XML Publisher runtime when the associated physical inventory adjustment report concurrent program executes. Developers extending the report may reference the C_*FORMULA functions within the report's data template to reproduce Oracle's standard adjustment and variance percentage logic, and the PX_* style parameter variables are populated from the concurrent program's parameter set at runtime. Because it is an OTHER-classified object with no documented reverse dependencies, it should be treated as report-internal infrastructure subject to change with any Inventory patch or upgrade.