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. java的GUI编程

    目前有三种创建模版产生应用窗体: 第一种: public class MenuDemo implements ActionListener{ //你的组件(成员变量) public MenuDemo( ...

  2. Method Resolution Order – Python类的方法解析顺序

    在支持多重继承的编程语言中,查找方法具体来自那个类时的基类搜索顺序通常被称为方法解析顺序(Method Resolution Order),简称MRO.(Python中查找其它属性也遵循同一规则.)对 ...

  3. 动态PDF在线预览

    实战动态PDF在线预览及带签名的PDF文件转换 开篇语: 最近工作需要做一个借款合同,公司以前的合同都是通过app端下载,然后通过本地打开pdf文件,而喜欢创新的我,心想着为什么不能在线H5预览,正是 ...

  4. List<T>类

    List<T>类是ArrayList的泛型等效版本,两者功能相似.它实现了6个接口,实际上市对应的3对. 1.IEnumerable<T>和IEnumerable 2.ICol ...

  5. LeeCode-Rotate Array

    Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array  ...

  6. python使用post登陆电子科大信息门户并保存登陆后页面

    python使用post登陆电子科大信息门户并保存登陆后页面 作者:vpoet mail:vpoet_sir@163.com #coding=utf-8 import HTMLParser impor ...

  7. redhat6.3 64位更新源(使用网易源)全过程记录

    本篇博客参考:http://chinaxiaoyu.diandian.com/post/2013-01-24/40046529897.首先在浏览器中输入http://tel.mirrors.163.c ...

  8. 用Python实现九九乘法表

    1.用“#”组成的矩形的实现 代码 eight = int(input("Height:")) #用户输入高度 width = int(input("Width:&quo ...

  9. Mac 下纯lua(二)

    Lua库 基本函数 assert(v,[,message]) 当v时false时,返回message assert(money >0,"error -1001"); coll ...

  10. 开源 java CMS - FreeCMS1.9公布。

    FreeCMS商业版V1.9更新功能 添加Oracle数据库支持.