Search Results insert_adjs_from_iface
Overview
OE_BULK_PRICEORDER_PVT is an internal (private) PL/SQL package in the Oracle Order Management (OM) module, owned by the APPS schema and defined with AUTHID CURRENT_USER. It provides the bulk pricing engine used when large volumes of order headers and lines must be priced and credit-checked in a single processing pass, most notably through the Order Import (Bulk Import) path. The package operates on the in-memory PL/SQL records maintained by lower-level bulk utilities rather than on single transactional forms.
A central design point of this package concerns the g_header_rec global record, which the source comments explicitly identify as the authoritative in-memory representation of a header. OE_BULK_HEADER_UTIL.Insert_Headers always writes booked_flag = 'N' to the database, but the g_header_rec global always holds the correct, current booked flag. The package header (version 120.0.12010000.1, dated 2008) exposes six documented procedures that drive pricing adjustment insertion, order pricing, credit checking, and the recalculation of pricing flags on both header and line records.
Key Procedures and Functions
- INSERT_ADJS_FROM_IFACE — Inserts price adjustment records originating from the bulk interface (identified by a batch ID) into the pricing adjustment tables, returning a return status to the caller.
- PRICE_ORDERS — The core pricing routine. It consumes a header record and a line record (both
IN OUT NOCOPY) to price the order, and receives a flag indicating whether adjustments already exist. It returns a status to the caller. - CREDIT_CHECK — Performs credit checking across a set of orders. Per the embedded comments, it loops one by one through
G_HEADER_REC, updates the database headerbooked_flagto 'BOOKED', and then runs the credit check for each order. It is invoked before processing the acknowledgment. - SET_CALC_FLAG_INCL_ITEM — Sets the "calculate inclusive of item" flag on a line record at a specified index, controlling how item-level amounts participate in calculation.
- SET_PRICE_FLAG — Sets the pricing flag on a line record using the supplied index and header counter, marking the line for pricing action.
- SET_HDR_PRICE_FLAG — Sets the pricing flag on the header record, indicating that the header requires pricing.
The package also declares a constant, G_SEED_GSA_HOLD_ID (value 2), used for seed GSA hold handling. Note that no parameter lists are reproduced here; only documented purposes.
Tables Accessed
The package reads and writes the principal OM pricing and order tables through APPS synonyms:
- OE_ORDER_HEADERS and OE_ORDER_HEADERS_ALL — order header data and booked_flag updates during credit check.
- OE_ORDER_LINES — line-level pricing data.
- OE_PRICE_ADJUSTMENTS, OE_PRICE_ADJ_ASSOCS/_S, and OE_PRICE_ADJ_ATTRIBS/_S — insertion and association of price adjustments created from the interface.
- QP_LIST_HEADERS_B and QP_LIST_LINES — Advanced Pricing list/qualifier data used to resolve adjustments.
- PLITBLM — the pricing list index table used in bulk pricing lookups.
- ONT_DBI_CHANGE_LOG — change-log capture for bulk order processing.
- V$TIMER — timing/metrics reference.
Usage Notes
OE_BULK_PRICEORDER_PVT is a PVT (private) package and is not a public API; it is referenced internally by three other packages rather than called directly by forms or standard public interfaces. It is typically invoked during bulk order import and pricing concurrent program runs, where headers and lines are staged and then priced and credit-checked in bulk. Because it is private and its header record type is shared with OE_BULK_ORDER_PVT, customizations should not depend on it directly; instead, use supported public OM APIs. In Oracle EBS 12.1.1 and 12.2.2, the package remains part of the OM bulk processing infrastructure. Understanding g_header_rec is essential for troubleshooting booked-flag discrepancies, since the in-memory global — not the database column — is the source of truth until credit check synchronizes them.