148: WHERE oola.line_id = mo_line.txn_source_line_id
149: AND (NVL(open_flag,'Y') ='Y' and cancelled_flag='N')
150: AND NOT EXISTS (
151: SELECT 1
152: FROM mtl_material_transactions_temp mmtt
153: WHERE mmtt.move_order_line_id = mo_line.line_id)
154: AND NOT EXISTS (
155: SELECT 1
156: FROM wsh_delivery_details wdd
227: and order_line is not open (OE_ORDER_LINES_ALL.OPEN_FLAG <> 'Y') */
228: BEGIN
229: SELECT 1
230: INTO can_delete
231: FROM mtl_material_transactions_temp mmtt
232: WHERE mmtt.move_order_line_id = mo_line.line_id
233: AND ROWNUM < 2;
234:
235: can_delete := 0;
263: --Delete MTRL if allocations doesn't exist for this MO line
264: BEGIN
265: SELECT 1
266: INTO can_delete
267: FROM mtl_material_transactions_temp mmtt
268: WHERE mmtt.move_order_line_id = mo_line.line_id
269: AND ROWNUM < 2;
270:
271: can_delete := 0;