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 ...
随机推荐
- Django学习(六) 模板
下面是一个新闻的模板:mysite/news/templates/news/year_archive.html mysite/news/templates/news/year_archive.html ...
- android的编译和运行过程深入分析
android的编译和运行过程深入分析 作者: 字体:[增加 减小] 类型:转载 首先来看一下使用Java语言编写的Android应用程序从源码到安装包的整个过程,此过程对了解android的编译和运 ...
- HQL(Hibernate Query language)语言
现在有两张表:student(学生表),classroom(教室表). //对象 Student 对应 student 表中有四个字段,分别是:id,name,age,classroom; publi ...
- 关于STM32工程的错误,狗血错误。。。..\CMSIS\core_cm3.h(1087): error: #20: identifier "IRQn_Type" is undefined
这件事还是要写一篇博客了,为了后来的人不换致命性的错误 辛辛苦苦写的一个四个不同的引脚不同时钟不同寄存器分别产生四种不同占空比不同周期的信号方波程序超级经典 PS:页尾上传PWM波形产生工程附件供大 ...
- Linux vps无法发送邮件
首先安装sendmail软件...yum install sendmail /etc/init.d/php-fpm restart 来检查下sendmail是否正常运行 /etc/init.d/sen ...
- Code First 创建数据库
最近在对以前学的知识做一个总结,EF 这块,Code First 是很重要的一部分,方便快捷创建模型. Code First有两种配置方式: DataAnnatation: [Table(&quo ...
- BZOJ 1062 糖果雨
http://www.lydsy.com/JudgeOnline/problem.php?id=1062 思路:找到平行四边形以后,变换坐标:y->y-kx,k为斜率,这样变成了矩形,然后只要二 ...
- 学DSP(二):目标芯片28335,GO!
28335开发板有了,之前没有用过TI的片子,还是先看看这个东西是啥东西. 进入28335的中文网页: http://www.ti.com.cn/product/cn/tms320f28335 ...
- C pointers
指向整型数组指针int (*p)[10] = matrix;增加这个指针的值使它指向下一个整型数组 指向整型指针int *pi = &matrix[0][0];int *pi = &m ...
- C/C++误区四:char c = getchar();
许多初学者都习惯用 char 型变量接收 getchar.getc,fgetc 等函数的返回值,其实这么做是不对的,并且隐含着足以 致命的错误 .getchar 等函数的返回值类型都是 int 型 ...