Query

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

select glb.NAME, GJH.NAME, TRANSACTION_ID, ionv.organization_code, TRANSACTION_QUANTITY, ACTUAL_COST, msi.segment1, MSI.SEGMENT1||'-'||MSI.SEGMENT2||'-'||MSI.SEGMENT3 ITEM_CODE, MSI.DESCRIPTION, MMT.TRANSACTION_DATE, gcc.SEGMENT5 NATURAL_ACCOUNT, gtm_gl_code_combination(gcc.

CODE_COMBINATION_ID) code_combination, ffvt.DESCRIPTION NATURAL_ACCOUNT_DESC, mtt.TRANSACTION_TYPE_NAME "TRANSACTION TYPE OR STATUS", (NVL(GJL.ACCOUNTED_DR,0)) DEBIT, (NVL(GJL.ACCOUNTED_CR,0)) CREDIT --(NVL(GJL.ACCOUNTED_DR,0))-SUM(NVL(GJL.ACCOUNTED_CR,0)) BALANCE from gl_je_headers gjh , gl_je_lines gjl, gl_code_combinations gcc, xla_ae_lines xal, xla_ae_headers xah, xla.xla_events xe, xla.xla_transaction_entities xte, mtl_material_transactions mmt , mtl_transaction_types mtt , fnd_flex_values ffv , fnd_flex_values_tl ffvt , mtl_system_items msi, inv_organization_name_v ionv, gl_je_batches GLB where gjh.JE_HEADER_ID = gjl.JE_HEADER_ID and gcc.CODE_COMBINATION_ID = gjl.CODE_COMBINATION_ID and xal.GL_SL_LINK_ID = gjl.GL_SL_LINK_ID and xal.AE_HEADER_ID = xah.AE_HEADER_ID and xah.EVENT_ID = xe.EVENT_ID and xte.ENTITY_ID = xe.ENTITY_ID and mmt.TRANSACTION_ID = xte.SOURCE_ID_INT_1 and mtt.TRANSACTION_TYPE_ID = mmt.TRANSACTION_TYPE_ID and mmt.inventory_item_id = msi.inventory_item_id and mmt.organization_id = msi.organization_id and mmt.organization_id = ionv.organization_id and ffvt.FLEX_VALUE_ID = ffv.FLEX_VALUE_ID and ffv.FLEX_VALUE = gcc.SEGMENT5 AND gjh.je_batch_id = GLB.je_batch_id(+) and ffv.FLEX_VALUE_SET_ID = 1014150 --AND MMT.TRANSACTION_tYPE_ID IN (109) --AND MSI.SEGMENT1 BETWEEN 400 AND 417 --AND MMT.ORGANIZATION_ID = 93 --AND MSI.SEGMENT1 = 110 --and gcc.segment5 in ('31019900','31031003','35011001','35011002','35011003','3 5011005','35011004','51021001','51021002','51021012','51032010','51032012', --'51042004','51051001','51051005','61051001','61081003','35012001','35012002',' 51021003','51021011') ----and GCC.SEGMENT5 in ('35021002','35022102','35022101','35021001') --and ionv.organization_id = 124 --and gjh.JE_SOURCE = 'Cost Management' --and mmt.transaction_type_id in (18)

--and gjh.DEFAULT_EFFECTIVE_DATE BETWEEN '01-MAr-2012' AND '31-Mar-2012' and xal.APPLICATION_ID = 707 and xe.APPLICATION_ID = 707 --and xte.ENTITY_CODE = 'MTL_ACCOUNTING_EVENTS' and glb.JE_BATCH_ID = 450661 --AND NVL(GJL.ACCOUNTED_DR,0) = 0

You might also like