Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential.

When to Use the GL Balances Corruption Fix Script GLBALFIX (Doc ID 387775.1)

In this Document

Goal
Solution
1. What the script will fix
2. What to check before running this script
3. Actions to take prior to running the script
4. Limitations and Warnings
5. Upgrades
6. Where can I get GLBALFIX ?
7. What to do if there are errors ?
8. How to Uninstall GLBALFIX ?
Still Have Questions?
References

APPLIES TO:

Oracle General Ledger - Version 11.5.10.2 and later


Information in this document applies to any platform.
GLBALFIX - GL Balances Corruption Fix Script

GOAL

When To Use The GL Balances Corruption Fix Script GLBALFIX.

The GL Balances Corruption Fix script was created by development to allow customers to safely detect and/or fix corrupt actual balance data
in their gl_balances table.

This uses the data in the posted journal lines to rebuild the balances with the correct amounts, therefore this is only to be used when the
posted journal lines are correct and accurate.

There are three versions of the script available.

The original version which works for version 11.5.1 through 11.5.10 CU2 of applications.
A version that will work on release 11.5.1 to 11.5.10 CU2 for both standard and Average Daily balances.
A release 12 version for both standard and Average Daily balances, that will work for releases R12.0, R12.1 and R12.2.

The script is not intended to diagnose the cause of the corruption. Root cause analysis should be done prior to running this script or take a
backup of gl_balances to enable root cause analysis to be done after running the script.

SOLUTION

1. What the script will fix

The script only works on the "Actual" balances of the accounts whose balances do not match the posted lines amounts:

1. Period to Date Balances (Bad PTD Amount)


2. Quarter to Date Balances (Bad QTD Amount)
3. Year to Date Balances (Bad YTD Amount)
4. Retained Earnings Balances (Bad YTD Amount)
5. Project to Date Balances (Bad PJTD Amount)
6. Duplicate Balances (Duplicate Row)
7. Extra Balances (Extra Row)

GLBALFIX requires the data in the journals is correct and recalculates the balances based in the posted journals. If corruption or
incorrections exist in the journals the script may fail or calculate incorrect balances.

第 1 頁,共 4 頁 30/10/2019 10:46


Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

2. What to check before running this script

1. Confirm the invalid data via one of the following options:

a) Run the Period Closing activity diagnostic test. Get the script location from Document 1416402.1: Oracle General
Ledger (GL) Diagnostics Catalog.
This Diagnostic will show you the different balance corruptions that you may have in a specific period (balances not matching
journals, unbalanced totals, etc.) for a specific ledger/set of books.
You should execute this going back period by period until you have no more corruption reported, because the problem may
have started before you noticed it.

b) Run the Account analysis report and General ledger 132 reports which give warnings if the journals and lines do not match.
The Summary Trial balance also gives a warning if the trial balance is out of balance, i.e. the total DR's do not match the total
CR's (this is a feature since about 11.5.6).

2. Check if the root cause is due to program incompatibilities by reviewing the following:

For 11i:
Document 301743.1 Alert: Possible Balance Corruptions in 11.5
Document 238345.1 Alert: Possible Balance Corruptions caused by Incompatibility issues in 11.5
Document 300933.1 How to Prevent Possible General Ledger Balances Corruption Due to Incorrect Program Incompatibilities
in 11.5
For R12:
Document 1070410.1 How to Prevent Possible General Ledger Balances Corruption Due to Incorrect Program Incompatibilities
in Release 12

3. Confirm that the invalid data is only for actual balances.

The script does not fix encumbrances or budgets balances, nor accounts with Budgetary DR and Budgetary CR types, even
though their balances are actuals.

3. Actions to take prior to running the script

1. Read the full readme before taking any action.


2. Confirm the whole fix on a test instance first.
3. Backup the GL_BALANCES and/or GL_DAILY_BALANCES tables.
4. No GL users should be doing updates on the system when the fix script is running.
5. Take the necessary steps to make sure the Posting, Open Period, Translation, Add/Delete Summary Templates, and Program -
Incremental Add/Delete Summary Templates programs don't run while the GL Balances Corruption Fix script is running. These
programs can be safely run for sets of books/ledgers other than the one being corrected, but it is generally easier and safer to block
them out completely.
6. The script should be run in report mode first.

4. Limitations and Warnings

This is an edited extract from the readme file. Review the full readme file if there is any doubt whether the script should be run.

1. The script assumes that the journal entry information is accurate. It compares the gl_balances table with the journal entries tables,
and reports any discrepancies. It fixes the gl_balances table to match the information in the journal entries tables. Any problems with
the journal entry information should be corrected before running this script.
2. The script assumes that the summary template account hierarchies are accurate. When fixing balance corruption, it fixes summary
accounts based upon the associated detail account fixes and the current account hierarchy. If the current account hierarchy is
inaccurate or if the summary accounts have balances inconsistent with the detail balances, then correct this first, generally by
dropping and recreating the summary template.
3. The script only works on actual balances. It does not fix problems with budget or encumbrance balances.
4. The script only fixes issues in the gl_balances table. It does not fix issues in gl_code_combinations, gl_period_statuses,
gl_je_batches, gl_je_headers, gl_je_lines, gl_account_hierarchies, etc.
5. To fix daily balances in the gl_daily_balances table use the NEW GLBALFIX script. Support will provide you the correct version for
your installation.
6. If using budgetary DR and budgetary CR accounts, the following restriction applies. The script does not maintain budgetary dr and
budgetary cr balances. The script will error out if it detects that the customer is using budgetary dr and/or budgetary cr account
types.
The glbalfix can be used, depending on the account types of the accounts in the range.

第 2 頁,共 4 頁 30/10/2019 10:46


Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

Budgetary dr, budgetary cr, retained earnings or net income statement accounts cannot be in the range.
Revenue and expense can be, only if it is being run for a period where it would not affect retained earnings, i.e., the current year.

If the range of accounts contains any budgetary dr or cr (D, C) accounts it cannot be used.
If the range of accounts contains the retained earnings or net income account it cannot be used.
If the range of accounts contains income statement accounts (R, E), and is run for a period in a prior year, it cannot be used.
If the range of accounts contains income statement accounts and is run in the current year, it can be used.
If the range of accounts contains balance sheet accounts (A,O,L), it can be used.

So if the discrepancies have been identified, and can be broken down into ranges that do not included budgetary dr/cr accounts, and
do not involve or affect retained earnings or net income, then this can possibly be used.
7. The script does not maintain functional entered balances. The script will error out if the track_entered_func_curr_flag column set to
'Y' in gl_sets_of_books.
8. The script expects that each year has the same number of periods. If after the specified start period, some years have more periods
than others, the script will error out.
9. The script cannot be run for the first period ever defined in the calendar. It can be run for the first opened period for your set of
books/ledgers, but there must be a period defined, though potentially not opened, that is before this period. The script will error out
if it is run for the first period in the calendar.
10. The script cannot be run for periods for which journals have been purged. The script will error out if it is run for periods in which
journals have been purged.
11. The script cannot be run for periods for which balances have been purged. It also cannot be run for a period where the period
immediately prior to that period has had balances purged. The script will error out if it is run for periods that satisfy these criteria.
12. The script will use the current retained earnings account defined for your set of books/ledgers. If you have changed retained earnings
accounts, then the script may move balances from your old retained earnings account to the current one. The script will do this for all
fiscal years where the period immediately following the fiscal year (aka the first period of the next year) is equal to or later than the
start period specified when the script was started.
13. The script will attempt to retrieve all retained earnings accounts that have balancing segment values that fall into the specified
account range, even if the balancing segment value has never been posted to and does not have balances that need to be fixed. If
the appropriate retained earnings account does not exist, the script will attempt to create it. The script will fail to run if the account
cannot be created. If the account does exist, it will be used even if it is disabled, out of date, or secured.
14. The script will use the current account type for each account. If an account was treated as an income statement account for some
years and a balance sheet account for others, the balances for the account will be changed to be consistently treated as the current
account type for all of the years processed by the script. The script will do this for all fiscal years where the period immediately
following the fiscal year (aka the first period of the next year) is equal to or later than the start period specified when the script was
started.
15. The script doesn't recalculate translations. After running the script, you may need to rerun translation to get up to date translated
balances.
16. The script will rollback any sql*plus updates to the gl_balances table that result in actual balances that don't match journals. It will do
this even if the updates were intentional; for example to seed opening balances. It will only do this for periods equal to or after the
start period specified when running the script.

5. Upgrades

The script is not upgradable from 11i to R12. If you have upgraded with the 11i glbalfix version already installed, then you need to drop the
objects created by the script, in order to install the R12 version of glbalfix, otherwise it will fail with compilation errors in PACKAGE BODY
APPS.GL_BALANCE_FIX.
You can ask support for instructions on how to drop those objects.

6. Where can I get GLBALFIX ?

You need to request the script to Oracle Support by logging a Service Request.

Please provide the evidence and nature of corruption you have found by uploading the results gathered in Section 2 of this document into
the SR.

For more information you can review the R12 script README here: glbalfixr12readme.txt.

7. What to do if there are errors ?

Contact Oracle Support by logging a Service Request.

8. How to Uninstall GLBALFIX ?

第 3 頁,共 4 頁 30/10/2019 10:46


Document Display https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...

It may happen that one 11i environment with GLBALFIX already installed is upgraded to R12.

The GLBALFIX is not upgraded and therefore when providing the R12 version of the script it will fail during install with compilation errors in
PACKAGE BODY APPS.GL_BALANCE_FIX.
The previous version of the script must be completely removed in order to install the new version.

a) get a list of the related objects:

select owner, object_name, object_type, created


from all_objects
where object_name in (
'GL_ACCOUNT_TEMPLATE_GT',
'GL_BALANCE_FIX_GT',
'GL_BALANCE_FIX_RE_GT',
'GL_DAILY_BALANCE_FIX_GT',
'GL_PERIOD_OVERLAP_GT',
'GL_PERIOD_ORDER_GT',
'GL_BALANCE_FIX');

b) Connect to each owner account and drop all the objects returned above.

Note:

Before R12 the tables GL_OPEN_INTERIM and GL_DAILY_OPEN_INT are standard GL and they should NOT be dropped manually when
uninstalling GLBALFIX, if it is to remain on 11i.
If you have upgraded to R12, they must have been dropped by the upgrade scripts (glrdrtbl.sql), causing gl_balance_fix package to become
INVALID. The old 11i GLBALFIX objects must then be dropped, including these 2 tables if they still exist. They will be recreated with the
correct columns by glqblfix.sql when GLBALFIX is reinstalled.

c) Now you can install the new version.

Still Have Questions?

To discuss this information further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the
My Oracle Support General Ledger Community.

To provide feedback on this note, click on the Rate this document link.

REFERENCES

NOTE:2017330.1 - Is it Allowed to Run GLBALFIX - Balances Corruption Datafix Script in Parallel for Multiple Ledgers?
Didn't find what you are looking for?

第 4 頁,共 4 頁 30/10/2019 10:46

You might also like