identifying querying for corrupt move orders.txt

Download Identifying querying for Corrupt move orders.txt

If you can't read please download the document

Upload: muhammad-imtiaz

Post on 30-Jan-2016

4 views

Category:

Documents


1 download

TRANSCRIPT

Identifying queries for script INVCLRMOv115.5.sqlSource: INVCLRMOv115.5.sql version 115.5To check for corrupted move order data that could be cleaned up by the script INVCLRMOv115.5.sql, please run SQL queries like below:a. Check for orphan move order allocations in Pending Transactions: (all move order types)select mmtt.trx_source_line_id,mmtt.transaction_source_id,mmtt.transaction_temp_id,mmtt.move_order_header_id,mmtt.move_order_line_id,mmtt.organization_id,mmtt.inventory_item_id,mmtt.transaction_type_id,mmtt.primary_quantityfrom mtl_material_transactions_temp mmttwhere mmtt.move_order_line_id is not nulland not exists (select nullfrom mtl_txn_request_lines mtrlwhere mtrl.line_id = mmtt.move_order_line_id)order by mmtt.trx_source_line_id,mmtt.transaction_temp_id/b. Check for move order allocations in Pending Transactions related to closed move order lines: (all move order types)select mtrl.txn_source_line_id,mtrl.txn_source_id,mmtt.transaction_temp_id,mtrl.header_id,mtrl.line_number,mtrl.line_id,mmtt.organization_id,mmtt.inventory_item_id,mmtt.transaction_type_id,mmtt.primary_quantityfrom mtl_txn_request_lines mtrl,mtl_material_transactions_temp mmttwhere mmtt.move_order_line_id = mtrl.line_idand mtrl.line_status = 5order by mtrl.txn_source_line_id,mmtt.transaction_temp_id/c. Check for sales order move order allocations in Pending Transactions with no pending shipping transaction: (Pick wave / Sales Order)select mtrl.txn_source_line_id,mtrl.txn_source_id,mmtt.transaction_temp_id,mtrl.header_id,mtrh.request_number,mtrl.line_number,mtrl.line_id,mmtt.organization_id,mmtt.inventory_item_id,mmtt.transaction_type_id,mmtt.primary_quantityfrom mtl_txn_request_headers mtrh,mtl_txn_request_lines mtrl,mtl_material_transactions_temp mmttwhere mmtt.move_order_line_id is not nulland mmtt.move_order_line_id = mtrl.line_idand mtrl.line_status = 7and mtrl.header_id = mtrh.header_idand mtrh.move_order_type = 3and not exists (select nullfrom wsh_delivery_details wddwhere wdd.move_order_line_id = mtrl.line_idand wdd.released_status = 'S')order by mtrl.txn_source_line_id,mmtt.transaction_temp_id/d. Check for open sales order move order lines with no pending shipping transaction: (Pick wave / Sales Order)select mtrl.txn_source_line_id,mtrl.txn_source_id,mtrl.header_id,mtrh.request_number,mtrl.line_number,mtrl.line_id,mtrl.organization_id,mtrl.inventory_item_id,mtrl.primary_quantityfrom mtl_txn_request_headers mtrh,mtl_txn_request_lines mtrlwhere mtrl.line_status = 7and mtrl.header_id = mtrh.header_idand mtrh.move_order_type = 3and not exists (select nullfrom wsh_delivery_details wddwhere wdd.move_order_line_id = mtrl.line_idand wdd.released_status = 'S')order by mtrl.txn_source_line_id,mtrl.line_id/