Results for “bucket_entries”

16 results




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

Overview

MRP_SCHEDULE is an Oracle E-Business Suite PL/SQL package owned by the APPS schema. It supports the Master Demand Schedule (MDS) and Master Production Schedule (MPS) functionality within Oracle Material Requirements Planning. Its primary responsibility is to populate the MRP_FORM_QUERY table with schedule entries that have been bucketed by work date, allowing the planning forms to display discrete and repetitive schedules correctly. The package classifies schedule information into daily, weekly, and monthly buckets (internally defined as constants TYPE_DAILY_BUCKET, TYPE_WEEKLY_BUCKET, and TYPE_MONTHLY_BUCKET), and it distinguishes quantity perspectives such as current quantity (SYS_YES for yes and TYPE_CURRENT_QTY for current quantity). In short, MRP_SCHEDULE acts as the data-preparation engine that transforms raw schedule records into a query-friendly, bucketed form for downstream planning and reporting.

Key Procedures and Functions

  • BUCKET_ENTRIES — The central routine of the package. It populates MRP_FORM_QUERY by placing demand entries for MDS and supply entries for MPS into the correct work dates. It derives the last calendar date using the MRP calendar, adjusts the start date to the previous valid work day, and handles the daily bucketing transition by inserting schedule rows. The procedure operates on the daily, weekly, or monthly bucket granularity based on the bucket type passed to it.
  • GET_NEXTVAL — A utility function used to obtain the next sequence value, typically required when generating unique identifiers for schedule rows or related query records.
  • GET_COST — A helper function that returns cost information for schedule entries, used where costing context must accompany the schedule display.
  • GET_MAX_BOM_LEVEL — A helper function that determines the maximum bill-of-material level, supporting exploded schedule entries and structured planning views.

The package relies on a cursor named form_query that reads from MRP_FORM_QUERY and orders results by date, and it uses ROWID handling to update or delete schedule rows as part of the bucketing process. The source header indicates the file MRSCHDBB.pls, version 120.1, dated 2005/06/16.

Tables Accessed

  • MRP_FORM_QUERY and MRP_FORM_QUERY_S — The primary working tables. Schedule data is written into MRP_FORM_QUERY so that the MDS/MPS forms can display bucketed results; the _S table provides the database-link or shared variant of the same structure.
  • BOM_CALENDAR_DATES, BOM_CAL_WEEK_START_DATES, and BOM_PERIOD_START_DATES — Provide the calendar and period boundaries needed to bucket daily schedules into weekly and monthly buckets and to validate work dates.
  • BOM_PARAMETERS and MTL_PARAMETERS — Supply organization-level and inventory setup parameters, including the calendar used by mrp_calendar.next_work_day and mrp_calendar.prev_work_day.
  • DUAL — Used for simple scalar evaluations and sequence retrieval.

The package reads schedules and writes derived rows; it does not own the master schedule tables but prepares data for the planning form layer.

Usage Notes

MRP_SCHEDULE is invoked primarily through the MDS/MPS planning forms during online bucket generation, and secondarily from concurrent programs or custom code that needs to refresh MRP_FORM_QUERY for a given schedule designator, organization, and item. Because it is not referenced by other documented packages, it is effectively a leaf utility called directly by form-driven logic. Typical invocation requires a query_id, organization_id, inventory_item_id, bucket type, quantity type, version type, past-due indicator, start date, and cutoff date. Callers must ensure the MRP calendar is populated for the target organization and that the appropriate schedule type is selected so that demand is bucketed for MDS and supply for MPS. Custom integrations should treat it as read-and-refresh logic and avoid concurrent conflicting updates to MRP_FORM_QUERY.