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. Azure上A/D系列虚拟机到DS系列迁移(1)

    有一些用户在刚开始的时候创建了A7,D14等虚拟机来跑一些IO要求比较高的应用,比如Oracle数据库,MySQL数据库,等到用户量上来之后,性能不够,需要升级数据磁盘到SSD固态硬盘,但是问题是: ...

  2. setAdapter(adapter)空指针nullPointer 解决办法

    setAdapter(adapter)空指针nullPointer 解决办法 (2014-06-13 10:01:23) 转载▼ 标签: 旅游 分类: Android开发 如果setAdapter报空 ...

  3. Kth Smallest Element in a BST 解答

    Question Given a binary search tree, write a function kthSmallest to find the kth smallest element i ...

  4. linux 之 tar 命令

    通过SSH访问服务器,难免会要用到压缩,解压缩,打包,解包等,这时候tar命令就是是必不可少的一个功能强大的工具.linux中最流行的tar是麻雀虽小,五脏俱全,功能强大. tar 命令可以为linu ...

  5. js的for in循环和java里的foreach循环的差别

    js里的for in循环定义例如以下: for(var variable in obj) { ... } obj能够是一个普通的js对象或者一个数组.假设obj是js对象,那么variable在遍历中 ...

  6. .NETFramework类库

    .NET Framework 包括可加快和优化开发过程并提供对系统功能的访问的类.接口和值类型. 为了便于语言之间进行交互操作,大多数 .NET Framework 类型都符合 CLS,因而可在编译器 ...

  7. Sharepoint2010 通过 WebFeature 修改web.config

    using System;using System.Runtime.InteropServices;using System.Security.Permissions;using Microsoft. ...

  8. Oracle中中文、数字,英文混杂形式的字段进行排序的方法

    http://blog.csdn.net/p451933505/article/details/9272257 对Oracle中中文.数字.英文混杂形式的字段进行排序的方法: 例如: order by ...

  9. 大数值基础、for与while循环的简单对比

  10. JavaScript面向对象,闭包内存图,闭包和作用域

    var i = 10; function test(){ var j; i=20; //未定义 function test(){ j='hello'; } console.log(test()); / ...