select

msi.segment1                                         装配件编码,
       msi.description                                        装配件描述,
       bos.operation_seq_num                                    序号,
       bso.operation_code                                     工序代码,
       bd.department_code                                         部门,
       bos.operation_description                            工序说明,
       bor.completion_subinventory                       完工子库,
       bors.resource_seq_num                              资源序号,
       br.resource_code                                        资源代码,
       br.description                                             资源说明,
       br.unit_of_measure                                     资源单位,
       bors.assigned_units                                          人数,
       decode(bors.basis_type, '1', '物料', '2', '批次') 计费基准,
       bors.usage_rate_or_amount                     单位使用量,
       bors.usage_rate_or_amount_inverse                  倒数,
       decode(bors.autocharge_type, '1', 'WIP移动', '2', '人工', '3','PO接收', '4', 'PO移动') 计费类型,
       decode(bors.attribute1, 'Y', '是', 'N', '否')        是否预估
  from inv.mtl_system_items_b          msi,
       bom.bom_departments                bd,
       bom.bom_resources                     br,
       bom.bom_operational_routings   bor,
       bom.bom_operation_sequences  bos,
       bom.bom_operation_resources  bors,
       bom.bom_standard_operations    bso
 where msi.inventory_item_id = bor.assembly_item_id
   and msi.organization_id = bor.organization_id
   and bor.routing_sequence_id = bos.routing_sequence_id
   and bso.standard_operation_id(+) = bos.standard_operation_id
   and bos.department_id = bd.department_id
   and bd.organization_id = bor.organization_id
   and bors.operation_sequence_id = bos.operation_sequence_id(+)
   and bors.resource_id = br.resource_id(+)
   and bor.organization_id(+) = br.organization_id
   and msi.organization_id = x
   and msi.inventory_item_status_code <> 'Inactive'
   and bos.disable_date is null
union
select msi.segment1                                        装配件编码,
       msi.description                                         装配件描述,
       bos.operation_seq_num                                     序号,
       bso.operation_code                                      工序代码,
       bd.department_code                                          部门,
       bos.operation_description                             工序说明,
       bor.completion_subinventory                        完工子库,
       to_number('')                                              资源序号,
       '' 资源代码,
       '' 资源说明,
       '' 资源单位,
       to_number('') 人数,
       '' 计费基准,
       to_number('') 单位使用量,
       to_number('') 倒数,
       '' 计费类型,
       '' 是否预估
from inv.mtl_system_items_b                     msi,
        bom.bom_departments                        bd,
        bom.bom_operational_routings            bor,
        bom.bom_operation_sequences           bos,
        bom.bom_standard_operations            bso
 where msi.inventory_item_id = bor.assembly_item_id
   and msi.organization_id = bor.organization_id
   and bor.routing_sequence_id = bos.routing_sequence_id
   and bso.standard_operation_id(+) = bos.standard_operation_id
   and bos.department_id = bd.department_id
   and bd.organization_id = bor.organization_id
   and msi.organization_id = x
   and msi.inventory_item_status_code <> 'Inactive'
   and bos.disable_date is null
   and not exists
 (select 'X'
          from bom.bom_operation_resources bors
         where bors.operation_sequence_id = bos.operation_sequence_id)

Oracle EBS-SQL (BOM-14):检查工艺路线明细.sql的更多相关文章

  1. Oracle EBS-SQL (BOM-18):检查BOM与工艺路线对照.sql

    /*有工艺路线,无BOM清单*/ select msi.segment1, msi.description from apps.BOM_OPERATIONAL_ROUTINGS bor, apps.m ...

  2. Oracle EBS-SQL (PO-4):检查采购订单明细.sql

    SELECT PHA.SEGMENT1                  订单号, pha.approved_flag           批准状态, pha.closed_code        订 ...

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

  4. Oracle EBS BOM模块常用表结构

    表名: bom.bom_bill_of_materials  说明: BOM清单父项目  BILL_SEQUENCE_ID NUMBER 清单序号(关键字)ASSEMBLY_ITEM_ID NUMBE ...

  5. [Oracle EBS APIs]import Flow routing and DJ routing using BOM_RTG_PUB.PROCESS_RTG APIs

    DJ routing --BOM模块的工艺路线 Flow routing -- Flow Manufacturing 模块使用的工艺路线,导入 Flow routing时先导入Line Operati ...

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

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

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

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

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

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

  9. PO ITEM_BOM_工艺路线SQL

    ---物料主数据接口 SELECT count(*)PO_MARA FROM STG.PO_MARA; SELECT count(*)PO_MARC FROM STG.PO_MARC; SELECT ...

随机推荐

  1. MVC 过滤

    我们来看两个接口: public interface IActionFilter { // Methods void OnActionExecuted(ActionExecutedContext fi ...

  2. MVC中一般为什么用IQueryable而不是用IList?用IQueryable比IList好在哪?

    IList(IList<T>)会立即在内存里创建持久数据,这就没有实现"延期执行(deferred execution)",如果被加载的实体有关联实体(associat ...

  3. ASP.NET用户自定义控件配置

    一直以来开发中碰到要写自定义控件的时候总是习惯性的找度娘,而没有自己记住,结果今天就悲剧了,找了半天才找到,想想还是自己积累起来吧! 第一种配置方式: 配置写在webconfig文件中,位置如下: w ...

  4. 动态加载JS过程中如何判断JS加载完成

    在正常的加载过程中,js文件的加载是同步的,也就是说在js加载的过程中,浏览器会阻塞接下来的内容的解析.这时候,动态加载便显得尤为重要了,由于它是异步加载,因此,它可以在后台自动下载,并不会妨碍其它内 ...

  5. javascript之Error

    一.Error()构造函数 构造函数:new Error(); new Error(message); 二.Error.message //人类可读的错误消息 语法:error.message; 三. ...

  6. Maximum Subarray 解答

    Question Find the contiguous subarray within an array (containing at least one number) which has the ...

  7. POJ1679(次小生成树)

    The Unique MST Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 24201   Accepted: 8596 D ...

  8. apache FtpServer 整合spring部署

    我们在项目中可能会出现这样的需求,使用ftp上传很大的文件后对需要对文件进行相应的逻辑处理,这时我们可以使用apache ftpServer来处理这段逻辑,只要我们做相应的部署和编写我们的逻辑代码,这 ...

  9. Kyoya and Colored Balls(组合数)

    Kyoya and Colored Balls time limit per test 2 seconds memory limit per test 256 megabytes input stan ...

  10. android假设重写onDraw实现一个相似TextView能够显示表情和链接的控件(一)

    先看效果图: 写一个超连接支持的对象: /**作为超连接显示的对象*/ public class LinkInfo implements Comparable<LinkInfo>{ pri ...