Results for “db_flag”

16 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OE_AK_LINE_SCREDITS_V is a read-only view owned by the APPS schema in Oracle E-Business Suite, registered under the ONT (Order Management) product family. Its name follows the Oracle "AK" interface-view convention used by the Oracle Order Management publish/subscribe and EDI/integration layer, which exposes order entities in a flattened, interface-ready format. The view presents sales-credit assignments for order lines — that is, the sales representatives credited against a given line and their respective credit percentages — together with the descriptive flexfield context (CONTEXT and ATTRIBUTE1 through ATTRIBUTE15) and the standard WHO audit columns. Because the view is a straight projection over a single base object with no complex joins or aggregations, it is lightweight and suitable for downstream reporting, data extraction, and interface staging rather than for transactional updates.

The status of the object is VALID, and in 12.1.1 and 12.2.2 the definition is materially identical; the ONT data model for sales credits was not restructured between these releases, so no compatibility concerns arise when migrating reports or extracts between the two versions.

Underlying Base Objects

The view is defined exclusively over OE_SALES_CREDITS, referenced through a synonym. This is the transactional table that stores one row for each sales-credit assignment against an order line, keyed at the line level and linked to SALES_CREDIT_TYPE_ID to identify the credit role (for example, quota or non-quota salesperson). Because the view inherits no outer joins, every row returned corresponds one-to-one with a row in OE_SALES_CREDITS, subject to any view-level column transformations only. There are no exposed joins to OE_ORDER_HEADERS_ALL or OE_ORDER_LINES_ALL within the view itself; HEADER_ID and LINE_ID are carried as denormalized foreign keys, and callers must join to the order tables separately when header or line attributes are required.

The view also appends several derived columns that do not exist physically on the base table. These include RETURN_STATUS, DB_FLAG, OPERATION, and LINE_INDEX, generated through RPAD expressions and a constant, consistent with Oracle's interface-view pattern for publication and concurrency signaling. DB_FLAG in this context is a derived status/change indicator used by the integration layer, not a column of OE_SALES_CREDITS; users searching for "db_flag" should note that its value is computed by the view rather than maintained in the base table.

Key Columns

  • SALES_CREDIT_ID — Primary identifier for the sales-credit row.
  • HEADER_ID, LINE_ID — Foreign keys to the order header and order line; the join anchors to Order Management.
  • SALESREP_ID — The credited salesperson identifier; the view text wraps this in TO_NUMBER(TO_CHAR(...)) to normalize its type for interface consumption.
  • SALES_CREDIT_TYPE_ID — Credit role/type lookup reference.
  • PERCENT — The percentage of the line credit allocated to that salesperson; usable for split-credit reporting.
  • CONTEXT, ATTRIBUTE1–ATTRIBUTE15 — Descriptive flexfield context and segments for OE_SALES_CREDITS.
  • DW_UPDATE_ADVICE_FLAG, WH_UPDATE_DATE — Data-warehouse update advice and warehouse timestamp columns supporting incremental extraction.
  • LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY — Standard auditing columns.
  • RETURN_STATUS, DB_FLAG, OPERATION, LINE_INDEX — Derived interface-control columns generated by the view definition.

Common Use Cases and Queries

Typical usage is to retrieve credit splits for order lines, to feed commissions or quota reporting, and to drive interface extracts.

  • Credits for a specific line:
    SELECT salesrep_id, sales_credit_type_id, percent
    FROM   oe_ak_line_scredits_v
    WHERE  line_id = :p_line_id;
  • Credit totals by salesperson, including the flexfield attributes:
    SELECT salesrep_id, SUM(percent) pct_total
    FROM   oe_ak_line_scredits_v
    GROUP  BY salesrep_id;
  • Incremental extract driven by the warehouse advice flag:
    SELECT sales_credit_id, line_id, salesrep_id, wh_update_date
    FROM   oe_ak_line_scredits_v
    WHERE  dw_update_advice_flag = 'Y';
  • Flexfield attribute filtering:
    SELECT line_id, attribute1
    FROM   oe_ak_line_scredits_v
    WHERE  context = :ctx AND attribute1 = :val;

Because the view exposes no base-table updatable key and derives control columns, it should be treated as read-only; DML must be issued against OE_SALES_CREDITS or through the supported Order Management APIs.