define item1="1234567890"

select

a1.产品编码,

a1.产品描述,

'1层'         层数,

a1.物料编码,

a1.物料描述,

a1.单位,

a1.装配数量,

A1.备注,

'2层'         层数,

a2.物料编码,

a2.物料描述,

a2.单位,

a2.装配数量,

A2.备注,

'3层'         层数,

a3.物料编码,

a3.物料描述,

a3.单位,

a3.装配数量,

A3.备注,

'4层'         层数,

a4.物料编码,

a4.物料描述,

a4.单位,

a4.装配数量,

A4.备注,

'5层'         层数,

a5.物料编码,

a5.物料描述,

a5.单位,

a5.装配数量,

A5.备注,

'6层'         层数,

a6.物料编码,

a6.物料描述,

a6.单位,

a6.装配数量,

A6.备注,

'7层'         层数,

a7.物料编码,

a7.物料描述,

a7.单位,

a7.装配数量,

A7.备注,

'8层'         层数,

a8.物料编码,

a8.物料描述,

a8.单位,

a8.装配数量,

A8.备注

from

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                   单位,

BIC.COMPONENT_QUANTITY            装配数量,

BIC.Last_Update_Date                     更改日期,

bic.component_remarks                         备注

From

INV.MTL_SYSTEM_ITEMS_B                MSI1,

BOM.BOM_BILL_OF_MATERIALS          BOM,

BOM.BOM_INVENTORY_COMPONENTS  BIC,

INV.MTL_SYSTEM_ITEMS_B                MSI2

Where

MSI1.SEGMENT1  like  '&item1'

And         MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a1,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                           物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY           装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                        备注

From

INV.MTL_SYSTEM_ITEMS_B                 MSI1,

BOM.BOM_BILL_OF_MATERIALS           BOM,

BOM.BOM_INVENTORY_COMPONENTS    BIC,

INV.MTL_SYSTEM_ITEMS_B                  MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a2,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY           装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                        备注

From

INV.MTL_SYSTEM_ITEMS_B                MSI1,

BOM.BOM_BILL_OF_MATERIALS          BOM,

BOM.BOM_INVENTORY_COMPONENTS   BIC,

INV.MTL_SYSTEM_ITEMS_B                 MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a3,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY            装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                        备注

From

INV.MTL_SYSTEM_ITEMS_B                MSI1,

BOM.BOM_BILL_OF_MATERIALS           BOM,

BOM.BOM_INVENTORY_COMPONENTS    BIC,

INV.MTL_SYSTEM_ITEMS_B                  MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a4,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                           物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY           装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                        备注

From

INV.MTL_SYSTEM_ITEMS_B               MSI1,

BOM.BOM_BILL_OF_MATERIALS         BOM,

BOM.BOM_INVENTORY_COMPONENTS  BIC,

INV.MTL_SYSTEM_ITEMS_B                MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a5,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY           装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                        备注

From

INV.MTL_SYSTEM_ITEMS_B                    MSI1,

BOM.BOM_BILL_OF_MATERIALS              BOM,

BOM.BOM_INVENTORY_COMPONENTS       BIC,

INV.MTL_SYSTEM_ITEMS_B                     MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a6,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY            装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                         备注

From

INV.MTL_SYSTEM_ITEMS_B                MSI1,

BOM.BOM_BILL_OF_MATERIALS          BOM,

BOM.BOM_INVENTORY_COMPONENTS  BIC,

INV.MTL_SYSTEM_ITEMS_B                 MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND        BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a7,

(Select

MSI1.Segment1                             产品编码,

MSI1.Description                            产品描述,

MSI2.Segment1                             物料编码,

MSI2.Description                            物料描述,

MSI2.PRIMARY_UOM_CODE                  单位,

BIC.COMPONENT_QUANTITY           装配数量,

BIC.Last_Update_Date                    更改日期,

bic.component_remarks                         备注

From

INV.MTL_SYSTEM_ITEMS_B                MSI1,

BOM.BOM_BILL_OF_MATERIALS          BOM,

BOM.BOM_INVENTORY_COMPONENTS  BIC,

INV.MTL_SYSTEM_ITEMS_B                MSI2

Where

MSI1.Organization_Id = X

And         BOM.ASSEMBLY_ITEM_ID = MSI1.INVENTORY_ITEM_ID

And         BOM.Organization_Id = MSI1.Organization_Id

And         BIC.BILL_SEQUENCE_ID = BOM.BILL_SEQUENCE_ID

And         ( BIC.DISABLE_DATE IS NULL  OR BIC.DISABLE_DATE > sysdate )

And         MSI2.INVENTORY_ITEM_ID(+) = BIC.COMPONENT_ITEM_ID

And         MSI2.Organization_Id(+) = X

AND  BOM.ALTERNATE_BOM_DESIGNATOR IS NULL

)a8

where

a1.物料编码=a2.产品编码(+)

and a2.物料编码=a3.产品编码(+)

and a3.物料编码=a4.产品编码(+)

and a4.物料编码=a5.产品编码(+)

and a5.物料编码=a6.产品编码(+)

and a6.物料编码=a7.产品编码(+)

and a7.物料编码=a8.产品编码(+)

ORDER BY

a1.物料编码

, a2.物料编码

, a3.物料编码

, a4.物料编码

, a5.物料编码

, a6.物料编码

, a7.物料编码

Oracle EBS-SQL (BOM-17):检查8层BOM.sql的更多相关文章

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

  2. MS SQL巡检系列——检查外键字段是否缺少索引

    前言感想:一时兴起,突然想写一个关于MS SQL的巡检系列方面的文章,因为我觉得这方面的知识分享是有价值,也是非常有意义的.一方面,很多经验不足的人,对于巡检有点茫然,不知道要从哪些方面巡检,另外一方 ...

  3. Oracle EBS-SQL (BOM-6):检查物料失效但BOM中未失效的数据.sql

    select msi.segment1                   装配件编码 , msi.description                  装配件描述 , msi.item_type ...

  4. Oracle EBS-SQL (BOM-3):检查期间新增Bom数量.sql

    --本周系统BOM汇总记录 SELECT         ITM.SEGMENT1  物料编码, ITM.DESCRIPTION   物料描述, bom2.CREATION_DATE   创建日期, ...

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

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

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

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

  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 基础100问

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

随机推荐

  1. 2015网易校招Java开发工程师(技术架构)在线笔试题

    1.  程序和进程的本质区别是? A.在外存和内存存储 B.非顺序和顺序执行机器指令 C.独占使用和分时使用计算机资源 D.静态和动态特征 参考答案分析: 进程与应用程序的区别: 进程(Process ...

  2. apache主目录,配置文件目录结构说明

    apache服务安装成功后,主要的目录结构如下: |-- bin 程序命令目录[apache执行文件的目录如apachectl,htpassed] |-- build |-- cgi-bin 预设给一 ...

  3. 基于epoll的聊天室程序

    epoll相对于poll和select这两个多路复用的I/O模型更加的高效.epoll的函数很简单,麻烦的地方在于水平触发和边沿触发. 用张图来说明下 ET(边沿)只是在状态反转时触发,比如从不可读到 ...

  4. javascript之Boolean

    一.new Boolean(value); //构造函数 Boolean(value); //转换函数 0,NaN,null,"",undefined都会转成false,其他都会返 ...

  5. HtmlTextNode & HtmlCommentNode

    在HtmlAgilityPack里,HtmlTextNode对应的是文本节点.这是一个非常简单的一个类,方法和字段都比较少. 一.属性 override string InnerHtml { get; ...

  6. 学习笔记之--Navicat Premium创建数据表

    1.打开Navicat Premium,点击连接,选择MySQL,创建新连接.输入安装MySQL是的用户名和密码.点击确定. 2.admin数据连接已经创建成功.下面为admin新建数据库,输入数据库 ...

  7. UESTC_秋实大哥の恋爱物语 2015 UESTC Training for Search Algorithm & String<Problem K>

    K - 秋实大哥の恋爱物语 Time Limit: 5000/2000MS (Java/Others)     Memory Limit: 32000/32000KB (Java/Others) Su ...

  8. Clone Graph 解答

    Question Clone an undirected graph. Each node in the graph contains a label and a list of its neighb ...

  9. Safari HTML5 Canvas Guide: Creating Charts and Graphs

    Safari HTML5 Canvas Guide: Creating Charts and Graphs Bar graphs are similar to data plots, but each ...

  10. IOS反地理编码取得城市名称

    // 获取当前所在的城市名 CLGeocoder *reverseGeocoder=[[CLGeocoder alloc] init]; [reverseGeocoder reverseGeocode ...