Search Results query_adjustments




Overview

QP_PRC_UTIL is a pricing utility package in the Oracle Advanced Pricing module (QP schema) of Oracle E-Business Suite. It centralizes the core pricing calculation logic used throughout the order-to-cash flow, providing reusable program units that determine the best applicable price adjustment for an item and derive the final selling price. The package operates under AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema rather than the package owner, which is significant for security and synonym resolution during pricing calls made from Order Management, Quoting, and other consuming modules. The package is classified in the ETRM repository as a UTIL type API, indicating it is not a formal business object API with a published interface contract, but rather a shared internal utility invoked by other pricing packages and forms. Its header comments explicitly state that it contains "all pricing utilities," including two principal operations: calculating a selling price or selling percent for an item after applying all adjustments, and fetching the best automatic adjustment for an item while summing manual and automatic, header and line adjustments before computing the final selling price based on the applicable pricing method. The package defines global constants for pricing method codes (AMT and %), action codes such as PRICE, CALCULATE, APPLY_CHG, ADJUSTMENT, and LINES, operation codes such as CREATE, DELETE, UPDATE, and LOCK, and attribute identifiers sourced from OE_ENTITIES that map pricing attributes to numeric identifiers (for example, unit, quantity, list price, customer, item, PO number, agreement type, agreement, order type, invoice-to, and ship-to).

Key Procedures and Functions

The ETRM metadata documents eleven program units within QP_PRC_UTIL. The two most business-critical are:

  • PRICE_ITEM — The central pricing routine. It fetches the best automatic adjustment for an item, accumulates all manual and automatic adjustments applied at both header and line level, and then computes the selling price according to the applicable pricing method. This is the entry point most relevant to searches for "price_item."
  • CALCULATE_SELLING_PRICE — Calculates the selling price or selling percent for an item after applying all adjustments, isolating the arithmetic derivation from the adjustment selection performed by PRICE_ITEM.

Supporting program units include:

  • QUERY_ADJUSTMENTS — Retrieves the set of price adjustments qualifying for the pricing request based on the supplied qualifier attributes.
  • GET_HDR_ADJ_TOTAL — Returns the accumulated total of header-level adjustments for the pricing context.
  • GET_AGR_TYPE — Determines the applicable agreement type for the pricing request, used to resolve agreement-driven pricing.
  • GET_ITEM_CATEGORY — Resolves the category assignment for an item, supporting category-based qualifiers and modifiers.
  • GET_CUST_CLASS — Derives the customer class for the ordering party, supporting customer-class qualifiers.
  • GET_ATTRIBUTE_NAME — Maps an internal attribute identifier to its display name, used in qualifier and pricing attribute resolution.
  • EQUAL — A comparison helper used during adjustment evaluation and attribute matching.

Tables Accessed

The package reads and writes data through APPS synonyms across the pricing, order management, and trading partner schemas:

  • QP_LIST_HEADERS and QP_LIST_LINES — The price list and modifier definition tables that hold list prices and adjustment definitions, consulted during adjustment retrieval and price derivation.
  • QP_QUALIFIERS — Stores qualifier definitions that determine which adjustments apply to a given pricing request.
  • OE_PRICE_ADJUSTMENTS and OE_AGREEMENTS — Order-level adjustments and agreement records used to resolve agreement-based pricing and accumulate applied adjustments.
  • MTL_ITEM_CATEGORIES and MTL_DEFAULT_CATEGORY_SETS — Item-to-category assignments and the default category set definition, used by GET_ITEM_CATEGORY.
  • HZ_CUST_ACCOUNTS, HZ_CUST_SITE_USES, and HZ_PARTIES — Trading partner tables used to resolve customer, ship-to, and invoice-to identities and customer classification for qualifier evaluation.

Usage Notes

QP_PRC_UTIL is an internal utility rather than a public extension API. It is referenced by seven other packages in the EBS pricing codebase, and it is invoked indirectly whenever the pricing engine needs to determine the best price for an item. Typical invocation paths include the Order Management order entry form when a line is priced, the Advanced Pricing price list and modifier setup forms during validation, and concurrent programs that perform bulk repricing or price list maintenance. Custom code should generally call the higher-level pricing APIs (such as QP_PREQ_GRP or the Order Management pricing interfaces) rather than invoking PRICE_ITEM directly, because the utility expects a fully populated pricing context, including the OE_ENTITIES attribute values defined as global constants. The package was last shipped with a header revision of 120.1 (2005), and the same body is used in both 12.1.1 and 12.2.2; the object owner is APPS, so grants and synonyms must be verified when extending or debugging pricing behavior. Because the package runs with AUTHID CURRENT_USER, callers must have the necessary privileges on the underlying pricing and trading partner tables for resolution to succeed.