Search Results func_defect_flag




Overview

The view CSS_DEF_TERR_MGMT_V belongs to the CSS – Support product family within Oracle E-Business Suite, and is documented in ETRM as a territory management view. Its stated purpose is to expose defect records together with the customer party attributes that drive territory assignment and routing rules. The view is classified as obsolete, and the ETRM implementation record explicitly states "Not implemented in this database," meaning it is retained only as a historical metadata artifact. It therefore carries no runtime role in a standard 12.1.1 or 12.2.2 instance. The object is a join-based view rather than a stored table: it does not persist data, does not carry an owner in the documented 12.2.2 metadata, and has no referenced base objects recorded in ETRM. Despite this, the view text remains informative because it shows how defect and party data were historically flattened into a single result set for territory evaluation.

Underlying Base Objects

Although ETRM lists no referenced base objects, the embedded view text identifies four sources combined in a single SELECT. CSS_DEF_DEFECTS_B supplies the defect header rows, including identifiers and classification attributes. CSS_DEF_DEF_ERROR_CODES is joined with an outer join (DER.DEFECT_ID(+)) filtered to the primary error code flag, reflecting the rule that at most one error code per defect is authoritative. CSS_DEF_DEF_LANGUAGES is likewise outer-joined on DLA.PRIMARY_FLAG(+) = 'Y' to retrieve the primary language of the defect. Finally, HZ_PARTIES is joined through DEF.ORIGINATING_CUSTOMER_ID = PAR.PARTY_ID to attach the originating customer's party record. The selective use of outer joins on the two detail tables ensures a defect is still returned when no error code or language row is flagged primary, preserving a complete defect population for territory evaluation.

Key Columns

The projection deliberately mixes defect columns, party columns, and hard-coded placeholders. The strongest signal is TIER_CODE, which is defined as NULL in the view text. This is a classic migration shim: the column exists to satisfy a consumer's expected signature, but no source value is available. The same pattern applies to PARTY_SITE_ID, AREA_CODE, NUM_OF_EMPLOYEES, UI_DEFECT_FLAG, FUNC_DEFECT_FLAG, and ERROR_CODE_ID, all rendered as NULL or TO_NUMBER(NULL). Defect attributes (DEFECT_ID, PROBLEM_TYPE_ID, PHASE_ID, SEVERITY_ID, PRIORITY_ID, and the platform, product, component, and sub-component identifiers) carry real values. LANGUAGE_CODE_ID is populated from the language table, and the fifteen attribute columns plus CONTEXT support descriptive flexibility. Party location columns—COUNTRY, CITY, STATE, PROVINCE, COUNTY, POSTAL_CODE—and PARTY_NAME, aliased as COMP_NAME_RANGE, provide the geographic and organizational dimensions used for matching territory rules.

Common Use Cases and Queries

The historical use case is territory and routing determination: joining defect severity, priority, and customer location to assignment rules. Because TIER_CODE is always null, any query that filters or groups on it returns no meaningful result, and this is the most common reason users searching for that column find the view unusable. A representative query would be:

  • SELECT DEFECT_ID, PARTY_NAME, COUNTRY, STATE, SEVERITY_ID, PRIORITY_ID FROM CSS_DEF_TERR_MGMT_V WHERE COUNTRY = 'US';
  • SELECT DEFECT_ID, PARTY_ID, CITY, POSTAL_CODE FROM CSS_DEF_TERR_MGMT_V WHERE PROBLEM_TYPE_ID = :p;
  • SELECT SEVERITY_ID, COUNT(*) FROM CSS_DEF_TERR_MGMT_V GROUP BY SEVERITY_ID;

In 12.1.1 and 12.2.2 environments, the recommended approach is to confirm whether the view exists and is compiled before relying on it; if territory logic is required, the underlying defect and party tables should be queried directly, since the null placeholders render several columns functionally inert.