Tuesday, December 15, 2015

journal entry through SLA:

Key points of creation of journal entry through SLA:
There is a new functionality to enter subledger journals through SLA: Create Journal Entry page.
Add the function SLA: Create Subledger Journal Entry, if not available in relevant module. All the modules by default will have this function unless specifically restricted.
Very important point is manual subledger journal entry is not associated with transaction of any subledger application. Meaning we can’t transfer the entries to both Subledgers and GL without customization. This is true whether we use FAH or DRM (Data Relationship Management, which is part of Hyperion) applications.
If required to use Manual SLA Journals functionality to represent accounting treatment in legacy systems, one can use API which allows importing legacy transactions into SLA, change the accounting treatment as per Oracle EBS logic or combination and then transfer to GL.
SLA is a rule based accounting engine not a module, which sits in between Subledgers and GL. The entry that appears in SLA can be controlled or design using SLA rules. Therefore it is known as Rule based accounting engine.
Don’t use SLA: Debug% profile option, which is obsolete. Instead use profile options FND: Debug% for SLA to debug.
To transfer the subledger journal entries to GL from subledgers run the following programs

  • Create Accounting
  • Run Transfer Journal Entries to GL – conditionally required.
We can use this functionality particularly during month end reconciliation where data transferred from subledger to GL got corrupted.
Very important this is the functionality of FAH where we will use API XLA_JOURNAL_ENTRIES_PUB_PKG to load the data into this create journal entry page (see the screen shot below). We don’t need license of FAH to use this package, however.
This is another way of loading the journal entries apart from GL_INTERFACE, Web ADI or manually entering the journals.
This is particularly useful to stream line the accounting string between Oracle EBS and Legacy or third party systems, which is the basic of FAH.
How it works:
Go to Payable Module (any module can be used)
clip_image002
Subledger journal entry
clip_image004
Click Create Journal Entry
Enter Debit
clip_image006
Enter credit
clip_image008
Click continue
clip_image010
Select Final and Post and click finish button
clip_image012
Result
clip_image014
System should fire journal import
clip_image016
Go and check in payables whether any invoice (transaction) created
clip_image018
Go to GL and check the result
clip_image020
Note the Category, which is other.
Review the journal
clip_image022
Click Line Drill down button
clip_image024
Click view transaction
clip_image026
Read the error message, which confirms that no transaction has been created in subledger.
clip_image028

Oracle Apps Intercompany Accounting in R12

Intercompany Accounting in R12:
How it happens in 11i:
In 11i, intercompany transactions used to be created when a transaction has happened between two different balancing segments. Consider a payment for 100 in Payables has happened where the balancing segment for the liability account is ‘001’ and balancing segment on the cash/cash clearing is ‘002’. For the below illustration let us know the chart of accounts has three segments Company Code, Account and Cost Center.
Acct Class                                Acct                      Credit                         Debit
---------------                            -----------              --------                        -------
Cash/clearing                          001.xx.xx                100
Liability                                              002.xx.xx                                                                 100



Since the accounting entries are not balanced by the balancing segments, intercompany lines would be created when posting happens in GL. The setup for intercompany accounts is to be done at the GL side.




R12 Intercompany Accounting:
In R12 accounting between two different balancing segments differs from how it was done in 11i in the following ways.
If a transaction has been created between two different balancing segments belonging to the same legal entity for the ledger, then intracompany lines are created for balancing.
If a transaction has been created between two different balancing segments belonging to the different legal entities for the ledger, then intercompany lines are created for balancing.

Steps for Intercompany setup in R12.
Let us assume the company codes (which is the balancing segment) ‘001’ and ‘002’ belong to two different legal entities (LE1 and LE2) under the same ledger.
We will be creating a payment with cash clearing account as 001.xx.xx and liability account as 002.xx.xx
We need to complete the below steps to ensure proper intercompany accounting entries are created for the above payment.
In the Intercompany accounts setup, two accounts need to be setup. One is Intercompany receivables account and another is Intercompany Payables account. The account for receivables should be Asset and account for payables should be Liability.
Create account ‘0010’ for the account segment corresponding to Company code ‘001’ and ‘002’ and mark the Account Type as ‘Asset’ in the qualifier.

Create account ‘0020’ for the account segment corresponding to Company code ‘001’ and ‘002’ and mark the Account Type as ‘Liability’ in the qualifier.
Create the below four accounting combinations.
001.0010.00
001.0020.00
002.0010.00
002.0020.00
Go to Accounting setup manager.

Query for the ledger
Under the setup step for the primary ledger, click on the update option for the Intercompany Accounts.
Click on define relationship for the legal entity LE1. Under the intercompany accounts section, click on Add Another Row. Give the transacting balancing segment value as ‘001’, trading partner legal entity as ‘LE2’ and trading partner balancing segment value as ‘002’.
Click on Define Accounts.
Give the intercompany receivables account as 001.0010.00 and intercompany payables account as 001.0020.00.
Note: The start date on the intercompany receivables and payables account should be before the transaction date, else Create Accounting would not be able to find the correct intercompany account.
The above steps need to repeated for the legal entity LE2.

Click on define relationship for the legal entity LE2. Under the intercompany accounts section, click on Add Another Row. Give the transacting balancing segment value as ‘002’, trading partner legal entity as ‘LE1’ and trading partner balancing segment value as ‘001’.
Click on Define Accounts.
Give the intercompany receivables account as 002.0010.00 and intercompany payables account as 002.0020.00.

Test the Intercompany Account setup:
Create an invoice ‘Test Inter1’ with the charge account as ‘002.xx.xx’ and liability account as ‘002.yy.yy’. Validate and account the invoice.
Pay the invoice using a bank account where pooled account is not enabled. The cash account setup for the bank account is ‘001.xx.xx’.
Account for the invoice. The accounting entries created for the payment would be as follows
Acct Class                                Acct                      Credit                         Debit
-------------                               -------------           ------------                  ------------
Cash                                        001.xx.xx             100
Liability                                  002.xx.xx                                                 100
Intercompany                          001.0010.00                                             100
Intercompany                          001.0020.00         100

Oracle SLA Tables

Given below are the tables to be referred when an invoice has been created in Payables and accounted either online or using create accounting program.

1. select * from xla_transaction_entities where source_id_int_1=

Few of the columns explained:
source_id_int_1 = invoice_id
entity_code='AP_INVOICES'
security_id_int_1=org_id
transaction_number=invoice number

get the entity_id from xla_transaction_entities

2. select * from xla_events where entity_id=

Few of the columns explained:
event_type_code can be 'INVOICE VALIDATED','CREDIT MEMO VALIDATED','PAYMENT CREATED' etc
event_status_code can be 'P' processed 'U' unprocessed etc
'P' when the accounting is done in 'Final' or 'Final Post' mode.
'U' when the accounting is done in 'Draft' mode.
process_status_code can 'D' for draft 'P' for processed etc

get the event_id from xla_events

3. select * from xla_ae_headers where event_id=

gl_transfer_status_code will be 'Y' when accounting done in 'Final' mode, where accounting
entries are transferred to GL.
gl_transfer_status_code will be 'N' when accounting done in 'Draft' mode.

get ae_header_id from xla_ae_headers

4. select * from xla_ae_lines where ae_header_id=

5. select * from xla_distribution_link where ae_header_id=

source_distribution_id_num_1 will have the invoice distribution id

Oracle Apps R12 SLA setup with example

SLA Setup in R12 with a simple example for Payables


Subledger Accounting:
SLA is a new concept in R12, where all the accounting information and rules are defined. Accounting entries generated in Subledgers are first transferred to SLA and then interfaced to GL. Hence reconciliation is already done in SLA before transferring to GL.

One big advantage in SLA is to configure rules to derive different accounting entries. Each and every segment for different accounting events could be configured to suit different business requirements which was not possible in 11i.

Liability account in payables would be defaulted from supplier site on to the invoices in 11i. If individual segments need to be different for different business, then custom programs were required. In SLA, we can set different rules to derive different segments for the liability account.
We shall see how we can derive the liability account based on one business requirement(to derive cost center based on invoice currency). We will be using the below functionalities to achieve the purpose.

Journal Line Type
Mapping Sets
Account Derivation Rules
Journal Lines Definition
Application Accounting Definition
Subledger Accounting Method

Then assigning the Subledger Accounting Method to the Ledger.
In our example we shall make use of the copy functionality provided by Oracle where ever available to derive our own custom types.

For complete definition of SLA and its components please refer to Oracle SLA Implementation guide.
The chart of accounts considered in the below example has 5 segments. Company, Cost Center, Account, Analysis, Others. Also automatic offset is enabled and set as 'Balancing' for the Operating Unit considered

Journal Line Type:
Subledger Accounting Setup --> Accounting Methods Builder --> Journal Entry Setup --> Journal Line Types
Journal types are defined for a particular event class(like invoices, credit memos..) and assigned to journal line definition along with mapping sets, account derivation rules.
We shall use the Oracle seeded Journal Line Type ‘Liability with Automatic Offsets Balancing Segment’ to make our custom line type.
Open the Journal Line Types window and query for ‘Liability with Automatic Offsets Balancing Segment’.


Click on copy, give our custom name.
‘XX Liab with Automatic Offsets Balancing Segment’

Click on Conditions, it would be same as the seeded Oracle Journal Line Type

The conditions are specified to create a Journal Entry based on this Journal Line Type when certain conditions are met.
The conditions in the above screenshot mentions the Journal Line Type to be created when Automatic Offset is set to ‘Balancing’ and for different invoice types.

Our requirement is to derive the cost center based on the invoice currency code. We shall see how we can achieve this using Mapping Sets and Account Derivation Rules.

Mapping Sets:
Subledger Accounting Setup --> Accounting Methods Builder --> Journal Entry Setup --> Mapping Sets
Mapping sets are used to get an output value for a particular segment or entire accounting flexfield based on input value.
Open mapping sets, click on New. Create new mapping set ‘XX Liability CC Map’.

In the input region, we have specified AP_SRS_CURRENCY valueset which will restrict the input value to valid currencies. In the output section we have selected the Chart of accounts and selected the segment as ‘Cost Center’.
In the mapping set values we have selected input value as ‘EUR’ and the output cost center.

Account Derivation Rules:
Subledger Accounting Setup --> Accounting Methods Builder --> Journal Entry Setup --> Account Derivation Rules
Account derivation rules are used along with Mapping sets to derive the accounting flexfield or individual segments.
Open ‘Account Derivation Rules’, click on ‘New’. Create Account derivation rule ‘XX LIABILITY CC ADR’


Select the Output Type as Segment and select ‘Cost Center’ segment. In priorities region, give the value type as ‘Mapping Set’ and value as ‘XX Liability CC Map’ which was created earlier. Select the input source as ‘Invoice Currency Code’

Journal Line Definition:
Subledger Accounting Setup --> Accounting Methods Builder --> Methods and Definition --> Journal Lines Definition
Journal line definition is used to assign journal line types for an event class or event type. This is where the Account Derivation rule is assigned to a journal line type.
Instead of creating an entirely new Journal Line Definitions, we shall make use of the copy definition functionality provided by Oracle.
Open the ‘Journal Lines Definition’. Query for event class ‘Invoices’, event type ‘All’ and definition code ‘ACCRUAL_INVOICES_ALL’.


Click on ‘Copy Definition’, give the definition code as ‘XX_ACCRUAL_INVOICES_ALL’, name as ‘XX Accrual Invoices All’. Select transaction and accounting chart of accounts as ‘Accounting Flexfield‘. Click on Done

In the ‘Line Assignments’ region disable ‘Liability with Automatic Offsets Balancing Segment‘ line type. Add the Journal Line Type Created – ‘XX Liab with Automatic Offsets Balancing Segment’.
In the Account Derivation Rules tab, select ‘All Segments’ and assign the standard Account Derivation Rule ‘Liability’. Select ‘Company’ segment and choose ‘Inherit’. Assign the Account Derivation rule created ‘XX Liability CC ADR’ to the segment ‘Cost Center’.


Application Accounting Definitions:
Subledger Accounting Setup --> Accounting Methods Builder --> Methods and Definition --> Application Accounting Definitions
Application accounting definition is used for assigning Journal Line Definitions to event classes and types.
We shall use copy functionality provided by Oracle to copy the Application Accounting Definition and make modifications.
Open ‘Application Accounting Definition’ and query for definition code ‘ACCRUAL’.


Click on Copy. Give the definition code ‘XX ACCRUAL’ and definition name as ‘XX Accrual Basis’. Select the transaction and accounting chart of accounts as ‘Accounting Flexfield’. Click on done. For the event class ‘Invoices’, delete the default journal line definition assigned and assign the Line Definition created earlier ‘XX Accrual Invoices All’.

Click on validate and make sure it is validated.

Subledger Accounting Method:
Subledger Accounting Setup --> Accounting Methods Builder --> Methods and Definition --> Subledger Accounting Methods
Application Accounting Definitions defined are assigned to different applications in Subledger Accounting Method. Subledger Accounting Method is then assigned to the ledger.
Open the Subledger Accounting Method. Click on New. Give the method code as ‘XX_STANDARD_ACCRUAL’ and method name as XX Standard Accrual. Select the transaction and accounting chart of accounts as ‘Accounting Flexfield’. In the Application Accounting Definition Assignment region assign ‘XX Accrual Basis’ for Payables.


The Subledger accounting method is attached to the ledger.

Create an invoice with currency code as ‘EUR’, validate and account the invoice. Check for the accounting entries created. The liability account would be having the cost center segment as ‘000000000EUR’.

Supporting references can be defined to store additional information on the subledger journal header or line level. The additional information could be transaction information like invoice type or line type, or accounting information or any supplier information etc. Supporting references can then be used for finding the subledger balance for the defined reference for a given period.

We shall see the process of creating a supporting reference and assigning it to journal line definition, creating an invoice and checking the supporting reference in the subledger journal entries after accounting. The below mentioned supporting reference is for AP Invoice Distribution Type.

Define Supporting Reference:
Subledger Accounting Setup --> Accounting Methods Builder --> Journal Entry Setup --> Supporting References
Click on Create.
Give the code as XX_DISTTYPE_SR, name as XX Dist Type SR, description as ‘Supp Ref for distribution line type’. Select ‘Enabled’ flag and ‘Maintain Balances’ which will enable us to check the subledger balance for the Supporting reference. Select year end carry forward as ‘Never’.

 
Click on ‘Add Detail’ in the ‘Supporting Reference Detail’ section.
Upto five details can be added to a supporting reference. Give the Code as ‘DISTTYPE’, name as ‘Distribution Type’.
 
 
Click on ‘Assign Sources’. In the search section, select application name as ‘Payables’ and source name as ‘Invoice Distribution Type’. Click on Go, in the search results select ‘Invoices’ in the Event Class Name. Click on ‘Apply’.
 
 
 
 
Assign Supporting Reference to the Journal Line Definition.
Subledger Accounting Setup --> Accounting Methods Builder --> Methods and Definition --> Journal Lines Definition
Query for the Journal Line Definition for the event class ‘Invoices’, in the journal line type select the ‘Liability’ . Go to the supporting references tab and assign the supporting reference ‘XX Dist Type SR’.
 
 
Validate the Application Accounting Definition.
Create an invoice, validate and do accounting.
Check the journal lines created.
 
 
 
Click on the supporting references for the Liability
Check the supporting reference details. Supporting reference has been created with Detail Name as 'Distribution Type' and value as 'Item', which is the invoice distribution line type.
 
 
 
Supporting Reference Balances
We can check the balances for the supporting reference in the Supporting Reference Balances. Run the ‘Subledger Accounting Balances Update’ program.
Subledger Accounting -> Supporting Reference Balances
Query for the supporting reference