Search Results src_date_offset
Overview
MSC_SATP_FUNC is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, belonging to the Advanced Supply Chain Planning (ASCP) and available-to-promise (ATP) product family. Its documented purpose is the calculation of delivery lead time at the source, which is the time required to fulfill a planned order or demand from a given source location to a destination. In the context of Oracle EBS 12.1.1 and 12.2.2, this logic underpins the scheduling engines that determine promise dates, ship dates, and transit intervals across sourcing rules defined in Oracle Planning.
The package combines two complementary responsibilities. The first is source-side lead time derivation, including location resolution, transit time, ship method selection, calendar-based workday arithmetic, and date offsetting. The second is ATP record manipulation, where the package extends and trims ATP supply/demand data and assigns input and output record structures used by the ATP engine during scheduling and propagation runs. The package is heavily reused in the ETRM metadata set, referenced by 25 other packages, which confirms its role as a shared utility layer rather than a standalone entry point.
Key Procedures and Functions
The documented interface exposes 29 procedures and functions. The sourcing functions include SRC_LOCATION_ID, which resolves the ship-from location for a given organization, customer, and customer site. SRC_INTERLOC_TRANSIT_TIME, SRC_DEFAULT_INTRANSIT_TIME, and SRC_INTRANSIT_TIME return transit durations, with the interlocation variants accepting a session identifier and partner site for multi-org and trading partner scenarios. SRC_DEFAULT_SHIP_METHOD and SRC_SHIP_METHOD return the shipping method used as input to transit calculations.
Calendar arithmetic is provided by SRC_PREV_WORK_DAY and SRC_NEXT_WORK_DAY, which return prior and subsequent working dates for an organization. The function directly relevant to the search term, SRC_DATE_OFFSET, accepts an organization identifier, a base date, and a day count, and returns the resulting date. It is annotated with reference 2833417 in the source header and is used to shift a date by a signed number of days, typically to convert a plan start or receipt date into a lead-time-adjusted date. Unlike the workday functions, SRC_DATE_OFFSET operates on a simple offset and therefore serves as the general-purpose date arithmetic primitive in this package.
ATP record handling is covered by EXTEND_ATP, ASSIGN_ATP_INPUT_REC, ASSIGN_ATP_OUTPUT_REC, EXTEND_ATP_PERIOD, EXTEND_ATP_SUPPLY_DEMAND, and TRIM_ATP_SUPPLY_DEMAND. The EXTEND_ATP procedure accepts a p_index parameter to control the length by which ATP_REC_TYP is extended, with a default of one. Region and session resolution are handled by GET_SESSION_ID, GET_REGIONS, GET_REGIONS_OLD, GET_REGIONS_SHIPPING, and GET_SRC_TRANSIT_TIME.
Tables Accessed
The package reads organizational and party data through BOM_CALENDAR_DATES for workday validation, HR_ALL_ORGANIZATION_UNITS for organization resolution, and HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_LOCATIONS, and HZ_PARTY_SITES for customer and site lookup. Sourcing and shipping method data come from MTL_INTERORG_SHIP_METHODS, MSC_TP_SITE_ID_LID, and MSC_TRADING_PARTNER_SITES. Region definitions are read from MSC_REGIONS, MSC_REGIONS_TEMP, MSC_REGION_LOCATIONS, MSC_REGION_SITES, and MSC_ZONE_REGIONS. Working and temporary ATP state is held in MSC_ATP_SRC_PROFILE_TEMP, which the package populates and consumes during a session.
Usage Notes
MSC_SATP_FUNC is an internal engine utility rather than an end-user API. It is invoked indirectly by the ATP and planning engines and by the 25 dependent packages that call its sourcing and record-manipulation routines. The p_session_id and p_partner_site_id parameters on several functions allow the same logic to serve both single-org and trading partner or multi-org contexts, and callers are expected to supply them when operating outside a standard session. Custom code should call the higher-level planning APIs in preference to this package, and any direct invocation must respect the documented parameter signatures, as the functions are not designed for public consumption. Behavior is consistent across 12.1.1 and 12.2.2, though the source header reflects incremental enhancements such as the addition of session and partner site parameters and the p_index control on EXTEND_ATP.
-
PACKAGE: APPS.MSC_SATP_FUNC
12.1.1
-
PACKAGE: APPS.MSC_SATP_FUNC
12.2.2
-
APPS.MSC_SATP_FUNC dependencies on FND_MESSAGE
12.2.2
-
APPS.MSC_SATP_FUNC dependencies on FND_MESSAGE
12.1.1
-
APPS.MSC_SATP_FUNC dependencies on APP_EXCEPTION
12.1.1
-
APPS.MSC_SATP_FUNC dependencies on APP_EXCEPTION
12.2.2
-
PACKAGE BODY: APPS.MSC_SATP_FUNC
12.1.1
-
PACKAGE BODY: APPS.MSC_SATP_FUNC
12.2.2