oracle产品追溯,如何追溯AR到Receipt再到GL
AR to GL 可以通過如下追溯...不過執行效率很低...主要由于GL_JE_JOURNAL_LINES_V 視圖的原因...不知道為什么...
----------------------------------------AR to GL-----------------------------------------------------------------------------
SELECT? ? gjjlv.period_name? ?? ?? ?? ? "Period Name"
, gjb.name? ?? ?? ?? ?? ?? ?? ? "Batch Name"
, gjjlv.header_name? ?? ?? ?? ? "Journal Entry For"
, gjjlv.je_source? ?? ?? ?? ?? ?"Source"
,glcc.concatenated_segments? ???"Accounts"
, NVL(gjjlv.line_entered_dr,0)??"Entered Debit"
, NVL(gjjlv.line_entered_cr,0)? ?"Entered Credit"
, NVL(gjjlv.line_accounted_dr,0) "Accounted Debit"
, NVL(gjjlv.line_accounted_cr,0) "Accounted Credit"
, gjjlv.currency_code? ?? ?? ?? ?"Currency"
, rctype.name? ?? ?? ?? ?? ?? ???"Trx type"
, rcta.trx_number? ?? ?? ?? ?? ? "Trx Number"
, rcta.trx_date? ?? ?? ?? ?? ?? ?"Trx Date"
, RA.CUSTOMER_NAME? ?? ?? ?? ?? ?"Trx Reference"
, gjh.STATUS? ?? ?? ?? ?? ?? ?? ?"Posting Status"
, TRUNC(gjh.DATE_CREATED)? ?? ???"GL Transfer Dt"
, gjjlv.created_by? ?? ?? ?? ?? ?"Transfer By"
FROM? ? apps.GL_JE_JOURNAL_LINES_V gjjlv
, gl_je_lines gje
, gl_je_headers gjh
, gl_je_batches gjb
, ra_customer_trx_all rcta
, apps.ra_customers ra
, apps.gl_code_combinations_kfv glcc
, ra_cust_trx_types_all rctype
WHERE? ?--??gjh.period_name IN ('OCT-2008','NOV-2008')
--AND
glcc.code_combination_id = gje.code_combination_id
AND? ?? ? gjh.je_batch_id = gjb.je_batch_id
AND? ?? ? gjh.je_header_id = gje.je_header_id
AND? ?? ? gjh.period_name = gjb.default_period_name
AND? ?? ? gjh.period_name = gje.period_name
AND? ?? ? gjjlv.period_name = gjh.period_name
AND? ?? ? gjjlv.je_batch_id = gjh.je_batch_id
AND? ?? ? gjjlv.je_header_id = gjh.je_header_id
AND? ?? ? gjjlv.line_je_line_num??= gje.je_line_num
AND? ?? ? gjjlv.line_code_combination_id = glcc.code_combination_id
AND? ?? ? gjjlv.line_reference_4 = rcta.trx_number
AND? ?? ? rcta.cust_trx_type_id = rctype.cust_trx_type_id
AND? ?? ? rcta.org_id = rctype.org_id
AND? ?? ? ra.customer_id = rcta.bill_to_customer_id
and? ?? ???rcta.trx_number in ('54130226','54130231','54130245','54130227')
--and? ?? ? glcc.segment1 ='30D
總結
以上是生活随笔為你收集整理的oracle产品追溯,如何追溯AR到Receipt再到GL的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle multi read,解读
- 下一篇: oracle 查询创建的全文索引,CSS