Search Results get_visit_applicable_mrs




Overview

APPS.AHL_FMP_PVT is a private (PVT) PL/SQL package within the Oracle Enterprise Asset Management (eAM) / Enterprise Asset Management family of modules in Oracle E-Business Suite, specifically belonging to the AHL (Applications for Healthcare and Lifecycle / Asset Lifecycle) application schema. In the ETRM 12.2.2 metadata the package is classified as a private API, meaning it is intended for internal use by other AHL packages rather than being called directly by external integrations or end users. Its core business purpose is the evaluation and resolution of Applicable Maintenance Requirements (MRs), Maintenance Plans (PMs), and Visits against asset configurations and their associated instances. In practical terms, AHL_FMP_PVT answers the question: "Given this asset instance, its configuration, its location in a maintenance chain path, and its service coverage, which maintenance requirements are actually applicable?" The package also validates associations between maintenance requirements and preventive (PM) coverage structures and supports relationship resolution between parent and child components of the asset hierarchy.

Key Procedures and Functions

The documented metadata exposes eight procedures and functions, all centred on maintenance requirement applicability and hierarchy navigation:

  • GET_MR_AFFECTED_ITEMS — Returns the items (assets or components) affected by a given maintenance requirement.
  • GET_APPLICABLE_MRS — Resolves the set of maintenance requirements applicable to a supplied asset or instance context.
  • COUNT_MR_DESCENDENTS — Counts the descendant nodes beneath a maintenance requirement within the maintenance hierarchy, supporting recursive path exploration.
  • INSTANCE_MATCHES_PATH_POS — Determines whether an asset instance corresponds to a specific path position in the maintenance chain, a prerequisite to applicability evaluation.
  • GET_PM_APPLICABLE_MRS — Derives applicable maintenance requirements from a preventive maintenance plan context.
  • GET_VISIT_APPLICABLE_MRS — Derives applicable maintenance requirements for a particular service visit.
  • IS_PC_ASSOC_VALID — Validates whether a preventive (PC) association is valid, guarding coverage-to-requirement linking.
  • GET_MR_APPLICABILITY — The primary entry point that combines the above checks to yield the final applicability decision.

Tables Accessed

Through APPS synonyms, the package reads and writes the core AHL maintenance data model. It queries AHL_MR_HEADERS_B (maintenance requirement definitions), AHL_APPLICABLE_MRS and AHL_APPLICABLE_MR_RELNS (precomputed applicability and its relations), and AHL_MR_EFFECTIVITIES with its detail tables AHL_MR_EFFECTIVITY_DTLS and AHL_MR_EFFECTIVITY_EXT_DTLS (effective-dating of requirements). Asset configuration and hierarchy data come from AHL_CONFIG_COMPONENTS, AHL_MC_HEADERS_B, AHL_MC_PATH_POSITIONS and AHL_MC_RELATIONSHIPS (maintenance chain path positions and relationships). Instance data is held in AHL_APPLICABLE_INSTANCES and the transient AHL_MR_INSTANCES_TEMP. Service coverage and contract context are resolved from OKC_K_HEADERS_ALL_B, OKS_COV_TYPES_B and OKS_COV_TYPES_TL, linking service coverage types to maintenance requirements.

Usage Notes

AHL_FMP_PVT is a private helper and is not invoked directly by forms or concurrent programs; it is referenced by fourteen other AHL packages, including AHL_COMPLETIONS_PVT, AHL_FLEET_FORECAST_PVT, AHL_FMP_COMMON_PVT, AHL_FMP_PVT_W, AHL_PC_HEADER_PVT, AHL_VWP_TASKS_PVT and numerous AHL_UMP (unit maintenance processing) packages. It is therefore called during maintenance work order generation, completion processing, planned maintenance scheduling, fleet forecasting and visit planning. Because it is not a public API, customizations should call the corresponding public wrapper packages rather than AHL_FMP_PVT directly, and any extension logic should account for its effective-dated applicability rules when querying the underlying tables.