Search Results get_user_item_pricing_contexts




Overview

QP_ATTR_MAPPING_PUB is a public PL/SQL package in the APPS schema that supports the Oracle Advanced Pricing attribute-sourcing and context-generation framework. Its central business purpose is to translate pricing attribute definitions and sourcing rules into the runtime context structures that Oracle Pricing uses when evaluating price lists, modifiers, formulas, and limits. The package declares AUTHID CURRENT_USER and carries MOAC support through the G_ORG_ID global, reflecting its role in a multi-org enabled pricing environment. It also maintains internal state through globals such as g_dynamic_mapping_needed and g_dynamic_mapping_count, which govern whether dynamic attribute mapping must be rebuilt and how many mappings have been processed.

A defining characteristic of the package is the collection of PL/SQL record and table types it publishes. These include Contexts_Result_Rec_Type and its associated Contexts_Result_Tbl_Type, along with Sourced_Contexts_Rec_Type, Sourced_Contexts_Tbl_Type, New_Sourced_Contexts_Rec_Type, New_Sourced_Contexts_Tbl_Type, t_Segment_Ctr, t_MultiRecord, and the user-attribute pair. These types define the contracts through which callers pass and receive pricing context and sourcing information. The user search term contexts_result_tbl_type corresponds directly to the Contexts_Result_Tbl_Type collection, an index-by table of context name, attribute name, and attribute value records.

Key Procedures and Functions

The package exposes twenty-one documented procedures and functions. Several are utility routines: PUT_LINE, PRINT_LINE, NEW_LINE, COMMENT, and TEXT provide formatted output and diagnostic logging, while PKG_HEADER and PKG_END bracket generated source output. INIT_APPLSYS_SCHEMA initializes the schema context used during generation.

Tables Accessed

The package reads pricing and flexfield metadata through APPS synonyms. Attribute and context definitions are drawn from QP_PRC_CONTEXTS_B, FND_DESCR_FLEX_CONTEXTS, and QP_ATTRIBUTE_SOURCING. Pricing rule structures are read from OE_DEF_ATTR_CONDNS, OE_DEF_ATTR_DEF_RULES, OE_DEF_CONDITIONS, and OE_DEF_CONDN_ELEMS. Price list and modifier data come from QP_LIST_LINES, QP_ADV_MOD_PRODUCTS, QP_PRICE_FORMULA_LINES, QP_LIMITS, QP_LIMIT_ATTRIBUTES, QP_PARAMETERS_B, QP_EVENT_PHASES, and QP_CURRENCY_DETAILS.

Usage Notes

QP_ATTR_MAPPING_PUB is referenced by 42 other packages, making it a foundational dependency for pricing attribute mapping. It is typically invoked during pricing setup and upgrade processes, when attribute sourcing rules change, or when contexts must be regenerated. Callers pass and receive the documented record and table types, most notably Contexts_Result_Tbl_Type, to obtain the resolved context name, attribute name, and attribute value triplets used by the pricing engine. Custom code extending Advanced Pricing should treat the package as a read-oriented metadata utility rather than modifying its generated artifacts directly.