Oracle EBS-SQL (BOM-15):检查多层BOM(含common BOM).sql
select distinct
b.lvl 层次,
b.OPERATION_SEQ_NUM 工序,
msi1.segment1 父件编码,
msi1.description 父件描述,
msi1.item_type 父件类型,
msi1.inventory_item_status_code 父件编码状态,
msi2.segment1 子件编码,
msi2.description 子件描述,
msi2.item_type 子件类型,
b.component_quantity 用量,
b.COMPONENT_YIELD_FACTOR 产出率
from inv.mtl_system_items_b msi1,
inv.mtl_system_items_b msi2,
apps.BOM_BILL_OF_MATERIALS bom,
(select level lvl,
bic.bill_sequence_id,
bic.component_item_id,
bic.component_quantity,
bic.OPERATION_SEQ_NUM,
bic.COMPONENT_YIELD_FACTOR,
bic.COMPONENT_SEQUENCE_ID,
bic.item_num,
bic.wip_supply_type,
bic.supply_subinventory,
bic.effectivity_date
FROM apps.BOM_INVENTORY_COMPONENTS bic
where bic.disable_date IS NULL
and bic.IMPLEMENTATION_DATE is not null
start with bic.bill_sequence_id in
(select nvl(common_bill_sequence_id,bill_sequence_id)
from apps.BOM_BILL_OF_MATERIALS bom2,
inv.mtl_system_items_b msi
where bom2.assembly_item_id = msi.inventory_item_id
and bom2.organization_id = msi.organization_id
and msi.organization_id in(1,157)
and bom2.alternate_bom_designator is null)
CONNECT BY bill_sequence_id in prior
(SELECT distinct nvl(common_bill_sequence_id,bill_sequence_id)
FROM apps.BOM_BILL_OF_MATERIALS BO,
inv.mtl_system_items_b msi
WHERE BO.assembly_item_id = bic.component_item_id
AND BO.organization_id in(1,157)
and bo.ORGANIZATION_ID = msi.ORGANIZATION_ID
and bo.ASSEMBLY_ITEM_ID = msi.INVENTORY_ITEM_ID
and bo.alternate_bom_designator is null
and disable_date IS NULL)) b
where b.bill_sequence_id = nvl(bom.common_bill_sequence_id,bom.bill_sequence_id)
and bom.ORGANIZATION_ID in(1,157)
and bom.ORGANIZATION_ID = msi1.ORGANIZATION_ID
and bom.ASSEMBLY_ITEM_ID = msi1.INVENTORY_ITEM_ID
and bom.ORGANIZATION_ID = MSI2.ORGANIZATION_ID
AND b.component_item_id = MSI2.INVENTORY_ITEM_ID
and msi2.inventory_item_status_code <> 'Inactive'
order by b.lvl
Oracle EBS-SQL (BOM-15):检查多层BOM(含common BOM).sql的更多相关文章
- Oracle EBS中分类账和法人实体 的关系(有sql语句实例)
Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报 分类: Oracle EBS(12) Oracle数据 ...
- 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 R12 WIP Component Issue&Return Process
oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...
- 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 ...
- Oracle EBS R12经验谈(二)
作者: jianping.ni 时间: 2009-2-13 12:52 标题: Oracle EBS R12经验谈(二) OAF页面:银行帐户开户人LOV值列表无值 在输入 应付超 ...
随机推荐
- Hits per second 下降的几个原因
1.首先看看服务器的资源消耗情况,可能是服务器 处理不了那么多请求, 有很多请求都在等待,此时可以监控一下服务器的资源 看看是不是有很多等待队列 是不是有很多的等待的请求,可用vmstat命令,第一个 ...
- linux 安装mysqlServer
先下载mysql安装包 打开 http://dev.mysql.com/downloads/mysql/ 选择 linux - Generic 再选择*.tar.gz(最后那两个) 下载完毕后,得到 ...
- Mysql基础教程——mysql之一
教程列表:http://www.dxzy163.com/view/index7627.html 41 存储过程 40 全文索引与停止词 39 索引的管 38 索引概念 37 数据库备份与恢复 36 事 ...
- C语言中typedef
一.基本概念剖析 ])(int, char*); //#1 ]) (void (*)()); //#2 ]; //#3 .C语言中函数声明和数组声明.函数声明一般是这样: int fun(int, d ...
- 在非MFC的win 32程序里面能够使用CString类
论坛有会员用到了.,今天给大家说说CSring如何在非mfc下的调用第一:先要包含 #include "afx.h" 包含之后会报windows.h重复定义我们需要把这个头文件包含 ...
- 【剑指offer】面试题20:顺时针打印矩阵
题目描述 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
- Seletion Sort
referrence: GeeksforGeeks The selection sort algorithm sorts an array by repeatedly finding the mini ...
- Cdev
1,#和##操作符Operator,使用 首个参数返回为一个带引号的字符串 predefined variable was not declared in the scope;
- Train Problem I(栈)
Train Problem I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
- MVC实用架构设计:总体设计
http://developer.51cto.com/art/201309/410166.htm