Search Results raise_gsa_error
Overview
QP_PREQ_PUB (Price Request) is a public PL/SQL package in the APPS schema that exposes the Oracle Advanced Pricing pricing engine to calling applications across Oracle E-Business Suite. Its central purpose is to package caller-supplied request information—item, customer, pricing attributes, quantity, currency, and dates—into a form the pricing engine can consume, then return calculated prices, adjustments, and line-level status back to the caller. In Oracle EBS 12.1.1 and 12.2.2, this package is fundamental to order capture, quoting, and any module requiring real-time price determination. It is classified as a public API (PUB), meaning Oracle supports its invocation from external code, unlike private internal packages. The specification header indicates it is maintained under the QP product and carries the business entity categories QP_PRICE_LIST, QP_PRICE_MODIFIER, QP_PRICE_QUALIFIER, and QP_PRICE_FORMULA. The package defines numerous status constants—including G_STATUS_GSA_VIOLATION ('GSA'), G_STATUS_CALC_ERROR ('CALC'), G_STATUS_FORMULA_ERROR ('FER'), and G_STATUS_UOM_FAILURE—that communicate pricing outcomes to callers. Constants such as G_GSA_INDICATOR and G_LICENSED_FOR_PRODUCT support Government Supply Schedule (GSA) compliance logic that enforces contract price restrictions.
Key Procedures and Functions
The documented interface exposes thirteen procedures and functions:
- PRICE_REQUEST — The primary entry point that submits a complete pricing request to the engine and orchestrates the calculation cycle.
- CALCULATE_PRICE — Performs the core price computation for a line, returning the derived price and applicable adjustments.
- UPDATE_UNIT_PRICE — Writes the engine-determined unit price back to the calling line records.
- UPDATE_LINE_STATUS — Persists the pricing status code (e.g., 'GSA', 'CALC', 'FER') against the affected line.
- UPDATE_CHILD_BREAK_LINES — Refreshes dependent break (tier) lines when a parent price component changes.
- UPDATE_PASSED_IN_PBH — Updates passed-in price book header information during processing.
- CHECK_GSA_VIOLATION — Evaluates whether the calculated price contravenes GSA/contract pricing rules.
- RAISE_GSA_ERROR — Signals a GSA violation error to the caller when a restricted price condition is detected.
- DETERMINE_SVC_ITEM_QUANTITY — Derives the effective quantity for service items, which often differ from shippable goods.
- GET_ORDERQTY_VALUES — Retrieves ordered quantity values used in price calculation.
- GET_PRICE_FOR_LINE — Returns the price associated with a specific order or quote line.
- GET_BUY_LINE_PRICE_FLAG — Returns a flag indicating whether a buy-side line price is available.
Tables Accessed
The package references several tables through APPS synonyms. Customer context is drawn from HZ_CUST_ACCOUNTS, HZ_CUST_SITE_USES_ALL, and HZ_PARTIES. Pricing setup and results reside in QP_LIST_HEADERS_B, QP_LIST_LINES, QP_QUALIFIERS, QP_PRICING_PHASES, QP_EVENT_PHASES, QP_PRICING_ATTRIBUTES, and QP_PRICE_REQ_SOURCES, which together supply qualifier, pricing phase, and attribute information required for calculation. Adjustment results are written to or read from OE_PRICE_ADJUSTMENTS and OE_PRICE_ADJ_ASSOCS. QP_LIMIT_PRICE_REQUEST_CODE_S supports the limit price request sequence. DBMS_UTILITY and DUAL are used for internal utility and singleton queries.
Usage Notes
QP_PREQ_PUB is invoked from Oracle Order Management and Quoting forms during order entry, from concurrent programs, and from custom applications performing programmatic price calculation. Because it is a public API, custom code may call it directly, though callers must populate the request structures and interpret the returned status constants correctly, handling GSA violations and calculation errors appropriately. The package is referenced by forty-two other packages, underscoring its central role. When upgrading between 12.1.1 and 12.2.2, callers should verify parameter compatibility, as signatures can evolve across releases.