Search Results renew_pm_program_schedule
Overview
OKS_PM_PROGRAMS_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Service Contracts (OKS) module, part of the Enterprise Technical Reference Manual (ETRM) for release 12.1.1 and 12.2.2. The package encapsulates the business logic governing Preventive Maintenance (PM) programs: the recurring service schedules, activities, and rules that drive contractually obligated maintenance visits. It is not a public API; rather it functions as the internal engine behind the public OKS_PMS_PVT access layer and the Service Contracts forms, handling schedule generation, renewal, adjustment, migration between program types, versioning, and history maintenance.
The package header declares a set of global constants and exception identifiers — G_PKG_NAME, G_APP_NAME derived from OKC_API, G_UNEXPECTED_ERROR, G_EXCEPTION_HALT_VALIDATION, G_SQLERRM_TOKEN, and G_SQLCODE_TOKEN — that standardize error handling and message token substitution across all procedures. It also defines several PL/SQL collection types, including pms_rec_type and pms_tbl_type (carrying SCHEDULE_DATE), act_rec_type and act_tbl_type (carrying ACTIVITY_ID), and the composite pmsch_refresh_rec_type / pmsch_refresh_tbl_type, which aggregate sequence numbers, rule identifiers (RULE_ID, PMP_RULE_ID, PMA_RULE_ID), object version numbers, schedule date ranges, and line and program identifiers. These structures support bulk processing of schedule rows, which is essential when a single program revision spans hundreds of future service dates.
Key Procedures and Functions
The 20 documented procedures divide into functional clusters.
- Schedule lifecycle: GENERATE_SCHEDULE creates PM schedule rows for a program; POPULATE_SCHEDULE fills schedule data based on program rules; RENEW_PM_PROGRAM_SCHEDULE — the object of the user's search — extends an existing PM program schedule forward by applying the program's recurring rules; ADJUST_PM_PROGRAM_SCHEDULE and REFRESH_PM_PROGRAM_SCHEDULE recalculate and rebuild schedules after rule or date changes.
- Rule maintenance: UPDATE_PMP_RULE_ID and UPDATE_PMA_RULE_ID re-point schedule rows to program and activity rules.
- Migration: MIGRATE_TO_PROGRAM and MIGRATE_TO_ACTIVITIES convert PM schedule data into program and activity structures during program restructuring.
- Validation: CHECK_PM_MATCH, CHECK_PM_SCHEDULE, CHECK_PM_PROGRAM_EFFECTIVITY, CHECK_PM_REQUIRED_VALUES, and CHECK_PM_NEW_ACTIVITIES verify schedule consistency, program effectivity, mandatory values, and newly added activities.
- Line and version handling: UNDO_PM_LINE, INIT_OKS_K_LINE, VERSION_PM, RESTORE_PM, COPY_PM_TEMPLATE, DELETE_PMHISTORY, and DELETE_PMSAVED_VERSION manage contract line rollback, version creation/restoration, template copying, and purge of history and saved-version records.
Internally the package reuses oks_pm_schedules_rec_type from OKS_PMS_PVT, reinforcing its role as a helper rather than a standalone API.
Tables Accessed
The package reads and writes through APPS synonyms. OKS_PM_SCHEDULES and its history table OKS_PM_SCHEDULES_H hold generated service dates; OKS_PM_ACTIVITIES and OKS_PM_ACTIVITIES_H hold activity definitions; OKS_PM_STREAM_LEVELS and OKS_PM_STREAM_LEVELS_H define stream hierarchies. Contract structures are reached via OKC_RULES_B, OKC_K_LINES_B, OKC_CLASS_OPERATIONS, OKC_OPERATION_LINES, OKC_OPERATION_INSTANCES, and OKC_SUBCLASSES_B. OKS_K_LINES_B links PM data to service contract lines, AHL_MR_HEADERS_B ties schedules to maintenance requirements, and PLITBLM supports bulk operations.
Usage Notes
As a PVT package, OKS_PM_PROGRAMS_PVT is not intended for direct customer invocation. It is called by the Service Contracts authoring forms when a user creates or renews a PM program, by concurrent programs that generate or refresh future schedules, and by the 12 other packages that reference it, notably OKS_PMS_PVT. Customizations requiring schedule renewal or adjustment should call the supported public APIs, which delegate to RENEW_PM_PROGRAM_SCHEDULE and its siblings, preserving validation and versioning integrity.
-
PACKAGE: APPS.OKS_PM_PROGRAMS_PVT
12.1.1
-
PACKAGE: APPS.OKS_PM_PROGRAMS_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_PM_PROGRAMS_PVT
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_DEBUG
12.2.2
-
PACKAGE BODY: APPS.OKS_PM_PROGRAMS_PVT
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_DEBUG
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_CONTRACT_PUB
12.1.1
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_CONTRACT_PUB
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.2.2
-
APPS.OKS_PM_PROGRAMS_PVT dependencies on OKC_API
12.1.1
-
APPS.OKS_COVERAGES_PVT dependencies on OKC_DEBUG
12.1.1
-
APPS.OKS_COVERAGES_PVT dependencies on OKC_DEBUG
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
-
PACKAGE BODY: APPS.OKS_COVERAGES_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_COVERAGES_PVT
12.1.1
-
APPS.OKS_COVERAGES_PVT dependencies on OKC_API
12.1.1
-
APPS.OKS_COVERAGES_PVT dependencies on OKC_API
12.2.2