Search Results msc_copy_plan




Overview

APPS.MSC_COPY_PLAN is a low-level PL/SQL package body belonging to the Oracle Advanced Supply Chain Planning (ASCP) schema, part of the MSC (Material Planning / Supply Chain Planning) application family. Its sole documented responsibility is to provide a programmatic wrapper for launching the "Copy Plan" concurrent program in Oracle E-Business Suite. In ASCP, a plan is a stored, versioned snapshot of supply and demand data produced by the planning engine. Planners frequently need to duplicate an existing plan — for example, to create a baseline copy before making scenario changes, to branch a simulation from a production plan, or to seed a what-if plan with current data. Rather than forcing users or custom programs to call the concurrent manager APIs directly, MSC_COPY_PLAN encapsulates the submission of the underlying copy request. The package is classified as "OTHER" in the ETRM documentation, indicating it is a supporting utility rather than a public, versioned API. Its header comment reflects a 2004 copyright and a 115.2 version, confirming the package has been stable across the 12.1.1 and 12.2.2 releases.

Key Procedures and Functions

  • COPY_PLAN — The single documented function in this package. It accepts parameters that describe the source plan, the destination plan's name and description, destination-level options (organization selection, ATP flag, production flag, notification flag, and inactive-on date), plus organization and sub-request instance identifiers. Internally it delegates to FND_REQUEST.SUBMIT_REQUEST, passing the application, program, description, requested start time, sub-request indicator, and all plan-copy arguments through to the concurrent manager. It returns the concurrent request ID issued by the concurrent manager, or 0 if the request could not be submitted. If submission succeeds (return code not equal to zero), it issues an explicit commit; otherwise the transaction is left uncommitted. The function returns a NUMBER, which is the conventional pattern for EBS request-submission wrappers.

No other procedures or functions are documented in the ETRM metadata for this package, and it is not referenced by any other package, confirming its role as an endpoint utility rather than a shared library routine.

Tables Accessed

The documented metadata records no direct table references via APPS synonyms. This is expected: COPY_PLAN does not read or write application tables itself. All state changes occur inside the concurrent program it submits. FND_REQUEST.SUBMIT_REQUEST writes to the FND concurrent manager tables (notably FND_CONCURRENT_REQUESTS) as part of its standard submission behavior, but those writes are attributed to the FND layer, not to MSC_COPY_PLAN. Similarly, the actual plan duplication logic — copying MSC plan, plan organization, and related planning data — is executed by the submitted concurrent program, which owns those MSC tables.

Usage Notes

MSC_COPY_PLAN is typically invoked when a user action needs to enqueue a plan copy without navigating the Copy Plan concurrent program form directly. Common invocation contexts include:

  • Custom concurrent programs or PL/SQL scripts that automate plan duplication, such as scheduled refreshes or batch copies across organizations.
  • Forms or OA Framework pages in ASCP that offer a "Copy Plan" button, where the form calls COPY_PLAN to submit the request and returns the request ID to the user for monitoring.
  • Integration code that must trigger a plan copy as a prerequisite step in a larger planning cycle.

Because the function returns the FND concurrent request ID, callers should check the return value: a value of 0 indicates the submission failed and no request was created. Successful calls commit the submission, so no additional commit is required by the caller. The package is not documented as a public API and should be treated as internal; Oracle may change its behavior without notice. Where possible, callers should prefer supported ASCP APIs, but for straightforward plan duplication MSC_COPY_PLAN remains the direct mechanism used across 12.1.1 and 12.2.2 environments.