Results for “as_access_territories_sum_v”

20 results




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

Overview

The AS_ACCESS_TERRITORIES_SUM_V view is a Sales Foundation (AS) reporting object in the APPS schema that presents a consolidated summary of territory access records. Its documented description, "Territory access summary," reflects its purpose: to expose the relationship between access definitions and the territories to which they grant visibility, joined to the describing territory name and rank information that would otherwise require multi-table navigation. The view is registered as VALID in both Oracle EBS 12.1.1 and 12.2.2 and is exposed under the standard APPS synonym so that it can be queried uniformly across custom reports, concurrent programs, and integration extracts.

Because the object is a view rather than a table, it carries no storage of its own and always returns current data from the underlying territory and territory-access tables. This makes it suitable for real-time lookups of territory access information in the context of Territory Manager and related Sales Foundation functionality. The user search term "territory_name" maps directly to the TERRITORY_NAME column, which is the human-readable identifier most consumers of this view rely on when reconciling access grants by name rather than by numeric identifier.

Underlying Base Objects

The view text is documented over three referenced objects:

  • AS_TERRITORY_ACCESSES (synonym) — the driving table, aliased ACC. It supplies ACCESS_ID and TERRITORY_ID. This is the authoritative record of which access definitions apply to which territories.
  • JTF_TERR (synonym) — the territory definition table, aliased TERR. It provides the territory NAME and the RANK code. The join to this table is an outer join (TERR_ID(+)), so access rows without a resolvable territory are still returned with null territory attributes.
  • AS_LOOKUPS (view) — the Sales Foundation lookup view, aliased ASLKP1. It is joined on TERR.RANK = ASLKP1.LOOKUP_CODE with LOOKUP_TYPE = 'RANK', translating the stored rank code into its meaning. Both lookup predicates use outer joins, preserving rows whose rank code has no lookup translation.

The use of SELECT DISTINCT in the view text indicates that the join pattern can produce duplicate combinations, and the view de-duplicates the result set before presentation.

Key Columns

  • ACCESS_ID — the identifier of the territory access record from AS_TERRITORY_ACCESSES. This is the key used when correlating the view back to the access definition.
  • TERRITORY_ID — the numeric identifier of the territory associated with the access grant, from AS_TERRITORY_ACCESSES.
  • TERRITORY_NAME — the descriptive name of the territory, sourced from JTF_TERR.NAME. This is the column most commonly used for user-facing reporting, and corresponds to the search term "territory_name."
  • TERRITORY_GROUP — documented as a column of the view but projected as a literal NULL in the view text. It is retained for interface compatibility and does not carry data.
  • TERRITORY_RANK — the meaning of the territory rank code, resolved through AS_LOOKUPS where LOOKUP_TYPE = 'RANK'. Values are null when the rank code has no corresponding lookup entry.

Common Use Cases and Queries

The view is typically used to report which territories are reachable through an access definition, and to display territory access by name. A basic listing ordered by territory name is shown below.

SELECT access_id,
       territory_id,
       territory_name,
       territory_rank
FROM   apps.as_access_territories_sum_v
ORDER  BY territory_name;

To locate the access records associated with a specific territory by name:

SELECT access_id,
       territory_id,
       territory_rank
FROM   apps.as_access_territories_sum_v
WHERE  territory_name = :p_territory_name;

To summarize access counts by rank for reporting or reconciliation:

SELECT NVL(territory_rank, 'Unranked') rank_meaning,
       COUNT(DISTINCT access_id) access_count
FROM   apps.as_access_territories_sum_v
GROUP  BY NVL(territory_rank, 'Unranked')
ORDER  BY rank_meaning;

Because TERRITORY_GROUP is always null, report layouts referencing that column should treat it as a placeholder. Consumers should also account for null TERRITORY_NAME and TERRITORY_RANK values, since the outer joins preserve access rows that lack a matching territory or lookup entry.