Wednesday 23 November 2011

gl Drill down to vendor

SELECT  gjh.period_name,
gjh.je_source,
gjh.je_category,
gcc.CONCATENATED_SEGMENTS,
NVL (SUM (xal.accounted_dr), 0) AS debit,
        NVL (SUM (xal.accounted_cr), 0) AS credit,
          NVL (SUM (xal.accounted_dr), 0)
        - NVL (SUM (xal.accounted_cr), 0) AS net,
        xal.accounting_class_code
    --xte.TRANSACTION_NUMBER
 --i.*
 FROM   gl_je_headers gjh,
       gl_je_lines gjl,
       gl_code_combinations_kfv gcc,
       gl_import_references gir,
       xla_ae_lines xal,
       xla_ae_headers xah,
       po_vendors pov
WHERE       gjh.status = 'P'
       AND gjh.actual_flag = 'A'
       AND gjh.je_header_id = gjl.je_header_id
          and gjh.je_category = 'Payments'
          and gcc.SEGMENT1 like '20'
          and gjh.PERIOD_NAME like 'MAR-11'
         -- and f.ENTITY_ID = xte.ENTITY_ID
          --and f.LEDGER_ID = xte.LEDGER_ID
          --and f.LEDGER_ID like '2034'
          AND pov.vendor_id(+) = xal.party_id
          group by gjh.period_name,
gjh.je_source,
gjh.je_category,
gcc.CONCATENATED_SEGMENTS,
xal.accounting_class_code

1 comment:

  1. 25% OFF on Oracle Apps R12 Financials Self Paced Course along with 11 Additional Add On Courses (321 Session Videos of 120 Hours Recordings). Our Top Trending Course with 1700 Enrolled Udemy Students

    Please Check https://www.oracleappstechnical.com for details

    ReplyDelete