Showing posts with label xla tables in oracle fusion. Show all posts
Showing posts with label xla tables in oracle fusion. Show all posts

Friday, 12 August 2022

XLA tables in Oracle Fusion

XLA tables in Oracle Fusion

Hi friends, we are going to discuss about the XLA tables in Oracle Fusion. We will share the complete list of xla tables which helps to store the complete xla accounting data for all AP,AR,GL,FA modules. We have multiple xla tables in oracle fusion and in this post , i will try to explain each of these xla tables. I will also share the DB table joins between the xla tables which will help to link the xla tables in oracle fusion. We will also share the important sql queries too which will help to extract the xla data in oracle fusion. If i will compare with oracle apps r12 then there is no much difference in xla tables. XLA tables are completely same in Oracle apps r12 and in oracle fusion. XLA is the bridge between the subledger modules and with general ledger. All accounting data transfers from subledger modules (ap,ar,gl,fa) to gl module using this xla. Please find below the complete detail about XLA tables in Oracle Fusion.

Top 6 XLA tables in Oracle Fusion

Here below is the list of important xla tables in oracle fusion which helps to keep the xla accounting data in oracle fusion

1.XLA_AE_LINES
2.XLA_AE_HEADERS
3.XLA_EVENTS
4.XLA_TRANSACTION_ENTITIES
5.GL_IMPORT_REFERENCES
6.XLA_DISTRIBUTIONS_LINK

XLA tables in Oracle Fusion
XLA tables in Oracle Fusion

XLA Tables Joins in Oracle Fusion

Here below is the xla tables join which helps to connect the xla tables in oracle fusion.

GL_IMPORT_REFERENCES (gl_sl_link_table, gl_sl_link_id)        => XLA_AE_LINES (gl_sl_link_table, gl_sl_link_id)

XLA_AE_LINES (application_id, ae_header_id)                   => XLA_AE_HEADERS (application_id, ae_header_id) 

XLA_AE_HEADERS (application_id, event_id)                     => XLA_EVENTS (application_id, event_id)   

XLA_TRANSACTION_ENTITIES(ENTITY_ID)                           => XLA_EVENTS (ENTITY_ID)  


Detail XLA SQL query to extract the xla data in Oracle Fusion

Here below is the complete sql query which helps to extract the xla data in oracle fusion


select 
aia.INVOICE_NUM "AP Invoice Num" ,

aia.INVOICE_DATE "AP Invoice Date" ,

aia.INVOICE_AMOUNT ,

aia.INVOICE_CURRENCY_CODE ,

aia.GL_DATE ,
aia.PAYMENT_METHOD_CODE ,
xah.JE_CATEGORY_NAME "Journal Cateogry"
FROM ap.ap_invoices_all aia,
xla.xla_events xev,
xla.xla_ae_headers XAH,
xla.xla_ae_lines XAL,
GL_IMPORT_REFERENCES gir,
gl_je_headers gjh,
gl_je_lines gjl,
gl_code_combinations gcc,
xla.xla_transaction_entities XTE
WHERE 1=1
AND XAH.je_category_name = 'Purchase Invoices'
AND XAH.gl_transfer_status_code = 'Y'
AND aia.INVOICE_ID = xte.source_id_int_1
AND gjl.JE_HEADER_ID = gjh.JE_HEADER_ID
AND gjh.JE_HEADER_ID = gir.JE_HEADER_ID
AND gjl.JE_HEADER_ID = gir.JE_HEADER_ID
AND gir.JE_LINE_NUM = gjl.JE_LINE_NUM
AND xev.entity_id = xte.entity_id
AND xah.entity_id = xte.entity_id
AND xah.event_id = xev.event_id
AND XAH.ae_header_id = XAL.ae_header_id
AND XAL.GL_SL_LINK_ID = gir.GL_SL_LINK_ID
AND gir.GL_SL_LINK_TABLE = xal.GL_SL_LINK_TABLE


XLA tables in Oracle Fusion
XLA tables in Oracle Fusion


Monday, 29 January 2018

Reconciliation of AP and GL in Oracle Apps R12

Reconciliation of  AP and GL in Oracle Apps R12

In this post , We will be discussed about Reconciliation of  AP and GL in Oracle Apps R12. We will be discuss about reconciliation method uses in oracle apps r12 to reconcile the ap and gl. We will go step by step for the Reconciliation of  AP and GL in Oracle Apps R12. In AP and GL reconciliation , we do reconcile the liability accounts balances between the ap and gl. Here below is the detail explanation about Reconciliation of  AP and GL in Oracle Apps R12.

Reconciliation of  AP and GL in Oracle Apps R12


In Friends , in this post I will share you the SQL queries by which you can easily reconcile from AP and GL in Oracle Apps R12.

Steps for the Reconciliation of  AP and GL in Oracle Apps R12

Step1:- First you need to run this below query from Oracle Apps DB for your AP Liability accounts.In this example I am doing reconciliation of my AP Liability Natural account 24103390 and you can select any dates of the month for which you want to do reconciliation.


select JE_SOURCE,sum(nvl(accounted_dr,0))-sum(nvl(accounted_cr,0)) Balanace from gl_je_headers a1,gl_je_lines a2,gl_code_combinations gcc
 where a1.JE_HEADER_ID=a2.JE_HEADER_ID
 and a2.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID
 and gcc.segment5=24103390
 and effective_date between :p_from_date and :p_to_date
 and A2.status='P'
 GROUP BY JE_SOURCE

This above query will give you the source from which your data is coming in GL. You have to put Manual Invoice amount separate in the sheet to do the reco between AP and GL because manual entry will not come in AP and this entry is directly entered in GL so when you will do the reco you will always get a difference of that manual entry value but by this query you will know this difference.


Step2:- Now that you need to run this query with Account wise and put that in Excel.

select JE_SOURCE,GCC.CONCATENATED_SEGMENTS,sum(nvl(accounted_dr,0))-sum(nvl(accounted_cr,0)) Balanace from gl_je_headers a1,gl_je_lines a2,gl_code_combinations_kfv gcc
 where a1.JE_HEADER_ID=a2.JE_HEADER_ID
 and a2.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID
 and gcc.segment5=24103390
 and effective_date between :p_from_date and :p_to_date
 and A2.status='P'
 GROUP BY JE_SOURCE,GCC.CONCATENATED_SEGMENTS



Step3:- Now run this query which will fetch the Payables/AP data for you Liability accounts.In this example I am doing reconciliation of my AP Liability Natural account 24103390 and you can select any dates of the month for which you want to do reconciliation.

 select CONCATENATED_SEGMENTS,sum(T_LEDGER_dr)-sum(T_LEDGER_Cr) bal from (
 SELECT
CASE WHEN
        XAL.PARTY_ID = (SELECT MAX(DUPLICATE_VENDOR_ID) FROM AP_DUPLICATE_VENDORS_ALL WHERE DUPLICATE_VENDOR_ID = XAL.PARTY_ID) THEN
        (SELECT MAX(VENDOR_ID) FROM AP_DUPLICATE_VENDORS_ALL WHERE DUPLICATE_VENDOR_ID = XAL.PARTY_ID)
        ELSE XAL.PARTY_ID
        END PARTY_ID,
        NVL(CASE WHEN
        XAL.PARTY_SITE_ID = (SELECT MAX(DUPLICATE_VENDOR_SITE_ID) FROM AP_DUPLICATE_VENDORS_ALL WHERE DUPLICATE_VENDOR_ID = XAL.PARTY_ID AND DUPLICATE_VENDOR_SITE_ID = XAL.PARTY_SITE_ID) THEN
        (SELECT MAX(VENDOR_SITE_ID) FROM AP_DUPLICATE_VENDORS_ALL WHERE DUPLICATE_VENDOR_ID = XAL.PARTY_ID AND DUPLICATE_VENDOR_SITE_ID = XAL.PARTY_SITE_ID)
        ELSE XAL.PARTY_SITE_ID
        END,XAL.PARTY_SITE_ID) PARTY_SITE_ID,
 GCC.CONCATENATED_SEGMENTS,GCC.CODE_COMBINATION_ID,
 0 O_LEDGER_CR,0 O_LEDGER_DR,
 NVL(XAL.ACCOUNTED_CR,0) T_LEDGER_CR,
 NVL(XAL.ACCOUNTED_DR,0) T_LEDGER_DR
 FROM
 XLA.XLA_TRANSACTION_ENTITIES XTE,
 XLA.XLA_AE_HEADERS XAH,
 XLA.XLA_AE_LINES XAL,
 GL_CODE_COMBINATIONS_KFV GCC
 WHERE 1 = 1
 AND :P_APPLICATION_ID=200
 AND XAL.APPLICATION_ID=200
 AND XTE.LEDGER_ID = XAH.LEDGER_ID
 AND XTE.ENTITY_ID = XAH.ENTITY_ID
 AND XTE.APPLICATION_ID = XAL.APPLICATION_ID
 AND XAH.AE_HEADER_ID = XAL.AE_HEADER_ID
 AND XAL.GL_SL_LINK_TABLE = 'XLAJEL'
 AND ACCOUNTING_CLASS_CODE IN ('LIABILITY','PREPAID_EXPENSE')
 AND XAL.CODE_COMBINATION_ID = GCC.CODE_COMBINATION_ID
 and xal.CODE_COMBINATION_ID in  (SELECT CODE_COMBINATION_ID FROM GL_CODE_COMBINATIONS
 WHERE 1=1
 AND SEGMENT5=24103390)
-- AND XAL.PARTY_ID=&VENDOR_ID
 AND NVL(XAL.GL_TRANSFER_MODE_CODE,'N')='S'
 AND TRUNC(XAL.ACCOUNTING_DATE) >= :FROM_DATE
 AND TRUNC(XAL.ACCOUNTING_DATE) <= :TO_DATE
 AND SECURITY_ID_INT_1=:P_ORG_ID)
 group by CONCATENATED_SEGMENTS


Step4:- Now match the accounts fetched with Step 2 and 3 and find the difference.



If you Want to Learn Oracle Fusion , Please Follow the Oracle Fusion Tutorial


Reconciliation of  AP and GL in Oracle Apps R12

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *