Results for “dealer_code”

50+ results




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

Overview

APPS.XTR_USER_ACCESS is a small utility package in Oracle E-Business Suite that resolves the dealer code associated with the currently authenticated application user. It belongs to the XTR (Treasury) product family and acts as a session-level lookup helper rather than a transactional API. The package exposes a single public function, DEALER_CODE, whose purpose is to return the dealer code that corresponds to the Oracle Applications user ID held in the FND session context.

The ETRM classification for this object is OTHER, reflecting its nature as an internal support routine rather than a documented business API. In the EBS 12.1.1 and 12.2.2 releases, Treasury and related dealer-facing functionality frequently needs to know which dealer an operator represents, and this package provides that mapping in a single, reusable call. The body is heavily referenced—119 other packages depend on it—which confirms its role as a foundational access routine within the XTR and adjacent modules.

Key Procedures and Functions

The package body documents one public function:

  • DEALER_CODE — Returns the dealer code for the current user. Internally it delegates to a private helper, get_dealer_code, which implements the actual query. The function also references a package-level variable g_dealer_code, used to cache the value once fetched. The original source contains commented-out caching logic (retained for reference to bug 3630670) and the live implementation simply returns the result of get_dealer_code. The header comment records the file revision (xtruaccb.pls 120.1) and an owner tag, indicating a maintenance history rather than a first-release API.

No parameters are documented for DEALER_CODE; it operates entirely against the FND global session variable fnd_global.user_id. Callers should therefore treat it as a context-sensitive lookup that reflects whoever is logged in at the time of invocation.

Tables Accessed

The package reads one table, resolved through the APPS synonym layer:

  • XTR_DEALER_CODES — The cursor c_get_dealer_code selects dealer_code from this table filtered by user_id = fnd_global.user_id. This is a read-only access; the package performs no inserts, updates, or deletes. The table stores the association between Oracle Applications users and their corresponding dealer codes and is therefore the authoritative source for the mapping the function returns.

Because the query is keyed on the FND user ID, the returned value is scoped to the current session and is not intended for cross-user reporting.

Usage Notes

XTR_USER_ACCESS.DEALER_CODE is typically invoked from within PL/SQL blocks running in an authenticated EBS session—for example, from Forms-based Treasury pages, OA Framework controllers, or custom extensions that need to know the operating dealer. Given its wide dependency footprint (119 referencing packages), it should be treated as a stable internal contract: callers rely on its return value matching the session user.

Developers writing custom code against this package should observe two practical constraints. First, the function depends on fnd_global.user_id being populated; invoking it outside a properly initialized FND session will not yield a meaningful result. Second, because the implementation caches the value in g_dealer_code, long-running sessions that change effective user context should re-initialize or re-query as appropriate. For 12.1.1 and 12.2.2 environments the package is delivered as part of the APPS schema and should not be modified; extensions should wrap rather than replace it.