Search Results qp_sourcing_api_pub




Overview

QP_SOURCING_API_PUB is a public PL/SQL API package in the Oracle Advanced Pricing (QP) module of Oracle E-Business Suite. Its role is to expose pricing and sourcing attributes — customer details, item identifiers, order volumes, agreement types, and site uses — to Oracle Advanced Pricing qualifier and modifier logic, so that pricing rules can be evaluated against the correct transactional context. The package header originates from the 2005 QPXPSAPS.pls source and remains a documented public API in both 12.1.1 and 12.2.2. Though the package header file carries a "noship" designation, indicating it is not a standalone shipped unit of the pricing engine, the package is catalogued by ETRM as an owner-APPS public API with 44 documented procedures and functions, and is referenced by zero other packages, making it a terminal API typically invoked directly by forms, pricing engine internals, or custom extensions.

Key Procedures and Functions

The documented API surface covers several functional groupings:

  • Get_Customer_Item_Id — the function the user searched for — accepts an item type and an ordered item identifier and resolves them to a customer item identifier. This supports customer-specific item numbering used in pricing and ordering.
  • Get_Customer_Info — populates customer context, populating the Customer_Info_Rec_Type record with customer_id, customer_class_code, sales_channel_code, gsa_indicator, account_types, and customer_relationships.
  • Get_Sales_Channel, Get_Customer_Class, Get_Account_Type, Get_Customer_Relationship — individual customer-attribute retrievals used by pricing qualifiers.
  • Get_Site_Use — returns a multi-record structure for invoice-to and ship-to organization combinations.
  • Get_Item_Category, Get_Item_Segment — item classification and segment retrieval, backed by the Item_Segments_Rec_Type (inventory_item_id plus segment1 through segment20).
  • Get_Order_Amt_And_Qty, Get_Order_Amount, Get_Order_Qty, Get_Period1/2/3_Item_Quantity, Get_Period1/2/3_Item_Amount, Get_Period1/2/3_Order_Amount — order history and period-based volume retrievals supporting volume-based pricing and loyalty qualifiers.
  • Get_Agreement_Type — resolves agreement context from the Agreement_Info_Rec_Type (agreement_id and agreement_type_code).

The supporting record types declared in the header (Customer_Info_Rec_Type, Order_Info_Rec_Type, Site_Use_Rec_Type, Agreement_Info_Rec_Type, Item_Segments_Rec_Type) define the shape of data returned by these calls.

Tables Accessed

The package reads from a defined set of APPS-synonym tables, principally TCA (Trading Community Architecture) customer tables — HZ_CUSTOMER_PROFILES, HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_RELATE, HZ_CUST_ACCT_SITES, HZ_CUST_SITE_USES, and HZ_PARTIES — for customer and site data. Item data comes from MTL_SYSTEM_ITEMS. Order and volume data comes from OE_ORDER_LINES / OE_ORDER_LINES_ALL, OE_CUST_TOTAL_AMTS, and OE_ITEM_CUST_VOLS. Agreement data is drawn from OE_AGREEMENTS, and PLITBLM is referenced. Collectively, these tables supply the qualifier and modifier attributes the pricing engine requires.

Usage Notes

QP_SOURCING_API_PUB is typically invoked from Oracle Advanced Pricing qualifier setup, pricing engine internal evaluation, or custom PL/SQL code that must resolve customer, item, order, or agreement context. Because it is a PUB (public) API, its signature is considered stable, but it is not directly referenced by other packages, so calls are made directly from forms, concurrent programs, or bespoke integrations. When using Get_Customer_Item_Id, callers should supply the correct item type and ordered item identifier and handle a NULL return for customers lacking a specific item mapping.