Search Results fv_cleanup_xla_gt
Overview
FV_UTILITY is a shared PL/SQL utility package in the Oracle E-Business Suite Financials vertical (FV) product family, owned by the APPS schema and declared with AUTHID CURRENT_USER. It provides a central library of low-level helper routines used throughout the FV modules rather than exposing an end-user business transaction. Its responsibilities cluster around four areas: diagnostic logging and messaging, retrieval of ledger and organization context, flexfield segment and account derivation, and transactional support for subledger accounting (XLA) processing. In Oracle EBS 12.1.1 and 12.2.2, the package is treated as an internal infrastructure object; the ETRM metadata classifies it as API classification OTHER, reflecting that it is not a public, supported integration interface. The package is referenced by 85 other packages, which indicates it is a pervasive dependency across the FV code base and that changes to it carry broad impact. Developers searching for get_segment_col_names are typically looking for the routine that resolves the column names of the accounting key flexfield segments for a given chart of accounts, a prerequisite for building dynamic SQL against the Accounting Flexfield structure.
Key Procedures and Functions
Twenty-one documented procedures and functions are recorded for the package. The principal groups are as follows.
- Logging and messaging: LOG_MESG, DEBUG_MESG, and MESSAGE provide overloaded entry points for writing diagnostic output and emitting user-visible messages, accepting level, module, and message arguments and, for MESSAGE, an optional pop-up flag.
- Ledger and context retrieval: GET_LEDGER_INFO returns ledger identifier, chart of accounts identifier, currency, and status for an operating unit. GET_CONTEXT resolves FV context variables such as CHART_OF_ACCOUNTS_ID, ACCT_SEGMENT, and BALANCE_SEGMENT for a given user and responsibility. GET_ORG_INFO supplies organization information, and GET_REPORT_INFO returns report-related attributes.
- Segment and account derivation: GET_SEGMENT_COL_NAMES returns the segment column names used by the chart of accounts, which is the routine referenced by the search term. CALC_CHILD_FLEX_VALUE, CALC_CONCAT_ACCTS, GET_ACCRUAL_ACCOUNT, and GET_FUND_INFORMATION derive flexfield values, concatenated account combinations, accrual accounts, and funding data respectively.
- Period handling: GL_GET_FIRST_PERIOD and GET_PERIOD_YEAR resolve the opening period and the year associated with a period, and TIME_STAMP returns a formatted timestamp.
- Maintenance and cleanup: DELETE_FV_BC_ORPHAN and FV_CLEANUP_XLA_GT remove orphaned records and purge temporary XLA staging data. TIN is a smaller scalar helper.
Tables Accessed
The package reads and writes through APPS synonyms. Logging and request context depend on FND_CONCURRENT_REQUESTS, while segment configuration is drawn from FND_SEGMENT_ATTRIBUTE_VALUES. Ledger, period, and accounting calendar data come from GL_LEDGERS, GL_PERIODS, and GL_PERIOD_STATUSES. Human-resources and purchasing configuration are read from PER_ALL_PEOPLE_F and PO_SYSTEM_PARAMETERS. FV transactional detail is held in FV_BE_TRX_DTLS. The XLA global temporary tables — XLA_ACCT_PROG_DOCS_GT, XLA_ACCT_PROG_EVENTS_GT, XLA_AE_HEADERS_GT, XLA_AE_LINES_GT, XLA_BAL_AC_CTRBS_GT, XLA_BAL_ANACRI_CTRBS_GT, and XLA_BAL_ANACRI_LINES_GT — support subledger accounting staging and cleanup operations.
Usage Notes
FV_UTILITY is invoked indirectly rather than directly by end users. FV forms and concurrent programs call its logging and messaging routines to record diagnostics in the concurrent request log, and its context, segment, and account routines to resolve the ledger and flexfield environment before performing transactions. The XLA-related cleanup and orphan-deletion routines are normally scheduled as part of period-end and subledger maintenance processing. Because GET_SEGMENT_COL_NAMES and its peers return structural metadata used to assemble dynamic SQL, customizations should treat the package as read-only and avoid modifying it, given its 85 downstream dependents. Developers extending FV functionality should call the documented public routines rather than duplicate their logic, and should validate behavior on both 12.1.1 and 12.2.2 since the source header reflects a long-maintained code line.