Search Results migrate_voucher_number
Overview
JA_CN_VOUCHER_NUM_MIG_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified under the ETRM standard as an OTHER API type. Its stated purpose, taken directly from the source header, is to migrate history data related to Chinese voucher numbering into the Oracle EBS data model. The package was created in September 2010 and last revised in February 2011 (version 120.2), reflecting its origin in the localizations delivered for Oracle Financials for China.
The business problem it addresses is the transition of voucher (journal) numbering history from legacy or pre-existing structures into the standard JA_CN_VOUCHER_NUMBER repository. Voucher numbers in the Chinese localization follow a period-based, legal-entity-specific numbering sequence (for example, a value such as "G1PMO26/2861"), and this package exists to carry that historical numbering forward so that it remains visible and auditable alongside current-period journals. The package is declared with AUTHID CURRENT_USER, so it executes with the privileges of the calling user rather than the package owner.
Key Procedures and Functions
The ETRM metadata documents three procedures in the package's public interface:
- MIGRATE_VOUCHER_NUMBER — Migrates voucher number history sourced from the GL journal line data. Per the inline documentation, its input parameters identify the ledger, the legal entity, and the period name for which the migration is performed. It is the core routine that populates the voucher number history records.
- MIGRATE_VOUCHER_NUM_PERIODS — Handles migration on a period basis, iterating over the periods that fall within the migration scope so that voucher numbering history is established for each relevant accounting period.
- MIGRATION — The top-level driver procedure that orchestrates the migration effort. It accepts the controlling parameters stored in the package's global variables (ledger, legal entity, chart of accounts, period range, GL date range, profile option value, and a regenerate flag) and calls the subordinate migration routines.
The package also declares a set of global variables used to carry ledger, legal entity, chart of accounts, period, GL date, and regeneration context between procedure calls. Note that parameter lists are intentionally not restated here; only the documented purpose of each procedure is described.
Tables Accessed
The package reads and writes the following objects through APPS synonyms:
- GL_JE_HEADERS — Source of journal entry header information used to identify the journals whose voucher numbers are being migrated.
- GL_LEDGER_NORM_SEG_VALS — Supplies the normalized balancing segment values used to associate voucher numbers with the correct legal entity.
- GL_PERIOD_STATUSES — Used to determine valid accounting periods and their open or closed status when building the period range for migration.
- JA_CN_JOURNAL_LINES — Holds the Chinese localization journal line data that carries or references voucher numbering detail.
- JA_CN_LEDGER_LE_BSV_GT — A global temporary table used to hold the ledger-to-legal-entity-to-balancing-segment mapping during processing.
- JA_CN_VOUCHER_NUMBER — The target table into which migrated voucher number history is written.
Usage Notes
This package is a migration utility rather than a transactional API, so it is not invoked during normal journal entry processing. It is typically run once, during implementation or upgrade, to seed the JA_CN_VOUCHER_NUMBER table with historical voucher numbering information. Because the package is referenced by one other package and exposes a driver procedure, execution is normally driven from a standalone PL/SQL script or a custom concurrent program that sets the global variables and calls MIGRATION. The P_REGENERATE_FLAG variable indicates that the migration can be re-executed to rebuild previously migrated records if needed. Any client-extension wrapping of this package should account for the date and version constraints of the 12.1.1 and 12.2.2 releases and for the AUTHID CURRENT_USER execution model.