Search Results g_st_empty
Overview
MSD_PURGE_LEG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite. It is declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the package owner, a convention typical of utility and purge routines that must respect the caller's security context. Its version header (115.3, dated January 2003) indicates it belongs to the older MSD (Master Scheduling/MRP and Supply Chain Planning) family of database objects that persists across releases 12.1.1 and 12.2.2.
The package's business purpose is the controlled purging of staging data associated with a planning instance. The constant declarations in its specification reveal a state machine governing this lifecycle: process flags (G_NEW, G_IN_PROCESS, G_ERROR_FLG, G_PROPAGATION, G_VALID), staging table statuses (G_ST_EMPTY, G_ST_PULLING, G_ST_READY, G_ST_COLLECTING, G_ST_PURGING, G_ST_PRE_PROCESSING), program return statuses (G_SUCCESS, G_WARNING, G_ERROR), and instance type discriminators covering discrete, process, other, mixed, and exchange instances. These constants define the vocabulary by which purge operations are tracked and validated.
Key Procedures and Functions
The package exposes a single documented procedure, LAUNCH_PROCEDURE. It is the entry point for initiating a purge operation against a specific planning instance, accepting an instance identifier and a delete-rejected-records indicator whose default is SYS_YES. It follows the standard Oracle EBS concurrent-program interface, returning an error buffer (ERRBUF) and a numeric return code (RETCODE) so that the concurrent manager or calling form can evaluate success or failure. Because only one procedure is documented, all purge orchestration—status transitions, validation, and deletion logic—is encapsulated behind this single call.
Tables Accessed
Per the ETRM metadata, the package references two tables through APPS synonyms:
- MSC_APPS_INSTANCES — the master record of planning instances. The package reads and likely updates this table to validate the instance, confirm its type, and move its processing and staging status through the purge cycle.
- FND_LOOKUP_VALUES — the standard Oracle EBS lookup repository. It is queried to resolve configurable lookup codes, most plausibly for instance-type or status validation, allowing behavior to be tuned without code changes.
Usage Notes
LAUNCH_PROCEDURE is designed to be invoked as a concurrent program, given its ERRBUF/RETCODE signature and instance-level granularity. It would be registered as a PL/SQL concurrent program in the planning application and submitted by administrators when staging data must be cleared—for example, before re-collecting data for an instance, or to reclaim space after a failed plan run. Because the procedure uses a DEFAULTed parameter for delete-rejected-records, the standard submission path omits it, while custom callers may pass SYS_NO to retain rejected records.
The package is referenced by zero other packages, confirming it is an application-facing entry point rather than a shared utility. Consequently, customizations should call LAUNCH_PROCEDURE directly and honor RETCODE values (G_SUCCESS, G_WARNING, G_ERROR) to distinguish clean completion from partial or failed purges. Direct manipulation of MSC_APPS_INSTANCES or its staging tables outside this package is not advisable, since the status constants imply that an externally introduced inconsistency would bypass the package's safeguards.
-
APPS.MSD_PURGE_LEG SQL Statements
12.2.2
-
APPS.MSD_PURGE_LEG SQL Statements
12.1.1
-
PACKAGE: APPS.MSD_PURGE_LEG
12.1.1
-
PACKAGE: APPS.MSD_PURGE_LEG
12.2.2
-
PACKAGE: APPS.MSC_PURGE_LID
12.1.1
-
PACKAGE: APPS.MSC_CL_PURGE_STAGING
12.1.1
-
PACKAGE: APPS.MSC_CL_PURGE_STAGING
12.2.2
-
PACKAGE: APPS.MSC_CL_MISCELLANEOUS
12.2.2
-
APPS.MSC_CL_PURGE_STAGING SQL Statements
12.1.1
-
PACKAGE: APPS.MSC_CL_MISCELLANEOUS
12.1.1
-
PACKAGE: APPS.MSC_CL_COPY_STG_TBL
12.2.2
-
APPS.MSC_CL_PURGE_STAGING SQL Statements
12.2.2
-
PACKAGE: APPS.MSC_PURGE_LID
12.2.2
-
PACKAGE BODY: APPS.MSD_PURGE_LEG
12.1.1
-
PACKAGE BODY: APPS.MSD_PURGE_LEG
12.2.2
-
PACKAGE: APPS.MSC_UTIL
12.1.1
-
PACKAGE: APPS.MSC_CL_PRE_PROCESS
12.1.1
-
PACKAGE: APPS.MSC_CL_PRE_PROCESS
12.2.2
-
PACKAGE: APPS.MSC_UTIL
12.2.2
-
PACKAGE BODY: APPS.MSC_CL_PURGE_STAGING
12.1.1
-
PACKAGE BODY: APPS.MSC_CL_PURGE_STAGING
12.2.2
-
PACKAGE: APPS.MSC_CL_COLLECTION
12.1.1
-
PACKAGE: APPS.MSC_CL_COLLECTION
12.2.2
-
PACKAGE: APPS.MSC_CL_PULL
12.1.1
-
PACKAGE: APPS.MSC_CL_PULL
12.2.2
-
APPS.MSD_PURGE_LEG dependencies on MSC_APPS_INSTANCES
12.1.1
-
APPS.MSD_PURGE_LEG dependencies on MSC_APPS_INSTANCES
12.2.2
-
APPS.MSC_CL_PURGE_STAGING dependencies on MSC_APPS_INSTANCES
12.2.2
-
APPS.MSC_CL_PURGE_STAGING dependencies on MSC_APPS_INSTANCES
12.1.1
-
APPS.MSD_PURGE_LEG dependencies on MSC_ST_UTIL
12.1.1
-
APPS.MSD_PURGE_LEG dependencies on MSC_ST_UTIL
12.2.2
-
APPS.MSC_CL_PULL dependencies on MSC_UTIL
12.1.1
-
APPS.MSC_CL_PURGE_STAGING dependencies on MSC_UTIL
12.1.1
-
APPS.MSC_CL_PURGE_STAGING dependencies on MSC_UTIL
12.2.2
-
APPS.MSC_CL_PULL dependencies on MSC_UTIL
12.2.2