WIP and COST Frequently Used Troubleshooting Scripts (Doc ID 105647.1)
Applies to:
Oracle Work in Process - Version 10.7.16.1 to 12.1 [Release 10.7 to 12.1]
Information in this document applies to any platform.
*** Checked for relevance on 06-Jun-2011 ***
Main Content
Purpose
These scripts are provided for Troubleshooting purposes only by Oracle Support Services. The scripts have been tested and work as intended. However, you should always test any script before relying on it. Please proof read these scripts prior to running them!
Due to differences in the way text editors, email packages and operating systems handle text formatting (spaces, tabs and carriage returns), these scripts may not be in an executable state when you first receive them.
Check over the script to ensure that errors of this type are corrected.
Troubleshooting Steps
1. Pending WIP Material Transactions?
First check if the Inventory Transaction Manager is running and if there are any records pending or in error in the inventory transactions interface. These can be queried via the Inventory Transactions Interface Inquiry screen. Navigate Inventory/Transactions/Transaction Open Interface.
Records can be deleted and/or resubmitted with this form.
Check Pending Transactions, Navigate Inventory/Transactions/Pending Transactions.
Records can only be resubmitted via the form.
If there are Pending Transactions that are stuck in the MTL_MATERIAL_TRANSACTIONS_TEMP table with transaction_type_id=5,(backflush/wip transactions)with proces_flag =E, they need to be submitted.
To investigate why the Transactions are Failing, run the following SQL Script:
select transaction_source_id , inventory_item_id, process_flag,
error_code, error_explanation,
transaction_source_type_id, organization_id
from mtl_material_transactions_temp
where process_flag = ?E?
and transaction_source_id= ;
Use this script to resubmit the Transactions:
update mtl_material_transactions_temp
set process_flag = 'Y',
lock_flag = 'N',
transaction_mode= 3,
error_code = NULL,
error_explaination = NULL
where process_flag = 'E'
and transaction_source_id= ;
2. Pending WIP Completion Transactions.
There are 2 ways of performing Completion Transactions.
In the WIP Move Transactions Form: ( Navigation -> WIP/Move Transactions/Move Transactions, Set Transaction Type to Complete).
In the WIP Material Transaction Form (Navigation -> WIP/Material Transactions/Completion Transactions)
Records are created by doing a WIP Assembly Completion.
They are Stuck in MTL_MATERIAL_TRANSACTIONS_TEMP Table. (Navigate -> Inventory/Transaction/Pending Transactions) for the error messages: Or run the following SQL script:
To find the ORGANIZATION_ID run this script:
select organization_id, organization_code
from org_organization_definitions
where organization_name like 'xxx%'; ( xxx is organization name )
To find the WIP_Entity_Id run this script:
select wip_entity_id
from wip_entities
where wip_entity_name = < Wip job or repetitive assembly>
and organization_id= 'xxx'; ( xxx is organization id )
select error_code, error_explanation,lock_flag,
inventory_item_id, transaction_action_id,
transaction_source_type_id, process_flag,
organization_id
from mtl_material_transactions_temp
where organization_id =
and transaction_source_id = ;
( wip_entity_id is obtained from above SQL statement )
3. Pending WIP Move Transactions
WIP_MOVE_TXN_INTERFACE:
Contains information about the shop floor move transactions that need to be processed.
To View the pending move transaction (Navigation -> WIP/Move Transactions/Pending Move Transactions.)
Records can be updated, deleted, and resubmitted via the form.
The Transaction Processing mode should be set to online processing.
If there are any errored move Transactions in wip_move_txn_interface, then these Transactions must be resubmitted.
Run the following scripts:
To find how many rows are in Error:
select count(*)
from wip_move_txn_interface
where process_status = 3 ;
To find how many rows are in Pending:
select transaction_id, wip_entity_id, process_phase, process_status, wip_entity_name
from wip_move_txn_interface
where process_status in (1,3)
(Process Status = 1 indicates Pending, 3 indicates "Error" )
To find how many rows are in Error and What the messages are:
select error_message, error_column
from wip_txn_interface_errors
where request_id=
( for the two that have a request id )
Use this script to update the Error Records:
update wip_move_txn_interface
set group_id=null,
request_Id = null,
process_status=1,
transaction_id=null
where transaction_id=;
Restart the interface managers (Move and Cost Manager).
Launch the Move Transaction Manager even if the TP:WIP Move Transaction Profile Option = on-line processing. (Navigation -> Inventory/Setup/Transactions/Interface Managers). Use the "Launch Manager" button under the special option on the tool bar.
4. Pending WIP Resource Transactions?
Do the following to re-submit ERRORED RESOURCE COST records;
1. Ensure that there is no (Resource) cost worker running.
2. Stop the (Resource) Cost Manager.
3. Take backup of this table WIP_COST_TXN_INTERFACE
4. To check for pending transactions, run the following SQL;
select transaction_id, request_id, group_id,
process_status , wip_entity_name
from wip_cost_txn_interface
where process_status in ( 1,3); ( process_status= 1 indicates 'Pending', 3 indicates 'Error' )
5. Update the table.
update wip_cost_txn_interface
set group_id=NULL,
transaction_id = NULL,
process_status= 1 ( set it to Pending )
where process_status = 3; ( error records )
6. Restart the (Resource) Cost Manager.
5. Pending Close Discrete Jobs ?
Go into SQL*Plus as apps user / and run the following sql script:
wipcljob.sql
Use this script to Report a Range of Discrete Jobs for a specific Organization, that cannot be Closed Due to Pending Transactions against them. This is a sql script which queries the database and generates output which shows the Transactions that are causing the problem. This script ONLY identifies data, it does NOT update or correct any data.
This script can also be downloaded here; Pending Jobs SQL Scripts Note 106242.1
Make certain that no workers are running and the Cost Manager has been taken down when running the update scripts.
In order for a job to be successfully closed, there must be NO Transactions for the job in WIP_MOVE_TXN_INTERFACE. If there are, then run the following script:
Use this script to Find Pending Rows:
select transaction_id, wip_entity_id, process_phase,
process_status, wip_entity_name
from wip_move_txn_interface
where process_status in (1,3); (process status = 1 indicates Pending, 3 indicates "Error" )
update wip_move_txn_interface
set group_id=null,
process_status=1,
transaction_id=null
where transaction_id=;
There must be NO transactions for the job in WIP_COST_TXN_INTERFACE.
WIP_COST_TXN_INTERFACE contains information about cost transactions that WIP needs to process.
select transaction_id, wip_entity_id,
process_phase, process _status
from wip_cost_txn_interface
where process_status in (1, 3);
If there are transactions for the job, then run the following script:
update wip_cost_txn_interface
set group_id=null,
process_status=1,
transaction_id=null
where transaction_id=;
There must be no transactions for the job in MTL_MATERIAL_TRANSACTIONS_TEMP. The mtl_material_transactions_temp table is the Key for all material transactions.
First make sure the Inventory Transaction Manager is running.
select transaction_source_id , inventory_item_id, process_flag,
error_code, error_explanation,
transaction_source_type_id, organization_id
from mtl_material_transactions_temp
where process_flag = ?E?
and transaction_source_type_id=5; ( 5 = Job/schedule )
If there are transactions for the job in MTL_MATERIAL_TRANSACTIONS_TEMP then run the following script:
update mtl_material_transactions_temp
set process_flag = 'Y',
lock_flag = 'N',
transaction_mode = 3,
error_code = NULL,
error_explanation = NULL
where organization_id =
and transaction_source_id = ;
There must be NO uncosted transactions for the job in MTL_MATERIAL_TRANSACTIONS (WHERE COSTED_FLAG IN ('N', 'E'))
select request_id, costed_flag, transaction_id,
transaction_group_id, inventory_item_id, transaction_source_id
from mtl_material_transactions
where costed_flag in ('N', 'E')
and transaction_source_type_id=5
and organization_id = < org. id > ;
Update the records for re-submission to the Cost Manager.
update mtl_material_transactions
set costed_flag = 'N',
request_id = NULL,
transaction_group_id = NULL,
error_code = NULL,
error_explanation = NULL
where costed_flag in ('N', 'E');
Re-start the Cost Manager to run against this schema .
If the above condition were satisfied, but the problem still occurs.
CHANGE STATUS in WIP_DISCRETE_JOBS & DELETE FROM WIP_DJ_CLOSE_TEMP.
1. You need to make the changes with sqlplus.
2. You need to make sure the Status_type =5 in WIP_DISCRETE_JOBS to Complete, No charges allowed'
3. You need to delete all corresponding records in WIP_DJ_CLOSE_TEMP.
To find any rows for the job:
select count (*) from wip_dj_close_temp
where wip_entity_id = < job's wip entity id>
and wip_entity_name = < job number > ;
1. In WIP_entities table check the Entity_type ( 3 = Closed Discrete Job).
2. In Wip_discrete_jobs check the status_type (12 = Closed).
Note:
FILE: wiprsjob.sql
This script is used to reset Discrete Jobs that cannot be Closed due to Pending Transactions against them.
This script can be downloaded here;
RESET Pending Close Jobs SQL Script Note 106245.1
6. Uncosted Transactions?
When Closing the Inventory Period End, you may receive a message saying that you cannot close the Period End because a specified number of Uncosted Transactions exist. This can happen when the Cost Manager job comes down or is taken down during run time, leaving some Transactions in an 'in between' state, with a request_id but costed_flag set to 'N'.
In Standard Costing the error message is listed in the log file of the cost worker. However, In Average Costing the error is detailed in the MMT table itself (error_code, error_explanation).
There must be NO Uncosted Transactions for the job in MTL_MATERIAL_TRANSACTIONS (WHERE COSTED_FLAG IN ('N', 'E'))
select request_id, costed_flag, transaction_id,
transaction_group_id, inventory_item_id, transaction_source_id
from mtl_material_transactions
where costed_flag in ('N', 'E')
and transaction_source_type_id=5
and organization_id = < org. id > ;
(If this picks up any records - Uncosted Transactions exist).
If this table has Uncosted Transactions that errored out then see the scripts provided.
IMPORTANT: Ensure that your Cost Manager is NOT running against this Schema.
Create a backup table for the records you are updating (always a good practice);
create table mtl_material_txn_bkup as
(select * from mtl_material_transactions
where costed_flag in ('N', 'E');
Update the records for re-submission to the Cost Manager.
update mtl_material_transactions
set costed_flag = 'N',
request_id = NULL,
transaction_group_id = NULL,
error_code = NULL,
error_explanation = NULL
where costed_flag in ('N','E');
Re-start the Cost Manager to run against this schema.
To resolve any WIP Transactions:
select transaction_id, request_id, group_id,
process_status , wip_entity_name
from wip_cost_txn_interface
where process_status in ( 1,3) ;
(Process_status= 1 indicates 'Pending' 3 indicates "Error" ) (ie. only uncosted transactions exist in this table)
To update the table :
update wip_cost_txn_interface
set request_id = null,
group_id = null,
process_status = 1
where process_status = 3;
(Process_status= ? ( 1 indicates 'Pending', 3 indicates "Error" )
The next Cost Manager run should pick up the Transactions and Reprocess them. If the Transactions fail due to an ERROR condition ie. costed_flag = 'E'. then there are Pending Transactions in WIP_COST_TXN_INTERFACE where the process_status=1. The Cost Manager is active, but never selects these rows for processing.
If you are using Average Costing, then verify that a Transaction has not errored out in MTL_MATERIAL_TRANSACTIONS. If a Transaction errored out there, other transactions will not be costed in WIP_COST_TXN_INTERFACE.
If using Average Costing, then all transactions are processed sequentially. If one transaction errors out, then no further processing can be done.
To determine if there is an errored transaction in MTL_MATERIAL_TRANSACTIONS use the following script:
select request_id, costed_flag, transaction_id,
transaction_group_id, inventory_item_id, transaction_source_id
from mtl_material_transactions
where costed_flag in ('N', 'E')
and transaction_source_type_id=5
and organization_id = < org. id > ;
To determine the error that has occured on this Transaction, reprocess it and look in the Cost Manager Log file for the error message.
To Reprocess this Transaction:
update mtl_material_transactions
set costed_flag = 'N',
request_id = NULL,
transaction_group_id = NULL,
error_code = NULL,
error_explanation = NULL
where costed_flag is in ('N', 'E');
COMMIT;
To view the Log File for the most Recent Cost Manager Run, use Sysadmin Responsibility and query up requests that begin Cost Manager%. Correct the error that occurs. Once this error has been properly addressed, the Cost Manager should then begin processing Transactions in WIP_COST_TXN_INTERFACE.
Check for a need to increase the extent the tablespace and resubmit. A script to check for max extent, invalid objects, and table space follows;
select owner,object_name, object_type
from all_objects
where status = 'INVALID';
select segment_name,tablespace_name,extents,max_extents
from dba_segments
where max_extents >5;
1. Check the tablespace for the mtl_transaction_accounts.
2. Check if the Material Cost Transaction worker ( CMCMCW) is running .
References
NOTE:106245.1 - WIPRSJOB Reset Pending Close Jobs SQL Script.
WIP and COST Frequently Used Troubleshooting Scripts (Doc ID 105647.1)的更多相关文章
- 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] Informatio ...
- Troubleshooting ORA-12547 TNS: Lost Contact (Doc ID 555565.1)
Troubleshooting ORA-12547 TNS: Lost Contact (Doc ID 555565.1) This error can occur in following scen ...
- Click to add to Favorites Troubleshooting: High Version Count Issues (Doc ID 296377.1)
Copyright (c) 2018, Oracle. All rights reserved. Oracle Confidential. Click to add to Favorites Trou ...
- Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1)
Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1) APPLIES TO: Oracle Da ...
- Troubleshooting ORA-30013 Error (Doc ID 1578717.1)
Troubleshooting ORA-30013 Error (Doc ID 1578717.1) APPLIES TO: Oracle Database - Enterprise Edition ...
- Troubleshooting ORA-1628 - max # extents (32765) reached for rollback segment <SEGMENT_NAME> (Doc ID 1580182.1)
Troubleshooting ORA-1628 - max # extents (32765) reached for rollback segment <SEGMENT_NAME> ( ...
- Master Note: Troubleshooting ORA-1548 error (Doc ID 1577988.1)
APPLIES TO: Oracle Database Cloud Schema Service - Version N/A and laterOracle Database Exadata Clou ...
- LOBs and ORA-01555 troubleshooting (Doc ID 846079.1)
LOBs and ORA-01555 troubleshooting (Doc ID 846079.1) APPLIES TO: Oracle Database Cloud Schema Servic ...
- Troubleshooting ORA-01555/ORA-01628/ORA-30036 During Export and Import (Doc ID 1579437.1)
Troubleshooting ORA-01555/ORA-01628/ORA-30036 During Export and Import (Doc ID 1579437.1) APPLIES TO ...
随机推荐
- 转 shell 命令 http://www.cnblogs.com/me115/p/3427319.html
http://www.cnblogs.com/me115/p/3427319.html 本文将介绍Linux下使用Shell处理文本时最常用的工具:find.grep.xargs.sort.uniq. ...
- 黄聪:WordPress实现HTML5预加载
WordPress实现HTML5预加载方法很简单,把下面代码: <?php if (is_archive() && ($paged > 1) && ($pa ...
- 注解反射原理(IOC框架)
IOC(Inversion of Control):控制反转.采用配置文件和注解的方式,将成员变量通过反射注入,舍弃new的方式,降低了耦合度. 反射:JAVA反射机制是在运行状态中,对于任意一个类, ...
- Java 中的包装类
Java 中的包装类 相信各位小伙伴们对基本数据类型都非常熟悉,例如 int.float.double.boolean.char 等.基本数据类型是不具备对象的特性的,比如基本类型不能调用方法.功能简 ...
- 学习笔记之C++入门到精通(名师教学·手把手教会)【职坐标】_腾讯课堂
C++入门到精通(名师教学·手把手教会)[职坐标]_腾讯课堂 https://ke.qq.com/course/101465#term_id=100105503 https://github.com/ ...
- laravel下载文件
public function jobDownload(){ $realPath = public_path('download/job/postForm.xls'); $filename = '应聘 ...
- Solr-DIH建立索引并执行简单初步的查询
我们将solr的安装目录设置为$SOLR_INSTALL, ./solr start,不使用任何原有的examples来进行,启动完成后,不存在任何的core,提示No cores availab ...
- JSON格式化工具推荐
JSON以其独特的简洁方便及与Javscript的无缝集成在WEB2.0时瓦风靡全球. 不过做为开发者,当看到一段很长的未格式化的JSON代码时,你会不会感到头晕? {"meta&quo ...
- vconsole使用
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- 关于eclipse open call hierarchy功能的一个细节
这个功能对应的快捷键是ctrl alt H,大家应该都很熟悉了.默认是查找这个方法的被调用堆栈.90%的人应该也是习惯这个默认的功能的,也基本无视它的另一个功能. 昨天重启eclipe之后,我的ecl ...