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的更多相关文章

  1. Oracle EBS中分类账和法人实体 的关系(有sql语句实例)

    Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报  分类: Oracle EBS(12)  Oracle数据 ...

  2. Oracle EBS 隐藏帮助-诊断-检查

  3. Oracle EBS DBA常用SQL - 安装/补丁【Z】

    Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...

  4. oracle锁表查询,资源占用,连接会话,低效SQL等性能检查

    查询oracle用户名,机器名,锁表对象 select l.session_id sid, s.serial#, l.locked_mode, l.oracle_username, l.os_user ...

  5. [转]oracle EBS 基础100问

    from:http://www.cnblogs.com/xiaoL/p/3593691.html  http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...

  6. Oracle EBS R12 WIP Component Issue&Return Process

    oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...

  7. Oracle EBS应用笔记整理 (转自IT++ flyingkite)

    ***************************************************** Author: Flyingkite Blog:   http://space.itpub. ...

  8. 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 ...

  9. Oracle EBS R12经验谈(二)

    作者: jianping.ni    时间: 2009-2-13 12:52     标题: Oracle EBS R12经验谈(二) OAF页面:银行帐户开户人LOV值列表无值    在输入 应付超 ...

随机推荐

  1. 解决onethink导出word后出现名字乱码的情况

    这个问题让我纠结了好久最后终于在网上看到一篇文章讲解的还不错 http://www.oschina.net/question/142207_39393

  2. position属性absolute与relative(转)

    每次要用到Position属性时,总要去搜索下,这两个属性值的区别:今天就直接复制网上的结果,以便以后多看看. Absolute,CSS中的写法是:position:absolute; 他的意思是绝对 ...

  3. Font Rending 的 Hint 机制对排版的影响

    Font Rending 的 Hint 机制对排版的影响[转] 在设计一种 Font 时,设计者使用的是一个抽象的单位,叫做 EM,来源于大写 M 的宽度(通常英文字体中大写 M 的宽度最大).EM ...

  4. Log4j之properties配置文件详解

    Log4j由三个重要的组件构成:日志信息的优先级,日志信息的输出目的地,日志信息的输出格式.日志信息的优先级从高到低有ERROR.WARN. INFO.DEBUG,分别用来指定这条日志信息的重要程度: ...

  5. BZOJ 3572 世界树(虚树)

    http://www.lydsy.com/JudgeOnline/problem.php?id=3572 思路:建立虚树,然后可以发现,每条边不是同归属于一端,那就是切开,一半给上面,一半给下面. # ...

  6. 开源欣赏wordpress之文章新增页面如何实现。

    本地网址http://localhost/wordpress/wp-admin/post-new.php 进而找到post-new.php页面. 进入之后, require_once( dirname ...

  7. UESTC_秋实大哥与连锁快餐店 2015 UESTC Training for Graph Theory<Problem A>

    A - 秋实大哥与连锁快餐店 Time Limit: 9000/3000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) S ...

  8. java POI读取excel 2007/2003

    2003版office excel读取 import java.io.FileNotFoundException; import java.io.IOException; import java.io ...

  9. 【转】android 电池(一):锂电池基本原理篇

    关键词:android  电池关机充电 androidboot.mode charger 平台信息:内核:linux2.6/linux3.0系统:android/android4.0 平台:S5PV3 ...

  10. Unity 手指触摸的方向(单手)

    最近写了一个跑酷游戏,总结下里面的知识点:O(∩_∩)O~ using UnityEngine; using System.Collections; public class Demo : MonoB ...