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)的更多相关文章

  1. sql:SQL Server metadata queries

    http://www.mssqltips.com/sqlservertip/3449/making-sql-server-metadata-queries-easier-with-these-new- ...

  2. sql: Compare Tables

    ---使用 UNION.INTERSECT 或 EXCEPT 运算符合并的所有查询必须在其目标列表中有相同数目的表达式 select * from BookInfoList --存在不同的 selec ...

  3. 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. ...

  4. 【sql技巧】mysql修改时,动态指定要修改的字段 update `table` set (case when ....) = 1 where id = xx

    如果你点进了这篇帖子,那么你一定遇到了跟我一样的问题.别看题目的set case when...,我一开始也是第一反应是用case when但是发现并不好使. 问题呢,说得高大上一点:动态指定要修改的 ...

  5. 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 没有打完整

  6. 17Web服务器端控件

    Web服务器端控件 Web服务器端控件 ASP.Net提供了两类服务器端控件:Html服务器端控件和Web服务器端控件.由于Web服务器端控件功能更强大,和Windows应用程序的控件使用方法类似,容 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. composer中文镜像

    王赛先生维护的 phpcomposer 全局修改 composer config -g repo.packagist composer https://packagist.phpcomposer.co ...

  2. emacs之配置speedbar

    安装sr-speedbar,这样的话,speedbar就内嵌到emacs里面了 emacsConfig/speedbar-setting.el (require 'sr-speedbar) (setq ...

  3. vim之vundle

    git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle,下载到本地 gvim ~/.vimrc set nocompat ...

  4. cocos命令行生成项目

    cocos命令行生成项目: cocos new GoodDay(项目名称) -p com.boleban.www(包名字) -l cpp(项目类型) -d D:\DevProject\cocos2dx ...

  5. Ninject Lazy Load问题

    参考: http://stackoverflow.com/questions/2538132/lazy-loading-with-ninject  方案一: public class Module : ...

  6. Java进行spark计算

    首先在Linux环境安装spark: 可以从如下地址下载最新版本的spark: https://spark.apache.org/downloads.html 这个下载下来后是个tgz的压缩包,解压后 ...

  7. 访问https请求出现警告,去掉警告的方法

    在顶部引多一个包即可 from requests.packages.urllib3.exceptions import InsecureRequestWarning,InsecurePlatformW ...

  8. MySQL 高性能存储引擎:TokuDB初探

    在安装MariaDB的时候了解到代替InnoDB的TokuDB,看简介非常的棒,这里对ToduDB做一个初步的整理,使用后再做更多的分享. 什么是TokuDB? 在MySQL最流行的支持全事务的引擎为 ...

  9. Solr Suggest组件的使用

    使用suggest的原因,最主要就是相比于search速度快,In general, we need the autosuggest feature to satisfy two main requi ...

  10. jquery 等html加载完成再绑定事件

    $(document).on("click","selector",function(){ //code});