表名:GL_IMPORT_REFERENCES

说明:总账导入附加信息表

用途:用来追溯从子模块传入总账模块的明细,对于报表开发很有帮助

SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir
where gjh.je_header_id = gjl.je_header_id
and gjl.je_header_id = gir.je_header_id
and gjl.je_line_num = gir.je_line_num;

1、gjh.je_source = 'Payables':

1)与 AP 模块关联表:ap_ae_lines_all

2)SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
ap_ae_lines_all ael,
ap_ae_headers_all aeh
where gjh.je_header_id = gjl.je_header_id
and gjl.je_header_id = gir.je_header_id
and gjl.je_line_num = gir.je_line_num
and gjh.je_source = 'Payables'
and gir.gl_sl_link_id = ael.gl_sl_link_id
and ael.ae_header_id = aeh.ae_header_id;

3)根据 aeh.ae_category 或 aeh.accounting_event_id 判断业务性质,从而关联以下数据

库表进行取值;

ap_invoices_all

ap_invoice_distributions_all

ap_checks_all

ap_invoice_payments_all

ap_accounting_events_all

4)借贷金额计算逻辑:

直接取 ap_ae_lines_all 的 ael.accounted_dr,ael.accounted_cr 字段值

  借项:

ael.accounted_dr;

  贷项:

ael.accounted_cr;

2、gjh.je_source = 'Receivables':

1)gjh.je_category in ('Credit Memos', 'Sales Invoices')

A.  与 AR 关联表:ra_cust_trx_line_gl_dist_all

2

B.  SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
ra_cust_trx_line_gl_dist_all rcl
where gjh.je_header_id = gjl.je_header_id
and gjl.je_header_id = gir.je_header_id
and gjl.je_line_num = gir.je_line_num
and gjh.je_source = 'Receivables'
and gjh.je_category in ('Credit Memos', 'Sales Invoices')
and gir.reference_3 = to_char(rcl.cust_trx_line_gl_dist_id);

C.  根据 rcl.customer_trx_id、rcl.customer_trx_line_id 关联以下表:

ra_customer_trx_all

ra_customer_trx_lines_all

D.  借贷金额计算逻辑:

根据自总账模块所追溯科目的性质,判断 sign(rcl.acctd_amount)的符号和

gjl.accounted_dr 是否为空,分别列在借方和贷方金额栏。

以下为应收账款科目借贷方金额计算逻辑,仅供参考:

  借项:

decode(sign(rcl.acctd_amount),
1, rcl.acctd_amount,
0,
0,
-1,
0) acctd_dr;

  贷项:

decode(sign(rcl.acctd_amount),
1,
0,
0,
0,
-1,
rcl.acctd_amount * -1) acctd_cr;

2)gjh.je_category in ('Trade Receipts', 'Credit Memo Applications')

A.  与 AR 关联表:ar_receivable_applications_all

B.  SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
ar_receivable_applications_all ara
where gjh.je_header_id = gjl.je_header_id
and gjl.je_header_id = gir.je_header_id
3
and gjl.je_line_num = gir.je_line_num
and gjh.je_source = 'Receivables'
and gjh.je_category in ('Trade Receipts', 'Credit Memo Applications')
and decode(gjh.je_category,
'Trade Receipts',
substr(gir.reference_2, instr(gir.reference_2, 'C', 1) + 1),
gir.reference_2) = ara.receivable_application_id;

C.  根据 ara.cash_receipt_id、 ara.customer_trx_id、 ara.applied_customer_trx_id

关联以下表:

ar_cash_receipts_all

ra_customer_trx_all

D.  借贷金额计算逻辑:

根据自总账模块所追溯科目的性质,判断 sign(ara.acctd_amount_applied_to)

的符号和 gjl.accounted_dr 是否为空,分别列在借方和贷方金额栏。

以下为应收账款科目借贷方金额计算逻辑,仅供参考:

  借项:

decode(gjh.je_category,
'Trade Receipts',
decode(sign(ara.acctd_amount_applied_to),
0,
0,
1,
0,
ara.acctd_amount_applied_to * -1),
decode(sign(ara.acctd_amount_applied_to),
0,
0,
1,
decode(gjl.accounted_dr,
null,
0,
ara.acctd_amount_applied_to),
decode(gjl.accounted_dr,
null,
0,
ara.acctd_amount_applied_to * -1))) acctd_dr;

  贷项:

decode(gjh.je_category,
'Trade Receipts',
decode(sign(ara.acctd_amount_applied_to),
0,
0,
1,
ara.acctd_amount_applied_to,
4
0),
decode(sign(ara.acctd_amount_applied_to),
0,
0,
1,
decode(gjl.accounted_dr,
null,
ara.acctd_amount_applied_to,
0),
decode(gjl.accounted_dr,
null,
ara.acctd_amount_applied_to * -1,
0))) acctd_cr;

3、gjh.je_source = 'Inventory':

1)与 INV 关联表:mtl_transaction_accounts

2)SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
mtl_transaction_accounts mta,
mtl_material_transactions mmt
where gjh.je_header_id = gjl.je_header_id
and gir.je_header_id = gjl.je_header_id
and gir.je_line_num = gjl.je_line_num
and gjh.je_source = 'Inventory'
and gir.reference_1 = to_char(mta.gl_batch_id)
and mta.transaction_id = mmt.transaction_id;

3)根据 mmt.transaction_type_id 关联以下表:

mtl_transaction_types

oe_order_headers_all

oe_order_liness_all

rcv_transactions

po_hedaers_all

po_lines_all

mtl_txn_request_headers

mtl_txn_request_lines

mtl_generic_dispositions

4)借贷金额计算逻辑:

根据自总账模块所追溯科目的性质,判断 sign(mta.base_transaction_value)的符

号,分别列在借方和贷方金额栏

以下为销售成本科目借贷方借计算逻辑,仅供参考:

  借项:

decode(sign(mta.base_transaction_value),
5
1,
mta.base_transaction_value,
0) acctd_dr;
 贷项:
decode(sign(mta.base_transaction_value),
-1,
mta.base_transaction_value * -1,
0) acctd_cr;

4、gjh.je_source = 'Purchasing':

1)与 PO 关联表:rcv_receiving_sub_ledger

2)SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
rcv_receiving_sub_ledger rcs
where gjh.je_header_id = gjl.je_header_id
and gir.je_header_id = gjl.je_header_id
and gir.je_line_num = gjl.je_line_num
and gjh.je_source = 'Purchasing'
and gir.reference_5 = to_char(rcs.rcv_transaction_id);

3)根据 rcs.rcv_transaction_id 关联以下表:

rcv_transactions

po_headers_all

po_lines_all

po_line_locations_all

po_distributions_all

4)借贷金额计算逻辑:

直接取 rcv_receiving_sub_ledger 的 rcs.accounted_dr 和 rcs.accounted_cr 字

段值

  借项:

rcs.accounted_dr;

  贷项:

rcs.accounted_cr;

5、gjh.je_source = 'Assets':

1)与 FA 关联表:fa_adjustments

2)SQL 语句:

select *
from gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
fa_adjustments fad
where gjh.je_header_id = gjl.je_header_id
and gir.je_header_id = gjl.je_header_id
6
and gir.je_line_num = gjl.je_line_num
and gjh.je_source = 'Assets'
and gir.je_header_id = fad.je_header_id
and gir.je_line_num = fad.je_line_num;

3)根据 source_type_code 关联以下表:

fa_additions_b

fa_additions_tl

fa_books

fa_deprn_detail

fa_deprn_summary

fa_retirements

fa_transfer_details

fa_distribution_accounts

fa_distribution_history

fa_transaction_headers

4)借贷金额计算逻辑:

根据 fad.debit_credit_flag 的性质,判断 fad.adjustment_amount 的借贷方属性

  借项:

decode(fad.debit_credit_flag,

'DR',

fad.adjustment_amount,

0) acctd_dr;

  贷项:

decode(fad.debit_credit_flag,

'CR',

fad.adjustment_amount,

0) acctd_cr;



EBS总账模块与其他模块数据关联关系的更多相关文章

  1. Nodejs中cluster模块的多进程共享数据问题

    Nodejs中cluster模块的多进程共享数据问题 前述 nodejs在v0.6.x之后增加了一个模块cluster用于实现多进程,利用child_process模块来创建和管理进程,增加程序在多核 ...

  2. Python基础之模块、数据类型及数据类型转换

    一.模块 1.标准库 不需要安装,直接调入使用的模块. import sys模块: import sys print(sys.path) #打印环境变量绝对路径 print(sys.argv) #打印 ...

  3. 使用Jyhon脚本和PMI模块监控WAS性能数据

    使用Jyhon脚本和PMI模块监控WAS性能数据的优点有: 1.可以使用非交互的方式远程获取数据 2.不需要图形化模块支持 3.对各种was版本的兼容性较高 4.使用方便,官方自带 缺点也有很多: 1 ...

  4. selenium模块获得js动态数据-17track为例

    通过selenium模块驱动Chrome浏览器,获得js动态数据,以17track为例:通过运单号查询最新的物流信息 1 import re 2 from time import sleep 3 fr ...

  5. python常用模块(模块和包的解释,time模块,sys模块,random模块,os模块,json和pickle序列化模块)

    1.1模块 什么是模块: 在计算机程序的开发过程中,随着程序代码越写越多,在一个文件里代码就会越来越长,越来越不容易维护. 为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样,每个文 ...

  6. threading模块和queue模块实现程序并发功能和消息队列

    简介: 通过三个例子熟悉一下python threading模块和queue模块实现程序并发功能和消息队列. 说明:以下实验基于python2.6 基本概念 什么是进程? 拥有独立的地址空间,内存,数 ...

  7. python数据库操作之pymysql模块和sqlalchemy模块(项目必备)

    pymysql pymsql是Python中操作MySQL的模块,其使用方法和MySQLdb几乎相同. 1.下载安装 pip3 install pymysql 2.操作数据库 (1).执行sql #! ...

  8. python-Day5-深入正则表达式--冒泡排序-时间复杂度 --常用模块学习:自定义模块--random模块:随机验证码--time & datetime模块

    正则表达式   语法:             mport re #导入模块名 p = re.compile("^[0-9]") #生成要匹配的正则对象 , ^代表从开头匹配,[0 ...

  9. 第五十五节,IO多路复用select模块加socket模块,伪多线并发

    IO多路复用select模块加socket模块,伪多线并发,并不是真正的多线程并发,实际通过循环等待还是一个一个处理的 IO多路复用,lo就是文件或数据的输入输出,IO多路复用就是可以多用户操作 IO ...

  10. Python之xml文档及配置文件处理(ElementTree模块、ConfigParser模块)

    本节内容 前言 XML处理模块 ConfigParser/configparser模块 总结 一.前言 我们在<中我们描述了Python数据持久化的大体概念和基本处理方式,通过这些知识点我们已经 ...

随机推荐

  1. 51 nod 1405 树的距离之和

    1405 树的距离之和 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题   给定一棵无根树,假设它有n个节点,节点编号从1到n, 求任意两点之间的距离(最短路径)之 ...

  2. [BZOJ]4197: [Noi2015]寿司晚宴

    Time Limit: 10 Sec  Memory Limit: 512 MB Description 为了庆祝 NOI 的成功开幕,主办方为大家准备了一场寿司晚宴.小 G 和小 W 作为参加 NO ...

  3. VK-Cup2017 Wild Card Round 2

    来自FallDream的博客,未经允许,请勿转载,谢谢. Cf的Vkcup外卡赛2  上次round2和ditoly翻车了 所以只好来打打了  规则是给一道比较特殊的题目,你要找出较优的解 Unive ...

  4. [BZOJ]1050 旅行comf(HAOI2006)

    图论一直是小C的弱项,相比其它题型,图论的花样通常会更多一点,套路也更难捉摸. Description 给你一个无向图,N(N<=500)个顶点, M(M<=5000)条边,每条边有一个权 ...

  5. if else与switch区别

    一.if-else 只是单纯地一个接一个比较:if...else每个条件都计算一遍: 二.switch 使用了Binary Tree算法:绝大部分情况下switch会快一点,除非是if-else的第一 ...

  6. BigData-‘基于代价优化’究竟是怎么一回事?

    本文由  网易云发布. 本文具体讨论了Join基础算法的一种优化方案  – Runtime Filter,在本文最后还引申地聊了聊谓词 下推技术.同时,在本文文章开头,笔者引出了两个问题,SQL执行引 ...

  7. git修改远程仓库地址

    方法有三种: 1.修改命令 git remote set-url origin [url] 例如: git remote set-url origin gitlab@gitlab.chumob.com ...

  8. 读书笔记-《Maven实战》-2018/4/18

    第五章:坐标和依赖 1.每个依赖中可以包含的元素有: groupId,artifactId,version: 这三个元素是Maven项目最重要的元素.Maven需要根据这三个坐标找到需要的依赖. ty ...

  9. linux系统下安装jdk、tomcat、mysql、redis

    一,安装jdk 1.rpm -qa | grep jdk 检测是否安装jdk 2.rpm -e --nodeps 要卸载的已有jdk名称 3.tar -zxvf jdk-7u71-linux-i586 ...

  10. 初识RabbitMQ系列之二:下载安装

    一:Erlang安装 因为RabbitMQ 是Erlang语言开发的,所以首先要装上Erlang的环境 1)下载Erlang    下载官网:http://www.erlang.org/downloa ...