Results for “next_seq_num”

4 results




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

Overview

MRP_AP_SHIFT_DATES_V is a reporting and analytical view within the Oracle E-Business Suite Master Scheduling / Material Requirements Planning (MRP) module. It exposes the shift-level date sequencing maintained for a given calendar and exception set, allowing callers to traverse the chronological relationship between consecutive shifts — each row carries the current shift date alongside the dates and sequence numbers of the immediately preceding and following shifts. This makes the view particularly valuable for capacity planning, lead-time offset calculations, and any process that must reason about "the previous working shift" or "the next working shift" relative to a reference point.

The presence of the PRIOR_SEQ_NUM column is significant: it is the attribute most commonly searched for by implementers building backward-through-time scheduling logic, since shift-based sequencing is the granularity at which repetitive manufacturing and certain capacity engines operate. The view therefore acts as a lightweight navigation map over the shift calendar without requiring the caller to re-derive neighbour rows through self-joins or analytic functions.

Underlying Base Objects

The view is defined over MRP_AP_SHFT_DATES_SN, joined to an inline aggregate derived from MRP_AP_MTL_PARAS_SN (aliased MTLP) and MRP_AP_MRP_PARAS_SN (aliased MP). The inline subquery groups by CALENDAR_CODE and CALENDAR_EXCEPTION_SET_ID, exposing MAX(MTLP.RN) as RN2 and MAX(MP.RN) as RN1. These correlate to the RN3, RN2, and RN1 columns projected in the outer query (RN3 being X.RN from MRP_AP_SHFT_DATES_SN).

The join condition matches X.CALENDAR_CODE to Y.CALENDAR_CODE and X.EXCEPTION_SET_ID to Y.CALENDAR_EXCEPTION_SET_ID. Although the ETRM metadata lists no formally documented referenced base objects, the view text makes clear that the _SN suffixed tables are its physical dependencies. Notably, the documented metadata states the view is "Not implemented in this database," meaning it should be treated as a data-model artifact rather than a guaranteed runtime object in every environment.

Key Columns

  • CALENDAR_CODE / EXCEPTION_SET_ID — Identify the manufacturing calendar and its exception set, forming the join key across all underlying objects.
  • SHIFT_NUM — The ordinal number of the shift within the calendar.
  • SHIFT_DATE — The effective date on which the shift occurs.
  • SEQ_NUM — The sequence position of the current shift row.
  • PRIOR_SEQ_NUM — Sequence number of the preceding shift; the primary attribute for backward navigation.
  • NEXT_SEQ_NUM — Sequence number of the following shift.
  • PRIOR_DATE / NEXT_DATE — The calendar dates of the preceding and following shifts, enabling date arithmetic without recursion.
  • RN1, RN2, RN3 — Rank-style values derived from the parameter tables, supporting ordering and filtering.

Common Use Cases and Queries

A typical use is locating the shift immediately preceding a given date for backward-scheduling:

  • SELECT SHIFT_DATE, PRIOR_DATE, PRIOR_SEQ_NUM FROM MRP_AP_SHIFT_DATES_V WHERE CALENDAR_CODE = :cal AND EXCEPTION_SET_ID = :es AND SHIFT_DATE = :ref_date;

Because the view already materialises neighbour relationships, it removes the need for LAG/LEAD analytic rewrites. A forward-looking variant selects NEXT_DATE and NEXT_SEQ_NUM for offsetting operation start dates. Aggregation queries can count available shifts per calendar to validate capacity windows. Implementers should confirm view availability in their specific release, since the metadata flags it as not implemented in the documented database.