Results for “oke_tax_codes_v”

32 results




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

Overview

OKE_TAX_CODES_V is a consolidated reporting view owned by the APPS schema within Oracle E-Business Suite (12.1.1 and 12.2.2). It belongs to the OKE – Project Contracts product family and is documented in ETRM with the short description "Tax code listing." The view is marked VALID and functions as a read-only presentation layer that unifies tax code definitions drawn from two separate Oracle sub-ledgers into a single, product-neutral result set.

Its functional purpose is to give Project Contracts, and any dependent reporting or integration component, one place to resolve tax codes regardless of whether the underlying definition originated in Payables or Receivables. Because Oracle maintains distinct tax repositories for purchasing flows (AP) and for VAT/sales flows (AR), downstream features that must reference "a tax code" without caring about its origin rely on views such as this. The view therefore behaves as a lightweight abstraction rather than a transactional object; it stores no data of its own and inherits the semantics, security, and Multi-Org behavior of its base objects.

Notably, this object is a common landing point for users who begin a search with the term "AP_TAX_CODES_ALL." Although AP_TAX_CODES_ALL is the principal Payables base table, the unified view exposes an identical tax_code style column, so the two are frequently confused during impact analysis, custom report design, and integration mapping.

Underlying Base Objects

The documented view text defines OKE_TAX_CODES_V as a UNION ALL of two selects, and ETRM records the referenced base objects as AP_TAX_CODES_ALL (resolved through a synonym) and the AR-side object AR_VAT_TAX_ALL, with ZX_TAX_CLASSIFICATIONS_V also noted in the documented metadata.

  • AP_TAX_CODES_ALL (Payables) — supplies the purchasing-side tax codes. The view derives BUY_OR_SELL = 'B' from this branch and maps TAX_ID into the ID column, NAME into TAX_CODE, and enforces an open-ended END_DATE via TO_DATE(NULL).
  • AR_VAT_TAX_ALL (Receivables VAT) — supplies the selling/VAT-side tax codes. This branch yields BUY_OR_SELL = 'S' and maps VAT_TAX_ID into ID and TAX_CODE into TAX_CODE, retaining the source START_DATE and END_DATE.
  • ZX_TAX_CLASSIFICATIONS_V — the E-Business Tax classification view, referenced for the tax regime/classification context associated with the codes.

Because the two source branches are combined with UNION ALL, duplicate or overlapping definitions are retained rather than merged, and each row carries the ORG_ID of its owning operating unit. All access is through the APPS synonym, so privilege is governed by the standard APPS grants rather than by direct grants on the base tables.

Key Columns

  • ORG_ID — the operating unit (Multi-Org) identifier that owns the tax code; essential for any org-secured query.
  • BUY_OR_SELL — discriminator indicating origin: 'B' for Payables/purchasing codes and 'S' for Receivables/VAT codes. This is the primary filter for separating the two source populations.
  • ID — the surrogate identifier (TAX_ID or VAT_TAX_ID) of the underlying tax definition.
  • TAX_CODE — the user-visible tax code name, mapped from NAME or TAX_CODE depending on the branch.
  • DESCRIPTION, START_DATE, END_DATE — descriptive text and the effective date range; Payables rows are presented with a null end date (open-ended).
  • ENABLED_FLAG — active/inactive indicator, defaulted to 'Y' via NVL when the source value is null.

Common Use Cases and Queries

Typical uses include validating tax codes before contract billing, building LOV-style lookups, and reconciliation between Payables and Receivables tax definitions. A basic listing filtered to a single operating unit:

  • SELECT tax_code, description, buy_or_sell, enabled_flag FROM apps.oke_tax_codes_v WHERE org_id = :p_org_id AND enabled_flag = 'Y';
  • SELECT buy_or_sell, COUNT(*) FROM apps.oke_tax_codes_v WHERE org_id = :p_org_id GROUP BY buy_or_sell; — separates purchasing from VAT codes.
  • SELECT id, tax_code, start_date, end_date FROM apps.oke_tax_codes_v WHERE buy_or_sell = 'S' AND TRUNC(SYSDATE) BETWEEN start_date AND NVL(end_date, SYSDATE); — currently effective VAT codes.

Because the view is a UNION ALL with no indexes of its own, performance depends entirely on the base tables; queries should always supply ORG_ID and, where possible, BUY_OR_SELL to avoid scanning both branches.