Search Results assign_territory_accesses




Overview

APPS.AS_ATA_NEW_PUB is a public PL/SQL package within the Oracle E-Business Suite Advanced Sales (AS) module, whose name reflects its role in the "Assign Territory Accesses" (ATA) process. It is classified as a PUB API and, in Release 12.1.1 and 12.2.2, retains the single public entry point declared in the package specification header dating to 2005. The package exists to support the bulk reassignment or regeneration of territory access records — the association between sales resources and the territories covering accounts, leads, opportunities, quotes, and proposals — after territory definitions, resources, or transactional ownership data have changed. Because territory coverage determines which sales representatives can see and act upon a given record, this package underpins downstream visibility, forecasting, and reporting. Its documentation is registered in the ETRM repository under the search term "assign_territory_accesses," which corresponds directly to the sole documented routine.

Key Procedures and Functions

The package specification exposes exactly one documented procedure:

  • ASSIGN_TERRITORY_ACCESSES — The only public routine. It performs the territory access assignment pass: it evaluates the current set of accounts, leads, opportunities, quotes, and proposals against territory definitions and resource alignments, then rebuilds or refreshes the corresponding territory access rows. The procedure accepts standard concurrent-program style output parameters (error buffer and return code) plus a substantial set of input arguments that scope the run: an account type and account additional-WHERE clause; a lead status and lead additional-WHERE clause; an opportunity status and opportunity additional-WHERE clause; quote exclusion order and quote exclusion explanation quote flags together with a quote additional-WHERE clause; a proposal additional-WHERE clause; a percentage-analyzed indicator; and debug and trace flags. The parameters are described here by purpose only; no statuses, values, or internal logic are asserted. The trailing ERRBUF and RETCODE parameters confirm that the routine is intended to be invoked from a concurrent program or a form, with outcomes reported to the caller rather than raised as exceptions.

Tables Accessed

The package operates across the principal changed-record staging and target tables of the AS/JTF territory model, as documented in the ETRM metadata (via APPS synonyms):

Usage Notes

AS_ATA_NEW_PUB is an API-layer package, not a form-bound library. It is documented as referenced by zero other packages, meaning it is invoked as a top-level entry point rather than buried inside another PL/SQL dependency chain. The presence of ERRBUF, RETCODE, debug, and trace parameters indicates the canonical invocation path is a concurrent program registered in the Advanced Sales territory management set of requests, submitted by administrators when territory definitions or resource assignments have been modified and territory access data must be reconciled. The account, lead, opportunity, quote, and proposal "additional WHERE" parameters allow the submitting user or program to narrow the assignment pass to a subset of records, which is essential in large installations where a full reassignment is expensive; the percentage-analyzed parameter supports staged or partial execution. Custom code may also call the procedure directly, but callers are responsible for supplying valid dynamic SQL fragments through the additional-WHERE arguments and for interpreting the returned return code. As with most AS territory routines, careful testing on a cloned environment is advisable before running the pass against production data, since the procedure rewrites territory access records that govern sales visibility.