Showing posts with label General Ledger. Show all posts
Showing posts with label General Ledger. Show all posts

Saturday, June 29, 2013

Oracle GL Daily Conversion Rates Deep Drive


We will discuss the process of Oracle GL Daily Conversion Rates with few example and technical code.


Client Industry - Applicable to clients implementing Oracle General Ledger

Business Case - Almost all clients who implement Oracle General Ledger make use of the currency exchange rate interface, since it provides a convenient and automated way for multicurrency processing within Oracle Apps. Many clients make use of this interface to report financials in a common currency as well as to perform inter-company transactions between companies that have 2 different functional currencies.

Solution – A simple custom interface program can be written which will import rates automatically from a vendor and will also load these rates into the core GL daily rates table using the delivered daily rates interface tables. Find below a high-level process flowchart which can be used as a starting point to design this interface:

1. Request file is sent to Vendor (Reuters, Bloomberg, Oanda).
2. The encrypted file “XXGLDAILYRATES_XXXX.txt” from the vendor is obtained where XXXX is “mmdd”.
3. If the file is available, continue step 4 thro 11. Else, go to step 12.
4. Invoke the Shell script to decrypt the file and load the data from the file into the daily rates interface table .
5. Call the concurrent program “Program - Daily Rates Import and Calculation”
6. Load the daily rates from interface table into Oracle base tables till the end of next fiscal month.
7. Calculate the Period average rates.
8. Load the period rates into the interface table (gl_daily_rates_interface) and Call the concurrent program “Program - Daily Rates Import and Calculation” to load the period rates from interface table into Oracle base tables.
9. Calculate the Period average and end rates for NON - US currencies.
10. Load the period average and end rates into Oracle base tables (gl_translation_rates)
11. Archive the decrypted data file as “XXGLDAILYRATES_XXXX.txt” in ARCHIVE/inbound folder where XXXX is “mmdd”.
12. Page the Finance on-call support.

Example with code:
Base tables for GL Daily Rates are—Gl_DAILY_RATES
Interface table for GL Daily Rates are—Gl_DAILY_RATES_INTERFACE
Moving the Data from Flat File to Base Table using SQL * LOADER:
Options (Skip =0)
Load data
infile '/ebs/oracle/apps/apps_st/appl/gl/12.0.0/bin/gl_daily_rates.csv'
Insert into table GL_daily_rates_stg
fields terminated by ','
optionally enclosed by '"'
Trailing nullcols
(From_currency,
 To_currency, 
 From_conversion_date, 
 To_conversion_date,
 User_conversion_type, 
 conversion_rate, 
 Mode_flag)
Moving the data from Staging tables to Base Tables using Standard Interface Programs:
Create a Staging table based on the requirement
CREATE TABLE XXGL_DRATES_STG (
FROM_CURRENCY VARCHAR2(15),
TO_CURRENCY VARCHAR2(15),
FROM_CONVERSION_DATE DATE,
TO_CONVERSION_DATE DATE,
USER_CONVERSION_TYPE VARCHAR2(30),
CONVERSION_RATE NUMBER,
MODE_FLAG CHAR(1));

Inserting Data into Staging Table:
Insert into XXGL_DRATES_STG Values (
'USD','INR','29-Jan-2009','31-Jan-2009','Corporate','50','I');


Create a Package with validations to move the data into Interface Tables

CREATE OR REPLACE PACKAGE xxgl_drates_pkg
IS
   PROCEDURE daily_rates_prc (retcode OUT NUMBER, errbuff OUT VARCHAR2);
END;

CREATE OR REPLACE PACKAGE BODY xxgl_drates_pkg

IS
   PROCEDURE daily_rates_prc (retcode OUT NUMBER, errbuff OUT VARCHAR2)
   IS
      CURSOR cur_drates
      IS
         SELECT from_currency, to_currency, from_conversion_date,
                to_conversion_date, user_conversion_type, conversion_rate,
                mode_flag
           FROM xxgl_drates_stg;

      lv_from_currency          VARCHAR2 (15);

      lv_to_currency            VARCHAR2 (15);
      lv_user_conversion_type   VARCHAR2 (30);
      lv_conversion_rate        NUMBER;
      lv_err_flag               VARCHAR2 (1)  := 'A';
   BEGIN
      FOR i IN cur_drates
      LOOP
         BEGIN
            SELECT currency_code
              INTO lv_from_currency
              FROM fnd_currencies
             WHERE currency_code = i.from_currency;
         EXCEPTION
            WHEN NO_DATA_FOUND
            THEN
               lv_from_currency := NULL;
               lv_err_flag := 'E';
               fnd_file.put_line
                  (fnd_file.LOG,
                   'The Currency Code is not defined
/not enabled if not enabled enable it.'
                  );
         END;

         fnd_file.put_line (fnd_file.LOG,

                               'The Currency Code inserting IS--'
                            || lv_from_currency
                           );

         BEGIN

            SELECT currency_code
              INTO lv_to_currency
              FROM fnd_currencies
             WHERE enabled_flag = 'Y' AND currency_code = i.to_currency;
         EXCEPTION
            WHEN NO_DATA_FOUND
            THEN
               lv_from_currency := NULL;
               lv_err_flag := 'E';
               fnd_file.put_line
                  (fnd_file.LOG,
                   'The Currency Code is not defined
/not enabled if not enabled enable it.'
                  );
         END;

         fnd_file.put_line (fnd_file.LOG,

                               'The Currency Code inserting IS--'
                            || lv_to_currency
                           );

         BEGIN

            SELECT user_conversion_type
              INTO lv_user_conversion_type
              FROM gl_daily_conversion_types
             WHERE user_conversion_type = i.user_conversion_type;
         EXCEPTION
            WHEN NO_DATA_FOUND
            THEN
               lv_user_conversion_type := NULL;
               lv_err_flag := 'E';
               fnd_file.put_line (fnd_file.LOG,
                                  'The USER_CONVERSION_TYPE is not defined.'
                                 );
         END;

         fnd_file.put_line (fnd_file.LOG,

                               'The USER_CONVERSION_TYPE inserting IS--'
                            || lv_user_conversion_type
                           );

         BEGIN

            SELECT user_conversion_type
              INTO lv_user_conversion_type
              FROM gl_daily_conversion_types
             WHERE user_conversion_type = i.user_conversion_type;
         EXCEPTION
            WHEN NO_DATA_FOUND
            THEN
               lv_user_conversion_type := NULL;
               lv_err_flag := 'E';
               fnd_file.put_line (fnd_file.LOG,
                                  'The USER_CONVERSION_TYPE is not defined.'
                                 );
         END;

         fnd_file.put_line (fnd_file.LOG,

                               'The USER_CONVERSION_TYPE inserting IS--'
                            || lv_user_conversion_type
                           );

         IF lv_err_flag = 'A'

         THEN
            INSERT INTO gl_daily_rates_interface
                        (from_currency, to_currency,
                         from_conversion_date, to_conversion_date,
                         user_conversion_type, conversion_rate,
                         mode_flag
                        )
                 VALUES (lv_from_currency, lv_to_currency,
                         i.from_conversion_date, i.to_conversion_date,
                         lv_user_conversion_type, i.conversion_rate,
                         i.mode_flag
                        );
         END IF;
      END LOOP;

      COMMIT;

   END;
END xxgl_drates_pkg;


Create an Executable – XXGL_DRATES_PKG_EXEC
Execution File
Create a Concurrent program – XXGL_DRATES_PKG_EXEC IFace Conc prg
Add the Conc program to the Request group
In custom module, Run the Conc Program thro’ SRS Window.
In GL MODULE Run the Standard Concurrent Program –Program - Daily Rates Import and Calculation

Wednesday, June 26, 2013

Oracle General Ledger Journal Import Process Overview

Abstract

Accounting transactions are originated as a result of normal business activities in Financial and Manufacturing modules of Oracle Applications, as well as in external modules. In order to register those transactions into the General Ledger, a process called Journal Import must take place.

This process works based on the existing data in an interface table. The table is called GL_INTERFACE.

Each subledger populates this table through one or more specific processes. Once the information is in the interface table, the Journal Import process loads the General Ledger tables creating unposted journal batches.

Details

Section 1: Journal Import Overview

Accounting transactions are originated as a result of normal business activities in Financial and Manufacturing modules of Oracle Applications, as well as in external modules. In order to register those transactions into the General Ledger, a process called Journal Import must take place.
This process works based on the existing data in an interface table. The table is called GL_INTERFACE.

Each subledger populates this table through one or more specific processes. Once the information is in the interface table, the Journal Import process loads the General Ledger tables creating unposted batches.
The only exception to this process is the Oracle Fixed Assets module before Family Pack G, which directly loads the General Ledger tables. Currently FA also populates the GL_INTERFACE table to transfer the accounting data to GL.

The following diagram illustrates the flow of the procedure:
SEQ.ACTIONCONDITIONGO TO
1Populate GL interface table (subledgers, external systems, ADI, etc.)2
2Import journal by Source / Group ID3
3Journal Import terminated without Errors? (check the execution report for errors or warnings)Yes11
No4
4Is the Source a standard Subledger?Yes5
No9
5Correct the errors in the Source. In case of a standard subledger you may need support assistance.6
6Is a R12 environment? (then no need to delete as already rolled back to XLA)Yes8
No7
7Delete the incorrect batch to be imported again. 8
8Need to Transfer the corrected batch again from the source1
9Many Errors ?Yes7
No10
10Use the Correct Journals form to fix the errors in the interface2
11The batch is created ready for PostingEND

Section 2: Data structures involved in the Journal Import process

GL_INTERFACE

This table is used to import journal entry batches through Journal Import. You insert rows in this table and then use the Run Journal Import form to create journal batches. Currently the Journal Import can import from tables with different names, but the same structure.
You must supply values for all NOT NULL columns.
Not Null Columns (may have variations depending on the release):
  • STATUS
  • ACCOUNTING_DATE
  • CURRENCY_CODE
  • DATE_CREATED
  • CREATED_BY
  • ACTUAL_FLAG
  • USER_JE_CATEGORY_NAME
  • USER_JE_SOURCE_NAME

GL_INTERFACE_CONTROL

This table is used to control Journal Import execution. Whenever you start Journal Import from the Import Journals form, a row is inserted into this table for each source and group_id that you specified. When Journal Import completes, it deletes these rows from the table. If you run Journal Import from outside of the Import Journals form, you must insert a row into the GL_INTERFACE_CONTROL table first.
Is from this table that Journal Import knows the name of the interface table to import (INTERFACE_TABLE_NAME).
The phase of the process is indicated through the Status field. It can have the following values:
  • P - Pending; the journal import process has not been started.
  • S - Selected; the data group identified by Source and Group id has been selected for processing.
  • I - In process; the data group identified by Source and Group id has been selected and is actually in process.
Not Null Columns:
  • JE_SOURCE_NAME
  • STATUS

GL_INTERFACE_HISTORY

This table stores the rows that are successfully imported from the GL_INTERFACE table through the import process. The General Ledger application adds rows to this table every time you successfully run Journal Import, with the Archive Journal Import Data option enabled. This option is defined on the Concurrent Program Controls form. This option increases execution time but can be used for auditing purposes.
You use this information for historical reference only. General Ledger does not use the data stored in this table.

GL_IMPORT_REFERENCES

Depending on the Journal Source configuration, this table may be populated by the Journal Import Process. You can specify the Journal Entry sources for which you want to maintain your transaction's origin by entering 'Yes' in the Import Journal References field of the Journal Sources form. When Journal Import is run for a source that has 'Yes' set for the Import Journal References field, this table will be populated with the necessary information to match journal entry lines to the originating documents in the source. This functionality is known as Account Drilldown.
This uses the following fields to link to the subledger information:
  • gl_sl_link_id
  • gl_sl_link_table
In R12 normal subledgers this always points to the XLA tables (value is 'XLAJEL'), whilst in 11i it points to subledger specific tables.

The data stored in this table may vary depending on the release and type of transaction. The reference fields are used in different ways by each subledger.
In the following table is the use that some of the most common subledgers give to these fields:
TransactionsReference
1
Reference
2
Reference
3
Reference
4
Reference
5
Reference
6
Reference
7
Reference
8
Reference
9
Reference
10
RELEASE 11i









Payables/PaymentsVendor nameInvoice idCheck idExternal check numberPaid invoice number'AP Payments'SOB idInvoice distribution line numberInvoice payment idCash, Discount, Liability, Exchange Gain,
Exchange Loss,
Future Pay
Payables/InvoicesVendor nameInvoice idDistribution line number
Invoice number'AP Invoices'SOB id

Expense, Liability
Receivables/Transactionsposting control idcustomer trx idcust trx line gl dist idtrx numbercust account numberCUSTOMERbill to customer idCM, DM, CB, INVtype||account classRA_CUST_TRX_LINE_GL_DIST
Receivables/Receiptsposting control idcash receipt id ||cash receipt history idline idreceipt number

pay from customerTRADETRADE_'source_type'AR_CASH_RECEIPT_HISTORY
Receivables/Applications (cash)posting control idcash receipt id ||receivable application idline idreceipt numbertrx number, nullcust trx typepay from customerTRADE, CCURapplication type||source typeAR_RECEIVABLE_APPLICATIONS
Receivables/Applications (CM)posting control idreceivable application idline idtrx numbertrx number, nullcust trx typebill to customer idCMAPPapplication type||source typeAR_RECEIVABLE_APPLICATIONS
Receivables/Adjustmentsposting control idadjustment idline idtrx numberadjustment numbercust trx typebill to customer idADJADJ_source typeAR_ADJUSTMENTS
Receivables/Miscel.Rec.posting control idcash receipt idline idreceipt numbercash receipt history id
pay from customerMISCMISC_source typeAR_CASH_RECEIPT_HISTORY
Receivables/Bills Receivableposting control idtransaction history idline idtrx numbercustomer trx idcust trx typedrawee idcust trx typeBR_source typeAR_TRANSACTION_HISTORY
PurchasingPO, REQdoc header iddoc distribution iddoc number





Inventorymta.gl batch idmta.organization code







Consolidations (TRX)consolidation idconsolidation run idsource hournal header idsource journal line numsource ccid'Transaction'subsidiary SOB
source batch id
Consolidations (BAL)consolidation idconsolidation run idsource ccidcurrency typebudget version id'Balances'subsidiary SOBperiodamount typeactual amount
Intercompanytransaction numbertransaction idoffset line numberCLEARING, OFFSETSENDER, RECEIVER




RELEASE 12









(all subledgers)



entity_idaccounting_event_idae_header_idae_line_numDR amountCR amount


Section 3: Transfer and Import Processes

A. Entering transactions into the Interface Table

In Oracle Applications, modules such as AP, AR, PO, INV and WIP have concurrent processes that take the information from database structures in which the business activity is stored and inserts it into the GL_INTERFACE table.

Some of the transferring concurrent programs by module in Release 11i are :
ModuleProgramExecutable
APPayables Transfer to General LedgerAPPPST
FACreate Journal EntriesFAPOST
ARGeneral Ledger Transfer ProgramARGLTP
AXAX Transfer to GLAXXPSTGL
PAInterface Burden Cost to GLPADTBC
PRC: Interface Labor Costs to General LedgerPAGGLT
PRC: Interface Usage Costs to General LedgerPASGLT
PRC: Interface Revenue to General LedgerPATTGL
INVTransfer transactions to GLINCTGL


In R12 the Create Accounting for each subledger populates the common XLA tables (Subledger Accounting). When the accounting is Final then the Transfer Journal Entries to GL process populates the GL interface and automatically submits the Journal Import. It can also submit the Post for the imported journals automatically.
For more detail information please see Create Accounting and Transfer Journal Entries to GL Programs.

If the information comes from an external module, the GL_INTERFACE table must be populated through a means such as SQL*Loader, Pro*C, a PL/SQL procedure or Applications Desktop Integrator (ADI or Web ADI)).

Following is a description of important fields in the interface table:

Account Combination
An account combination can be stored in two ways:
  • Entering a value for field CODE_COMBINATION_ID.
  • Entering a value for each segment of the accounting flexfield in use. The fields are SEGMENT1, SEGMENT2,..., SEGMENTn according to the definition of the structure.
If the account combination is stored in both ways, the Journal Import process will take the value stored in the SEGMENTn columns.

Group ID
This field is used by the sending process to group the transactions.
When the information comes from Oracle Applications subledgers, the value for this field is assigned automatically and is defined by the sequence GL_INTERFACE_CONTROL_S. The Journal Import process selects records based on SOURCE and optionally GROUP_ID.

Journal Type
Budget, encumbrance or actual journals can be entered into GL_INTERFACE. The type of journal that is being created is stored in the field ACTUAL_FLAG. The possible values are:
  • A : Actual
  • E : Encumbrance
  • B : Budget
Currency Conversion
Journals entered in a currency other than the functional currency can be stored in two ways:
  • Enter the amount, conversion type and conversion date in the fields ENTERED_CR or ENTERED_DR, USER_CURRENCY_CONVERSION_TYPE and CURRENCY_CONVERSION_DATE respectively. If you enter a rate type of User, then you must also enter a conversion rate in the CURRENCY_CONVERSION_RATE column. For all other conversion types you must enter a conversion date in the CURRENCY_CONVERSION_DATE column. In this case, the Journal Import process automatically calculates the amount in the functional currency.
  • Populate fields ENTERED_CR or ENTERED_DR and ACCOUNTED_CR or ACCOUNTED_DR without specifying a conversion type and date. The Accounted amount must be your converted debit or credit amount.
Journal Source
This value is stored in field USER_JE_SOURCE_NAME and corresponds to the name of the journal source. Examples: Receivables, Payables, Inventory, etc.

Reference Fields
The reference fields are optional, but if they are defined, they are interpreted in the following way:

REFERENCE1Batch name. Its structure is: <Reference1><Source><Request ID><Balance Type ><Group ID>
REFERENCE2Batch description; if one is not defined, it will look like: Journal Import <Source><Request ID>
REFERENCE4Journal entry name; with the format: <Category><Currency>< Conversion Type >< Conversion Rate>< Conversion Date ><Encumbrance Type ID><Budget Version>. Some of this information depends on the journal type.
REFERENCE5Journal entry description; if one is not given, it will follow this format: Journal Import - Request ID
REFERENCE6Reference or journal number. If it is not defined, it is automatically defined as Journal Import Created.
REFERENCE7Reverse Journal Flag
REFERENCE8Reverse Journal Period
REFERENCE10Journal line description
REFERENCE21...30The values and meanings for these fields depend on the Journal Source and Release. They store information used to identify and match the journal with the source document. The values for these fields map to REFERENCE_1 through REFERENCE_10 in the GL_JE_LINES table and the GL_IMPORT_REFERENCES table.

B. Journal Import

Journal import is a complex tool, which performs a lot of validation on thousands of records at a time. Journal import loads data from the subledgers into the GL_INTERFACE table and then into GL_JE_BATCHES, GL_JE_HEADERS and GL_JE_LINES tables.

Define the concurrent program controls.

The Concurrent Program Controls form can be used to improve the performance of the Journal Import, MassAllocation/MassBudgeting, and Open Period programs. The performance of Journal Import can be improved by increasing the number of journal lines it holds in memory.
Before R12 this setup was done in a specific form:



Form name: GLXSTCPC
Responsibility: General Ledger Super User
Navigation: Setup > System > Control

In R12 the setup uses the Profile Options instead:
  • GL: Number of Accounts In Memory
  • GL: Archive Journal Import Data
  • GL: Number of Records to Process at Once
  • GL Journal Import: Separate Journals by Accounting Date

Submit Journal Import Run

Once the data is in the GL_INTERFACE table, you can manually submit the import process from the Import Journals form.



Form name: GLXJIRUN
Responsibility: General Ledger Super User
Navigation: Journals > Import > Run

Currently it is also possible to submit the journal import from the Submit Concurrent Requests form.



Source: Select the Source from which you want Journal Import to create journal entries, such as Receivables, Payables, etc..
Note that in R12, the transactions are only in the interface temporarily during the journal import (the data stays in the XLA tables), therefore it is not possible to submit the journal import for subledger sources using subledger accounting. The Journal Import program is automatically launched by the transfer accounting program.

Group ID: If there is a value in the GROUP_ID field in the GL_INTERFACE table, either intentionally populated by the user, or by the subledger creating these transactions, then to import these transactions into General Ledger, the user must specify the Group ID on the Import Journals form.
A list of values option is provided on the Group ID field on the Import Journals form, which allows the users to pick a valid value (existing in the interface tables). General Ledger will then import data with the journal source and Group ID combination you specify.
If you do not specify a Group ID, General Ledger imports data from the specified journal entry source with no corresponding Group ID (null Group ID).
In this case it can happen that different batches in the interface with null Group ID get merged during the journal import. To avoid this  we recommend to always use the Group ID.

You can choose your run options as well as whether to import descriptive flexfields at this time.

Journal Import Concurrent Program: GLLEZL

This concurrent process generates a request log file and also an execution report. The request log file shows valuable information for troubleshooting purposes, such as:
  • Set of books or Ledger ID and name
  • Chart of accounts ID
  • Number of segments in the accounting flexfield and a description of each segment
  • Functional currency
  • Whether suspense accounting is enabled
The Journal Import Execution Report summarizes the results of the import and points out the lines that have errors.
It also contains a list in the end with the description of all the possible error codes (it doesn't mean that they have occurred).

C. Journal Import Correct

If the Journal Import run results in error, no records with the selected Source and Group_id will be imported. All of those rows will remain in the GL_INTERFACE table.
In R12, the rows comming from subledger accounting are rolled back to the XLA tables and removed from the interface, so they must be corrected at subledger level and then transferred again, to avoid reconciliation problems between GL and the subledgers.



You can use the Correct Journal Import Data form to correct the errors.
  • The first screen gives you the option to find the journals with certain errors.
Form name: GLXJICOR
Responsibility: General Ledger Super User
Navigation: Journals > Import > Correct

Query on the errors you find in the Journal Import Execution Report to correct the data. You can only query journal import lines that have a status of Error or Corrected.

  • This screen shows the actual journal with the errors.
Examples: EF04, EF02 etc.



Form name: GLXJICOR

Once corrected you can then click on the Import Journals button to rerun Journal Import.
The screen shows the different types of information in the journal you can choose from:
    • Batches/Journals,
    • Accounts,
    • Journal Lines,
    • Descriptive Flexfields
    • References.
Depending on what the error is, select the part of the journal you need to go to in order to make your corrections.

D. Journal Import Delete

Use this ONLY if the data can be repopulated into the GL_INTERFACE table, such as from a spreadsheet or from an external source. The principle is the same as for journal correction: only the batches with status of error can be deleted.
In R12 this is not possible to delete subledger batches because the rows are rolled back to the XLA tables and removed from the interface.
Currently the Deletion of the journals is submitted as a Concurrent Request:  Program - Delete Journal Import Data.



Older versions use a form to delete the batch.



Form name: GLXJIDEL
Responsibility: General Ledger Super User
Navigation: Journals > Import > Delete

Select the Source, Request ID and Group ID.

WARNING!!! After you Delete, you can not get the data back again.
If from a spreadsheet or another system (i.e. not a subledger) then it can be re-sent.
So be careful when you decide to do this!

Section 4: Journal Import Error Codes

Following is a sample of Journal Import validation errors (Per Journal Import Execution Report). This may not be complete as some new codes may be added as needed.

Period Error Codes
  • EP01 This date is not in any open or future enterable period.
  • EP02 This set of books does not have any open or future enterable periods.
  • EP03 This date is not within any period in an open encumbrance year.
  • EP04 This date is not a business day.
  • EP05 There are no business days in this period.
Unbalanced Journal Error Codes
  • WU01 Warning: This journal entry is unbalanced. It is accepted because suspense posting is allowed in this set of books.
  • EU02 This journal entry is unbalanced and suspense posting is not allowed in this set of books.
  • EU03 This encumbrance journal entry is unbalanced and the Reserve for Encumbrance account is not defined.
Flexfield Error Codes
  • EF01 This Accounting Flexfield is inactive for this accounting date.
  • EF02 Detail posting not allowed for this Accounting Flexfield.
  • EF03 Disabled Accounting Flexfield.
  • EF04 This is an invalid Accounting Flexfield. Check your cross-validation rules and segment values.
  • EF05 There is no Accounting Flexfield with this Code Combination ID.
  • EF06 The alternate account is invalid
  • WF01 An alternate account was used instead of the original account
  • WF02 A suspense account was used instead of the original account
Foreign Currency Error Codes
  • EC01 A conversion rate must be entered when using the User conversion rate type.
  • EC02 There is no conversion date supplied.
  • EC03 A conversion rate type or an accounted amount must be supplied when entering foreign currency journal lines.
  • EC04 There is no conversion rate entered for this conversion date.
  • EC05 There is no conversion rate entered for this conversion rate type.
  • EC06 There are no conversion rates for this currency.
  • EC08 Invalid currency code.
  • EC09 No currencies are enabled.
  • EC10 Encumbrance journals cannot be created in a foreign currency.
  • EC11 Invalid conversion rate type.
  • EC12 The entered amount must equal the accounted amount in a functional or STAT currency journal line.
  • EC13 The entered amount multiplied by the conversion rate must equal the accounted amount.
  • ECW1 Warning: Converted amounts could not be validated because the conversion rate type is not specified.
Budget Error Codes
  • EB01 A budget version is required for budget lines.
  • EB02 Journals cannot be created for a frozen budget.
  • EB03 The budget year is not open.
  • EB04 This budget does not exist for this set of books.
  • EB05 The encumbrance_type_id column must be null for budget journals.
  • EB06 A period name is required for budget journals.
  • EB07 This period name is not valid. Check calendar for valid periods.
  • EB08 Average journals cannot be created for budgets.
Encumbrance Error Codes
  • EE01 An encumbrance type is required for encumbrance lines.
  • EE02 Invalid or disabled encumbrance type.
  • EE03 Encumbrance journals cannot be created in the STAT currency.
  • EE04 The budget_version_id column must be null for encumbrance lines.
  • EE05 Average journals cannot be created for encumbrances.
Reversal Error Codes
  • ER01 A reversal period name must be provided.
  • ER02 This reversal period name is invalid. Check your calendar for valid periods.
  • ER03 A reversal date must be provided
  • ER04 This reversal date is not in a valid period.
  • ER05 This reversal date is not in your database date format.
  • ER06 Your reversal date must be the same as or after your effective date.
  • ER07 This reversal date is not a business day.
  • ER08 There are no business days in your reversal period.
Descriptive Flexfield Error Codes
  • ED01 The context and attribute values do not form a valid descriptive flexfield for Journals - Journal Entry Lines.
  • ED02 The context and attribute values do not form a valid descriptive flexfield for Journals - Captured Information.
  • ED03 The context and attribute values do not form a valid descriptive flexfield for Value Added Tax.
Miscellaneous Error Codes
  • EM01 Invalid journal entry category.
  • EM02 There are no journal entry categories defined.
  • EM03 Invalid set of books id.
  • EM04 The value in the actual_flag must be "A" (actuals), "B" (budgets), or "E" (encumbrances).
  • EM05 The encumbrance_type_id column must be null for actual journals.
  • EM06 The budget_version_id column must be null for actual journals.
  • EM07 A statistical amount belongs in the entered_dr(cr) column when entering a STAT currency journal line.
  • EM09 There is no Transaction Code defined.
  • EM10 Invalid Transaction Code.
  • EM12 An Oracle error occurred when generating sequential numbering.
  • EM13 The assigned sequence is inactive.
  • EM14 There is a sequential numbering setup error resulting from a missing grant or synonym.
  • EM17 Sequential numbering is always used and there is no assignment for this set of books and journal entry category.
  • EM18 Manual document sequences cannot be used with Journal Import.
  • EM19 Value Added Tax data is only valid in conjunction with actual journals.
  • EM21 Budgetary Control must be enabled to import this batch.
  • EM22 A conversion rate must be defined for this accounting date, your default conversion rate type, and your dual currency.
  • EM23 There is no value entered for the Dual Currency Default Rate Type profile option.
  • EM24 Average journals can only be imported into consolidation sets of books.
  • EM25 Invalid average journal flag. Valid values are "Y", "N", and null.

Section 5: Troubleshooting Scripts

Following are some useful scripts to troubleshoot Journal Import errors.
  • Estimate the number of lines pending to import from GL_INTERFACE:
q_ji1.sql :
/* Lists all pending journal import groups and the number*/
/* of records in each group */
set linesize 120
col Currency format a8
spool q_ji1
Select set_of_books_id Book
, user_je_source_name Source
, user_je_category_name Category
, currency_code Currency
, trunc (date_created) Created
, actual_flag Journal
, count(*)
from gl_interface
group by set_of_books_id
, user_je_source_name
, user_je_category_name
, currency_code
, trunc (date_created)
, actual_flag
order by set_of_books_id, trunc (date_created)
/
spool off
  • Total the debit and credit amounts within a Group_ID:
q_ji2.sql :
/* Calculates the total amounts for a given group id */
set linesize 120
col s_en_cr format S999,999,999.99
col s_en_dr format S999,999,999.99
col s_acc_cr format S999,999,999.99
col s_acc_dr format S999,999,999.99
spool q_ji3
Select user_je_source_name Source
, User_je_category_name Category
, currency_code Currency
, sum (entered_cr) s_en_cr
, sum (entered_dr) s_en_dr
, sum (accounted_cr) s_acc_cr
, sum (accounted_dr) s_acc_dr
from gl_interface
where group_id = &group_id
group by user_je_source_name
, User_je_category_name
, currency_code
/
spool off
  • The following query groups journal lines for a particular group_id coming from Oracle Payables by Category and Internal Invoice Id, and sums the debit and credit amounts (in 11i):

q_ji3.sql :
set linesize 120
col s_en_cr format S999,999,999.99
col s_en_dr format S999,999,999.99
col s_acc_cr format S999,999,999.99
col s_acc_dr format S999,999,999.99
col reference22 format a15
spool q_ji4
Select USER_JE_CATEGORY_NAME category
, reference22 invoice_id
, sum (entered_cr) s_en_cr
, sum (entered_dr) s_en_dr
, sum (accounted_cr) s_acc_cr
, sum (accounted_dr) s_acc_dr
, count(*)
from gl_interface
where user_jr_source_name ='Payables' and
group_id = &group_id
group by USER_JE_CATEGORY_NAME, reference22
;
spool off


Query q_ji3.sql can be modified to be used with the reference fields for other sources.


----Satya Chaluvadi