Search Results discount_lines




Overview

QP_VALUE_TO_ID is an internal Oracle Advanced Pricing (QP) utility package that provides a centralized conversion layer between human-readable, denormalized attribute values and the surrogate identifiers used inside the pricing engine. Advanced Pricing stores many descriptive attributes — currencies, list types, ship methods, freight terms, prorate flags, and units of measure — as short text codes on pricing entities, while the engine operates on numeric or key-flex identifiers. QP_VALUE_TO_ID supplies the deterministic "value to id" translation functions that bridge those two representations.

The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the calling session rather than its owner, and it is explicitly generated code. The header comment instructs developers not to modify it, since a generator appends and maintains the function prototypes. It is a foundational dependency: the ETRM metadata records that 36 other packages reference QP_VALUE_TO_ID, making it one of the more widely consumed internal utilities in the pricing schema. Once a user searches for a term such as list_price_uom, this package is the object that converts the stored UOM value into the identifier the pricing and list-price logic requires.

Key Procedures and Functions

The package exposes 90 documented procedures and functions. The principal entries include:

  • GET_ATTR_TBL — the only procedure; it initializes or returns the internal attribute table used by the generator and the conversion functions, ensuring existing conversion routines are not overridden or duplicated.
  • KEY_FLEX — resolves a key flexfield code, structure number, application short name, and segment array into a numeric identifier.
  • LIST_HEADER, LIST_LINE, LIST_LINE_TYPE, LIST_TYPE — convert pricing list header, line, line type, and list type values into their internal identifiers. These are central to price list resolution.
  • LIST_PRICE_UOM — converts the list price unit of measure value into its corresponding identifier; this is the function most directly associated with the user's list_price_uom search.
  • BASE_UOM — performs the equivalent conversion for the base unit of measure.
  • CURRENCY — maps a currency code to its internal identifier, supporting multi-currency pricing.
  • MODIFIER_LEVEL, DISCOUNT_LINES, PRORATE, GENERATE_USING_FORMULA — convert modifier and discount attribute values used in adjustment and promotion processing.
  • AUTOMATIC, FREIGHT_TERMS, SHIP_METHOD, TERMS — translate order and agreement attribute values such as automatic flag, freight terms, shipping method, and payment terms.
  • AGREEMENT_SOURCE — added for Oracle Order Capture/OKC integration; converts the agreement source value.
  • INVENTORY_ITEM, ORGANIZATION — convert inventory item and organization identifiers used in pricing qualifiers.

Tables Accessed

The ETRM metadata documents two tables referenced through APPS synonyms:

  • QP_QUALIFIER_RULES — the qualifier rule definition table that governs which pricing attributes qualify a modifier or list; the package reads this to validate and resolve qualifier-related values.
  • PLITBLM — the pricing list interface/line table used during list and list-line processing; the package accesses it when resolving list headers, lines, and list price UOM values.

Usage Notes

QP_VALUE_TO_ID is generator-managed code and should never be modified directly; custom conversions must be added through the supported generator mechanism. It is invoked internally by the Advanced Pricing engine, by pricing forms and concurrent programs that accept user-entered code values (such as currency, UOM, list type, and freight terms), and by the 36 dependent packages that require normalized identifiers. When a user enters or searches for a value such as list_price_uom, the corresponding function is called to translate the textual value into the identifier used by downstream pricing logic.