Below are the queries used for Drill Down between GL(General Leder) and SLA(Sub ledger Accounting) in R12
http://www.thotasuman.com/
- select * from ap_invoices_all where invoice_num =
<invoice_num> ; --invoice_id 158962
Now Query for entity Id - select * from xla.xla_transaction_entities where source_id_int_1 = 158962
--entity_id 603052
Next get the events - select * from xla_events where entity_id=603052
--event_id 658617 658618 - select * from xla_ae_headers where event_id in (658617, 658618);
--ae_header_id 1758986 1758987 1758988 1758989 1758990 1758991 - select gl_sl_link_id from xla_ae_lines where ae_header_id in (1758986, 1758987, 1758988, 1758989, 1758990, 1758991);
--gl_sl_link_id is obtained - select * from gl_import_references where gl_sl_link_id in (select gl_sl_link_id from xla_ae_lines where ae_header_id in (1758986, 1758987, 1758988, 1758989, 1758990, 1758991))
and gl_sl_link_table ='XLAJEL'; - select * from gl_je_batches where je_batch_id in
(select je_batch_id from gl_import_references where gl_sl_link_id in (select gl_sl_link_id from xla_ae_lines where ae_header_id in (1758986, 1758987, 1758988, 1758989, 1758990, 1758991))
and gl_sl_link_table ='XLAJEL'); - select * from gl_je_headers where je_header_id in
(select je_header_id from gl_import_references where gl_sl_link_id in (select gl_sl_link_id from xla_ae_lines where ae_header_id in (1758986, 1758987, 1758988, 1758989, 1758990, 1758991))
and gl_sl_link_table ='XLAJEL'); - select * from gl_je_lines where je_header_id in
(select je_header_id from gl_import_references where gl_sl_link_id in (select gl_sl_link_id from xla_ae_lines where ae_header_id in (1758986, 1758987, 1758988, 1758989, 1758990, 1758991))
and gl_sl_link_table ='XLAJEL');
http://www.thotasuman.com/
steps 8 and 9 do not work after the subledger transaction posting to the GL is complete, because gl_je_lines.gl_sl_link_id and gl_sl_link_table are set to null
ReplyDeleteGreat Drilling, Really I like it
ReplyDelete