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 ...
随机推荐
- HttpClient 请求WebApi
HttpClient client = new HttpClient(); client.BaseAddress = new Uri(ConfigurationManager.AppSettings[ ...
- CSS发抖
纯CSS发抖 当您在 @keyframes 中创建动画时,请把它捆绑到某个选择器,否则不会产生动画效果. 通过规定至少以下两项 CSS3 动画属性,即可将动画绑定到选择器: 规定动画的名称 规定动画 ...
- PHP多种序列化/反序列化的方法 (转载)
1. serialize和unserialize函数 这两个是序列化和反序列化PHP中数据的常用函数. <?php $a = array('a' => 'Apple' ,'b' => ...
- 2^x mod n = 1(hd1395)
2^x mod n = 1 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- Go语言(golang)开源项目大全
转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析 ...
- registered the JBDC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. (转)
最近项目中遇见一问题,在开发环境没有问题的代码,到了生产环境就会报如下错误: 严重: A web application registered the JBDC driver [oracle.jd ...
- 【LeetCode练习题】Copy List with Random Pointer
Copy List with Random Pointer A linked list is given such that each node contains an additional rand ...
- 【LeetCode练习题】Minimum Window Substring
找出包含子串的最小窗口 Given a string S and a string T, find the minimum window in S which will contain all the ...
- Codeforces 551C GukiZ hates Boxes 二分答案
题目链接 题意: 一共同拥有n个空地(是一个数轴,从x=1 到 x=n),每一个空地上有a[i]块石头 有m个学生 目标是删除全部石头 一開始全部学生都站在 x=0的地方 每秒钟每一个学生都 ...
- CSDN博文大赛火爆开启
俗话说的好,程序猿会写博,谁也挡不住! 是不是每一个开发人员都能写出好博文,这个非常难说,但能够肯定的是,能写出好博文的,一定是优秀的程序猿! 写作即思考,养成写博文的习惯,既能帮自己整理技术思路,也 ...