49: AND organization_id = p_organization_id;
50:
51: CURSOR c_mmta IS
52: SELECT ROWID
53: FROM MTL_MATERIAL_TXN_ALLOCATIONS
54: WHERE transaction_date >= l_min_date and transaction_date <= l_max_date + 1-(1/(24*3600))
55: AND organization_id = p_organization_id;
56:
57: CURSOR c_mtlt IS
109: x_errbuf := 'Error';
110: return;
111: end ;
112:
113: -- *************** Purge from MTL_MATERIAL_TXN_ALLOCATIONS ****************
114: l_total_count := 0;
115: OPEN c_mmta;
116: LOOP
117: l_count := 0;
125: EXIT;
126: END IF;
127:
128: FORALL i IN rowid_list.first .. rowid_list.last
129: DELETE FROM MTL_MATERIAL_TXN_ALLOCATIONS
130: WHERE ROWID = rowid_list(i);
131:
132: l_count := SQL%ROWCOUNT;
133: COMMIT;