Results for “as_territory_types”

8 results




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

Overview

The view AS_TERRITORY_TYPES is a Sales Foundation (AS) object in Oracle E-Business Suite, documented in the E-Business Suite Technical Reference Manual (ETRM) for releases 12.1.1 and 12.2.2. Its ETRM description identifies it as obsolete, defined as "Territory types (multi-org)." In the standard reference, the object is not implemented in the shipped database, which indicates that it survives only as a legacy compatibility stub rather than an active component of the Territory Management data model. Historically, the view exposed the configurable territory type definitions — the classification records that grouped territories of similar purpose, such as sales, service, or collections — and applied the multi-org security predicate so that rows were filtered by the operating unit context of the session.

Because Oracle restructured Territory Management in the Oracle Sales and Trade Management (formerly CRM) footprint, the underlying territory tables were relocated and reorganized, and AS_TERRITORY_TYPES was retained only for backward compatibility with older customizations, reports, and integrations. In a 12.1.1 or 12.2.2 instance, the view may either be absent or present but non-functional depending on patch level and whether the migrated territory schema is used. This distinction matters for reporting and integration design: the view should not be treated as a supported data source for new development.

Underlying Base Objects

Per the documented view text, AS_TERRITORY_TYPES is defined over a single base object, AS_TERRITORY_TYPES_ALL. No other referenced base objects are documented in the ETRM entry, making this a straightforward filtering view rather than a join construct. The relation is a filtered projection: the outer view selects the complete column list from the _ALL table and restricts rows through a WHERE clause on ORG_ID that implements multi-organization security.

The security predicate evaluates the ORG_ID column against the operating unit identifier obtained from the USERENV('CLIENT_INFO') session attribute, converting the first ten characters of CLIENT_INFO to a number. Where the value is blank, a literal of -99 is substituted, so that rows lacking an ORG_ID (shared, organization-independent definitions) are visible alongside rows belonging to the current operating unit. This is the standard "NVL(ORG_ID, -99)" multi-org pattern used widely in EBS 11i and early R12 views, and it explains the view's designation as multi-org.

Key Columns

  • TERRITORY_TYPE_ID — Primary key of the territory type definition.
  • NAME — User-visible name of the territory type.
  • ENABLED_FLAG — Indicates whether the type is active and selectable.
  • NUM_QUALIFIERS — Number of qualifiers associated with the type, a legacy grouping attribute.
  • ROLLUP_FLAG — Governs whether territories of this type participate in rollup hierarchies.
  • TERRITORY_GROUP_ID — Foreign key to the owning territory group.
  • ACCESS_TYPE — Controls the access semantics applied to the type.
  • RANK — Ordering/priority value used when evaluating territory types.
  • ORG_ID — Operating unit identifier driving multi-org filtering.
  • DESCRIPTION — Free-text description of the type.
  • ATTRIBUTE_CATEGORY and ATTRIBUTE1–15 — DFF-enabled descriptive flexfield columns for customer extensions.
  • Audit columns — CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN.

Common Use Cases and Queries

The most defensible use of this view is diagnostic. A query confirms whether the object exists and, where it does, returns the legacy territory type set filtered to the session's operating unit. It is also useful when auditing pre-upgrade customizations that still reference the object.

Example diagnostic query:

SELECT t.territory_type_id, t.name, t.enabled_flag, t.org_id
FROM   as_territory_types t
ORDER  BY t.name;

For historical migration analysis, a comparable query against the base table — AS_TERRITORY_TYPES_ALL — bypasses the multi-org predicate and reveals all operating unit rows, which is often required when reconciling legacy territory definitions. Because the ETRM states the view is not implemented and obsolete, any production integration should be redirected to the current Territory Management tables rather than relying on AS_TERRITORY_TYPES.