Search Results rec_nrec_dist_tbl_type




Overview

ZX_TRD_SERVICES_PUB_PKG is a public PL/SQL package in the Oracle E-Business Suite ETRM (E-Business Tax) module, owned by the APPS schema and classified as an OTHER API. It provides the shared services layer used by E-Business Tax during the calculation, validation, and distribution of transaction taxes. The package exposes the recovery determination and override logic, tax distribution reversal, exchange-rate maintenance, account (CCID) derivation, and document-level tax validation that other tax engines and external callers rely on.

The package defines several public record and collection types, including REC_NREC_DIST_TBL_TYPE (a table of ZX_REC_NREC_DIST%ROWTYPE), TAX_LINE_TBL_TYPE (a table of ZX_LINES%ROWTYPE), TAX_HOLD_STATUS, and TAX_VARIANCE_INFO_REC_TYPE/TAX_VARIANCE_INFO_TBL_TYPE, which carry distribution, hold, and tax-variance information between the procedures. The header also declares the package globals g_tax_dist_id, g_tax_variance_info_tbl, and g_variance_calc_flag, which persist state during a calculation session.

Key Procedures and Functions

  • DETERMINE_RECOVERY — Evaluates the applicable recovery rules for the event class passed in, setting the recoverable/non-recoverable split that drives later tax account derivation.
  • OVERRIDE_RECOVERY — Applies an explicit user- or application-supplied recovery override to the event class, superseding the rule-based determination.
  • REVERSE_TAX_DIST — Reverses previously generated tax distributions, returning the affected rows through a non-recoverable/recoverable distribution table output parameter.
  • VALIDATE_DOCUMENT_FOR_TAX — Validates the transaction against E-Business Tax controls and returns hold codes and a validation status used to place or release tax holds.
  • REVERSE_DISTRIBUTIONS — Performs the broader reversal of tax distributions associated with the current transaction context.
  • UPDATE_EXCHANGE_RATE — Updates the currency conversion rate, type, and conversion date used for the specified ledger and event class.
  • GET_CCID and GET_OUTPUT_TAX_CCID — Derive the accounting code combination identifiers used for tax postings; the output-tax variant resolves the CCID appropriate to output tax lines.
  • GET_RECOVERABLE_CCID — Returns the CCID corresponding to the recoverable portion of a tax amount.
  • ROUND_AMT_TO_MAU — Rounds a tax amount to the minimum accountable unit of the currency.
  • GET_TAX_HOLD_RLS_VAL_FRM_CODE — Maps a tax hold release reason code to its descriptive validation value.
  • GET_PROD_TOTAL_TAX_AMT — Returns the total product (line-level) tax amount for the transaction under evaluation; this is the function most frequently referenced by callers seeking the aggregated product tax figure.
  • IS_RECOVERABILITY_AFFECTED — Determines whether a change in circumstances affects the recoverability status of the tax.
  • UPDATE_POSTING_FLAG — Sets the posting indicator that controls whether tax distributions are eligible for transfer to the general ledger.

Tables Accessed

Usage Notes

ZX_TRD_SERVICES_PUB_PKG is an internal-facing public API invoked by E-Business Tax calculation flows and by the eleven other packages documented as referencing it. It is called during transaction processing in Receivables, Payables, and related subledgers when tax must be validated, recovered, reversed, or posted, and it can be invoked from concurrent tax programs as well as custom PL/SQL integrations. The GET_PROD_TOTAL_TAX_AMT function is the documented entry point for callers requiring the total product tax amount; because the package manipulates package-level global state (g_tax_dist_id, g_tax_variance_info_tbl, g_variance_calc_flag), it should be treated as session- and context-sensitive, and callers should pass event class and transaction records rather than assuming residual values persist safely across unrelated calls.