Search Results use_matrix_flag




Overview

ZX_EXTRACT_PKG is the extraction engine of the Oracle E-Business Tax (ETRM) reporting architecture. It is responsible for materializing tax transaction and tax accounting data into the reporting tables (ZX_REP_TRX_DETAIL_T and ZX_REP_ACTG_EXT_T) that back the Tax Repository and the associated tax reporting extracts used for statutory and reconciliation reporting. In the 12.1.1 and 12.2.2 code lines the package body (versioned as zxriextractwpkgb.pls) assembles tax lines, ledger context, legal reporting unit information, and party/location details into flattened reporting rows, then purges and re-populates them on demand. Because it reads configuration that varies by operating unit, ledger, and tax regime, it resolves accounting context dynamically at runtime rather than at compile time, and it honors multi-organization and multi-reporting-currencies (MRC) settings through FND_PRODUCT_GROUPS and GL_LEDGERS lookups.

Key Procedures and Functions

  • POPULATE_TAX_DATA — the principal driver routine. It builds the extraction rows for tax lines and accounting entries, coordinating the supporting lookups and bulk inserts into the ZX_REP_* tables.
  • PURGE — removes previously extracted data so that a re-extraction run starts from a clean state; typically scoped to the extraction range or reporting entity.
  • USE_MATRIX_FLAG — determines whether the tax matrix (matrix-based tax determination) applies for the tax regime/configuration being extracted. This is the object referenced by the search term "use_matrix_flag"; downstream extraction logic uses its return to decide which records and attributes to include.
  • GET_REP_CONTEXT_ID — resolves the reporting context identifier from the legal reporting unit, location, and registration data, providing the contextual key used to tie extracted rows together.
  • GET_LEGAL_MESSAGE — retrieves the legal/statutory message text associated with a tax regime or configuration for inclusion in the extract.
  • GET_VAT_TRANSACTION_CODE_NAME — returns the descriptive VAT transaction code name for a given transaction code, used to enrich the reporting output.
  • ZX_UPD_LEGAL_REPORTING_STATUS — updates the legal reporting status, marking records as reported or otherwise advancing their state in the reporting lifecycle.
  • SET_RETCODE and APPEND_ERRBUF — utility routines that set the PL/SQL return code and append messages to the error buffer, supporting the standard concurrent-program reporting contract.

Tables Accessed

The package reads and writes the ETRM reporting tables ZX_REP_TRX_DETAIL_T and ZX_REP_ACTG_EXT_T, and reads the tax line source ZX_LINES. Configuration and context come from FND_PRODUCT_GROUPS (multi-organization flag), GL_LEDGERS and GL_PERIOD_STATUSES (ledger and period validation), HR_LOCATIONS_ALL and HR_ORGANIZATION_INFORMATION (legal reporting unit location and organization attributes), the HZ party model (HZ_PARTIES, HZ_ORG_CONTACTS, HZ_PERSON_PROFILES, HZ_RELATIONSHIPS), and the XLE first-party/registration tables (XLE_ENTITY_PROFILES, XLE_ETB_PROFILES, XLE_REGISTRATIONS) for legal entity, establishment, and registration details.

Usage Notes

ZX_EXTRACT_PKG is invoked through the ETRM extraction concurrent programs (Tax Repository extraction and related reporting jobs) and is referenced by 25 other packages that depend on its context-resolution and matrix-flag logic. Custom code should not modify populated ZX_REP_* rows directly; instead, call POPULATE_TAX_DATA and PURGE within the supported extraction sequence, respect the SET_RETCODE/APPEND_ERRBUF error contract, and evaluate USE_MATRIX_FLAG where matrix-based determination affects the extraction scope. Because the package is version-sensitive across 12.1.1 and 12.2.2, patches to zxriextractwpkgb.pls should be applied only through standard ETRM patch delivery.