Search Results get_timecard_amount




Overview

PO_HXC_INTERFACE_PVT is a private (PVT-classified) PL/SQL package body owned by APPS in Oracle E-Business Suite 12.1.1 and 12.2.2. It provides the integration bridge between Oracle Purchasing and Oracle Time and Labor (OTL) / Oracle Labor Distribution, allowing purchasing functionality to determine whether a Standard Purchase Order line is linked to contractor timecards and, if so, to retrieve the associated monetary value. The package name combines the PO (Purchasing) prefix with HXC, the schema prefix used throughout Oracle Time and Labor (HXC_TIME_ATTRIBUTES, HXC_TIME_BUILDING_BLOCKS, and related tables). Its header references POXVIHXB.pls, with the last recorded revision dated 24 December 2007 at version 120.2.

The central business problem addressed by this private API is rates and amounts on contractor-related purchase orders. Contractor labor is frequently recorded in OTL as submitted or approved timecards, and the corresponding PO line must reflect the value of that labor. PO_HXC_INTERFACE_PVT encapsulates the lookups and OTL API calls needed to resolve a PO line to a contractor, identify the timecards associated with that line, and return the aggregated amount. It also exposes utility fields and existence checks that supporting Purchasing logic uses to avoid unnecessary calls or to drive display and validation behavior.

Key Procedures and Functions

The documented package exposes six procedures and functions. None of their parameter lists are reproduced here; purposes are described as documented.

  • GET_TIMECARD_AMOUNT — The primary entry point and the object most commonly searched for in this package. It calls an OTL API to obtain the total amount of submitted or approved timecards associated with a given Standard PO line. It returns the total timecard amount for the PO line, returning zero when no contractor is associated with the line, together with a standard FND_API return status indicating success or an unexpected error. The source excerpt shows it performing standard API initialization via FND_API.compatible_api_call and declaring internal variables for logging and person identification.
  • GET_PA_TIMECARD_AMOUNT — A parallel routine that retrieves timecard amounts in the Project Accounting (PA) context, supporting project-related PO lines where labor costs are captured against PA rather than purely OTL constructs.
  • CHECK_TIMECARD_EXISTS — Determines whether any timecard exists for the relevant PO line or contractor, allowing callers to short-circuit amount retrieval and to conditionally expose timecard-related UI or validation.
  • FIELD_PO_HEADER_ID — A utility field/accessor used within the package to carry or resolve the PO header identifier needed to relate header-level context to the timecard and line-level lookups.
  • FIELD_PO_LINE_ID — The corresponding utility for the PO line identifier, the key input that anchors the entire timecard-to-PO mapping.

Together these routines form a cohesive private service layer: field accessors supply identifiers, CHECK_TIMECARD_EXISTS performs a lightweight predicate, and the two GET_TIMECARD_AMOUNT variants return monetary values for the OTL and PA scenarios respectively.

Tables Accessed

The package references the following tables through APPS synonyms. PO_LINES_ALL and PO_DISTRIBUTIONS_ALL provide the purchasing-side anchors, supplying PO line identity and distribution detail used to correlate a line with its labor charges. HXC_TIME_ATTRIBUTES and HXC_TIME_ATTRIBUTE_USAGES are the OTL definition tables that describe time attributes, including the attribute definitions that link timecard data to a purchase order line. HXC_TIME_BUILDING_BLOCKS holds the actual timecard building-block records from which submitted and approved amounts are derived. PER_ALL_PEOPLE_F resolves the person (contractor) associated with the line, which is why the source declares l_person_id based on this table. The OTL API invoked by GET_TIMECARD_AMOUNT reads from these HXC tables on the package's behalf.

Usage Notes

Because the object is classified PVT (private), PO_HXC_INTERFACE_PVT is not intended as a public integration API. It is invoked internally by Purchasing and related labor-distribution code paths, and the ETRM metadata records that it is referenced by four other packages. Typical invocation occurs when a purchase order involving contractor labor is created, queried, or validated, particularly where the system must derive or refresh the timecard amount associated with a PO line. The GET_TIMECARD_AMOUNT call follows the standard EBS API contract: it validates the API version through FND_API.compatible_api_call, honors the PO_DEBUG debug flags, and returns FND_API.G_RET_STS_SUCCESS or FND_API.G_RET_STS_UNEXP_ERROR. Customizations and extensions should not call this package directly; they should instead use the supported public Purchasing or OTL APIs that internally rely on it.