Results for “jtf_terr_denorm_rules”

24 results




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

Overview

JTF_TERR_DENORM_RULES is an APPS-owned database view in the Oracle E-Business Suite CRM Foundation (JTF) product family. Its documented purpose is to expose denormalized territory rule data for performance purposes — that is, to present territory qualification and ranking information in a pre-flattened form that avoids the expense of recursively resolving territory hierarchies at query time. The view is valid in both EBS 12.1.1 and 12.2.2 and is registered in the ETRM metadata as a VIEW object with a single documented base reference, the synonym JTF_TERR_DENORM_RULES_ALL.

Territory denormalization is a core enabling mechanism for Territory Manager and related CRM modules such as Sales, Telesales, and Quoting. Rather than walking parent-child territory relationships dynamically, Oracle pre-computes the relationships and ranking attributes so that territory assignment queries can be resolved with a single table access. The view therefore sits between the physical denormalized table and consumer code or reporting layers, providing the canonical column projection and enforcing the ORG_ID (multi-org) filter through the underlying _ALL synonym pattern.

Underlying Base Objects

The documented view text is a straightforward projection with no joins, expressions, or WHERE clause:

  • SELECT of 41 named columns, including the organizational key ORG_ID.
  • FROM JTF_TERR_DENORM_RULES_ALL, which ETRM records as a SYNONYM. The _ALL suffix indicates the underlying table is multi-organization partitioned, and the synonym typically points to the base table JTF_TERR_DENORM_RULES.

Because the view performs no filtering, row-level security and operating-unit scoping are the responsibility of the caller or of the base table's own access controls. No _TL, _B, or interface tables are referenced, and no DBA-created PL/SQL function or inline view appears in the documented text, confirming the view is a pure column-projection convenience layer.

Key Columns

The columns fall into three groups: identifier/qualification keys, hierarchy positional metadata, and standard EBS audit and descriptive-flexfield columns.

Common Use Cases and Queries

Typical scenarios include diagnosing territory qualifier results, building custom territory reports, and validating hierarchy flags after a refresh of the denormalization program. Because IMMEDIATE_PARENT_FLAG appears in the view, queries commonly filter on it to isolate direct parent-child relationships rather than the full transitive closure.

Sample SQL against the view:

SELECT TERR_ID, RELATED_TERR_ID, IMMEDIATE_PARENT_FLAG,
       LEVEL_FROM_PARENT, RANK
  FROM APPS.JTF_TERR_DENORM_RULES
 WHERE ORG_ID = :p_org_id
   AND IMMEDIATE_PARENT_FLAG = 'Y'
 ORDER BY TERR_ID, RANK;
SELECT TERR_ID, RANK, ABSOLUTE_RANK, NUM_QUAL, NUM_WINNERS,
       LEVEL_FROM_ROOT, ROOT_FLAG, LEAF_FLAG
  FROM APPS.JTF_TERR_DENORM_RULES
 WHERE TERR_ID = :p_terr_id
   AND QUAL_TYPE_ID = :p_qual_type_id;

SQL> SELECT ROOT_FLAG, LEAF_FLAG, COUNT(*)
FROM APPS.JTF_TERR_DENORM_RULES
GROUP BY ROOT_FLAG, LEAF_FLAG;