Drill down form journals to invoices

Comments
-
Hi
Please post questions under discussions.
Here is your sql.
Select source_id_int_1
from xla.xla_transaction_ENTITIES
where entity_id in (select distinct(entity_id)
from xla_ae_headers
where ae_header_id in (select ae_header_id
from xla_ae_lines
where gl_sl_link_id in
(select gl_sl_link_id
from gl_import_references
where je_header_id=5278
and je_line_num=3)))
You may want to run each of the subqueries separately to see the output to determine why you get more than the expected invoice_id
1) select gl_sl_link_id
from gl_import_references
where je_header_id=5278
and je_line_num=3;
2) select ae_header_id, application_id,event_type_code, entity_id, event_id
from xla_ae_lines
where gl_sl_link_id in (list the link ids from 1)
Check what values are returned, how many distinct entity_ids are returned for payables by this query
3) Select source_id_int_1, entity_code, application_id
from xla.xla_transaction_ENTITIES
where entity_id in (entity_id from sql 2);
Check the rows returned.
Thanks
Lakshmi
0 -
Hi
Hi Lakshmi,
Please post questions under discussions.
Here is your sql.
Select source_id_int_1
from xla.xla_transaction_ENTITIES
where entity_id in (select distinct(entity_id)
from xla_ae_headers
where ae_header_id in (select ae_header_id
from xla_ae_lines
where gl_sl_link_id in
(select gl_sl_link_id
from gl_import_references
where je_header_id=5278
and je_line_num=3)))
You may want to run each of the subqueries separately to see the output to determine why you get more than the expected invoice_id
1) select gl_sl_link_id
from gl_import_references
where je_header_id=5278
and je_line_num=3;
2) select ae_header_id, application_id,event_type_code, entity_id, event_id
from xla_ae_lines
where gl_sl_link_id in (list the link ids from 1)
Check what values are returned, how many distinct entity_ids are returned for payables by this query
3) Select source_id_int_1, entity_code, application_id
from xla.xla_transaction_ENTITIES
where entity_id in (entity_id from sql 2);
Check the rows returned.
Thanks
LakshmiThanks for your inputs.
when i check from application the invoice corrosponding to je_header_id=5278
and je_line_num=3 i get one invoice.(using the drill down option.)but if i run the 1st sub query
select gl_sl_link_id
from gl_import_references
where je_header_id=5278
and je_line_num=3;i get around 585 rows...
is this normal.
i want to find one to one relation between a je line and an invoice.
Thanks
Ashish Joshi
0