Search Results calc_variance_factors
Overview
ZX_TRD_INTERNAL_SERVICES_PVT is a private PL/SQL package in the Oracle E-Business Suite E-Business Tax (ZX) module, owned by the APPS schema and declared with AUTHID CURRENT_USER. It forms the internal computation engine behind tax recovery and distribution processing within the Transactional Tax Recovery and Distribution (TRD) subsystem. Its central responsibility is calculating how recoverable and non-recoverable portions of tax amounts are distributed across transaction lines, and how those distributions are subsequently reversed, cancelled, or adjusted when transactions are voided, credited, or re-rated.
The package exposes a cache structure, zx_tax_recovery_info_cache_rec, that captures tax-level recovery configuration—regime code, tax, tax_id, recoverability flags, primary and secondary recovery type codes, recovery rate determination flags, default rate codes, effective dates, settlement option, and account source. An associative array of this record type, g_tax_recovery_info_tbl, is used to avoid repeated lookups of static recovery setup during high-volume distribution processing.
Key Procedures and Functions
- CALC_TAX_DIST — The core distribution routine. It computes the recoverable and non-recoverable tax distribution amounts for a given detail tax line and transaction line distribution index, accumulated into the REC_NREC_DIST result table alongside rounding index boundaries and event class context.
- REVERSE_TAX_DIST — Reverses previously generated recoverable and non-recoverable distributions, used when a tax line must be backed out.
- CANCEL_TAX_LINE — Handles cancellation of a tax line, removing or negating associated recovery distribution records.
- CALC_VARIANCE_FACTORS — Derives variance factors that reconcile calculated recoverable amounts against expected or previously stated values.
- DET_APPL_REC_TYPE — Determines the applicable recovery type for a tax line based on recovery configuration and rule flags.
- GET_TAX_RELATED_COLUMNS_STA and GET_TAX_RELATED_COLUMNS_VAR — Retrieve tax-related column values for static and variance contexts respectively, feeding downstream distribution calculations.
- GET_REC_RATE — Returns the recovery rate applicable to a tax, resolving primary or secondary rate codes from setup.
- GET_REC_NREC_DIST_AMT — Retrieves the recoverable and non-recoverable distribution amounts already recorded for a tax line.
- ROUND_REC_NREC_AMT — Applies currency rounding rules to recoverable and non-recoverable amounts, typically using FND_CURRENCIES precision.
- CREATE_MRC_TAX_DISTS — Creates multiple reporting currency (MRC) tax distributions, propagating recovery entries into reporting currency sets of books.
Tables Accessed
The package references tax setup and definition tables including ZX_TAXES_B (tax definition and recovery flags), ZX_RATES_B (recovery rates), ZX_ACCOUNTS (tax accounts), ZX_STATUS_B, and FND_CURRENCIES for rounding and currency attributes. Transactional data is sourced from ZX_LINES and ZX_LINES_DET_FACTORS, with processing state held in ZX_PROCESS_RESULTS. Recovery output is written to ZX_REC_NREC_DIST, its global temporary and sequence companions ZX_REC_NREC_DIST_GT and ZX_REC_NREC_DIST_S, alongside the PLITBLM PL/SQL table index utility and DUAL for singleton queries.
Usage Notes
This is a private (PVT) package and is not a public API. It is invoked internally by the E-Business Tax calculation and recovery flow, principally from ZX_TRD_SERVICES_PUB_PKG and other TRD callers, and is referenced by three other packages. It executes during tax calculation, adjustment, and reversal events triggered from Payables, Receivables, and Purchasing transaction processing, as well as Tax Recovery concurrent and reporting activity. Custom code should call the public ZX_TRD_SERVICES_PUB_PKG or ZX_API_PUB interfaces instead of this package, since its signature and internal cache are not guaranteed across patches.
-
PACKAGE: APPS.ZX_TRD_INTERNAL_SERVICES_PVT
12.1.1
-
PACKAGE: APPS.ZX_TRD_INTERNAL_SERVICES_PVT
12.2.2
-
APPS.ZX_TRD_INTERNAL_SERVICES_PVT dependencies on ZX_API_PUB
12.2.2
-
APPS.ZX_TRD_INTERNAL_SERVICES_PVT dependencies on ZX_API_PUB
12.1.1
-
PACKAGE BODY: APPS.ZX_TRD_INTERNAL_SERVICES_PVT
12.1.1
-
PACKAGE BODY: APPS.ZX_TRD_INTERNAL_SERVICES_PVT
12.2.2
-
APPS.ZX_TRD_SERVICES_PUB_PKG dependencies on ZX_TRD_SERVICES_PUB_PKG
12.1.1
-
APPS.ZX_TRD_SERVICES_PUB_PKG dependencies on ZX_TRD_SERVICES_PUB_PKG
12.2.2
-
PACKAGE BODY: APPS.ZX_TRD_SERVICES_PUB_PKG
12.1.1
-
APPS.ZX_TRD_SERVICES_PUB_PKG dependencies on FND_LOG
12.1.1
-
PACKAGE BODY: APPS.ZX_TRD_SERVICES_PUB_PKG
12.2.2
-
APPS.ZX_TRD_SERVICES_PUB_PKG dependencies on FND_LOG
12.2.2
-
APPS.ZX_API_PUB dependencies on ZX_API_PUB
12.1.1
-
APPS.ZX_TRD_INTERNAL_SERVICES_PVT dependencies on ZX_TRD_INTERNAL_SERVICES_PVT
12.1.1
-
APPS.ZX_TRD_INTERNAL_SERVICES_PVT dependencies on ZX_TRD_INTERNAL_SERVICES_PVT
12.2.2
-
PACKAGE BODY: APPS.ZX_API_PUB
12.1.1
-
APPS.ZX_API_PUB dependencies on ZX_API_PUB
12.2.2
-
APPS.ZX_API_PUB dependencies on FND_LOG
12.1.1
-
PACKAGE BODY: APPS.ZX_API_PUB
12.2.2
-
APPS.ZX_API_PUB dependencies on FND_LOG
12.2.2
-
APPS.ZX_API_PUB dependencies on FND_API
12.1.1