Search Results g_retcode_warning




Overview

CSF_AUTO_COMMIT_PVT is a private (PVT-classified) PL/SQL package body owned by the APPS schema in Oracle E-Business Suite. It belongs to the CSF (Field Service / Service) module family and is responsible for automatically committing planned tasks — that is, transitioning task records from a planned state to a committed state once they fall within a defined commit horizon. The package operates as the implementation layer behind a concurrent program: it receives standard concurrent manager OUT parameters for error buffer and return code, outputs status messages through a set of private logging routines, and signals completion using return code constants that correspond to success, warning, and error outcomes.

The body declares several private constants and variables at the package level, including the canonical success/warning/error message strings (g_errbuf_success, g_errbuf_warning, g_errbuf_error), the numeric return codes 0, 1, and 2, a cached UOM-hours value, and a conc_fail exception used to abort processing when a concurrent request submission fails. It also declares a collection type requests as a table of numbers indexed by binary integer, indicating that the package manages a batch of submitted concurrent request IDs.

Key Procedures and Functions

ETRM documents a single public procedure for this package:

  • update_planned_task_status — The core entry point. It accepts standard concurrent program OUT parameters for error buffer and return code, together with IN parameters controlling which tasks are processed: a task source, a task query flag, a territory flag, a query identifier, a commit horizon and its unit of measure, and a task ID range bounded by from/to task IDs. The procedure evaluates planned tasks against the commit horizon and updates their status accordingly, recording any exceptions in the error buffer rather than raising them to the caller. When no task source or query criteria are supplied, defaults allow the procedure to process all eligible tasks.

Supporting private constructs include convert_to_days, a function used to normalize a duration expressed in a given unit of measure into days using the package-level UOM-hours reference, so that the commit horizon can be compared consistently regardless of the UOM supplied. Private print and printlog procedures write progress and diagnostic messages to the concurrent log.

Tables Accessed

The package accesses the base table JTF_TASKS_B through its APPS synonym. JTF_TASKS_B is the foundational task table in the CRM/Service task model, holding task definitions and status. The package reads planned task rows from it and writes updated status values back after determining that a task falls within the commit horizon.

It also references DBMS_LOCK, used to serialize execution so that overlapping concurrent runs do not process the same task set simultaneously, and PLITBLM, an internal item-type lookup utility. The requests collection suggests the package submits and tracks concurrent requests, monitoring their completion before concluding the run.

Usage Notes

CSF_AUTO_COMMIT_PVT is not intended for direct invocation from forms or custom code; it is a private implementation package executed almost exclusively through its associated concurrent program. The procedure surface mirrors the standard concurrent manager interface — x_errbuf and x_retcode as OUT NOCOPY parameters with the remaining arguments exposed as concurrent program parameters — which confirms that administrators schedule it via the Concurrent Programs and Request Sets forms in EBS 12.1.1 and 12.2.2.

Typical scheduling is periodic, with the commit horizon and horizon UOM parameters tuned to the organization's service throughput. The return code drives concurrent manager completion status: 0 (success), 1 (warning, raised as g_errbuf_warning when some tasks could not be committed), and 2 (error, raised as g_errbuf_error for fatal conditions). If a submitted request fails, the conc_fail exception aborts processing. ETRM records no packages referencing this one, reinforcing its role as a leaf-level batch implementation with no downstream API dependents.