SQL -- What Tables Queries are Used to Display the Counts in the Inventory Account Periods form (INVTTGPM.fmb) (Doc ID ID 357997.1)
Applies to:
Oracle Inventory Management - Version 11.5.9 to 12.1.3 [Release 11.5 to 12.1]
Information in this document applies to any platform.
Goal
What tables / queries are used to display the counts in the Inventory Account Periods form (INVTTGPM.fmb)?
R11i Pending Transactions screen:
Note: The "Uncosted Material" and "Pending WIP Costing" fields from R11i were merged into one count : "Uncosted Material/WSM". A new "Pending LCM Interface" count was added for Landed Cost Management (LCM).
R12 Pending transactions screen:
Steps
1. Goto Inventory > Accounting Close Cycle > Inventory Accounting Periods
2. Choose an inventory organization
3. The inventory accounting periods form opens
4. Press the "Pending..." button
5. The Pending Transactions Appear
6. See the following:
0 Unprocessed Material
3 Uncosted Material
0 Pending Transactions
... etc...
Fix
The following SQL mimicks the counts found in the Inventory Accounting Period close form.
1. The following parameters are used:
OrgID -- The Organization id.
StartPeriodDate -- The start period date for the period in question.
EndPeriodDate -- The end period date for the period in question.
2. The following SQL can be used to find the organization id:
select a.organization_id, b.organization_code, a.name
from HR_ALL_ORGANIZATION_UNITS_TL a, mtl_parameters_view b
where a.organization_id = b.organization_id
order by organization_id, organization_code;
INDIVIDUAL SQL
Here are the SQL scripts:
A. Resolution Required
1 Unprocessed Material
SELECT COUNT(*)
FROM MTL_MATERIAL_TRANSACTIONS_TEMP
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate'
AND NVL(TRANSACTION_STATUS,0) <> 2;
2 Uncosted Material
SELECT COUNT(*)
FROM MTL_MATERIAL_TRANSACTIONS
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate'
AND COSTED_FLAG IS NOT NULL;
3 Pending WIP Transactions
SELECT COUNT(*)
FROM WIP_COST_TXN_INTERFACE
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate';
4 Uncosted WSM (Separate Prior to R12)
SELECT COUNT(*)
FROM WSM_SPLIT_MERGE_TRANSACTIONS
WHERE ORGANIZATION_ID = &OrgID
AND COSTED <> 4
AND TRANSACTION_DATE <= '&EndPeriodDate';
5 Pending WSM Interface
SELECT COUNT(*)
FROM WSM_SPLIT_MERGE_TXN_INTERFACE
WHERE ORGANIZATION_ID = &OrgID
AND PROCESS_STATUS <> 4
AND TRANSACTION_DATE <= '&EndPeriodDate';
X Pending LCM Interface (New in R12)
SELECT COUNT(*)
FROM CST_LC_ADJ_INTERFACE
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate';
B. Resolution Recommended
6 Pending Receiving
SELECT COUNT(*)
FROM RCV_TRANSACTIONS_INTERFACE
WHERE TO_ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate'
AND DESTINATION_TYPE_CODE = 'INVENTORY';
7 Pending Material
SELECT COUNT(*)
FROM MTL_TRANSACTIONS_INTERFACE
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate'
AND PROCESS_FLAG <> 9;
8 Pending Shop Floor Move
SELECT COUNT(*) FROM WIP_MOVE_TXN_INTERFACE
WHERE ORGANIZATION_ID = &OrgID
AND TRANSACTION_DATE <= '&EndPeriodDate';
C. Resolution Required / Recommended
9 Unprocessed Shipping Transactions (Pending Transactions)
SELECT COUNT(*)
FROM WSH_DELIVERY_DETAILS WDD, WSH_DELIVERY_ASSIGNMENTS WDA, WSH_NEW_DELIVERIES WND, WSH_DELIVERY_LEGS WDL, WSH_TRIP_STOPS WTS
WHERE WDD.SOURCE_CODE = 'OE'
AND WDD.RELEASED_STATUS = 'C'
AND WDD.INV_INTERFACED_FLAG IN ('N' ,'P')
AND WDD.ORGANIZATION_ID = &OrgID
AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID
AND WND.DELIVERY_ID = WDA.DELIVERY_ID
AND WND.STATUS_CODE IN ('CL','IT')
AND WDL.DELIVERY_ID = WND.DELIVERY_ID
AND WTS.PENDING_INTERFACE_FLAG = 'Y'
AND TRUNC(WTS.ACTUAL_DEPARTURE_DATE)
BETWEEN '&StartPeriodDate' AND '&EndPeriodDate'
AND WDL.PICK_UP_STOP_ID = WTS.STOP_ID;
... Full SQL Script
Here is an example Script using these counts:
spool PeriodCloseCount.lst
PROMPT This attempts to provide similar counts as provided in the Period Close form.
prompt
accept OrgID DEFAULT '207' prompt 'Please enter an Organization ID: (Default is 207)'
prompt
prompt
accept StartPeriodDate DEFAULT '01-APR-2006 00:00:00' prompt 'Please enter the start of your period: (Default is 01-APR-2006 0:0:0)'
prompt
prompt
accept EndPeriodDate DEFAULT '30-APR-2006 23:59:59' prompt 'Please enter the end of your period: (Default is 30-APR-2006 23:59:59)'
prompt
PROMPT A. Resolution Required
PROMPT 1 Unprocessed Material
SELECT COUNT(*)
FROM MTL_MATERIAL_TRANSACTIONS_TEMP
WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS') AND NVL(TRANSACTION_STATUS,0) <> 2;
PROMPT 2 Uncosted Material
SELECT COUNT(*)
FROM MTL_MATERIAL_TRANSACTIONS
WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS') AND COSTED_FLAG IS NOT NULL;
PROMPT 3 Pending WIP Transactions
SELECT COUNT(*) FROM WIP_COST_TXN_INTERFACE WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS');
PROMPT 4 Uncosted WSM
SELECT COUNT(*)
FROM WSM_SPLIT_MERGE_TRANSACTIONS
WHERE ORGANIZATION_ID = &OrgID AND COSTED <> 4 AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS');
PROMPT 5 Pending WSM Interface
SELECT COUNT(*)
FROM WSM_SPLIT_MERGE_TXN_INTERFACE
WHERE ORGANIZATION_ID = &OrgID AND PROCESS_STATUS <> 4 AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS');
PROMPT X Pending LCM Interface
SELECT COUNT(*)
FROM CST_LC_ADJ_INTERFACE
WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS');
PROMPT B. Resolution Recommended
PROMPT 6 Pending Receiving
SELECT COUNT(*)
FROM RCV_TRANSACTIONS_INTERFACE
WHERE TO_ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS') AND DESTINATION_TYPE_CODE = 'INVENTORY';
PROMPT 7 Pending Material
SELECT COUNT(*)
FROM MTL_TRANSACTIONS_INTERFACE
WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS') AND PROCESS_FLAG <> 9;
PROMPT 8 Pending Shop Floor Move
SELECT COUNT(*) FROM WIP_MOVE_TXN_INTERFACE WHERE ORGANIZATION_ID = &OrgID AND TRANSACTION_DATE <= to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS');
PROMPT C. Resolution Required / Recommended
PROMPT 9 Unprocessed Shipping Transactions (Pending Transactions)
SELECT COUNT(*)
FROM WSH_DELIVERY_DETAILS WDD, WSH_DELIVERY_ASSIGNMENTS WDA, WSH_NEW_DELIVERIES WND,
WSH_DELIVERY_LEGS WDL, WSH_TRIP_STOPS WTS
WHERE WDD.SOURCE_CODE = 'OE' AND WDD.RELEASED_STATUS = 'C'
AND WDD.INV_INTERFACED_FLAG IN ('N' ,'P') AND WDD.ORGANIZATION_ID = &OrgID
AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.DELIVERY_ID = WDA.DELIVERY_ID
AND WND.STATUS_CODE IN ('CL','IT') AND WDL.DELIVERY_ID = WND.DELIVERY_ID
AND WTS.PENDING_INTERFACE_FLAG = 'Y' AND TRUNC(WTS.ACTUAL_DEPARTURE_DATE) BETWEEN to_date('&StartPeriodDate','DD-MON-YYYY HH24:MI:SS') AND to_date('&EndPeriodDate','DD-MON-YYYY HH24:MI:SS')
AND WDL.PICK_UP_STOP_ID = WTS.STOP_ID;
References
NOTE:105647.1 - WIP and COST Frequently Used Troubleshooting Scripts
NOTE:238700.1 - Unprocessed Shipping Transactions Stop Period Close
NOTE:262979.1 - Unprocessed Shipping Transactions Troubleshooting Techniques
SQL -- What Tables Queries are Used to Display the Counts in the Inventory Account Periods form (INVTTGPM.fmb) (Doc ID ID 357997.1)的更多相关文章
- sql:SQL Server metadata queries
http://www.mssqltips.com/sqlservertip/3449/making-sql-server-metadata-queries-easier-with-these-new- ...
- sql: Compare Tables
---使用 UNION.INTERSECT 或 EXCEPT 运算符合并的所有查询必须在其目标列表中有相同数目的表达式 select * from BookInfoList --存在不同的 selec ...
- SQL Server tables export/import with bcp
Export tables below bcp wind.wind.WTUser OUT c:\WTUser.bcp -T -N bcp wind.wind.EPPlan OUT c:\EPPlan. ...
- 【sql技巧】mysql修改时,动态指定要修改的字段 update `table` set (case when ....) = 1 where id = xx
如果你点进了这篇帖子,那么你一定遇到了跟我一样的问题.别看题目的set case when...,我一开始也是第一反应是用case when但是发现并不好使. 问题呢,说得高大上一点:动态指定要修改的 ...
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'wher id = 41' at line 1
where 没有打完整
- 17Web服务器端控件
Web服务器端控件 Web服务器端控件 ASP.Net提供了两类服务器端控件:Html服务器端控件和Web服务器端控件.由于Web服务器端控件功能更强大,和Windows应用程序的控件使用方法类似,容 ...
- Display Database Image using MS SQL Server 2008 Reporting Services
原文 Display Database Image using MS SQL Server 2008 Reporting Services With the new release of MS SQL ...
- One SQL to Rule Them All – an Efficient and Syntactically Idiomatic Approach to Management of Streams and Tables(中英双语)
文章标题 One SQL to Rule Them All – an Efficient and Syntactically Idiomatic Approach to Management of S ...
- sql: Query to Display Foreign Key Relationships and Name of the Constraint for Each Table in Database
--20170505 --塗聚文 Geovin Du CREATE DATABASE DuMailSystem GO USE DuMailSystem GO --1查詢表的及备注说明 SELECT S ...
随机推荐
- python文本挖掘输出权重,词频等信息,画出3d权重图
# -*- coding: utf-8 -*- from pandas import read_csv import numpy as np from sklearn.datasets.base im ...
- 【精华】部署与管理ZooKeeper(转)
部署与管理ZooKeeper(转) 本文以ZooKeeper3.4.3版本的官方指南为基础:http://zookeeper.apache.org/doc/r3.4.3/zookeeperAdmin. ...
- 【BZOJ】1756: Vijos1083 小白逛公园(线段树)
题目 传送门:QWQ 分析 线段树维护一下最大子序列 维护一下最大前缀 最大后缀 区间和 就ok了 好像只能用结构体..... 代码 #include <bits/stdc++.h> u ...
- php+nginx环境下的php报错设置
修改php.ini的配置: display_errors = Off(关闭) display_errors = On(开启) 设置修改完成后重启php-cgi进程 killall -9 php-cgi ...
- python之解析csv
使用csv包 读取信息 csvfile = file('csv_test.csv', 'rb') reader = csv.reader(csvfile) for line in reader: pr ...
- windows下使用nginx配置tomcat集群
转自:https://blog.csdn.net/csdn15698845876/article/details/80658599
- 「小程序JAVA实战」小程序的留言和评价功能(70)
转自:https://idig8.com/2018/10/28/xiaochengxujavashizhanxiaochengxudeliuyanhepingjiagongneng69/ 目前小程序这 ...
- Richview 首页 奇偶页 不同页眉页脚
首页 奇偶页 不同页眉页脚 ScaleRichView v6.0 Different headers and footers for the first page, for odd and even ...
- 【317】python 指定浏览器打开网页 / 文件
一.python 打开浏览器的方法: 1. startfile方法(打开指定浏览器) import os os.startfile("C:\Program Files\internet ex ...
- sass compact方法的实现
不想依赖compass的编译器,但sass的又没有compact方法,于是自己造轮子.最早时在stackoverflow看到一个 @function compact($var-1, $var-2: f ...