What is the correct link between SLA tables?
Hello,
I am working on a report where I have to extract information from GL tables and projects. I am using following joins:
pa_expenditure_items_all pei
xla_distribution_links xdl
xla_ae_lines xal
xla_ae_headers xah
xla_transaction_entities_upg
where xah.ae_header_id = xal.ae_header_id
and xdl.ae_line_num = xal.ae_line_num
and xdl.ae_header_id = xah.ae_header_id
and xdl.source_distribution_id_num_1 = pei.expenditure_item_id
and upg.entity_code='EXPENDITURES'
and xah.entity_id = upg.entity_id
The query is not fetching me results because there is mismatch between xdl.ae_line_num = xal.ae_line_num