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. unity里面的gameobject和transform的关系

    一切都是物体(gameobject),而transform是物体的一个基本属性类,包含位置,旋转,缩放,三个基本属性,两者之间可以互相转换 查找物体,建议用transform,GameObject无法 ...

  2. emacs里面模拟vim按键操作的插件evil

    emacsConfig/evil-setting.el (setq evil-mode t) (setq evil-shift-width ) ;; some modes aren't meant f ...

  3. 除去a标签target="_blank"的方法

    用Jquery:$(function(){$("div>a").attr("target","_blank");});先查找页面上的d ...

  4. java web 程序---留言板

    思路:一个form表单,用户提交留言 一个页面显示留言内容.用到Vector来存取信息并显示 cas.jsp <body> <form action="fei.jsp&qu ...

  5. Java 从原字符串中截取一个新的字符串 subString()

    Java 手册 substring public String substring(int beginIndex) 返回一个新的字符串,它是此字符串的一个子字符串.该子字符串从指定索引处的字符开始,直 ...

  6. CentOS下长时间ping网络加时间戳并记录到文本

    Linux下长时间ping网络加时间戳并记录到文本   由于一些原因,比如需要检查网络之间是否存在掉包等问题,会长时间去ping一个地址,由于会输出大量的信息而且最好要有时间戳,因此我们可以使用简单的 ...

  7. Vue 获取数据、事件对象、todolist

    vue中在方法里获取data里的msg:this.msg 在微信小程序里this.data.msg 改变data里的msg:this.msg="改变后的msg" 可以通过list. ...

  8. 超简单的制作win7 U盘启动

    我感觉真的太简单,操作so简单 第一个下载这个工具,这是微软官方提供的,用这个工具可以把win7的iso文件刻录到u盘中,u盘就可以作为系统启动盘来使用了 Windows 7 USB DVD Down ...

  9. linux学习(别人指出来的), 回头有针对性的学下!

    应该是 会linux 基本操作吧linux 安装 lamp lnmp php拓展这些基本都得会把知道subversion 和 github 这俩吧windows的代码同步到linux上无需ftp 会跟 ...

  10. CDN理解<转>

    CDN则是更高级的手段.CDN到底如何工作的呢,让我们来大概了解一下! CDN的基础百科资料也很多了,我也稍等提一下.CDN,Content Distribute Network,即:内容分发网络. ...