Search Results qp_seg_util




Overview

QP_SEG_UTIL is a utility package body in the APPS schema that supports the Oracle Advanced Pricing segmentation framework. In Oracle EBS 12.1.1 and 12.2.2, pricing qualifiers, pricing attributes, and related entities are stored in normalized segmented tables (for example, QP_SEGMENTS_B and QP_SEGMENTS_TL). QP_SEG_UTIL provides the low-level, reusable operations needed to read, write, and validate rows in these segmented structures without requiring calling code to manage the underlying table mechanics directly.

The package is classified as a UTIL API, indicating that it is not a public, user-facing business API but rather an internal building block consumed by other pricing packages. It is documented as being referenced by four other database objects, confirming its role as a shared dependency within the Advanced Pricing module. It does not itself reference downward into custom objects; all of its dependencies are standard Oracle EBS components.

Key Procedures and Functions

The documented interface exposes twelve procedures and functions that operate on segmented pricing data:

  • CLEAR_DEPENDENT_ATTR — Clears dependent attribute values, typically when a controlling attribute changes and previously derived values are no longer valid.
  • APPLY_ATTRIBUTE_CHANGES — Applies pending attribute changes to the segment record, reconciling the supplied values with the stored representation.
  • COMPLETE_RECORD — Populates or finalizes a segment record, filling in values required for a complete, valid row.
  • CONVERT_MISS_TO_NULL — Normalizes missing-value placeholders into proper null values, ensuring the segment record conforms to expected storage conventions.
  • UPDATE_ROW — Updates an existing segment row.
  • INSERT_ROW — Inserts a new segment row.
  • DELETE_ROW — Removes a segment row.
  • QUERY_ROW — Retrieves a single segment row.
  • QUERY_ROWS — Retrieves a set of segment rows based on supplied criteria.
  • LOCK_ROW — Acquires a row-level lock to support concurrency control during modification.
  • GET_VALUES — Translates internal identifiers into their human-readable values, using the pricing value-to-id conversion infrastructure.
  • GET_IDS — Performs the inverse translation, converting displayed values into internal identifiers.

Tables Accessed

QP_SEG_UTIL accesses the following documented tables through APPS synonyms:

  • QP_SEGMENTS_B and QP_SEGMENTS_TL — the base and translation tables holding segmented pricing records; these are the primary targets of the insert, update, delete, and query operations.
  • QP_PRC_CONTEXTS_B — the pricing context definition table, consulted to determine the valid contexts and attributes that govern a segment record.
  • FND_DESCR_FLEX_COLUMN_USAGES — the descriptive flexfield column usage table, used to map segment attributes to their flexfield storage.
  • FND_LANGUAGES — the installed-languages table, used when retrieving translated (TL) segment data.
  • PLITBLM — the standard PL/SQL index-by table of VARCHAR2 used internally for bulk processing of values and identifiers.

Usage Notes

QP_SEG_UTIL is an internal utility invoked by other Advanced Pricing packages rather than directly by end users. Its primary consumers are packages such as QP_ATTRIBUTES_PUB, which use its row manipulation and value/ID conversion routines when maintaining pricing attributes and qualifiers. Because it is documented as referenced by four database objects, customizations should treat it as a shared dependency and avoid modifying its behavior.

The package depends on the FND_API, FND_MESSAGE, and FND_FLEX_DSC_API foundation packages, and on APP_EXCEPTIONS for error handling, so it participates in the standard EBS API error-stack conventions. Custom code that needs to manipulate segmented pricing records can call these procedures, but should do so in preference to direct DML against QP_SEGMENTS_B and QP_SEGMENTS_TL, since the package centralizes flexfield, translation, and missing-value handling. Callers should invoke LOCK_ROW before UPDATE_ROW or DELETE_ROW where concurrent access is possible.