Search Results qp_pte_util




Overview

QP_PTE_UTIL is a utility package in the Oracle E-Business Suite Advanced Pricing (QP) module, classified under the APPS schema as a UTIL-type API. Its name derives from "PTE," which refers to the Pricing Transaction Entity attribute mapping structures exposed through QP_Attr_Map_PUB.Pte_Rec_Type. The package provides the low-level record manipulation, validation, and persistence routines that support the Attribute Mapping setup functionality in Oracle Pricing. Attribute Mapping allows administrators to link pricing attributes (such as qualifiers on price lists, modifiers, and formulas) to the columns of a Pricing Transaction Entity, controlling how source transaction data populates pricing engine attribute values. QP_PTE_UTIL encapsulates the boilerplate PL/SQL logic — record completion, missing-value conversion, dependent attribute handling, and CRUD operations — needed by the higher-level Attribute Mapping API layer.

Key Procedures and Functions

  • CLEAR_DEPENDENT_ATTR — Resets or nullifies dependent attributes on a PTE record when a parent attribute changes, preserving referential consistency within the mapping hierarchy.
  • APPLY_ATTRIBUTE_CHANGES — Applies attribute-level modifications to a PTE record, comparing the new record against the prior (old) record to determine net changes.
  • COMPLETE_RECORD — Returns a fully populated PTE record, filling in defaults and derived values prior to DML or validation.
  • CONVERT_MISS_TO_NULL — Translates FND_API.G_MISS_* sentinel values into database NULLs, a standard pattern in EBS PL/SQL APIs for distinguishing "not supplied" from "explicitly null."
  • UPDATE_ROW — Persists changes to an existing PTE row.
  • INSERT_ROW — Creates a new PTE row.
  • DELETE_ROW — Removes a PTE row identified by its lookup code.
  • QUERY_ROW — Returns a PTE record for a given lookup code.
  • LOCK_ROW — Obtains a row-level lock and returns status, guarding against concurrent updates.
  • GET_VALUES — Retrieves coded values (descriptions, lookups, meanings) required to render or validate a PTE record.
  • GET_IDS — Resolves internal identifiers used by the Attribute Mapping structures.

The package also declares global constants that index into the PTE record's attribute positions: G_DESCRIPTION, G_ENABLED, G_END_DATE_ACTIVE, G_LOOKUP, G_LOOKUP_TYPE, G_MEANING, G_START_DATE_ACTIVE, and G_MAX_ATTR_ID. The constant G_END_DATE_ACTIVE marks the position of the end-date-active attribute within the record, allowing callers to reference it by symbolic name rather than a hard-coded index — relevant when enforcing effective-dating on attribute mappings.

Tables Accessed

The ETRM metadata does not enumerate specific base tables. Functionally, QP_PTE_UTIL operates on the Attribute Mapping repository tables (the QP_ATTR_MAP family) through the QP_Attr_Map_PUB record type. Its CRUD procedures read and write the row corresponding to a given lookup code, while LOCK_ROW and QUERY_ROW perform retrieval and concurrency control on those same rows. Effective-date columns represented by G_START_DATE_ACTIVE and G_END_DATE_ACTIVE are maintained as part of the stored attribute definition.

Usage Notes

QP_PTE_UTIL is not intended for direct invocation by end users. It is a supporting utility layer called by three other documented packages, most notably the Attribute Mapping public API (QP_Attr_Map_PUB) and the corresponding Attribute Mapping form handler. Direct calls should be avoided in customizations; developers extending pricing attribute setup should use the published API instead. The package was last revised under header QPXUPTES.pls 120.1 (June 2005) and remains present in both 12.1.1 and 12.2.2. Because the file.sql.39 comment appears on OUT NOCOPY parameters, the package has been patched to remove NOCOPY semantics for file SQL compliance on certain platforms, a common EBS 11i-to-R12 porting artifact.