Search Results mr_tl




Overview

APPS.OKX_PM_PROGRAMS_V is an Oracle E-Business Suite view that exposes maintenance program definitions managed by Oracle Enterprise Asset Management (eAM) and the Oracle Maintenance module. In Releases 12.1.1 and 12.2.2 the view surface appears in the APPS schema, but it draws its data from the AHL (Enterprise Asset Management / Complex Maintenance, Repair, and Overhaul) product tables AHL_MR_HEADERS_B and AHL_MR_HEADERS_TL. The view filters these header records to a single maintenance type, TYPE_CODE = 'PROGRAM', producing a concise report-friendly list of maintenance programs.

Its primary role is to provide a reporting and integration interface rather than to act as a transactional object. Because the view resolves status and type meanings from FND_LOOKUP_VALUES and scopes results to the currently logged-in application usage, it allows reports, concurrent programs, and external integrations to display human-readable program information without joining the underlying base tables and lookups themselves. The search term "mr_tl" relates directly to the AHL_MR_HEADERS_TL translation table, which supplies the multilanguage description column in this view.

Underlying Base Objects

ETRM documents four referenced objects behind the view:

  • AHL_MR_HEADERS_B — the base (non-translated) maintenance header records. It contributes the primary key MR_HEADER_ID, TITLE, TYPE_CODE, EFFECTIVE_FROM, EFFECTIVE_TO, MR_STATUS_CODE, and APPLICATION_USG_CODE.
  • AHL_MR_HEADERS_TL — the translated maintenance header records. It supplies DESCRIPTION for the run-time language, joined on MR_HEADER_ID with LANGUAGE = USERENV('LANG').
  • FND_LOOKUP_VALUES — used twice as inline lookup subqueries. One resolves MR_STATUS_CODE against lookup type AHL_FMP_REVISION_STATUS, and the other resolves TYPE_CODE against AHL_FMP_MR_TYPE.
  • FND_PROFILE (package) — supplies the value of the AHL_APPLN_USAGE profile option, which is trimmed and compared to APPLICATION_USG_CODE to restrict output to the active application usage.

The join between header base and translation tables is an inner join, so only programs with a translation row in the current language are returned. The type lookup is an outer join (TYPE.LOOKUP_CODE(+)), while the status lookup is an inner join.

Key Columns

  • ID1 — aliases MR_HEADER_ID, the unique program identifier used as the view's primary key for forms and integrations. ID2 is a constant '#' placeholder.
  • NAME — the program title from the base header table.
  • DESCRIPTION — the translated program description from AHL_MR_HEADERS_TL, in the session language.
  • TYPE_CODE — the raw maintenance type code; always 'PROGRAM' due to the view filter.
  • TYPE — the decoded lookup meaning for TYPE_CODE from AHL_FMP_MR_TYPE.
  • EFFECTIVE_FROM / EFFECTIVE_TO — the validity window of the program.
  • MR_STATUS_CODE — the raw status code of the header.
  • STATUS — the decoded meaning of MR_STATUS_CODE from AHL_FMP_REVISION_STATUS.

Common Use Cases and Queries

Typical uses include building eAM program lists for custom reports, validating program setup during data migration, and exposing program data through interfaces or BI Publisher layouts. Because lookups and profile values are resolved inside the view, callers avoid repetitive joins.

To list all active programs visible to the current application usage:

  • SELECT id1, name, description, type, status FROM apps.okx_pm_programs_v;

To locate a program by description text (the "mr_tl" pattern):

  • SELECT id1, name, description, effective_from, effective_to, status FROM apps.okx_pm_programs_v WHERE UPPER(description) LIKE '%PREVENTIVE%';

To restrict to currently effective programs:

  • SELECT id1, name, status FROM apps.okx_pm_programs_v WHERE SYSDATE BETWEEN effective_from AND NVL(effective_to, SYSDATE + 1);