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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值