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? [ID 558514.1]的更多相关文章

  1. How To Join XLA_AE_HEADERS and RCV_TRANSACTIONS(子分类账到事务处理追溯)

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

  2. 内连接查询 (select * from a join b on a.id = b.id) 与 关联查询 (select * from a , b where a.id = b.id)的区别

    转自https://blog.csdn.net/l690781365/article/details/76261093 1.首先了解 on .where 的执行顺序以及效率? from a join ...

  3. MySQL JOIN 连接时,条件为以逗号分隔的字段与 ID 相匹配

    一.背景 有一张相片表,一张相片所属标签表,一张相片可以归属于多个标签,表结构如下: 现在需要通过一次查询,得到每一张照片对应的标签名称,标签名称之间以固定的分隔符连接,结果如下图: 二.查询语句 原 ...

  4. linq lambda left join

    //var list = table1.Join(table2, ee => ee.Id, ff => ff.table1_Id, (ee, ff) => new { ee, ff  ...

  5. 30秒懂SQL中的join(2幅图+30秒)

    废话不多说,直接上图秒懂. t1表的结构与数据如下: t2表的结构与数据如下: inner join select * from t1 inner join t2 on t1.id = t2.id; ...

  6. Delete,Update与LEFT Join

    UPDATE:UPDATE A SET ApproverID=NULL FROM [SH_MaterialApplyBuyBill] A LEFT JOIN [SH_MaterialApplyBuyB ...

  7. inner join on 和 where = 的区别!

    请看下面两条语句:select * from table1 inner join table2 on table1.id = table2.idselect * from table1,table2 ...

  8. UPDATE INNER JOIN 两表联合更新

    UPDATE B_READMETER_HANDWORK INNER JOIN B_READMETER_ORDER_SP ON B_READMETER_HANDWORK.ID = B_READMETER ...

  9. SQL update join on 连接更新

    http:/how-can-i-do-an-update-statement-with-join-in-sql create table sale ( id int, udid int, assid ...

随机推荐

  1. Autofac 的点滴

    泛型类型的注册和使用 public interface IRepository<T> where T:class { } public interface ISchoolDetailRep ...

  2. vue2.0构建淘票票webapp

    项目描述 之前一直用vue1.x写项目,最近为了过渡到vue2.0,特易用vue2.0栈仿写了淘票票页面,而且加入了express作为后台服务. 前端技术栈:vue2.0 + vue-router + ...

  3. Java垃圾回收

    垃圾收集算法 引用计数 堆中的每个对象都有一个引用计数,当对象被引用时引用计数加1,当对象的引用被重新赋值或超出有效区域时引用计数减1,当一个对象被回收后,它所引用的对象的引用计算减1.当一个对象的引 ...

  4. Java在DOS命令下的运行及其API文档制作过程

    该文档主要描述java程序在DOS命令下的运行,以及一些常用的命令 常用DOS命令: d: 回车 盘符切换 dir(directory):列出当前目录下的文件以及文件夹 md (make direct ...

  5. ABP源码分析二十八:ABP.MemoryDB

    这个模块简单,且无实际作用.一般实际项目中都有用数据库做持久化,用了数据库就无法用这个MemoryDB 模块了.原因在于ABP限制了UnitOfWork的类型只能有一个(前文以作介绍),一般用了数据库 ...

  6. ABP源码分析三十八: ABP.Web.Api.OData

    如果对OData不熟悉的话可参考OData的初步认识一文以获取OData的一些初步知识. API.Odata 模块唯一用处就是提供了一个泛型版本的ODataController,实现了Controll ...

  7. 日期格式 CST

    从es 取出来一个date 字段, 结果竟然是 2016-10-10T10:48:58.000Z 这样的字符串, 这个是什么格式啊??? CST ? 只能自己转换了! 通过"yyyy-MM- ...

  8. 如何调用Google地图?

    在建设网站中用到地图是很常见的,在国内大部分都是用百度地图,但是有时候可能会用到国外地址,这时候就只能使用谷歌地图了. 方法一.使用框架引入谷歌地图 用框架引入谷歌地址是最简单的方法,不是专业开发人员 ...

  9. SQL Server 系列文章快速导航(SWF版)

    一.前言 在博客园写博客不自不觉已经有5个年头了,一开始只是为了记录工作中遇到的问题和解决办法,后来写的文章不自不觉的侧重在SQL Server方面的技术文章,在2014年1月终于鼓起勇气申请了微软S ...

  10. ASP.NET Core 中文文档 第二章 指南(4.9)添加验证

    原文:Adding Validation 作者:Rick Anderson 翻译:谢炀(Kiler) 校对:孟帅洋(书缘).娄宇(Lyrics).许登洋(Seay) 在本章节中你将为 Movie 模型 ...