DBA Data[Home] [Help]

APPS.INV_MISSING_QTY_ACTIONS_ENGINE dependencies on MTL_ALLOCATIONS_GTMP

Line 144: UPDATE mtl_allocations_gtmp mat

140: print_debug('Updating Temp table to remove Confirmed Lots/Serials', l_api_name, g_info);
141: END IF;
142:
143: IF p_lot_control_code = 2 AND p_serial_control_code IN(1, 6) THEN
144: UPDATE mtl_allocations_gtmp mat
145: SET (primary_quantity, transaction_quantity,secondary_quantity)
146: = (SELECT mat.primary_quantity - nvl(SUM(mtlt.primary_quantity),0)
147: , mat.transaction_quantity - nvl(SUM(mtlt.transaction_quantity),0)
148: , DECODE(NVL(mat.secondary_quantity,0) - NVL(SUM(mtlt.secondary_quantity),0)

Line 159: DELETE mtl_allocations_gtmp

155:
156: WHERE mat.transaction_temp_id = p_transaction_temp_id;
157: l_updated_count := SQL%ROWCOUNT;
158:
159: DELETE mtl_allocations_gtmp
160: WHERE transaction_temp_id = p_transaction_temp_id AND primary_quantity <= 0;
161: l_deleted_count := SQL%ROWCOUNT;
162: ELSIF p_lot_control_code = 1 AND p_serial_control_code NOT IN(1, 6) THEN
163: DELETE mtl_allocations_gtmp

Line 163: DELETE mtl_allocations_gtmp

159: DELETE mtl_allocations_gtmp
160: WHERE transaction_temp_id = p_transaction_temp_id AND primary_quantity <= 0;
161: l_deleted_count := SQL%ROWCOUNT;
162: ELSIF p_lot_control_code = 1 AND p_serial_control_code NOT IN(1, 6) THEN
163: DELETE mtl_allocations_gtmp
164: WHERE transaction_temp_id = p_transaction_temp_id
165: AND serial_number IN( SELECT msn.serial_number
166: FROM mtl_serial_numbers msn
167: WHERE msn.group_mark_id = p_transaction_temp_id);

Line 170: DELETE mtl_allocations_gtmp

166: FROM mtl_serial_numbers msn
167: WHERE msn.group_mark_id = p_transaction_temp_id);
168: l_deleted_count := SQL%ROWCOUNT;
169: ELSIF p_lot_control_code = 2 AND p_serial_control_code NOT IN(1, 6) THEN
170: DELETE mtl_allocations_gtmp
171: WHERE transaction_temp_id = p_transaction_temp_id
172: AND serial_number IN( SELECT msn.serial_number
173: FROM mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn
174: WHERE mtlt.transaction_temp_id = p_transaction_temp_id

Line 179: UPDATE mtl_allocations_gtmp mat

175: AND msn.group_mark_id = mtlt.serial_transaction_temp_id);
176: l_deleted_count := SQL%ROWCOUNT;
177:
178: IF SQL%ROWCOUNT = 0 THEN
179: UPDATE mtl_allocations_gtmp mat
180: SET (primary_quantity, transaction_quantity,secondary_quantity)
181: = (SELECT mat.primary_quantity - nvl(SUM(mtlt.primary_quantity),0)
182: , mat.transaction_quantity - nvl(SUM(mtlt.transaction_quantity),0)
183: , DECODE(NVL(mat.secondary_quantity,0) - NVL(SUM(mtlt.secondary_quantity),0)

Line 194: DELETE mtl_allocations_gtmp

190: AND mtlt.lot_number = mat.lot_number)
191: WHERE mat.transaction_temp_id = p_transaction_temp_id;
192: l_updated_count := SQL%ROWCOUNT;
193:
194: DELETE mtl_allocations_gtmp
195: WHERE transaction_temp_id = p_transaction_temp_id AND primary_quantity <= 0;
196: l_deleted_count := SQL%ROWCOUNT;
197: END IF;
198: END IF;

Line 500: FROM mtl_allocations_gtmp

496: --Bug Number 3372238 added the group by clause
497: CURSOR c_unconfirmed_lots IS
498: SELECT lot_number, SUM(transaction_quantity) transaction_quantity ,SUM (primary_quantity) primary_quantity
499: ,DECODE (SUM(NVL(secondary_quantity,0)),0,NULL,SUM(NVL(secondary_quantity,0))) secondary_quantity --INVCONV KKILLAMS
500: FROM mtl_allocations_gtmp
501: WHERE transaction_temp_id = p_transaction_temp_id
502: GROUP BY lot_number;
503: BEGIN
504: x_return_status := fnd_api.g_ret_sts_success;

Line 603: FROM mtl_allocations_gtmp

599: )
600: SELECT l_serial_txn_temp_id
601: , serial_number, serial_number, 1
602: , SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
603: FROM mtl_allocations_gtmp
604: WHERE transaction_temp_id = p_transaction_temp_id
605: AND lot_number = curr_lot.lot_number
606: AND ROWNUM <= l_lot_pri_qty;
607: l_insert_count := SQL%ROWCOUNT;

Line 642: FROM mtl_allocations_gtmp

638: )
639: SELECT x_new_txn_temp_id
640: , serial_number, serial_number, 1
641: , SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
642: FROM mtl_allocations_gtmp
643: WHERE transaction_temp_id = p_transaction_temp_id
644: AND ROWNUM <= l_rem_pri_qty;
645: l_insert_count := SQL%ROWCOUNT;
646:

Line 1157: FROM mtl_allocations_gtmp

1153: SELECT lot_number
1154: ,SUM(transaction_quantity) transaction_quantity
1155: ,SUM(primary_quantity) primary_quantity
1156: ,DECODE(SUM(NVL(secondary_quantity,0)),0,NULL,SUM(NVL(secondary_quantity,0))) secondary_quantity --INVCONV kkillams
1157: FROM mtl_allocations_gtmp
1158: WHERE transaction_temp_id = p_transaction_temp_id
1159: GROUP BY lot_number;
1160:
1161:

Line 1250: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, transaction_quantity, primary_quantity

1246: IF l_debug = 1 THEN
1247: print_debug('Populating Temp Table for a Lot Ctrl Item', l_api_name, g_info);
1248: END IF;
1249:
1250: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, transaction_quantity, primary_quantity
1251: ,secondary_quantity) --INVCONV kkillams
1252: SELECT p_transaction_temp_id, mtlt.lot_number, SUM(mtlt.transaction_quantity), SUM(mtlt.primary_quantity)
1253: ,DECODE(SUM(NVL(mtlt.secondary_quantity,0)),0,NULL,SUM(NVL(mtlt.secondary_quantity,0))) --INVCONV kkillams
1254: FROM mtl_transaction_lots_temp mtlt

Line 1306: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, serial_number)

1302: IF l_debug = 1 THEN
1303: print_debug('Populating Temp Table for a Serial Ctrl Item', l_api_name, g_info);
1304: END IF;
1305:
1306: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, serial_number)
1307: SELECT p_transaction_temp_id, msn.serial_number
1308: FROM mtl_serial_numbers msn
1309: WHERE p_transaction_temp_id IS NOT NULL
1310: AND msn.group_mark_id = p_transaction_temp_id

Line 1347: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, serial_number, transaction_quantity, primary_quantity)

1343: IF l_debug = 1 THEN
1344: print_debug('Populating Temp Table for a Lot and Serial Ctrl Item', l_api_name, g_info);
1345: END IF;
1346:
1347: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, serial_number, transaction_quantity, primary_quantity)
1348: SELECT p_transaction_temp_id, mtlt.lot_number, msn.serial_number, 1, 1
1349: FROM mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn
1350: WHERE p_transaction_temp_id IS NOT NULL
1351: AND mtlt.transaction_temp_id = p_transaction_temp_id

Line 1441: DELETE mtl_allocations_gtmp;

1437: END IF;
1438: END IF;
1439:
1440: -- First clear Allocations Temp Table.
1441: DELETE mtl_allocations_gtmp;
1442:
1443: IF l_lot_control_code = 2 AND l_serial_control_code IN(1, 6) THEN
1444: populate_tt_lot(x_return_status, p_transaction_temp_id, p_mo_line_id);
1445: ELSIF l_lot_control_code = 1 AND l_serial_control_code NOT IN(1, 6) THEN