Search Results qp_default_seg




Overview

QP_DEFAULT_SEG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified in the ETRM repository as a member of the Oracle Advanced Pricing (QP) module. The package name derives from "Default Segment," and its purpose is to supply defaulting logic for attribute segments used in Oracle Advanced Pricing's pricing engine, specifically the qualifier and modifier attribute model managed through the QP_Attributes_PUB public API.

In Advanced Pricing, qualifiers and modifiers are defined by sets of attribute segments that determine eligibility and computation for price lists, discounts, surcharges, and promotions. Each segment carries a set of attribute values that must be populated or defaulted before the pricing engine can evaluate a transaction line. QP_DEFAULT_SEG encapsulates the rules that produce a defaulted segment record given an input segment record and an iteration indicator, centralizing the defaulting logic so that all calling components resolve attribute defaults consistently. The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema rather than the defining schema, which is consistent with other Oracle Applications public-style packages.

Key Procedures and Functions

The package exposes a single documented procedure:

  • Attributes — Accepts an input segment record of type QP_Attributes_PUB.Seg_Rec_Type together with an iteration number, and returns a defaulted segment record of the same type through an OUT NOCOPY parameter. The procedure is the sole documented entry point of the package and represents the core defaulting behavior. The default value for the input segment record is QP_Attributes_PUB.G_MISS_SEG_REC, the standard missing-record constant used across the QP attribute APIs, and the iteration parameter defaults to 1. The OUT NOCOPY signature avoids the copy overhead associated with large PL/SQL record types and follows the file.sql.39 change convention documented in the header comment.

No functions are documented in the ETRM metadata for this package.

Tables Accessed

ETRM records two referenced objects, both accessed through APPS synonyms:

  • QP_SEGMENTS_S — This is the sequence used to generate primary keys for the QP_SEGMENTS table, which stores the attribute segment definitions that drive qualifier and modifier evaluation. The package references the sequence to obtain the next segment identifier when constructing or defaulting a segment record.
  • DUAL — The standard Oracle single-row utility table, used to evaluate expressions such as sequence NEXTVAL or simple scalar computations within PL/SQL, ensuring single-row evaluation semantics.

The metadata does not indicate any DML against pricing attribute tables within this package, which is consistent with a defaulting utility whose contract is to populate an in-memory record that the caller subsequently persists.

Usage Notes

QP_DEFAULT_SEG is an internal helper rather than an end-user API. ETRM records that it is referenced by one other application package, indicating it is invoked from within the Advanced Pricing attribute-processing code path rather than directly from forms or concurrent programs. Typical invocation occurs during pricing setup operations in Oracle Pricing Manager, where a qualifier or modifier attribute is created or validated and the attribute segment record must be populated with default values before being passed to QP_Attributes_PUB for persistence.

Because the package is AUTHID CURRENT_USER, any custom code invoking it must ensure that the calling schema holds the necessary synonyms and grants on QP_SEGMENTS_S and the QP attribute objects. Since the procedure relies on the documented record types from QP_Attributes_PUB, callers should reference those types directly rather than redefining structures. Given the restricted header revision (120.1, dated 2005) and the single documented procedure, the package should be regarded as a stable, narrowly scoped defaulting utility whose behavior is tightly coupled to the Advanced Pricing attribute segment model.