Search Results qp_preq_rltd_lines_tmp




Overview

QP_PREQ_RLTD_LINES_TMP is an APPS-owned, VALID database view within the Oracle Advanced Pricing (QP) module. It is documented as being based on the underlying table QP_PREQ_RLTD_LINES_TMP_T and is described in the ETRM metadata as holding "the information pertaining to the current pricing engine call." In practical terms, the view exposes the transient, in-session working data that the Advanced Pricing pricing engine generates while evaluating related line relationships during a pricing request — for example, when deriving a price for a parent line and its associated child, component, or prerequisite lines.

Because its name carries the "_TMP" suffix, the object is a temporary staging structure rather than a permanent transactional entity. Rows are scoped to the active pricing engine invocation, and the view is filtered on REQUEST_ID, resolving to the value stored in the QP_CONTEXT application context under the key 'REQUEST_ID', defaulting to 1 when no context value is present. This design isolates each concurrent pricing call's related-line results so that consumers only see the lines belonging to the current request, which is essential in a multi-user, multi-concurrent-request environment. The view therefore serves reporting, debugging, and integration purposes where the intermediate results of pricing engine processing of related lines must be inspected or consumed programmatically.

Underlying Base Objects

The view is defined over a single documented base object, QP_PREQ_RLTD_LINES_TMP_T, which is referenced through a synonym and aliased as QPT in the view definition. The view is a straightforward projection: every column exposed by QP_PREQ_RLTD_LINES_TMP corresponds directly to a column of the same name in QP_PREQ_RLTD_LINES_TMP_T, with no joins, derivations, or aggregations applied.

The only transformation is the WHERE clause, which restricts the result set to rows matching the current pricing request:

  • Filter predicate: WHERE REQUEST_ID = NVL(SYS_CONTEXT('QP_CONTEXT', 'REQUEST_ID'), 1)
  • Purpose: to scope the temporary related-line data to the active pricing engine call identified by the QP_CONTEXT namespace.
  • Fallback: when the QP_CONTEXT 'REQUEST_ID' is not set, the predicate returns rows where REQUEST_ID equals 1.

Consequently, the view does not add business logic beyond context-based filtering; it presents the base table's related-line data in a session-aware manner. Any change to the underlying _TMP_T table's structure is inherited by the view.

Key Columns

The view exposes twenty-one columns carried over from QP_PREQ_RLTD_LINES_TMP_T. Those most relevant to the pricing engine and the user's search term are described below.

Common Use Cases and Queries

The view is typically queried to diagnose how related lines were priced within the current pricing engine call, to verify operand calculation behavior, or to feed related-line results into downstream integrations. A basic query selecting the view's own columns returns only rows for the active QP_CONTEXT request:

  • SELECT line_index, related_line_index, relationship_type_code, operand_calculation_code, operand, adjustment_amount FROM qp_preq_rltd_lines_tmp;
  • SELECT request_type_code, pricing_status_code, operand_calculation_code, operand, satisfied_range_value FROM qp_preq_rltd_lines_tmp WHERE request_type_code = :p_request_type;
  • SELECT line_index, related_line_index, list_line_id, related_list_line_id, pricing_group_sequence FROM qp_preq_rltd_lines_tmp ORDER BY pricing_group_sequence;

Because the view is context-filtered, callers that need data for a specific request must ensure the QP_CONTEXT 'REQUEST_ID' is set appropriately, or explicitly query the base table QP_PREQ_RLTD_LINES_TMP_T with an explicit REQUEST_ID predicate. Data should be treated as transient and temporary: it reflects the current pricing engine invocation and should not be relied upon as a persistent historical record.