Search Results is_resource_error_exists
Overview
JTF_EBI_UTIL is a utility package owned by the APPS schema and classified in the ETRM repository as an API of type UTIL. It belongs to the JTF (Java Tools Framework / CRM Foundation) product family and supports the E-Business Intelligence (EBI) integration flows that move CRM resource and salesperson data between Oracle E-Business Suite and downstream reporting or integration layers. The package header declares AUTHID CURRENT_USER, meaning that all unqualified object references are resolved in the schema of the calling user rather than in the schema of the package owner. This is significant because the package is designed to be invoked from concurrent programs, forms, and custom code that already execute under an APPS session context, so privilege checking is deferred to the invoker's grants.
The package is deliberately narrow in scope. It exposes one context-setting procedure and two diagnostic functions that test whether load or interface batches have produced error rows. It does not perform the data load itself; rather, it provides the plumbing and validation checks required by the broader resource and salesperson interface processes. Because the source header dates from 2009 (revision 120.0), the package is a mature component carried forward from earlier 11i and 12.0 releases into 12.1.1 and 12.2.2 with minimal structural change.
Key Procedures and Functions
The package exposes three documented program units.
- SET_APPS_CONTEXT — A procedure that establishes the APPS runtime context for the session. It accepts a user name and a responsibility name as inputs and uses them to initialize the FND session environment so that subsequent profile-dependent logic (for example, operating unit or security group resolution) evaluates correctly. It is typically the first call made by a caller that has not already been placed into an APPS context by the concurrent manager or Forms session.
- IS_RESOURCE_ERROR_EXISTS — A function accepting a batch identifier and returning a VARCHAR status indicator. It reports whether any resource-level errors were recorded for the specified interface batch. Callers use the return value to decide whether to continue processing, abort the batch, or route the batch to error correction.
- IS_SALESREP_ERROR_EXISTS — A parallel function, also accepting a batch identifier and returning VARCHAR, that reports whether salesperson-level errors exist for the batch. This separates resource (party/CRM resource) validation failures from salesperson (receivable-facing) validation failures, allowing each error class to be handled independently.
Both functions are the object of the common search term "is_resource_error_exists," which reflects their use as gating checks in custom batch-processing code.
Tables Accessed
The package references the following objects through APPS synonyms:
- FND_USER and FND_RESPONSIBILITY_TL — used by SET_APPS_CONTEXT to resolve the supplied user name and responsibility name into the internal identifiers needed to initialize the FND session.
- FND_PROFILE_OPTION_VALUES — read to obtain profile option values that govern the session context, such as operating unit or security group.
- JTF_RS_RESOURCE_EXTNS_INT — the resource interface staging table; queried by IS_RESOURCE_ERROR_EXISTS to detect resource error rows for the batch.
- JTF_RS_SALESREPS_INT — the salesperson interface staging table; queried by IS_SALESREP_ERROR_EXISTS to detect salesperson error rows for the batch.
All access is read-oriented in the documented surface; the package validates and reports rather than mutating interface data.
Usage Notes
JTF_EBI_UTIL is invoked in the context of resource and salesperson interface or conversion batches. The conventional pattern is to call SET_APPS_CONTEXT first to guarantee a valid APPS session, then to call IS_RESOURCE_ERROR_EXISTS and IS_SALESREP_ERROR_EXISTS with the batch identifier before committing downstream processing. The functions are equally useful inside concurrent programs that load interface tables, inside custom PL/SQL wrappers, and inside correction workflows that must determine whether a batch is clean.
The package is referenced by one other package in the ETRM inventory, confirming that it is consumed programmatically rather than through a user-facing form. Because it is AUTHID CURRENT_USER, custom callers must themselves hold execute privilege and the necessary object grants on the underlying tables; wrapping calls inside an APPS-privileged package is the recommended approach when invoking from a restricted schema.