Search Results formula_migration_main




```html

Overview

APPS.ZX_AR_FORMULA_MIG_PKG is a migration utility within the Oracle E-Business Suite (EBS) E‑Business Tax (E‑Tax) module, deliverable as part of the 12.1.1 and 12.2.2 repository. Its principal function is to convert legacy Oracle Receivables (AR) tax setup — specifically records held in the AR VAT tax tables and associated tax group/condition structures — into the configuration model used by the next‑generation E‑Tax (ZX) schema. In this way, the package provides a bridge between the historical AR_VAT_TAX_ALL‑based regime and the attribute‑driven tax determination services introduced with the ZX product family.

The package exposes the entry point FORMULA_MIGRATION_MAIN, which orchestrates the population of the ZX formula and rule entities. By transforming legacy taxable‑basis definitions into ZX formulas and their associated conditions into ZX rules, the package enables tax calculation for migrated Receivables transactions without requiring a manual, item‑by‑item re‑implementation of legacy tax logic. This is particularly important during an upgrade from 11i or early 12.x releases, or when consolidating multiple legacy tax engines onto the ZX engine.

Key Procedures and Functions

  • FORMULA_MIGRATION_MAIN — The top‑level driver procedure. It accepts a single output parameter used to return the status of the migration run. When invoked, it coordinates the creation of ZX formulas and rules by reading the legacy AR tax configuration and delegating to the lower‑level procedures. It is the procedure referenced directly by the search term formula_migration_main.
  • CREATE_FORMULA — Populates the ZX formula definition entities, notably ZX_FORMULA_B and ZX_FORMULA_DETAILS. It derives a formula code from the tax group and tax code, and links each formula to the relevant child and parent tax regime/tax code combinations, tax group, content owner, dates, and taxable basis. The procedure also maintains the translated formula entities and their temporary staging table during the load.
  • CREATE_RULES — Builds the ZX rule records that drive tax determination, writing to ZX_RULES_B and its related process results. It maps legacy condition groups and tax condition/exception identifiers onto the new condition model, taking effective dates, enabled status, and content owner from the migration inputs. Rule creation ensures that the generated formulas are actually applied during tax calculation.

All three procedures use an x_return_status or x_return_status OUT NOCOPY convention, consistent with the EBS concurrent‑safe API standard, allowing callers to detect success, warning, or error conditions.

Tables Accessed

  • AR_VAT_TAX_ALL — The primary legacy source of taxable‑basis, enabled flag, and effective date information. Read to seed formula attributes.
  • AR_TAX_GROUP_CODES / AR_TAX_GROUP_CODES_ALL — Provide the legacy condition and exception identifiers that are transformed into ZX rules.
  • ZX_TAX_RELATIONS_T — Supplies the parent and child regime/tax code relationships used to build both formulas and their detail lines.
  • ZX_RATES_B — Read for tax regime, tax code, and content owner identifiers required by both formula and rule creation.
  • ZX_FORMULA_B, ZX_FORMULA_TL, ZX_FORMULA_DETAILS — The principal target tables for the new formula definitions and their translatable/descriptive rows.
  • ZX_FORMULA_B_S, ZX_FORMULA_DETAILS_S — Sequence‑based surrogate key tables used while inserting the primary formula records.
  • ZX_FORMULA_B_TMP — Temporary staging area employed during the migration load.
  • ZX_RULES_B, ZX_PROCESS_RESULTS, ZX_PROCESS_RESULTS_S — Target tables for the generated tax rules and their alphanumeric result values.
  • ZX_CONDITION_GROUPS_B — Source of the condition group identifiers linked to the generated rules.
  • FND_LANGUAGES — Read to determine the installed languages, supporting the insertion of translated formula rows.

Usage Notes

ZX_AR_FORMULA_MIG_PKG is not referenced by any other database package (documented as Referenced by 0 other packages), indicating that it is intended to be invoked directly rather than as a library routine. In a standard EBS environment it is typically called from:

  • Concurrent program / migration script — During an upgrade or a dedicated tax migration initiative, usually through an anonymous PL/SQL block or a wrapper concurrent program that calls FORMULA_MIGRATION_MAIN and interprets the returned status.
  • Custom migration code — When a consulting team is moving a specific set of legacy AR tax codes into the ZX engine, individual procedures such as CREATE_FORMULA and CREATE_RULES may be called in a controlled loop.

Because the package writes directly to core ZX configuration tables, it should be invoked only after a backup, preferably in a test or pre‑production instance, and after confirming that the legacy AR tax setup is fully validated. In 12.2.2 the same package structure and signatures are retained, so migration scripts written for 12.1.1 remain compatible. No forms are documented as calling this package directly; the normal entry point remains the PL/SQL API or a concurrent manager program supplied for tax migration.

```