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. C++ 类外定义

    类内定义与内联函数 像下面这种函数名与函数体都写在类里面的函数形式被称作类内定义,编译器编译的时候会把它默认成内联函数. class Student { public: void setAge(int ...

  2. Train-Alypay-Cloud:蚂蚁大数据平台培训开课通知(第三次)

    ylbtech-Train-Alypay-Cloud:蚂蚁大数据平台培训开课通知(第三次) 1.返回顶部 1. 您好! 很高兴通知您,您已经成功报名将于蚂蚁金服计划在2018年2月28日- 2018年 ...

  3. android中的一个圆角图片

    RoundedImageView A fast ImageView (and Drawable) that supports rounded corners (and ovals or circles ...

  4. 679. 24 Game

    ▶ 给出四个整数,求他们是否能加减乘除括号拼凑成 24 ● 代码,11 ms,正向枚举,推广性很强(nums 可以改为任意长度,也不限于拼凑 24 这个和),缺点是只能判定是否有解,不方便输出不重复的 ...

  5. Direcshow之视频捕捉<转>

    关于视频捕捉(About Video Capture in Dshow) 1. 视频捕捉Graph的构建 一个能够捕捉音频或者视频的graph图都称之为捕捉graph图.捕捉graph图比一般的文件回 ...

  6. Spring-JDBC模板-事务

    Spring-JDBC模板-事务 1.事务概述 什么是事务 逻辑上的一组操作,组成这组操作的各个单元要么全部成功要么全部失败 事务的特点ACID 原子性:事务不可分割(事务要么成功,要么失败) 一致性 ...

  7. MyBatis 动态SQL注意事项

  8. 多线程中,ResultSet为空,报错空指针

    最近在数据库查询数据时,由于数据量太大,使用了多线程,通过线程池建了好几个线程,然后调用了一个封装好的jdbc查询语句. 结果在多线程中,ResultSet报错空指针. 仔细查阅后,才发现多个线程访问 ...

  9. win bat命令后台运行控制台应用

    @echo off if "%1"=="h" goto begin start mshta vbscript:createobject()(window.clo ...

  10. 最多有k个不同字符的最长子字符串 · Longest Substring with at Most k Distinct Characters(没提交)

    [抄题]: 给定一个字符串,找到最多有k个不同字符的最长子字符串.eg:eceba, k = 3, return eceb [暴力解法]: 时间分析: 空间分析: [思维问题]: 怎么想到两根指针的: ...