Results for “jtf_terr_temp_root”

4 results




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

Overview

The APPS.JTF_TERR_TEMPLATES_NAV view is a navigation-support database object within the Oracle E-Business Suite Resource Manager (formerly Oracle Territories / ETRM) module. It exposes a hierarchy-oriented, denormalized result set that drives the Territory Manager and Territory Templates navigation user interface, and it can be queried directly for reporting and integration purposes in both 12.1.1 and 12.2.2.

The view is defined as a three-branch UNION query that assembles a tree of territory-template navigation nodes. Each branch returns an identical projection — label, node_type, node_key, icon_name, leaf_flag, parent_node_type, and parent_node_key — so that the unioned rows form a parent/child navigable structure rooted at the node type key JTF_TERR_TEMP_ROOT. It does not store any data of its own; every row is derived at runtime from the underlying territory and navigation definitions. Because the view is generated by joins across territory metadata, it is primarily read-only and is intended for display and lookup rather than for DML.

The reference to template_territory_id that prompts most searches appears in the second and third branches, where the self-join jtf_terr jtall = jtf_terr jtall2.template_territory_id (+) and the leaf-level projection from jtall.template_territory_id determine whether a template node is a leaf or has children. This column is the pivotal foreign key linking a child territory to the template territory from which it was instantiated.

Underlying Base Objects

The view is built from the following documented objects, all resolved through APPS synonyms and views:

  • JTF_NAV_NODE_TYPES_V (view) — supplies the node_type, icon_name, and root_key values and constrains the query to root_key = 'JTF_TERR_TEMP_ROOT'.
  • JTF_SOURCES (view) — provides source labels (s.meaning) and source_id keys used to identify source nodes.
  • JTF_TERR (synonym to the territory table) — the core territory definition, containing terr_id, name, template_flag, and template_territory_id.
  • JTF_TERR_USGS (synonym) — associates territories with their source, via terr_id and source_id, used to derive the parent key for template nodes.
  • FND_GLOBAL (package) — documented as a referenced base object; supplies session context such as organization and user identifiers that influence row visibility.

Collectively these objects allow the view to reconcile a territory template header, its source association, and its child territories into one navigation tree.

Key Columns

  • LABEL — display name of the node; the source meaning, territory name, or template name.
  • NODE_TYPE — classification of the row: SOURCE, TEMPLATE, or TERRITORY, corresponding to the three union branches.
  • NODE_KEY — unique identifier for the node, quoted; derived from source_id or terr_id.
  • ICON_NAME — icon to render in the navigation tree.
  • LEAF_FLAG — Y/N indicating whether the node has children; for template nodes this is computed from the count of rows referencing template_territory_id.
  • PARENT_NODE_TYPE — type of the parent node (ROOT, SOURCE, or TEMPLATE).
  • PARENT_NODE_KEY — key of the parent, enabling reconstruction of the hierarchy.

Common Use Cases and Queries

Typical uses include validating that template territories have been instantiated correctly, listing the children generated from a given template_territory_id, and audit reporting of the navigation tree.

SELECT node_type, node_key, label, leaf_flag, parent_node_key
FROM   apps.jtf_terr_templates_nav
ORDER BY label;
SELECT label, node_key
FROM   apps.jtf_terr_templates_nav
WHERE  parent_node_key = '"' || :template_territory_id || '"';

Because NODE_KEY values are stored with embedded double quotes, join predicates against them must reproduce the quoting convention shown above. Querying with parent_node_key returns the child territories of a template, which is the canonical technique for tracing the effect of a template_territory_id across the territory hierarchy.