Thursday 3 July 2014

Oracle Apps R12 Subledger Accounting Tables and joins

XLA Table joins
GL_JE_BATCHES (je_batch_id)                        => GL_JE_HEADERS (je_batch_id)
GL_JE_HEADERS (je_header_id)                      => GL_JE_LINES (je_header_id)
GL_JE_LINES (je_header_id,  je_line_num)        => GL_IMPORT_REFERENCES (je_header_id, je_line_num)
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_EVENTS (application_id, entity_id)            => XLA.XLA_TRANSACTION_ENTITIES (application_id, entity_id)

Transaction Entity Codes and ids
xte.entity_code =
'TRANSACTIONS' or
'RECEIPTS' or
'ADJUSTMENTS' or
'PURCHASE_ORDER' or
'AP_INVOICES' or
'AP_PAYMENTS' or
'MTL_ACCOUNTING_EVENTS' or
'WIP_ACCOUNTING_EVENTS'

xte.source_id_int_1 =
'INVOICE_ID' or
'CHECK_ID' or
'CUSTOMER_TRX_ID' or
'TRANSACTION_ID'

XLA_EVENTS:
SELECT *  FROM xla_events xe
WHERE xe.application_id = 222
AND xe.entity_id IN (
SELECT xte.entity_id
FROM xla.xla_transaction_entities xte
WHERE xte.application_id = 222
AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = 10066)

XLA_AE_HEADERS:
SELECT *  FROM xla_ae_headers xah  WHERE xah.application_id = 222
AND xah.entity_id IN (
SELECT xte.entity_id
FROM xla.xla_transaction_entities xte
WHERE xte.application_id = 222
AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = 10066)

XLA_AE_LINES:
SELECT xal.*  FROM xla_ae_lines xal, xla_ae_headers xah  WHERE xal.application_id = xah.application_id
AND xal.ae_header_id = xah.ae_header_id
AND xah.application_id = 222
AND xah.entity_id IN (
SELECT xte.entity_id
FROM xla.xla_transaction_entities xte
WHERE xte.application_id = 222
AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = 10066)

XLA_DISTRIBUTION_LINES:
SELECT xdl.*  FROM xla_distribution_links xdl, xla_ae_headers xah  WHERE xdl.application_id = xah.application_id
AND xdl.ae_header_id = xah.ae_header_id
AND xah.application_id = 222
AND xah.entity_id IN (
SELECT xte.entity_id
FROM xla.xla_transaction_entities xte
WHERE xte.application_id = 222
AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = 10066)


XLA_AE_HEADER status Columns
 Table stores important status Information
GL Transfer Status Code (GL_TRANSFER_STATUS_CODE)
The GL transfer status code of the sub-ledger journal entry has one of the following values:
Not transferred
Selected to transfer
Transferred
When a sub-ledger journal entry is created and completed, the value of this column is Not transferred. The Transfer to GL process updates this column when the subledger journal entry is transferred to General Ledger.

Subledger Journal Entry Status Code (ACCOUNTING_ENTRY_STATUS_CODE)
A subledger journal entry can have a status of Draft, Final, Incomplete, Invalid or Invalid Related Entry.
Draft: The entry status is set to Draft when the following conditions are met:
Final: The entry status is set to Final when the following conditions are met:
Incomplete: The entry status is set to Incomplete when the following condition is met:
Invalid Related Entry: The entry status is set to Invalid Related Entry when the following condition is met:

The subledger journal entry is valid, but one or more of the other subledger journal entries associated with the same accounting event are invalid.


XLA_DISTRIBUTION_LINKS table join based on Source Distribution Types
xdl.source_distribution_type = 'AP_PMT_DIST '
and xdl.source_distribution_id_num_1 = AP_PAYMENT_HIST_DISTS.payment_hist_dist_id
---------------
xdl.source_distribution_type = 'AP_INV_DIST'
and xdl.source_distribution_id_num_1 = AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id
---------------
xdl.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
and xdl.source_distribution_id_num_1 = AR_DISTRIBUTIONS_ALL.line_id
and AR_DISTRIBUTIONS_ALL.source_id = AR_RECEIVABLE_APPLICATIONS_ALL.receivable_application_id
---------------
xdl.source_distribution_type = 'RA_CUST_TRX_LINE_GL_DIST_ALL'
and xdl.source_distribution_id_num_1 = RA_CUST_TRX_LINE_GL_DIST_ALL.cust_trx_line_gl_dist_id
---------------
xdl.source_distribution_type = 'MTL_TRANSACTION_ACCOUNTS'
and xdl.source_distribution_id_num_1 = MTL_TRANSACTION_ACCOUNTS.inv_sub_ledger_id
---------------
xdl.source_distribution_type = 'WIP_TRANSACTION_ACCOUNTS'
and xdl.source_distribution_id_num_1 = WIP_TRANSACTION_ACCOUNTS.wip_sub_ledger_id
---------------
xdl.source_distribution_type = 'RCV_RECEIVING_SUB_LEDGER'
and xdl.source_distribution_id_num_1 = RCV_RECEIVING_SUB_LEDGER.rcv_sub_ledger_id

13 comments:

  1. It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.

    J2ee Training in Chennai Adyar

    ReplyDelete
  2. Excellent incredible blog layout! How long have you been blogging for? you make running a blog look easy. The overall glance of your website is magnificent, let alone the content!

    Corporate Training in Chennai

    ReplyDelete
  3. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.

    SEO Training in Chennai

    ReplyDelete
  4. Wow amazing i saw the article with execution models you had posted. It was such informative.By explaining this type we can identify the concepts easily. So thank you for this sharing.

    App Store Optimization Services in Chennai

    ReplyDelete

  5. Your procedure and way of idea is really good and thus it is very much interesting, i came too know more information about your blog.


    Android Training in Chennai

    ReplyDelete

  6. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.our giving articles really impressed for me,because of all information so nice.



    Best Dot Net Training Institutes in Chennai

    ReplyDelete

  7. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.our giving articles really impressed for me,because of all information so nice.

    Dot Net training

    ReplyDelete
  8. this is really too useful and have more ideas from yours. keep sharing many techniques. eagerly waiting for your new blog and useful information. keep doing more
    Sharepoint Training in Chennai

    ReplyDelete
  9. this concept and information it is really very well done and it is really nice and very much relevant too, thanks for posting these kind of information.

    cognos Training in Chennai

    ReplyDelete
  10. ya it is well and good and thus it is really awesome too which is helpful too and very much sharing.


    Informatica Training in Chennai

    ReplyDelete
  11. This Blog is new to me as well as i came to know many things about your concept and it is really helpful too.


    cognos Training in Chennai

    ReplyDelete
  12. After getting this blog reference, we get an new ideas about an oracle technologies.we are eager to know more concepts like this.

    Car Spa at Doorstep in Mumbai

    ReplyDelete
  13. I am inspired with your post writing style & how continuously you describe this topic on learn j2ee. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic. advanced java tutorial

    ReplyDelete