Search Results get_trx_value_index




Overview

ZX_TDS_RULE_BASE_DETM_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Tax (EBTax) schema, APPS. Its name reflects its role as the Tax Determination Services (TDS) rule base determination engine. The package is the internal workhorse that evaluates the determining factors, conditions, and rule hierarchies configured in Oracle E-Business Tax to arrive at tax applicability and tax rate outcomes for a given transaction line. It is declared with AUTHID CURRENT_USER and is not intended for direct invocation by external code; it is called by the public E-Business Tax engine packages and other private helpers during the tax determination lifecycle.

The package's declarative section, shown in the source excerpt, defines numerous PL/SQL collection types that mirror E-Business Tax configuration entities. These include types for determining factor template codes, condition group codes and identifiers, chart of accounts and ledger identifiers, determining factor classes and codes, tax parameter codes, condition data types, operators, and numeric, alphanumeric, low, and high value columns. These collections allow the engine to cache and iterate over condition and factor metadata efficiently during rule evaluation, which is a performance-critical operation in high-volume transaction processing.

Key Procedures and Functions

The documented public surface of the package consists of six procedures and functions:

  • RULE_BASE_PROCESS — The primary driver procedure. It orchestrates the evaluation of the rule base for a transaction or transaction line, iterating across condition groups and determining factors to produce a tax determination result.
  • GET_TSRM_NUM_VALUE — Retrieves the numeric value associated with a Tax Service Request Model (TSRM) determining factor, used when the condition data type is numeric.
  • GET_TSRM_ALPHANUM_VALUE — The counterpart to the numeric function, retrieving the alphanumeric (character) value for a TSRM determining factor. This is the function the user searched for. It supplies the character-based input value that is compared against alphanumeric conditions such as tax registration numbers, product categories, or classification codes.
  • GET_TRX_VALUE_INDEX — Returns an index into the transaction value structure, positioning the engine on the correct value element during rule evaluation.
  • INIT_CEC_PARAMS — Initializes parameters related to the Condition Evaluation Component (CEC), setting up the evaluation context before condition processing begins.
  • EVALUATE_IF_FIRST_PARTY — Evaluates whether the party on the transaction is a first party, a determination relevant to certain tax rules that distinguish between first-party and third-party transactions.

Tables Accessed

The package reads and writes against core E-Business Tax and shared EBS tables through APPS synonyms. ZX_CONDITIONS, ZX_CONDITION_GROUPS_B, ZX_DET_FACTOR_TEMPL_B, and ZX_DET_FACTOR_TEMPL_DTL provide the condition and determining factor configuration that drives evaluation. ZX_DETERMINING_FACTORS_B and ZX_PARAMETERS_B supply determining factor and tax parameter definitions. ZX_REGIMES_B, ZX_TAXES_B, ZX_RULES_B, and ZX_STATUS_B provide the regime-to-rate flow and rule and status hierarchy. ZX_LINES and ZX_PROCESS_RESULTS hold the transaction line input and the determination output respectively. FND_ID_FLEX_SEGMENTS is consulted for key flexfield segment values relevant to determining factors, while MTL_SYSTEM_ITEMS and XLE_ENTITY_PROFILES supply item and legal entity attributes used in condition matching.

Usage Notes

ZX_TDS_RULE_BASE_DETM_PVT is invoked internally by the E-Business Tax determination engine during tax calculation on transactions, including order entry, receivables, payables, and purchasing flows. It is referenced by seven other packages, confirming its role as a shared internal component rather than a standalone API. Because it is classified as PVT, Oracle does not guarantee its signature across releases; customizations should not call it directly. Developers investigating tax determination behavior, particularly the source of alphanumeric determining factor values surfaced through GET_TSRM_ALPHANUM_VALUE, can use this package as a diagnostic reference point when tracing how configured conditions map to transaction attributes.