Applies to:   Oracle Inventory Management - Version: 12.0.6<max_ver> and later   [Release: 12 and later ] Information in this document applies to any platform. ***Checked for relevance on 7-Sep-2011***   Goal   In Release 12, Subledger Accounting has been introduced for Procurement.  As a part of Subledger Accounting, new SLA tables XLA_AE_HEADERS, XLA_AE_LINES and XLA_DISTRIBUTION_LINKS have been introduced.

How to join the tables XLA_AE_HEADERS with RCV_TRANSACTIONS?   Solution   There is no direct join between these 2 tables, however you can link via other tables and return data.

In the rcv_receiving_sub_ledger with the rcv_transaction_id you can tie in the rcv_transactions table with the transaction_id, so:

rrsl.rcv_transaction_id = rt.transaction_id

In the rcv_receiving_sub_ledger with the RCV_SUB_LEDGER_ID you can tie in the XLA_DISTRIBUTION_LINKS table with the SOURCE_DISTRIBUTION_ID_NUM_1:

xdl.SOURCE_DISTRIBUTION_ID_NUM_1 = rrsl.RCV_SUB_LEDGER_ID

And then complete the join between the tables with the ae_header_id reference between xla_ae_headers and XLA_DISTRIBUTION_LINKS:

aeh.ae_header_id = xdl.ae_header_id

So with the following completed script by entering an accrued receipt number you can obtain the rcv_transaction transaction_id and the xla_ae_headers table ae_header_id values, thus effectively joining the respective tables.   Please note however that the transactions must have been accrued and the Create Accounting process have completed for records to be seen in the Subledger Tables.   Here is the script, it requires the entry of a receipt number and the appropriate set of books id ( for a receipt that has been accrued as described above):

SELECT aeh.ae_header_id,
       ael.ae_line_num,
       ael.accounting_class_code,
       ael.accounted_dr,
       ael.accounted_cr,
       rt.transaction_id,
       rt.shipment_header_id
FROM   xla_ae_headers aeh,
       xla_ae_lines ael,
       rcv_transactions rt,
xla_distribution_links xdl,
       rcv_receiving_sub_ledger rrsl
WHERE  aeh.ae_header_id = xdl.ae_header_id
       AND aeh.ae_header_id = ael.ae_header_id
       AND ael.ae_header_id = xdl.ae_header_id
       AND ael.ae_line_num = xdl.ae_line_num
       AND xdl.source_distribution_type = 'RCV_RECEIVING_SUB_LEDGER'
       AND xdl.source_distribution_id_num_1 = rrsl.rcv_sub_ledger_id
       AND rrsl.rcv_transaction_id = rt.transaction_id
       AND rrsl.set_of_books_id = &set_of_books_id
       AND rt.shipment_header_id IN (SELECT shipment_header_id
                                     FROM   rcv_shipment_headers
                                     WHERE  receipt_num = '&RECEIPT_NUM')
ORDER  BY rt.transaction_id,
          ael.ae_header_id,
          ael.ae_line_num;

How To Join XLA_AE_HEADERS and RCV_TRANSACTIONS(子分类账到事务处理追溯)的更多相关文章

  1. How To Join XLA_AE_HEADERS and RCV_TRANSACTIONS? [ID 558514.1]

    Applies to: Oracle Inventory Management - Version: 12.0.6<max_ver> and later   [Release: 12 an ...

  2. Oracle EBS SLA(子分类账)

    SLA概述 SLA(Subledger Accounting) 子帐是子分类帐会计的简称,字面上的含义就是子分类帐会计分录 SLA常用表介绍 在SLA中技术方面最常用的就是日记账来源追溯,在追溯的过程 ...

  3. 使用连接(JOIN)来代替子查询(Sub-Queries) mysql优化系列记录

    使用连接(JOIN)来代替子查询(Sub-Queries) MySQL从 4.1开始支持SQL的子查询.这个技术可以使用SELECT语句来创建一个单列的查询结果,然后把这个结果作为过滤条件用在另一个查 ...

  4. mysql常见的优化方法

    1.选取适当的字段属性.例如,在定义邮政编码这个字段时,如果将其设置为CHAR(255),显然给数据库增加了不必要的空间,甚至使用VARCHAR这种类型也是多余的,因为CHAR(6)就可以很好的完成任 ...

  5. 总账:日记账导入流程(文档 ID 1591640.1)

    文档内容   概要   历史记录   详细信息   GL_INTERFACE_CONTROL   GL_INTERFACE_HISTORY   GL_IMPORT_REFERENCES   摘要   ...

  6. 莱杰:期刊进口流程(文件 ID 1591640.1)

    文档内容   概要   _afrLoop=2068767096030752&id=1591640.1&_afrWindowMode=0&_adf.ctrl-state=qivv ...

  7. hive中的子查询改join操作(转)

    这些子查询在oracle和mysql等数据库中都能执行,但是在hive中却不支持,但是我们可以把这些查询语句改为join操作: -- 1.子查询 select * from A a where a.u ...

  8. Sla子分类账表结构

    --基础事件关系图Select * From xla_entity_types_vl; --事件实体Select * From xla_entity_id_mappings;--实体ID对应表Sele ...

  9. java多线程中关于join方法的使用

    Thread的非静态方法join()让一个线程B"加入"到另外一个线程A的尾部.在A执行完毕之前,B不能工作.例如:         Thread t = new MyThread ...

随机推荐

  1. docker 镜像详解

    镜像的大小不等于通过docker images 看到的每个镜像大小的合集,docker镜像采用了分层的机制.上层使用共同下层,各自不同部门构建各自的独立分层. docker的镜像通过联合文件系统(un ...

  2. 23种设计模式之适配器模式(Adapter)

    适配器模式将一个接口转换成客户希望的另一个接口,从而使接口不兼容的那些类可以一起工作.适配器模式既可以作为类结构型模式,也可以作为对象结构型模式.在类适配器模式中,通过使用一个具体类将适配者适配到目标 ...

  3. 利用bat批处理做启动mongodb脚本

    文章开始,我们先回顾一下,如何用cmd命令窗口开启mongodb数据库,命令如下: 开启mongodb数据库 cd D:\Program Files\MongoDB\bin mongod --depa ...

  4. mysql导入存储过程

    查询数据库存储过程 select `name` from mysql.proc where db = 'databaseName' and `type` = 'PROCEDURE'; mariadb操 ...

  5. 1.2Tensorflow的Session操作

    tf的session #-*- coding: utf-8 -*- # @Time : 2017/12/21 14:56 # @Author : Z # @Email : S # @File : 1. ...

  6. mount --bind 的妙用

      在固件开发过程中常常遇到这样的情况:为测试某个新功能,必需修改某个系统文件.而这个文件在只读文件系统上(总不能为一个小小的测试就重刷固件吧),或者是虽然文件可写,但是自己对这个改动没有把握,不愿意 ...

  7. html中label及加上属性for之后的用法

    定义和用法 <label> 标签为 input 元素定义标签(label). label 元素不会向用户呈现任何特殊的样式.不过,它为鼠标用户改善了可用性,因为如果用户点击 label 元 ...

  8. SUSE12的虚拟机安装以及ORACLE12C的安装

    在本文中用到的所有参数,均位于文后附录中 在VMware中新建虚拟机,建好之后挂载光盘,启动虚拟机进入安装界面 初始化中 选择跳过注册 选择DVD模式 选择接受许可证条款 默认选择 选择默认系统 选择 ...

  9. 25个站长必备的SEO优化工具

    搜索引擎抓取内容模拟器 可以模拟蜘蛛抓取指定网页,包括Text.Link.Keywords及Description信息等.http://www.webconfs.com/search-engine-s ...

  10. sum统计某字段满足某种条件的记录数

    (1)count来查询: 查询 lw_devices_type_relation 表中满足is_standard为1的数量. (2)sum来查询: ) from lw_devices_type_rel ...