Search Results p_stype1




Overview

INV_INVTRSTS_XMLP_PKG is the generated PL/SQL package body that backs the Oracle Inventory transaction register report. The report is published through the Oracle Reports XML Publisher (XMLP) concurrent program framework, and the package supplies the database-side logic that the report definition invokes at runtime. Its principal responsibility is to resolve the user's run-time parameters — organization, category set, transaction source types, subinventory, and status — into the actual SELECT clauses, WHERE fragments, and display values used by the report query. In addition, the package manages the lifecycle of a temporary database view that the report requires, creating it before the report executes and dropping it afterward.

The name is registered in the APPS schema, and the ETRM classification for this object is OTHER, reflecting that it is a report-support package rather than a published business API. It is not called by any other packaged code; the ETRM metadata records zero referencing packages.

Key Procedures and Functions

The package exposes sixteen documented program units, most of which are formula functions consumed directly by the report's data model:

  • AFTERREPORT — Cleanup routine executed when the report finishes. Drops the temporary view identified by the P_VIEW parameter, unless the P_DROP flag suppresses that action, and performs the standard FND SRWEXIT step. Failures are trapped and ignored so cleanup never aborts report completion.
  • BEFOREREPORT — Pre-report initialization hook, the counterpart to AFTERREPORT.
  • AFTERPFORM and BEFOREPFORM — Parameter form level triggers that run before and after the report's parameter form is displayed.
  • P_VIEW_PUTVALIDTRIGGER — Populates the validation trigger associated with the temporary view.
  • C_FROM_CATFORMULA and C_WHERE_CATFORMULA — Return the FROM-clause and WHERE-clause fragments that join MTL_ITEM_CATEGORIES and MTL_CATEGORIES to the item master, constrained by the organization and category set parameters.
  • C_SOURCE_TYPE1FORMULA, C_SOURCE_TYPE2FORMULA, and C_SOURCE_TYPE3FORMULA — Resolve the three transaction source type parameters (P_STYPE1 through P_STYPE3) to their descriptive names for display.
  • C_WHERE_SUBINVFORMULA and C_STATUS_WHEREFORMULA — Build the WHERE fragments that filter the report by subinventory and by transaction status.
  • C_ITEM_TOTALFORMULA — Derives the item-level total column presented on the report. This formula operates on the quantity data returned by the query, including the quantity adjusted for each transaction.
  • C_CAT_SET_NAMEFORMULA — Resolves the category set identifier to its descriptive name.
  • C_CURRENCY_CODEFORMULA and C_CAT_PADFORMULA — Return the currency code for monetary columns and the padded category value used in the report layout.

Tables Accessed

Two base tables are documented as referenced through APPS synonyms:

  • MTL_TXN_SOURCE_TYPES — Read by the C_SOURCE_TYPEnFORMULA functions to convert the transaction source type identifiers supplied as report parameters into the source type names printed in the report header.
  • MTL_CATEGORY_SETS — Read to resolve the category set parameter, supporting the category-related formulas and the category-set name column.

The report query itself additionally draws on the inventory transaction and item category tables joined by the formula-generated clauses; the temporary view managed by AFTERREPORT and P_VIEW_PUTVALIDTRIGGER encapsulates that query text.

Usage Notes

This package is not intended for direct invocation from forms or custom code. It is bound to the Inventory transaction register report definition, and Oracle Reports calls its formula functions and triggers automatically during report execution. The typical invocation sequence is: the concurrent manager runs the report, BEFOREREPORT and BEFOREPFORM fire to prepare parameters and the view, the formula functions supply SELECT and WHERE fragments while rows are fetched, and AFTERREPORT drops the temporary view. Because the package depends on run-time parameter values such as P_ORG_ID, P_CAT_SET_ID, P_STYPE1, and P_VIEW, any direct call outside the report context would require those values to be supplied explicitly. Customizations should avoid modifying this generated package body, since Oracle regenerates it during patching; extensions belong in a separate custom package or in a customized copy of the report definition.