Results for “as_terr_grp_type_v”

4 results




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

Overview

AS_TERR_GRP_TYPE_V is a reporting view in the Oracle E-Business Suite Sales Foundation (AS) module, documented within the ETRM (E-Business Suite Territory Management) data model for releases 12.1.1 and 12.2.2. Its documented purpose is to provide a territory information summary — a flattened, denormalized projection that joins the three principal tiers of the territory hierarchy: territory groups, territory types, and individual territories.

Rather than forcing a report or integration to navigate the hierarchy manually, the view exposes each level's identifiers, names, and — critically — its ENABLED_FLAG in a single row per territory. This makes the view a convenient foundation for territory administration dashboards, territory assignment diagnostics, and inbound/outbound integrations that need to validate whether a given territory group, type, or territory is currently active.

Note that the ETRM metadata states the view is not implemented in the referenced database. This is best understood as a deployment-specific observation: the underlying territory model (Oracle Territory Manager) may not be configured in that particular instance, or the view may not have been deployed because no territory groups were defined. It is a valid object within the AS data model and should not be treated as obsolete.

Underlying Base Objects

The view is defined over three sources, as documented in the view text:

  • AS_TERRITORY_GROUPS — aliased GR; provides the territory group header (name, enabled flag).
  • AS_TERRITORY_TYPES — aliased TY; provides the territory type within a group (name, rank, rollup flag, enabled flag).
  • AS_TERRITORIES_V — aliased TE; provides the individual territory records, including owner, dates, and partner references.

Joins are performed on GR.TERRITORY_GROUP_ID = TY.TERRITORY_GROUP_ID and TY.TERRITORY_TYPE_ID = TE.TERRITORY_TYPE_ID. This is a strictly hierarchical, inner-join structure: a row appears only when a territory has a valid type, and that type has a valid parent group. Any territory orphaned from its group/type chain will not be returned. Because the innermost source is itself a view (AS_TERRITORIES_V), the effective object set is broader than the three named tables, and the ETRM metadata records no additional referenced base objects beyond those shown in the view text.

Key Columns

The view returns twenty-five columns; the most significant are summarized below.

Because three separate enabled flags are surfaced, the view allows a report to distinguish, for example, a territory that is enabled but sitting under a disabled group or type — a common source of assignment confusion.

Common Use Cases and Queries

The view is typically used to audit the enabled/disabled state of the territory hierarchy and to drive territory assignment lookups.

Listing every enabled territory with its full group and type context:

  • SELECT group_name, terr_type_name, terr_name, salesforce_id FROM as_terr_grp_type_v WHERE terr_enabled_flag = 'Y' AND terr_type_enabled_flag = 'Y' AND terr_grp_enabled_flag = 'Y';

Detecting territories that are enabled while their parent group or type is not — a common configuration defect:

  • SELECT territory_id, terr_name, group_name FROM as_terr_grp_type_v WHERE terr_enabled_flag = 'Y' AND (terr_grp_enabled_flag = 'N' OR terr_type_enabled_flag = 'N');

Reviewing team-leader coverage and effective dates within a group, ordered by territory type rank:

  • SELECT terr_type_name, terr_name, emp_first_name, emp_last_name, start_date_active, end_date_active FROM as_terr_grp_type_v WHERE team_leader_flag = 'Y' ORDER BY rank, terr_name;

Because the view performs the hierarchical joins on the caller's behalf, these queries avoid hand-joining the three territory tables and remain stable across ETRM patch levels. For programmatic consumers, the view is best used read-only; all maintenance of territory groups, types, and territories should be performed through the Oracle Territory Manager UI or the supported AS APIs, with this view serving as the query surface.