Results for “insert_undo_data”
14 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.MSC_UPDATE_RESOURCE is a server-side PL/SQL package within the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) module. It is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the invoking schema rather than the package owner. The package provides the core programmatic logic that maintains and recalculates the planning engine's resource availability and resource requirement records. Its primary business purpose is to propagate changes—whether originating from a user-driven simulation, a plan re-run, or an administrative maintenance operation—through the resource scheduling tables that drive constrained and unconstrained plan output. The package also supplies helper routines for retrieving calendar-based work times, computing effective and disable dates, detecting first operations, and maintaining an undo summary so that changes can be rolled back or compared across simulation scenarios.
Key Procedures and Functions
The package exposes twenty documented procedures and functions. The simulation and change-control layer includes apply_simulation, apply_change, initialize_table, calculate_change, update_table, and reset_changes, which together stage, evaluate, and commit resource changes tied to a plan and query context. Record maintenance is handled by add_new_record (with flags to retain the prior record or identifier), get_transaction_id, and refresh_parent_record, supported by insert_undo_data for rollback capture and verify_data for consistency checking.
Aggregation routines—aggregate_child_records, aggregate_one_resource, and aggregate_some_resources—roll resource-level data upward for a plan, org, instance, department, or resource group. Scheduling calculations are performed by calculate_ops, routing_res_unit, get_new_time, processdates, isfirstop, and move_res_req. The get_new_time function is of particular interest to callers searching that term: it computes the new start and end timestamps for a resource assignment given the plan, organization, instance, department, resource, changed date, resource hours, assigned units, and first-activity indicator, returning the results as OUT parameters along with an error status.
Tables Accessed
The package reads and writes a set of ASCP base and interface tables through APPS synonyms. Resource definition and availability are sourced from MSC_DEPARTMENT_RESOURCES, MSC_OPERATION_RESOURCES, MSC_NET_RESOURCE_AVAIL, MSC_NET_RESOURCE_AVAIL_S, MSC_NET_RES_INST_AVAIL, and MSC_NET_RES_INST_AVAIL_S. Time-phased planning output is maintained in MSC_RESOURCE_REQUIREMENTS, MSC_PLAN_BUCKETS, MSC_SUPPLIES, and MSC_PLANS. Calendar logic depends on MSC_CALENDAR_DATES and MSC_PROCESS_EFFECTIVITY. Query and simulation context is stored in MSC_FORM_QUERY, trading partner data comes from MSC_TRADING_PARTNERS, and undo/rollback tracking uses MSC_UNDO_SUMMARY_S. These tables collectively support capturing the current resource state, computing revised availability windows, and persisting the recalculated plan.
Usage Notes
MSC_UPDATE_RESOURCE is an internal planning-engine package rather than a documented public API, and the ETRM classification records it as OTHER with no released interface. It is referenced by one other package, indicating it is invoked from within the ASCP planning codebase—typically during plan generation, resource-level simulation, and schedule change application. Direct custom invocation is uncommon and discouraged because the procedures depend on a valid plan_id, query_id, and organization context; callers who do invoke routines such as get_new_time must supply a fully initialized planning environment and honor the OUT parameters and error status returned. Because the package runs as AUTHID CURRENT_USER, any custom caller must possess the same object privileges required by APPS. Oracle support for this package is limited to its role inside standard planning flows; modifications are not supported in 12.1.1 or 12.2.2.