Search Results inventory_item_cost




Overview

PO_REQ_TEMPLATE_SV2 is a server-side PL/SQL package owned by APPS in the Oracle E-Business Suite Purchasing application. It supports the Requisition Templates (ReqExpress) feature set, which allows buyers and requesters to store frequently used requisition lines as reusable templates and to generate new requisition lines from them. The package is declared with AUTHID CURRENT_USER, so its execution privileges and unqualified name resolution follow the invoking schema rather than the defining schema — a characteristic consistent with a library intended for called from forms, concurrent programs, and custom extensions under the caller's security context.

The header comment identifies a build date of 2003 and a source file of POXRQT2S.pls, indicating the package has been part of the Purchasing code line for many releases and is carried forward into 12.1.1 and 12.2.2. ETRM classifies the object as OTHER rather than as an open or public API, meaning it is not part of a formally published interface contract, though it remains reachable from custom code and is documented at the procedure level.

Key Procedures and Functions

  • GET_REQ_LINE_INFO — the primary procedure. It returns a broad set of requisition line attributes for a given row identifier, resolving and returning item, revision, description, category, unit of measure, price, vendor and vendor site information, source type and sourcing organization, line type, RFQ flag, and several descriptive display values such as vendor name, source organization name, and suggested buyer name. It also returns derived amount and negotiated-by-preparer information.
  • DUPLICATE_EXPRESS_NAME — a Boolean function that tests whether a given ReqExpress template name already exists, supporting the uniqueness validation performed when users create or rename templates.
  • DUPLICATE_SEQUENCE_NUMBER — a Boolean function that tests whether a sequence number is already used within a named template, scoped by row identifier. This prevents duplicate line sequencing inside a template definition.
  • INVENTORY_ITEM_COST — returns the cost of an inventory item for a specified organization, used to default or validate pricing on template-driven requisition lines.
  • PRIMARY_UNIT_OF_MEASURE — returns the primary unit of measure for an inventory item in an organization, used to default the UOM on a template line.
  • GET_ORDER_TYPE — a function in this package. Based on the searching context of "get_order_type," this routine is the one most commonly targeted by custom code. It derives the order type value associated with a requisition template or requisition line, resolving the order type attribute that governs how the resulting document is processed downstream. Its knowledge is drawn from the same line-type and requisition data the package already accesses, so callers should treat it as a lookup/derivation helper rather than a data-changing operation.

Tables Accessed

The package reads and writes through APPS synonyms against six documented tables. PO_REQEXPRESS_HEADERS and PO_REQEXPRESS_LINES hold the template header and line definitions, and back the duplicate-name and duplicate-sequence validations. PO_REQUISITION_LINES supplies the source requisition line data that GET_REQ_LINE_INFO resolves, including order type, source type, line type, and pricing columns. PO_LINE_TYPES provides the line type definition used to derive the line type and order type values. MTL_SYSTEM_ITEMS is consulted for item attributes such as description, revision, and primary unit of measure in the context of INVENTORY_ITEM_COST and PRIMARY_UNIT_OF_MEASURE. DUAL is used for scalar lookups and function return values.

Usage Notes

PO_REQ_TEMPLATE_SV2 is most often invoked indirectly by the Requisition Templates and Requisition forms, where the template UI calls it to populate line defaults, validate template names and sequence numbers, and derive display values for the block. It may also be called from the AutoCreate or requisition import flows where template data is expanded. Because the package is not a published API and its header carries a 2003 vintage, custom code should call it defensively: wrap calls in exception handling, avoid reliance on parameter ordering, and confirm the presence of any specific routine in the target environment. Customizations that need the order type for a template or line should call GET_ORDER_TYPE directly rather than reimplementing the derivation logic, but should validate behavior after any patch or upgrade, since the object falls outside Oracle's formal API support commitment.