Search Results eam_safety_reports_pvt




Overview

APPS.EAM_SAFETY_REPORTS_PVT is a private (PVT) PL/SQL package in Oracle E-Business Suite Enterprise Asset Management (EAM). Its core purpose is the generation of XML report data for the safety-related artifacts that surround maintenance execution: work permits, work clearances, and isolations. In EAM, a work permit authorizes a crew to perform work on or near an asset, a work clearance formally certifies that equipment has been isolated and made safe, and an isolation records the lockout/tagout boundaries applied to energy sources. This package assembles the record data behind those safety workflows into XML fragments that can be rendered by a reporting engine (typically Oracle XML Publisher / BI Publisher) and delivered as printed or electronic documentation.

The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling session rather than as definer. The header history shows an initial creation in April 2008 with subsequent revisions through the 120.3 version line in 2011, consistent with the 12.1.1 codebase that was carried forward into 12.2.2. Because the package is classified as PVT, it is an internal implementation package not intended to be called directly by customer extensions.

Key Procedures and Functions

  • GETWORKPERMITREPORTXML — The primary public function. It generates the XML data payload for work permit reports. The parameter list includes a collection of permit identifiers, together with numeric flag parameters that control inclusion of referenced data: a work clearance flag, a work order flag, and separate flags for text attachments, URL attachments, and file attachments. The function returns a CLOB containing the assembled XML document. The package also declares supporting types (eam_permit_record_type and eam_permit_tab_type) used to pass the tab of permit IDs into the function.
  • CONVERT_TO_CLIENT_TIME — A utility function that converts a supplied server-time date value into the corresponding client time zone value, returning a date. This is used so that timestamps printed on safety documentation reflect the operating site's local time rather than the database server's time zone.

A declaration for a work clearance report generator (getWorkClearanceReportXML) appears in the specification source, indicating the package is structured to extend report coverage across additional safety artifacts.

Tables Accessed

  • EAM_WORK_PERMITS — the primary source of work permit header and status information.
  • EAM_WORK_CLEARANCES — clearance records associated with permits and work orders.
  • EAM_ISOLATIONS — isolation and lockout/tagout details within the safety envelope.
  • EAM_SAFETY_ASSOCIATIONS — linkage records associating safety documents with maintenance work.
  • WIP_DISCRETE_JOBS — work order context used when the work order flag is set.
  • FND_ATTACHED_DOCUMENTS, FND_DOCUMENTS_SHORT_TEXT — attachment metadata and short-text bodies retrieved when the text, URL, or file attachment flags are enabled.
  • FND_USER — user identity data for report attribution.
  • DUAL, PLITBLM, XMLTYPE — utility constructs used for XML assembly and type handling.

Usage Notes

EAM_SAFETY_REPORTS_PVT is invoked internally by the EAM safety reporting flow, generally from a concurrent program that produces printable safety documentation, and is referenced by one other package in the ETRM inventory. It is not a supported public API and should not be called directly from customer code. Sites customizing safety report layouts should work through Oracle XML Publisher templates against the XML produced by this package rather than modifying the package itself. Because it is AUTHID CURRENT_USER, callers must hold appropriate read privileges on the underlying EAM and FND tables.