Search Results calendar_next_work_day
Overview
MSC_CALENDAR is an Oracle Advanced Supply Chain Planning (ASCP) utility package owned by APPS and classified as a miscellaneous (OTHER) API within the ETRM repository for EBS 12.1.1 and 12.2.2. Its central purpose is to provide a single, consistent abstraction over the manufacturing and shipping calendars defined in the MSC schema. Planning engines, exception logic, and delivery-scheduling routines all need to answer the same class of question: given a date, an organization, and a planning instance, what is the next working day, how many working days separate two dates, or which calendar applies to a given item and trading partner? MSC_CALENDAR answers these questions without forcing every caller to re-implement calendar resolution logic.
The package is declared AUTHID CURRENT_USER and carries a header dated 2008, indicating it has been a stable component of the planning codebase across multiple releases. The presence of global bucket-type constants (daily, weekly, monthly) and shipping-calendar constants (SMC, SSC, ORC, OMC, OSC, CRC) shows it was extended over time to support the ship-receipt calendar project in addition to core workday arithmetic.
Key Procedures and Functions
- NEXT_WORK_DAY / PREV_WORK_DAY — Return the next or previous working day relative to a supplied date, resolved for a specific organization, instance, and bucket.
- DATE_OFFSET — Advances or rewinds a date by a caller-supplied number of working days according to the applicable calendar.
- DAYS_BETWEEN — Returns the count of working days separating two dates, honoring calendar exceptions and bucket type.
- SELECT_CALENDAR_DEFAULTS — Resolves and returns the applicable calendar code and exception set identifier for an organization and instance; this is the routine that answers the
get_calendar_codestyle of inquiry. - PREV_DELIVERY_CALENDAR_DAY — Identifies the prior valid delivery day using an explicit calendar code and exception set, supporting shipping and receipt scheduling.
- CALENDAR_NEXT_WORK_DAY and CALENDAR_DAYS_BETWEEN — Variants that accept a calendar code directly, bypassing default resolution when the caller already knows the calendar.
- GET_CALENDAR_CODE — Returns the calendar code applicable to the supplied planning context, allowing downstream code to persist or reuse the resolved value.
- THREE_STEP_CAL_OFFSET_DATE — Performs a multi-step calendar date offset, used where a single workday shift is insufficient.
Tables Accessed
- MSC_CALENDARS and MSC_CALENDAR_ASSIGNMENTS — Define calendars and map them to organizations, instances, and partners.
- MSC_CALENDAR_DATES — Holds individual working/non-working dates and exceptions.
- MSC_CAL_WEEK_START_DATES and MSC_PERIOD_START_DATES — Supply weekly and monthly bucket boundaries.
- MSC_ITEM_SUPPLIERS and MSC_TRADING_PARTNERS — Used to resolve supplier- and partner-specific calendars for delivery scheduling.
Usage Notes
MSC_CALENDAR is an internal planning utility rather than an end-user API. It is referenced by 29 other packages in the MSC schema, which is the dominant invocation path: planning, scheduling, and exception-generation code calls these functions to translate between raw dates and working-day sequences. It is not typically bound to a form or a standalone concurrent program, though concurrent planning managers indirectly exercise it through the packages they invoke. Custom extensions that need to compute lead times, delivery windows, or planning horizons in working-day terms should call these functions rather than querying MSC_CALENDAR_DATES directly, since the package encapsulates profile-option handling (notably MSC_BKT_REFERENCE_CALENDAR) and exception-set resolution. Callers should supply a valid organization, instance, and bucket combination; supplying a calendar code directly through the CALENDAR_* variants avoids repeated default resolution and is the preferred approach in high-volume loops.
-
PACKAGE: APPS.MSC_CALENDAR
12.2.2
-
PACKAGE: APPS.MSC_CALENDAR
12.1.1
-
PACKAGE BODY: APPS.MSC_CALENDAR
12.1.1
-
PACKAGE BODY: APPS.MSC_CALENDAR
12.2.2
-
APPS.MSC_CALENDAR dependencies on APP_EXCEPTION
12.1.1
-
APPS.MSC_CALENDAR dependencies on APP_EXCEPTION
12.2.2
-
APPS.MSC_CALENDAR dependencies on FND_MESSAGE
12.1.1
-
APPS.MSC_CALENDAR dependencies on FND_MESSAGE
12.2.2