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值列表无值 在输入 应付超 ...
随机推荐
- load average[zhuan]
load average值的含义 单核处理器 假设我们的系统是单CPU单内核的,把它比喻成是一条单向马路,把CPU任务比作汽车.当车不多的时候,load <1:当车占满整个马路的时候 load= ...
- linux多线程编程之互斥锁
多线程并行运行,共享同一种互斥资源时,需要上互斥锁来运行,主要是用到pthread_mutex_lock函数和pthread_mutex_unlock函数对线程进行上锁和解锁 下面是一个例子: #in ...
- Qt中调用PolarSSL库(一)
最近一直在学习SSL相关的知识,也是先了解理论相关的知识,主要是SSL相关的基本概念和连接建立过程,主要是基于PolarSSL开源库进行学习.学习完了之后就希望能给有所运用,就想用Qt写一个简单的程序 ...
- C# 父子类_实例_静态成员变量_构造函数的执行顺序
今天去面试的时候被一道题问得一点脾气都没有,今天特地来研究下. 子类成员变量,子类静态成员变量,子类构造函数,父类成员变量,父类静态成员变量,父类构造函数的执行顺序. 现在贴上从另外一个.net程序员 ...
- Silverlight 结合ArcGis
原文 http://www.dotblogs.com.tw/justforgood/archive/2012/05/09/72064.aspx 终于有机会谈到ArcGis(觉得很冷门) ,不过既然都做 ...
- Climbing Stairs 解答
Question You are climbing a stair case. It takes n steps to reach to the top. Each time you can eith ...
- Pros and Cons of T4 in Visual Studio 2008
Oleg Sych - » Pros and Cons of T4 in Visual Studio 2008 Pros and Cons of T4 in Visual Studio 2008 Po ...
- 【转】Android LCD(四):LCD驱动调试篇
关键词:android LCD TFTSN75LVDS83B TTL-LVDS LCD电压背光电压 平台信息:内核:linux2.6/linux3.0系统:android/android4.0 平台 ...
- html&CSS初学
<link href="https://fonts.gdgdocs.org/css?family=Lobster" rel="stylesheet" ty ...
- Red and Black(简单dfs)
Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...