Tuesday, 25 June 2013

SLA table for all Manual (YTD) transactions

* Formatted on 6/25/2013 5:06:49 PM (QP5 v5.114.809.3010) */
  SELECT                /*+ parallel(l) parallel(h) parallel(gl) leading(h) */
        gl .concatenated_segments,
           l.code_combination_id,
           SUM (NVL (entered_cr, 0)),
           SUM (NVL (entered_dr, 0)),
           SUM (NVL (entered_cr, 0)) - SUM (NVL (entered_dr, 0)),
           currency_code
    FROM   xla_ae_headers h, xla_ae_lines l, gl_code_combinations_kfv gl
   WHERE       gl.code_combination_id = l.code_combination_id
           AND h.application_id = 200
           AND l.application_id = h.application_id
           AND l.ae_header_id = h.ae_header_id
           AND h.accounting_date BETWEEN TO_DATE ('01-JUL-2007', 'DD-MON-YYYY')
                                     AND  TO_DATE ('31-MAR-2008',
                                                   'DD-MON-YYYY')        -- <>
           AND h.ledger_id = 1
           AND h.gl_transfer_status_code = 'Y'
           AND h.accounting_entry_status_code = 'F'
           AND l.code_combination_id = 112771
           AND h.event_type_code = 'MANUAL'
           AND h.application_id = 200
           AND h.balance_type_code = 'A'
GROUP BY   l.code_combination_id, gl.concatenated_segments, currency_code

No comments:

Post a Comment