Search Results ptnr_post_processing_calc_tax




Overview

ZX_TPI_SERVICES_PKG is a server-side PL/SQL package in the Oracle E-Business Tax (EBTax) module, owned by the APPS schema. It provides the third-party integration (TPI) service layer that allows external tax service providers to be invoked during tax determination and calculation on a transaction line. Within Oracle EBS 12.1.1 and 12.2.2, EBTax supports two broad processing models: a native (internal) tax engine and an external partner service to which tax calculation is delegated. This package implements the orchestration logic for the latter, handling service provider resolution, external attribute derivation, partner pre-processing, the partner service call itself, and the post-processing and synchronization of results returned by the partner.

The package header (version 120.13) describes the interface used by the tax engine to determine whether a provider is applicable to a given regime. A package-level temporary structure, tax_regime_tmp_tbl, was introduced (Bug 5515283) to record "hit" regimes already evaluated, avoiding redundant calls to the provider applicability procedure for the same regime across detail tax lines. The package is referenced by six other packages, confirming its role as a reusable integration component rather than an end-user entry point.

Key Procedures and Functions

  • GET_SERVICE_PROVIDER — The routine most commonly associated with this package. It resolves the applicable external tax service provider (and subscription) for a transaction line and regime, forming the entry point for determining which provider should service the tax call.
  • POPL_PVRDR_INFO_TAX_REG_TBL — Populates provider information into the tax regime temporary table, based on the event class record and transaction line index.
  • DERIVE_EXT_ATTRS — Derives external attributes required by the provider, keyed by regime, provider, and service type.
  • PARTNER_PRE_PROCESSING — Performs preparatory work before the partner service is invoked, using the tax regime, provider, and partner processing flag.
  • CALL_PARTNER_SERVICE — Invokes the external partner service for the regime, provider, and service type.
  • PTNR_POST_PROCESSING_CALC_TAX — Applies post-processing for partner-calculated tax results.
  • PTNR_POST_PROC_SYNC_TAX — Synchronizes partner-returned tax results back into the tax engine's data structures.
  • TRX_LINE_APP_REGIMES_TBL_HDL — Handles the applicable-regimes table for a transaction line.
  • GET_INCL_TAX_AMT — Returns inclusive tax amount information used during processing.

Tables Accessed

The package operates primarily on EBTax configuration and transaction data. ZX_SRVC_SUBSCRIPTIONS and ZX_API_REGISTRATIONS determine which provider is subscribed and API-registered; ZX_REGIMES_B resolves regime definitions; ZX_PARTY_TAX_PROFILE and HZ_PARTIES supply party-level tax configuration; XLE_ENTITY_PROFILES and XLE_ETB_PROFILES provide legal entity and establishment context. Transaction and result data reside in ZX_LINES, ZX_LINES_S, ZX_LINES_DET_FACTORS, ZX_DETAIL_TAX_LINES_GT, and ZX_API_CODE_COMBINATIONS, while ZX_JURISDICTIONS_B, ZX_EVNT_CLS_MAPPINGS, and FND_APPLICATION supply jurisdiction, event class mapping, and application metadata. Access is performed through APPS synonyms.

Usage Notes

ZX_TPI_SERVICES_PKG is not invoked directly by end users; it is called internally by the tax engine during tax determination and calculation when an external partner service is configured for a regime. It is typically reached from the Tax Calculation and Tax Determination flows, and is referenced by six other packages, several of which constitute the public EBTax API layer. Customizations should not modify the package; instead, extensions should use the supported EBTax APIs and provider subscription framework. Because its signature has evolved (the header shows version 120.13), callers should confirm the interface against the deployed patch level when migrating between 12.1.1 and 12.2.2.