Search Results get_converted_qty




Overview

QP_CROSS_ORDER_VOLUME_LOAD is an Oracle EBS Advanced Pricing utility package (APPS schema, classified as OTHER) that supports cross-order volume and amount-based modifier qualification. Its principal role is to compute and load aggregate customer order volumes and amounts so that pricing qualifiers defined at the customer, item, or order level can be evaluated correctly during pricing. The package addresses a common pricing requirement in which a modifier (for example, a volume discount) is not triggered by a single order line or single order, but by the cumulative business a customer has transacted — across multiple orders, and potentially across multiple currencies. To achieve this, the package reads order and pricing setup data, converts quantities and monetary amounts into consistent base units, and writes the consolidated results into the customer volume and amount tables used by the pricing engine. It is delivered in support of Oracle Pricing in both 12.1.1 and 12.2.2, and the header comment (120.7) confirms it is a mature, shipped object.

Key Procedures and Functions

  • CREATE_CROSSORDVOL_BRK — The primary driver procedure. It builds the cross-order volume and amount records for a given pricing context (effective date and organization), consolidating order activity and persisting the results into the customer volume/amount tables. This is the routine that most directly implements the package's business purpose.
  • GET_CUSTOMER_TOTAL_AMNTS — Returns the total monetary amounts for a customer, calculated from order history and converted to a consistent currency basis. It supports amount-based qualifiers.
  • GET_CONVERTED_QTY — Returns a quantity converted into the target/base unit of measure. The user's search term "get_converted_qty" maps directly to this documented function. It provides the UOM-normalized quantity used when aggregating volumes of items that may be stocked or ordered in different units of measure.
  • GET_UOM_CODE — Retrieves the primary unit of measure for an item in a specified organization by querying MTL_SYSTEM_ITEMS. Used to establish the target UOM for conversions.
  • GET_VALUE — A generic value retrieval helper used within the package's processing logic.
  • CONVERT_TO_BASE_CURR — Converts a transaction amount from one currency to another, using a supplied conversion date, rate, and type. It defaults the conversion type to 'Corporate' and the conversion date to the load effective date, and returns 0 for a zero input. It relies on GL_CURRENCY_API (notably Is_Fixed_Rate and convert_amount) and declares exceptions for missing user-defined rates, no rate, and invalid currency.

Tables Accessed

The package reads inventory and order data and writes pricing qualification data:

Usage Notes

QP_CROSS_ORDER_VOLUME_LOAD is typically invoked as a background/concurrent process rather than interactively, because cross-order aggregation is data-intensive and writes summary records that the pricing engine subsequently consumes. It may be scheduled as part of pricing maintenance, prior to order capture or price recalculation, so that the OE_CUST_TOTAL_AMTS_ALL and OE_ITEM_CUST_VOLS_ALL tables reflect current customer activity before qualifiers are evaluated. Custom pricing extensions and order-import processes that require volume or amount qualification against historical orders may call CREATE_CROSSORDVOL_BRK directly. The package is referenced by one other Oracle package, indicating downstream dependencies within the pricing flow. Because the conversion routines depend on GL daily rates and the Corporate conversion type, GL rate maintenance must be current; missing rates raise NO_RATE or No_User_Defined_Rate exceptions, and invalid currency codes raise INVALID_CURRENCY. G_LOAD_EFFECTIVE_DATE and G_ORG_ID are the global values that anchor the effective date and organization for a run, and should be set by the caller before invoking the processing routines.