Oracle EBS-SQL (CST-1):检查BOM历史成本查询(Average Cost).sql
select msi1.segment1 父件编码,
msi1.description 父件描述,
msi1.primary_uom_code 父件单位,
msi2.segment1 子件编码,
msi2.description 子件描述,
msi2.primary_uom_code 子件单位,
bcb.component_quantity BOM用量,
bcb.component_yield_factor 产出率,
cos.item_cost 子件成本
from inv.mtl_system_items_b msi1,
inv.mtl_system_items_b msi2,
bom.bom_structures_b bsb,
bom.bom_components_b bcb,
(select cic.inventory_item_id,
cic.organization_id,
nvl((select max(mc.actual_cost) item_cost
from MTL_CST_ACTUAL_COST_DETAILS mc
where nvl(mc.actual_cost, 0) <> 0
and mc.inventory_item_id = cic.inventory_item_id
and mc.organization_id = cic.organization_id
and exists
(select 'X'
from (select mct.transaction_id,
mct.inventory_item_id,
mct.organization_id,
max(mct.creation_date)
from MTL_CST_ACTUAL_COST_DETAILS mct
where nvl(mct.actual_cost, 0) <> 0
and mct.organization_id = Y
and trunc(mct.creation_date) <=to_date('&DATE_YYYY_MM_DD', 'yyyy-mm-dd')
group by mct.transaction_id,
mct.inventory_item_id,
mct.organization_id) a
where a.transaction_id = mc.transaction_id
and a.inventory_item_id = mc.inventory_item_id
and a.organization_Id = mc.organization_id
and a.transaction_id = mc.transaction_id)
group by 1),
cic.item_cost) item_cost
from bom.cst_item_costs cic
where cic.cost_type_id = 2)cos
where msi1.inventory_item_id = bsb.assembly_item_id
and msi1.organization_id = bsb.organization_id
and msi2.inventory_item_id = bcb.component_item_id
and msi2.organization_id = to_number(bcb.pk2_value)
and bsb.bill_sequence_id = bcb.bill_sequence_id
and bcb.disable_date is null
and msi1.organization_id = Y
and msi2.inventory_item_id = cos.inventory_item_id
and msi2.organization_id = cos.organization_Id
and msi1.segment1 = '&item_number'
Oracle EBS-SQL (CST-1):检查BOM历史成本查询(Average Cost).sql的更多相关文章
- Oracle EBS中分类账和法人实体 的关系(有sql语句实例)
Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报 分类: Oracle EBS(12) Oracle数据 ...
- Oracle EBS-SQL (BOM-18):检查BOM与工艺路线对照.sql
/*有工艺路线,无BOM清单*/ select msi.segment1, msi.description from apps.BOM_OPERATIONAL_ROUTINGS bor, apps.m ...
- Oracle EBS 隐藏帮助-诊断-检查
- Oracle EBS DBA常用SQL - 安装/补丁【Z】
Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...
- oracle锁表查询,资源占用,连接会话,低效SQL等性能检查
查询oracle用户名,机器名,锁表对象 select l.session_id sid, s.serial#, l.locked_mode, l.oracle_username, l.os_user ...
- [转]oracle EBS 基础100问
from:http://www.cnblogs.com/xiaoL/p/3593691.html http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...
- Oracle EBS Model Function Technical
♡.Oracle EBS(ERP)Oracle 是公司名字,这个我估计大家都知道.EBS是E-Business Suite的缩写,简单的说,就是Oracle做的一个企业级的信息化软件或者系统,里面包含 ...
- Oracle EBS应用笔记整理 (转自IT++ flyingkite)
***************************************************** Author: Flyingkite Blog: http://space.itpub. ...
- Oracle EBS R12 (12.1.3) Installation Linux(64 bit)
Oracle EBS R12 (12.1.3) Installation Linux(64 bit) Contents Objective. 3 1 Download & Unzip. 3 D ...
随机推荐
- 理解Python中的装饰器
文章先由stackoverflow上面的一个问题引起吧,如果使用如下的代码: @makebold @makeitalic def say(): return "Hello" 打印出 ...
- < IOS > X-code 5.1 x86 - 64 编译问题
关于xcode 5.1 x86 - 64 编译问题 坐等了N久,终于IOS 7.1 发布了,作为一个果粉,忍不住第一时间升级了.结果用设备测试的时候,出问题了,一直检测不到设备,哈哈,纠结了半 ...
- bzoj1645 [Usaco2007 Open]City Horizon 城市地平线
Description Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at ...
- Dubbo、Zookeeper、SpringMVC的整合使用
互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,Dubbo是一个分布式服务框架,在这种情况下诞生的.现在核心业务抽取出来,作为独立的服务,使 ...
- UESTC_邱老师选妹子(二) 2015 UESTC Training for Dynamic Programming<Problem I>
I - 邱老师选妹子(二) Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Su ...
- Eclipse选中变量名,相同变量都变色显示
Eclipse选中变量名,相同变量都变色显示 java文件的设置"Window"-"preferences"-"Java"-"Ed ...
- 了解Serialization
对象的串行化(Serialization) 一.串行化的概念和目的 1.什么是串行化 对象的寿命通常随着生成该对象的程序的终止而终止.有时候,可能需要将对象的状态保存下来,在需要时再将对象恢复.我们把 ...
- MFC学习之程序执行过程梳理
*首先利用全局变量对象theApp启动应用程序.这是由于这个全局对象,基类CWinApp中this的指针才干指向这个对象.假设没有这个全局对象,程序在编译时不会出错,但在执行时就会出错. *调用全局应 ...
- JAX-RS开发 hello world
1.建立maven webapp工程aty-rest. 2. 在pom文件增加spring框架.jax-rs接口.CXF实现 <dependency> <groupId>jav ...
- C# 多线程的坑 之 代码变序
英文好的,可跳过,直接打开底部的“参考“链接. 代码变序--reordering of memory operations 大概4年前,阅读了这篇文章后http://www.albahari.com/ ...