码迷,mamicode.com
首页 > 其他好文 > 详细

GL_会计科目子模组追溯至总账分析(案例)

时间:2014-06-02 16:01:23      阅读:451      评论:0      收藏:0      [点我收藏+]

标签:des   c   style   class   blog   code   

2014-06-02 BaoXinjian

一、案例

需求: 从日记账源头追溯至分类账,再至子模组

1. 查询日记账,进行追溯

2. 常用的SQL

3. E-R图

4. SLA中查询

    (1). 会计事件 

    (2). 子分类账日记账分录 

 

二、案例实现

Step1. 查询日记账,进行追溯 

    bubuko.com,布布扣

 

Step2. 常用的SQL

    2.1 xla_transaction_entities用以连接AP事物实体和XLA的连接表

    2.2 gl_import_references用以连接XLA和GL的连接表 

bubuko.com,布布扣
 1 select invoice_id from ap_invoices_all
 2 
 3 where invoice_num = BXJ20120904_001
 4 
 5  
 6 
 7 select * from ap_invoice_lines_all
 8 
 9 where invoice_id = 2977123
10 
11  
12 
13 select accounting_event_id from ap_invoice_distributions_all
14 
15 where invoice_id = 2977123
16 
17  
18 
19 select entity_id from xla. xla_events
20 
21 where event_id = 21380679
22 
23  
24 
25 select source_id_int_1, transaction_number from xla.xla_transaction_entities
26 
27 where entity_id = 21028756
28 
29  
30 
31 select * from xla. xla_ae_headers
32 
33 where event_id = 21380679
34 
35  
36 
37 select * from xla. xla_ae_lines
38 
39 where ae_header_id in ( 121331026, 121331041)
40 
41  
42 
43 select * from xla. xla_distribution_links
44 
45 where ae_header_id in ( 121331026, 121331041)
46 
47  
48 
49 select    je_batch_id,
50 
51             je_header_id ,
52 
53             gl_sl_link_id ,
54 
55             gl_sl_link_table ,
56 
57             reference_5 entity_id ,
58 
59             reference_6 accounting_event_id ,
60 
61             reference_7 ae_header_id
62 
63   from   gl_import_references
64 
65  where gl_sl_link_id = 246342532
66 
67  
68 
69 select * from gl_je_lines
70 
71 where je_header_id = 2720705
72 
73 and gl_sl_link_id = 246342532
74 
75  
76 
77 select * from gl_je_batches
78 
79 where je_batch_id = 2694595
80 
81  
82 
83 select * from gl_je_headers
84 
85 whereje_batch_id = 2694595
bubuko.com,布布扣

 

Step3. E-R

 bubuko.com,布布扣

 

Step4. SLA中查询

    (1). 会计事件

        bubuko.com,布布扣

    (2). 子分类账日记账分录 

         bubuko.com,布布扣   

 

三、参考资料 

1. R12 Mapping Between Subledger Tables, SLA and GL Tables [ID 871622.1]

 

Thanks and Regards

bubuko.com,布布扣

 

 

 

 

GL_会计科目子模组追溯至总账分析(案例),布布扣,bubuko.com

GL_会计科目子模组追溯至总账分析(案例)

标签:des   c   style   class   blog   code   

原文地址:http://www.cnblogs.com/eastsea/p/3764229.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!