Search Results migrate_to_program
Overview
OKS_PM_PROGRAMS_PVT is the private service-layer PL/SQL package that manages Preventive Maintenance (PM) programs and their generated schedules within Oracle Service Contracts (OKS) and the surrounding Enterprise Asset Management (EAM) integration stack. PM programs define recurring maintenance work that must be performed against covered items over the life of a service contract or warranty; this package encapsulates the business rules for building, adjusting, renewing, and versioning the schedule lines that realize those programs. The package is classified as PVT (private), meaning it is an internal implementation unit called by public OKS APIs, concurrent programs, and forms rather than being directly exposed to external integrators. Its header declares shared constants drawn from OKC_API and OKS_PMS_PVT, notably G_PKG_NAME, G_APP_NAME, G_UNEXPECTED_ERROR, G_REQUIRED_VALUE, and the token constants used to build standardized error messages. Debug output is conditionally enabled through the AFLOG_ENABLED profile option. The package also defines several global PL/SQL record and collection types, including pms_rec_type/pms_tbl_type for schedule dates, act_rec_type/act_tbl_type for QA activity checks, and pmsch_refresh_rec_type/pmsch_refresh_tbl_type, which carry sequence numbers, rule identifiers, program identifiers, and schedule date ranges through bulk processing operations.
Key Procedures and Functions
The package exposes twenty documented procedures spanning the full PM program lifecycle:
- GENERATE_SCHEDULE — Creates the schedule rows for a PM program based on its defined rules and frequency intervals.
- POPULATE_SCHEDULE — Fills schedule data structures ahead of persistence or refresh operations.
- REFRESH_PM_PROGRAM_SCHEDULE — Recomputes and rewrites an existing schedule when program definitions or dates change.
- RENEW_PM_PROGRAM_SCHEDULE — Extends a program's schedule into a new contract or warranty period.
- ADJUST_PM_PROGRAM_SCHEDULE — Realigns schedule dates, typically in response to negotiated changes.
- UPDATE_PMP_RULE_ID — Maintains the linkage between a schedule refresh record and its originating rule.
- MIGRATE_TO_PROGRAM and MIGRATE_TO_ACTIVITIES — Convert legacy or non-program PM data into the program and activity model respectively.
- CHECK_PM_MATCH, CHECK_PM_SCHEDULE, CHECK_PM_PROGRAM_EFFECTIVITY, CHECK_PM_REQUIRED_VALUES, CHECK_PM_NEW_ACTIVITIES — Validation routines that verify coverage matching, schedule integrity, program effectivity dates, mandatory values, and newly introduced activities.
- UNDO_PM_LINE, INIT_OKS_K_LINE — Manage the underlying contract line rows during PM edits and setup.
- VERSION_PM, RESTORE_PM, DELETE_PMHISTORY, DELETE_PMSAVED_VERSION, COPY_PM_TEMPLATE — Implement versioning, restoration, cleanup, and template copies for PM records and their history snapshots.
Tables Accessed
The package reads and writes the core PM entity tables: OKS_PM_ACTIVITIES, OKS_PM_SCHEDULES, OKS_PM_STREAM_LEVELS, and their corresponding _H history tables (OKS_PM_ACTIVITIES_H, OKS_PM_SCHEDULES_H, OKS_PM_STREAM_LEVELS_H), which support versioning and audit requirements. Contract-side data comes from OKC_RULES_B, OKC_K_LINES_B, OKC_CLASS_OPERATIONS, OKC_OPERATION_INSTANCES, OKC_OPERATION_LINES, and OKC_SUBCLASSES_B, tying PM programs to contract lines, rules, and class operations. OKS_K_LINES_B and AHL_MR_HEADERS_B connect the PM structures to the service contract line and maintenance work order header layers. PLITBLM is used for temporary PL/SQL table storage during collection processing.
Usage Notes
OKS_PM_PROGRAMS_PVT is not intended for direct customer invocation. It is referenced by twelve other packages and is called during PM program creation, schedule generation, renewal, versioning, and migration flows initiated from the Service Contracts forms or from concurrent programs that process schedules in bulk. Customizations should call the public OKS PM APIs, which in turn delegate to this private package, and the presence of MIGRATE_TO_PROGRAM in the ETRM metadata reflects common upgrade and data conversion scenarios where legacy PM data is consolidated into the program-based model introduced in later EBS releases. Because the unit is private, its signatures may change between 12.1.1 and 12.2.2 patch levels, and any dependency on it should be verified against the target release.
-
PACKAGE: APPS.OKS_PM_PROGRAMS_PVT
12.1.1
-
PACKAGE: APPS.OKS_PM_PROGRAMS_PVT
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKS_PMS_PVT
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKS_PMS_PVT
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKS_PM_SCHEDULES
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKS_PM_SCHEDULES
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.1.1
-
PACKAGE BODY: APPS.OKS_PM_PROGRAMS_PVT
12.1.1
-
PACKAGE BODY: APPS.OKS_PM_PROGRAMS_PVT
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.2.2