Results for “build_reverse_item”

8 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

APPS.PA_OTC_API is a public PL/SQL package in Oracle E-Business Suite that supports the import, validation, and update of Oracle Time and Labor (OTL) timecards into Oracle Projects as project expenditures. The package name reflects its role as an OTC (Oracle Timecard) application programming interface: it provides the programmatic bridge that converts labor timecard data captured in Oracle Time and Labor into costed and billable expenditure items within Oracle Projects. In release 12.1.1 and 12.2.2, this interface is essential for organizations that integrate time capture with project costing, enabling labor costs and billable amounts to flow into project budgets, invoices, and accounting without manual re-entry.

The package is classified as an API in the ETRM metadata and is owned by the APPS schema. It exposes a record type, Timecard_Rec, which mirrors the key attributes of a timecard line, including project number and identifier, task number and identifier, expenditure type, quantity, incurred-by person, overriding approver, expenditure item dates, descriptive flexfield attributes, billable flag, work type, assignment, person type, and related purchase order references. This record type defines the data contract that custom code and other EBS components use when calling the package.

Key Procedures and Functions

The package exposes 43 documented procedures and functions. The principal entry points include UPLOAD_OTC_TIMECARDS and TIEBACK_OTC_TIMECARDS, which process timecard records into Oracle Projects and reconcile them back to their source, respectively. UPDATE_OTC_DATA, UPDATE_PROCESS, VALIDATE_OTC_DATA, and VALIDATE_PROCESS drive the update and validation cycles that ensure timecard data is consistent before it is committed.

Supporting routines include POPULATEPROJREC and PROJECTS_RETRIEVAL_PROCESS, which build and retrieve project-related records; BUILD_REVERSE_ITEM, which constructs reversing expenditure items; UPDATECHANGEDORIGTXN, which manages changes to the original transaction; and DETERMINEDIRECTUPDATE, which decides whether a direct update path applies. Utility routines include TRACKPATH, ADD_ERROR_TO_TABLE, and GETDETAILINDEX, which support error handling and row-level detail access.

Validation is performed by a dedicated family of routines: VALIDATE_PROJECT_EXISTS, VALIDATE_TASK_EXISTS, VALIDATE_EXP_TYPE_EXISTS, VALIDATE_JOB_EXISTS, VALIDATE_WORK_TYPE_EXISTS, and VALIDATE_LOCATION_EXISTS. These confirm that referenced projects, tasks, expenditure types, jobs, work types, and locations exist before processing, preventing invalid data from reaching the expenditure tables.

Tables Accessed

The package reads and writes through APPS synonyms. Core Projects tables include PA_EXPENDITURES_ALL, PA_EXPENDITURE_ITEMS_ALL, and PA_EXPENDITURE_COMMENTS, which hold the resulting expenditure items and comments. Reference data is drawn from PA_PROJECTS, PA_PROJECTS_ALL, PA_TASKS, PA_EXPENDITURE_TYPES, PA_SYSTEM_LINKAGES, and PA_WORK_TYPES_B. The staging table PA_TRANSACTION_INTERFACE_ALL is used to route transactions through the interface. Oracle Time and Labor objects, including HXC_TIME_ATTRIBUTES, HXC_TIME_BUILDING_BLOCKS, and HXC_BLD_BLK_INFO_TYPES, supply timecard detail. Error messaging uses FND_NEW_MESSAGES, and organization validation references HR_ALL_ORGANIZATION_UNITS.

Usage Notes

PA_OTC_API is typically invoked indirectly through Oracle Time and Labor and Oracle Projects concurrent programs that transfer timecards to project expenditures, rather than being called interactively from a form. The package is referenced by 13 other packages, indicating its role as a shared service within the Projects API layer. Custom integrations that submit timecard data programmatically should populate the Timecard_Rec structure and invoke the upload and validation routines in sequence, respecting the validation family before committing updates. Because the API writes to core expenditure tables, custom callers should wrap invocations in error handling and use the ADD_ERROR_TO_TABLE mechanism to surface validation failures.