ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SLA GL SqlLink

SLA GL SqlLink

原创 Linux操作系统 作者:xing_lang 时间:2012-10-12 17:10:45 0 删除 编辑

AR SLA GL SqlLink  

2012-08-10 17:51:47|  分类: 技术、专业相关 |  标签: |字号大中小 

AR-SLA:

select xte.entity_id,
       xte.transaction_number,
       xte.source_id_int_1,
       rct.trx_number,
       fnd_flex_ext.get_segs('SQLGL',
                             'GL#',
                             gl.chart_of_accounts_id,
                             xal.code_combination_id) account,
       GL_FLEXFIELDS_PKG.get_concat_description(gl.chart_of_accounts_id,
                                                xal.code_combination_id) account_desc,
       xlk1.meaning journal_entry_status,
       xah.accounting_date gl_date,
       xal.currency_code,
       xal.entered_dr,
       xal.entered_cr,
       xal.accounted_dr,
       xal.accounted_cr
  from xla_transaction_entities xte,
       xla_ae_headers           xah,
       xla_ae_lines             xal,
       gl_ledgers               gl,
       xla_lookups              xlk1,
       ra_customer_trx_all      rct
 where xte.entity_id = xah.entity_id
   and xte.application_id = xah.application_id
   and xah.application_id = xal.application_id
   and xah.ae_header_id = xal.ae_header_id
   and gl.ledger_id = xah.ledger_id
   and xlk1.lookup_code = xah.accounting_entry_status_code
   and xlk1.lookup_type = 'XLA_ACCOUNTING_ENTRY_STATUS'
   and xte.application_id=222
  and xte.source_id_int_1=rct.customer_trx_id
 -- and rct.trx_number='5000082'
   and nvl(nvl(accounted_cr, accounted_dr), 0) <> 0; 

SLA-GL:

在子模块提交请求:Transfer Journal Entries to GL

 系统通过包 :  xla_gl_transfer_pkg,把SLA 中的数据写入GL_INTERFACE    产生总账的信息后,我们如果要追溯总账的歇息

XLA的日记帐表通过表GL_IMPORT_REFERENCES 和总账的日记账表做关联

select jh.je_category,
       jh.je_source,
       jh.description,
       jl.je_line_num,
       jl.line_type_code,
       xte.transaction_number,
       fnd_flex_ext.get_segs('SQLGL',
                             'GL#',
                             gl.chart_of_accounts_id,
                             jl.code_combination_id) account,
       gl_flexfields_pkg.get_concat_description(gl.chart_of_accounts_id,
                                                jl.code_combination_id) account_desc,
       jl.entered_dr,
       jl.entered_cr,
       jl.accounted_dr,
       jl.accounted_cr
  from gl_je_headers                jh,
       gl_je_lines                  jl,
       gl_import_references         gir,
       gl_ledgers                   gl,
       xla_ae_lines                 xal,
       xla_ae_headers               xah,
       xla_events                   xe,
       xla_transaction_entities     xte,
       ra_customer_trx_all          rct,
       ra_cust_trx_line_gl_dist_all ctld
 where jh.je_header_id = jl.je_header_id
   and gir.je_header_id = jh.je_header_id
   and gir.je_line_num = jl.je_line_num
   and jh.ledger_id = gl.ledger_id
   and gir.gl_sl_link_id = xal.gl_sl_link_id
   and xal.ae_header_id = xah.ae_header_id
   and xah.entity_id = xte.entity_id
   and xah.event_id = xe.event_id
   and xe.entity_id = xte.entity_id
   and xah.ledger_id = gl.ledger_id
   and rct.customer_trx_id = ctld.customer_trx_id
   and ctld.event_id = xe.event_id
   and xte.application_id = 222
   and nvl(nvl(jl.entered_dr, jl.entered_cr), 0) <> 0;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9182041/viewspace-746307/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-05-15

  • 博文量
    39
  • 访问量
    131675