Anda di halaman 1dari 3

Identifying queries for script INVCLRMOv115.5.

sql
Source: INVCLRMOv115.5.sql version 115.5
To check for corrupted move order data that could be cleaned up by the script IN
VCLRMOv115.5.sql, please run SQL queries like below:
a. Check for orphan move order allocations in Pending Transactions: (all move or
der 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_quantity
from
mtl_material_transactions_temp mmtt
where mmtt.move_order_line_id is not null
and not exists (
select null
from mtl_txn_request_lines mtrl
where 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 mo
ve 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_quantity
from
mtl_txn_request_lines mtrl
,mtl_material_transactions_temp mmtt
where mmtt.move_order_line_id = mtrl.line_id
and mtrl.line_status = 5
order 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_quantity
from
mtl_txn_request_headers mtrh
,mtl_txn_request_lines mtrl
,mtl_material_transactions_temp mmtt
where mmtt.move_order_line_id is not null
and mmtt.move_order_line_id = mtrl.line_id
and mtrl.line_status = 7
and mtrl.header_id = mtrh.header_id
and mtrh.move_order_type = 3
and not exists (
select null
from wsh_delivery_details wdd
where wdd.move_order_line_id = mtrl.line_id
and 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 transact
ion: (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_quantity
from
mtl_txn_request_headers mtrh
,mtl_txn_request_lines mtrl
where mtrl.line_status = 7
and mtrl.header_id = mtrh.header_id
and mtrh.move_order_type = 3
and not exists (
select null
from wsh_delivery_details wdd
where wdd.move_order_line_id = mtrl.line_id
and wdd.released_status = 'S'
)

order by
mtrl.txn_source_line_id
,mtrl.line_id
/

Anda mungkin juga menyukai