Oracle EBS-SQL (BOM-14):检查工艺路线明细.sql
2014-06-11 09:50
387 查看
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)
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-18):检查BOM与工艺路线对照.sql
- Oracle EBS-SQL (INV-3):检查仓库库存价值明细.sql
- Oracle EBS-SQL (BOM-2):检查期间Bom的更改记录数.sql
- Oracle EBS-SQL (BOM-1):检查供应类型错误.sql
- Oracle EBS-SQL (BOM-11):检查无BOM的装配件.sql
- Oracle EBS-SQL (BOM-16):检查多层BOM.sql
- Oracle EBS-SQL (CST-1):检查BOM历史成本查询(Average Cost).sql
- Oracle EBS-SQL (BOM-4):检查期间新增编码总数.sql
- Oracle EBS-SQL (BOM-10):检查有BOM无计划员的数据.sql
- Oracle EBS-SQL (BOM-17):检查8层BOM.sql
- Oracle EBS-SQL (PO-4):检查采购订单明细.sql
- Oracle EBS-SQL (WIP-14):检查车间需求与BOM差异对照.sql
- Oracle EBS-SQL (BOM-7):检查有BOM无工艺路线的子装配件或成品.sql
- Oracle EBS-SQL (WIP-4):检查检查成品标准作业是否勾选"固定"标识.sql
- Oracle EBS-SQL (SYS-8):职责定义明细.sql
- Oracle EBS-SQL (PO-2):检查当月到货补单的记录数.sql
- Oracle EBS-SQL (BOM-9):检查系统BOM总数.sql
- Oracle EBS-SQL (PO-8):检查有供货比例无采购员.sql
- Oracle EBS-SQL (SYS-14):查询表空间1.sql
- Oracle EBS-SQL (BOM-13):检查未定义库存分的物料类.sql