Results for “org_demand_peg_typ”
2 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
MSC_ATP_SUBST is an Oracle Advanced Supply Chain Planning (ASCP) package body owned by APPS that implements the substitute-component ATP check logic used during available-to-promise (ATP) processing. Its primary business function is to determine whether a demand can be satisfied by an item's substitutes when the primary item lacks sufficient supply, and to compute the supply chain quantities that flow from child organizations up to a top organization through the planning bill / sourcing network. The package supports the ATP substitution workflow by retrieving item substitutes, evaluating material constraints (such as material availability, promised-to-fulfill constraints, and transit lead-time constraints), and accumulating the resulting availability and demand quantities across organizations. The header comment indicates a release lineage around 120.4 (2007), which is consistent with the code base shared by EBS 12.1.1 and 12.2.2. Debug behavior is gated by the profile option MSC_ATP_DEBUG, defaulting to 'N'.
Key Procedures and Functions
Ten documented procedures and functions comprise the public interface:
- ATP_CHECK_SUBST — the entry point corresponding to the searched term "atp_check_subst". It performs the substitute ATP check, evaluating availability for the demanded item against its substitutes and returning the ATP result.
- GET_ITEM_SUBSTITUTES — retrieves the substitute items defined for a given item, providing the candidate set used by the ATP substitution logic.
- ADD_MAT_DEMAND — records material demand arising from the substitution and ATP evaluation into the demand structures.
- UPDATE_DEMAND — updates existing demand records with revised quantities or dates generated during ATP processing.
- DELETE_DEMAND_SUBST — removes demand rows that were created solely for substitute evaluation when the substitution is not fulfilled.
- ADD_PEGGING — writes pegging information linking demand to supply, using the demand/supply peg type constants defined in the specification (ORG_DEMAND_PEG_TYP, ORG_SUPPLY_PEG_TYP, TRANSFER_PEG_TYP).
- EXTEND_ORG_AVAIL_INFO_REC — extends the organization availability information record type to accommodate additional organizations traversed during the supply chain walk.
- EXTEND_ITEM_INFO_REC_TYP — extends the item information record type, supporting additional substitute items discovered at runtime.
- COPY_ITEM_INFO_REC — copies item information record contents, used when propagating substitute item attributes.
- DETAILS_OUTPUT — emits diagnostic detail output for the ATP substitution computation when diagnostics are enabled.
Internally, the private procedure TOP_ORG_SUPPLY_QTY performs the upward propagation of rounding leftovers, quantity-from-children, and ATF-date quantities through parent organizations, applying conversion rates and rounding flags as it moves from a child organization to its parent.
Tables Accessed
The package references the following tables through APPS synonyms:
- MSC_ITEM_SUBSTITUTES — source of substitute item definitions consumed by GET_ITEM_SUBSTITUTES.
- MSC_DEMANDS and MSC_ALLOC_DEMANDS — demand records created, updated, or deleted by ADD_MAT_DEMAND, UPDATE_DEMAND, and DELETE_DEMAND_SUBST.
- MSC_FULL_PEGGING_S — target of pegging detail written by ADD_PEGGING.
- MRP_ATP_DETAILS_TEMP — temporary workspace for ATP detail results and diagnostics.
- MSC_SYSTEM_ITEMS — item attribute validation and substitute eligibility.
- MSC_PLANS — plan context for the ATP computation.
- MSC_TP_ID_LID and MSC_TP_SITE_ID_LID — trading-partner identifier translation for sourcing and constraint evaluation.
- DUAL and PLITBLM — utility references.
Usage Notes
MSC_ATP_SUBST is typically invoked from the ASCP ATP and scheduling flows rather than directly by end users; the documented metadata shows it is referenced by one other package, which drives the substitution check. Custom code should call ATP_CHECK_SUBST rather than reimplementing substitute logic, and must observe the profile-gated debug behavior. Because the package writes to MSC_DEMANDS, MSC_ALLOC_DEMANDS, and MSC_FULL_PEGGING_S, concurrent invocations against the same plan should be serialized. Any direct calls should run in the APPS schema context, and testing should be performed with MSC_ATP_DEBUG enabled to capture DETAILS_OUTPUT diagnostics.