Tuesday, 17 January 2017

XLA TO FA Query

SELECT 'FA' module,
       transaction_type_code,
       asset_number,
       transaction_date_entered,
       xal.accounting_date gl_date,
       xal.description,
       (NVL (xal.accounted_dr, 0)) "DR_AMOUNT",
       (NVL (xal.accounted_cr, 0)) "CR_AMOUNT",
       gcc.segment4
  FROM xla_ae_lines xal,
       xla_ae_headers xah,
       fa_transaction_headers fth,
       xla_transaction_entities xte,
       gl_code_combinations gcc,
       fa_additions fa
 WHERE     xal.ae_header_id = xah.ae_header_id
       AND xah.event_id = fth.event_id
       AND xte.entity_id = xah.entity_id
       AND xte.entity_id = xah.entity_id
       AND gcc.code_combination_id = xal.code_combination_id
       AND gcc.segment4 = p_account
       AND fth.asset_id = fa.asset_id
        

No comments:

Post a Comment