Search Results update_pm_last_cyclic_act




Overview

APPS.EAM_PMDEF_PUB is the public PL/SQL package body that implements Preventive Maintenance (PM) definition processing within Oracle Enterprise Asset Management (EAM). It provides the programmatic interface used to create, validate, instantiate, and maintain PM definitions and their associated scheduling rules. In Oracle EBS 12.1.1 and 12.2.2, this package forms part of the EAM public API layer (object type PACKAGE BODY, owner APPS, status VALID). It exposes a set of procedures and functions that allow both Oracle EAM forms and external or custom code to build PM templates, associate activities, define scheduling rules, and synchronize the last-service and last-activity state used by the PM forecasting engine. It is not referenced by any database object, confirming its role as a top-level caller consumed by application code rather than an internal dependency of other database artifacts. Documentation is provided through ETRM 12.2.2 metadata.

Key Procedures and Functions

The package body documents 21 procedures and functions, organized around PM definition lifecycle and validation:

Tables Accessed

Through APPS synonyms, the package reads and writes PM and asset-related tables. PM definition structures include EAM_PM_ACTIVITIES, EAM_PM_SCHEDULINGS, EAM_PM_SCHEDULINGS_S, EAM_PM_SCHEDULING_RULES, EAM_PM_SCHEDULING_RULES_S, EAM_PM_SET_NAMES, and EAM_PM_LAST_SERVICE. Counter and asset context is drawn from CSI_COUNTERS_B, CSI_COUNTER_ASSOCIATIONS, CSI_COUNTER_TEMPLATE_B, and MTL_EAM_ASSET_ACTIVITIES. Work order context is read from EAM_JOB_COMPLETION_TXNS, WIP_DISCRETE_JOBS, and EAM_WO_STATUSES_V. It also depends on EAM_COMMON_UTILITIES_PVT, EAM_OBJECTINSTANTIATION_PUB, and EAM_PMDEF_PUB itself, along with standard infrastructure packages FND_API, FND_FILE, FND_GLOBAL, FND_MESSAGE, FND_MSG_PUB, and MFG_LOOKUPS, plus DUAL.

Usage Notes

EAM_PMDEF_PUB is typically invoked from the EAM Preventive Maintenance setup forms when a user saves a PM definition, and from concurrent programs or custom integrations that bulk-create or update PM definitions. Because it is a PUB-class API, it emits errors through the FND_MSG_PUB messaging stack, so callers should initialize the message stack and check the return status after each call. It is referenced by four other packages, indicating use as a shared entry point for PM definition processing. The VALIDATE_* routines are commonly called before CREATE_PM_DEF or UPDATE_PM_DEF to ensure header, activity, and scheduling-rule data conform to EAM expectations. INSTANTIATE_PM_DEFS is used where a definition set must be expanded into active PM schedulings, while UPDATE_PM_LAST_CYCLIC_ACT and UPDATE_PM_LAST_SERVICE_READING support counter-based maintenance planning. Custom code should not bypass the API to write these tables directly.