Search Results convert_to_client_time
Overview
The APPS.EAM_SAFETY_REPORTS_PVT package body is a private PL/SQL package within Oracle Enterprise Asset Management (EAM) that generates XML representations of safety-related data, principally work permits and their associated attachments, clearances, and work orders. Because the API classification is PVT (private), the package is not intended for direct invocation by external applications; it is instead consumed by other packages and reporting components within the EAM module. The header comment identifies the file as EAMVSRPB.pls and attributes the initial creation to Madhuri Shah in April 2008, with a subsequent revision in June 2011 (version 120.6). Its primary role is to assemble structured XML payloads that can be rendered into printed or electronic safety reports — for example, work permit documents that consolidate permit header details, approvals, text and URL attachments, work clearances, and linked work orders into a single CLOB returned to the calling layer.
Key Procedures and Functions
The documented API exposes two program units:
- GETWORKPERMITREPORTXML — A function that generates the XML data set for work permits. As evidenced by the source excerpt, it accepts collections of permit identifiers along with a series of numeric flags controlling whether work clearance data, work order data, text attachments, URL attachments, and file attachments are included in the output. Internally it declares numerous
XMLTypevariables (permit header, approver, associated work order, associated clearance, text attachment, URL attachment, and file attachment) and populates them via cursors such as the permit header cursor, which selects permit name, permit type meaning, description, permit status, prepared-by user name, and formatted dates. The assembled fragments are combined and returned as aCLOB. - CONVERT_TO_CLIENT_TIME — A utility function that converts a server-side date or timestamp value into the client's local time zone, ensuring that dates rendered in the safety report reflect the user's expected time context rather than the database server time.
Tables Accessed
The package reads from the following documented tables (via APPS synonyms):
EAM_WORK_PERMITS— Source of the permit header attributes (permit name, description, status, prepared-by).EAM_WORK_CLEARANCES— Supplies any work clearance records associated with the permit when the clearance flag is set.EAM_ISOLATIONS— Provides isolation details referenced by clearances or permits.EAM_SAFETY_ASSOCIATIONS— Links safety records to related entities such as work orders or permits.FND_DOCUMENTS_SHORT_TEXTandFND_ATTACHED_DOCUMENTS— Retrieve text-based attachments associated with the permit; the short-text table holds the attachment content, while the attached-documents table provides the association metadata.FND_USER— Resolves the prepared-by and approver user identifiers to display names.WIP_DISCRETE_JOBS— Provides work order context for jobs linked to the permit.DUAL,PLITBLM, andXMLTYPE— Support miscellaneous scalar queries and XML construction/type handling.
Usage Notes
Because EAM_SAFETY_REPORTS_PVT is a private package, it is invoked indirectly. The ETRM metadata records that it is referenced by one other package, which is the typical pattern: a public-facing EAM reporting package or a concurrent program wrapper calls GETWORKPERMITREPORTXML, passes the relevant permit ID collection and the display flags, receives the CLOB, and then transforms it — for example, through an XML Publisher (BI Publisher) template — into a printable work permit report. The CONVERT_TO_CLIENT_TIME function is used internally when formatting dates so that the generated report reflects local time. The attachment flags allow the calling report to optionally suppress or include text, URL, and file attachment data, which is useful when report size or security considerations dictate which attachment types should appear. Customizations should not call this package directly, since its signature and behavior are subject to change without notice; integrators should instead rely on the documented public packaging layer or on XML Publisher data templates registered against the EAM safety report concurrent programs.
-
APPS.EAM_SAFETY_REPORTS_PVT SQL Statements
12.2.2
-
APPS.EAM_WORKORDERREP_PVT SQL Statements
12.2.2
-
APPS.EAM_WORKORDERREP_PVT SQL Statements
12.1.1
-
PACKAGE BODY: APPS.EAM_SAFETY_REPORTS_PVT
12.2.2
-
PACKAGE BODY: APPS.EAM_WORKORDERREP_PVT
12.2.2
-
PACKAGE: APPS.EAM_SAFETY_REPORTS_PVT
12.2.2
-
PACKAGE BODY: APPS.EAM_WORKORDERREP_PVT
12.1.1
-
PACKAGE: APPS.EAM_SAFETY_REPORTS_PVT_W
12.2.2
-
PACKAGE: APPS.EAM_WORKORDERREP_PVT
12.1.1
-
PACKAGE: APPS.EAM_WORKORDERREP_PVT
12.2.2
-
PACKAGE BODY: APPS.EAM_SAFETY_REPORTS_PVT_W
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_DATE
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_DATE
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on FND_DATE
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_SAFETY_ASSOCIATIONS
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_WORK_CLEARANCES
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on BOM_RESOURCES
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on BOM_RESOURCES
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_WORK_PERMITS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_SAFETY_ASSOCIATIONS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_OP_RESOURCE_INSTANCES
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_OP_COMPLETION_TXNS_V
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_WORK_PERMITS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on CST_ACTIVITIES
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_WORK_ORDERS_V
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_JOB_COMPLETION_TXNS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_OPERATION_RESOURCES
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_PERMIT_STATUSES_VL
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on CST_ACTIVITIES
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_OP_COMPLETION_TXNS_V
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_OP_RESOURCE_INSTANCES
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_COMMON_LOOKUPS
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_JOB_COMPLETION_TXNS
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_OPERATION_RESOURCES
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_COMMON_LOOKUPS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on MFG_LOOKUPS
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_EAM_WORK_REQUESTS
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_USER
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on WIP_EAM_WORK_REQUESTS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_DIRECT_ITEM_RECS_V
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_DIRECT_ITEM_RECS_V
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_METERS_UTIL
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on FND_USER
12.2.2
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on EAM_WORK_CLEARANCE_STATUSES_VL
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_PM_SCHEDULINGS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on MFG_LOOKUPS
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_METERS_UTIL
12.1.1
-
APPS.EAM_WORKORDERREP_PVT dependencies on CSI_COUNTERS_B
12.2.2
-
APPS.EAM_WORKORDERREP_PVT dependencies on EAM_PM_SCHEDULINGS
12.1.1
-
APPS.EAM_SAFETY_REPORTS_PVT dependencies on MFG_LOOKUPS
12.2.2