Search Results msc_cust_bucket_v




Overview

MSC_CUST_BUCKET_V is a valid database view owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It belongs to the MSC product family — Advanced Supply Chain Planning — and serves as a specialized, pre-aggregated reporting layer that pivots supply chain planning quantities into discrete business "buckets." Rather than presenting a flat transaction table, the view applies conditional DECODE logic so that a single quantity column in the source data is routed into one of several semantically distinct forecast, commitment, or capacity columns depending on the value of PUBLISHER_ORDER_TYPE.

The view is significant because it respects the MSC multi-organization security model. It calls SYS_CONTEXT('MSC', 'COMPANY_ID') and compares that value against PUBLISHER_ID, CUSTOMER_ID, and SUPPLIER_ID. Planning quantities are therefore returned only for the organization context in which the query executes, and the chosen source column (PRIMARY_QUANTITY, TP_QUANTITY, or QUANTITY) depends on whether the publisher represents the company itself or a trading partner. This makes the view suitable for dashboards, collaborative planning extracts, and downstream integrations that require bucketed demand and supply figures without reimplementing the pivot logic in every report.

Underlying Base Objects

Per the documented 12.2.2 metadata, MSC_CUST_BUCKET_V is defined over three referenced objects:

  • FND_GLOBAL (PACKAGE) — supplies session and security context used by the view's DECODE logic and DBA-layer access checks.
  • MSC_SUP_DEM_ENTRIES_UI_V (VIEW) — the immediate data source supplying publisher, customer, supplier, and quantity columns that MSC_CUST_BUCKET_V pivots into named buckets.
  • MSC_X_UTIL (PACKAGE) — a planning utility package referenced by the view definition.

The view text itself contains no FROM or JOIN clause in the published excerpt; the selection and DECODE expressions are applied against the columns surfaced through MSC_SUP_DEM_ENTRIES_UI_V, making that view the effective row source for the bucketing logic.

Key Columns

The view exposes one column per planning bucket, each returning either the routed quantity or zero. The DECODE chain is identical across columns, differing only by the PUBLISHER_ORDER_TYPE constant being tested:

For each bucket, the routed value is determined by the nested DECODE: when COMPANY_ID equals PUBLISHER_ID, PRIMARY_QUANTITY is returned (this is the key relevance to the searched term "primary_quantity"); otherwise the value resolves through CUSTOMER_ID/SUPPLIER_ID to TP_QUANTITY, falling back to QUANTITY. All other PUBLISHER_ORDER_TYPE values yield 0 for that column.

Common Use Cases and Queries

Typical scenarios include customer collaborative planning extracts, forecast-versus-commitment reconciliation, and safety stock or allocated on-hand reporting by trading partner. A representative query follows:

  • SELECT sales_forecast, order_forecast, supply_commit, safety_stock, allocated_onhand FROM apps.msc_cust_bucket_v;
  • Filter or aggregate to isolate buckets: SELECT SUM(supply_commit) FROM apps.msc_cust_bucket_v WHERE supply_commit <> 0;

Because PRIMARY_QUANTITY is only surfaced when the session's MSC COMPANY_ID matches PUBLISHER_ID, correct session context must be established before querying; otherwise quantity values resolve to TP_QUANTITY or QUANTITY. Reports should also account for PUBLISHER_ORDER_TYPE values of 8 and others that produce zero across all buckets.