Oracle EBS-SQL (WIP-15):检查车间任务物料未发数量与现有量对照.sql
select
we.wip_entity_name 任务号
,mfg_lookups_wjs.meaning 作业状态
,wdj.class_code 任务类型
,msi1.segment1 装配编码
,msi1.description 装配描述
,wdj.scheduled_start_date 计划完成日期
,wdj.scheduled_completion_date 计划完成日期
,nvl(wdj.start_quantity
,0) 计划数量
,nvl(wdj.quantity_completed
,0) 完成数量
,msi2.segment1 物料编码
,msi2.description 物料描述
,nvl(wro.required_quantity
,0) 需求数量
,nvl(wro.quantity_issued
,0) 发料数量
,nvl(wro.required_quantity
,0) - nvl(wro.quantity_issued
,0) 未发数量
,wro.supply_subinventory 供应子库
,ml.meaning 供应类型
,onhand.subinventory_code 子库
,onhand.TRANSACTION_QUANTITY 子库数量
,(select nvl(sum(moq.TRANSACTION_QUANTITY),0)
from apps.mtl_onhand_quantities moq
where moq.organization_id=851
and moq.inventory_item_id=msi2.inventory_item_id) 现有量
from wip.wip_discrete_jobs wdj
,wip.wip_requirement_operations wro
,inv.mtl_system_items_b msi1
,inv.mtl_system_items_b msi2
,wip.wip_entities we
,bom.cst_item_costs cic
,applsys.fnd_lookup_values ml
,applsys.fnd_lookup_values mfg_lookups_wjs
,(select moq.inventory_item_id,
moq.subinventory_code,
sum(moq.TRANSACTION_QUANTITY) TRANSACTION_QUANTITY
from apps.mtl_onhand_quantities moq
where moq.organization_id=x
group by moq.inventory_item_id,
moq.subinventory_code) onhand
where we.organization_id = x
and wdj.wip_entity_id = we.wip_entity_id
and wdj.organization_id = we.organization_id
and msi1.inventory_item_id = we.primary_item_id
and msi1.organization_id = we.organization_id
and wro.wip_entity_id = wdj.wip_entity_id
and wro.organization_id = wdj.organization_id
and msi2.inventory_item_id= wro.inventory_item_id
and msi2.organization_id = wro.organization_id
and onhand.inventory_item_id(+)=msi2.inventory_item_id
and ml.lookup_type = 'WIP_SUPPLY'
and ml.lookup_code = wro.wip_supply_type
and (mfg_lookups_wjs.lookup_type = 'WIP_JOB_STATUS')
and (wdj.status_type = mfg_lookups_wjs.lookup_code)
and cic.inventory_item_id = msi2.inventory_item_id
and cic.organization_id = msi2.organization_id
and cic.cost_type_id = 1
and mfg_lookups_wjs.meaning <> '已关闭'
and ml.meaning not like '虚拟件'
and trunc(wdj.scheduled_completion_date) between
to_date('20**/01/01'
,'yyyy-mm-dd') and
to_date('20**/01/31'
,'yyyy-mm-dd')
and mfg_lookups_wjs.language = 'ZHS'
and ml.language = 'ZHS'
and nvl(wro.required_quantity
,0) - nvl(wro.quantity_issued
,0) > 0
and nvl(wdj.start_quantity
,0) = nvl(wdj.quantity_completed
,0)
order by 1,10
Oracle EBS-SQL (WIP-15):检查车间任务物料未发数量与现有量对照.sql的更多相关文章
- Oracle EBS R12 WIP Component Issue&Return Process
oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...
- Oracle EBS 隐藏帮助-诊断-检查
- Oracle EBS DBA常用SQL - 安装/补丁【Z】
Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...
- Oracle EBS中分类账和法人实体 的关系(有sql语句实例)
Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报 分类: Oracle EBS(12) Oracle数据 ...
- oracle锁表查询,资源占用,连接会话,低效SQL等性能检查
查询oracle用户名,机器名,锁表对象 select l.session_id sid, s.serial#, l.locked_mode, l.oracle_username, l.os_user ...
- [转]oracle EBS 基础100问
from:http://www.cnblogs.com/xiaoL/p/3593691.html http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...
- Oracle EBS R12经验谈(二)
作者: jianping.ni 时间: 2009-2-13 12:52 标题: Oracle EBS R12经验谈(二) OAF页面:银行帐户开户人LOV值列表无值 在输入 应付超 ...
- Oracle EBS应用笔记整理 (转自IT++ flyingkite)
***************************************************** Author: Flyingkite Blog: http://space.itpub. ...
- 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 ...
随机推荐
- centos 7 epel地址
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
- Android sample 之模拟重力感应,加速度
class SimulationView extends View implements SensorEventListener { // diameter of the balls in meter ...
- ORACLE PL/SQL开发--bulk collect的用法 .
刚刚在inthirties老大的博客里看到这篇文章,写的不错,正好自己最近在学习PL/SQL,转过来学习学习. ============================================ ...
- php的多线程使用
PHP 5.3 以上版本,使用pthreads PHP扩展,可以使PHP真正地支持多线程.多线程在处理重复性的循环任务,能够大大缩短程序执行时间. 在liunx下的安装 准备工作: 1.下载Threa ...
- openjpa框架入门_openbooks项目Overview(四)
- C语言的本质(15)——C语言的函数接口入门
C语言的本质(15)--C语言的函数接口 函数的调用者和其实现者之间存在一个协议,在调用函数之前,调用者要为实现者提供某些条件,在函数返回时,实现者完成调用者需要的功能. 函数接口通过函数名,参数和返 ...
- they're hiring
Gather Health ⋅ Careers Careers at Gather
- Object-C自定义对象NSLog输入信息
http://blog.cnrainbird.com/index.php/2012/07/19/object-c_zi_ding_yi_dui_xiang_nslog_shu_ru_you_yong_ ...
- mac 上配置sublime text3插件
1.安装MAC 版 sublime text 3 安装插件管理器 打开Sublime,按下Control + `(Mac)或者Ctrl + `(Windows),然后粘贴上下面的代码: import ...
- 演示如何通过 web api 上传文件MVC40
演示如何通过 web api 上传文件WebApiWebFormHost/UploadFileController.cs /* * 通过 web api 上传文件 */ using System; u ...