Search Results proj_template_id




Overview

APPS.AHL_VWP_VISITS_PUB is the public API package for creating and managing visits within the Oracle Enterprise Asset Management (eAM) and Maintenance Workbench product family, which falls under the Asset Lifecycle (AHL) schema. In Oracle EBS 12.1.1 and 12.2.2, the AHL schema supports the maintenance and service business flows where visits represent scheduled work performed against units, assets, or service requests. The package body delegates the substantive validation and persistence work to its companion private package, AHL_VWP_VISITS_PVT, exposing a thin public interface that external callers are expected to use.

The $Header line indicates the file AHLPVSTB.pls at version 120.2.12020000.2, dated December 2012, which confirms this is the release-consistent version bundled with the 12.2.x code line and backward-compatible with 12.1.x installations. The private declaration of Validate_And_Prepare_Params illustrates the layered design: input validation and defaulting occur before any DML is attempted, and callers receive a fully populated record structure.

Key Procedures and Functions

The ETRM metadata documents a single public procedure, CREATE_VISIT. Its purpose is to create a visit record, accepting an IN OUT NOCOPY record of type AHL_VWP_VISITS_PVT.Visit_Rec_Type. The record carries the full attribute surface of a visit, including visit name and description, organization and department identifiers, service request linkage, scheduling attributes (start date, start hour, start minute, planned end date and time components), visit type, unit header reference, project template reference, priority, unit schedule identifier, creation type, and the standard DFF attribute columns (ATTRIBUTE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE15). On successful completion, the record's VISIT_ID field returns the identifier of the newly created visit.

The internal helper Validate_And_Prepare_Params is not part of the public contract but is central to the behavior of CREATE_VISIT, handling mandatory-field enforcement, value-set validation, and defaulting before persistence.

Tables Accessed

Two base tables are referenced through APPS synonyms:

  • AHL_UNIT_CONFIG_HEADERS — stores unit configuration header records. A visit is associated with a unit via UNIT_HEADER_ID or UNIT_NAME, so this table is read to validate the unit reference and derive the surrogate identifier when a name is supplied.
  • PA_PROJECTS — the Projects foundation table. The PROJ_TEMPLATE_ID and PROJ_TEMPLATE_NAME attributes in the visit record map to project template usage, and PA_PROJECTS (together with its template views) is consulted to validate that the supplied project template exists and is valid for the operating unit before the visit is created.

Usage Notes

AHL_VWP_VISITS_PUB is the supported integration point for creating visits from outside the AHL maintenance UI. It is typically invoked from eAM/Maintenance Workbench forms and concurrent programs, from visiting or service-request workflows that need to materialize a scheduled visit, and from custom PL/SQL extensions that must create visits without directly manipulating the underlying tables. Callers must populate the input record with at least VISIT_NAME and, for transit visits, START_DATE and UNIT_SCHEDULE_ID, then read back VISIT_ID from the same record after the call. Because the procedure uses an IN OUT NOCOPY parameter, the caller's record is modified in place; exception handling should follow Oracle's standard API conventions, with errors surfaced through the FND_MSG_PUB message stack. The package is classified PUB in ETRM, confirming that it is a stable interface suitable for customer and partner extensions. No other packages are documented as referencing it, so adoption is driven by direct callers rather than internal dependency chains.