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 417: FROM mtl_allocations_gtmp

413: --Bug Number 3372238 added the group by clause
414: CURSOR c_unconfirmed_lots IS
415: SELECT lot_number, SUM(transaction_quantity) transaction_quantity ,SUM (primary_quantity) primary_quantity
416: ,DECODE (SUM(NVL(secondary_quantity,0)),0,NULL,SUM(NVL(secondary_quantity,0))) secondary_quantity --INVCONV KKILLAMS
417: FROM mtl_allocations_gtmp
418: WHERE transaction_temp_id = p_transaction_temp_id
419: GROUP BY lot_number;
420: BEGIN
421: x_return_status := fnd_api.g_ret_sts_success;

Line 520: FROM mtl_allocations_gtmp

516: )
517: SELECT l_serial_txn_temp_id
518: , serial_number, serial_number, 1
519: , SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
520: FROM mtl_allocations_gtmp
521: WHERE transaction_temp_id = p_transaction_temp_id
522: AND lot_number = curr_lot.lot_number
523: AND ROWNUM <= l_lot_pri_qty;
524: l_insert_count := SQL%ROWCOUNT;

Line 559: FROM mtl_allocations_gtmp

555: )
556: SELECT x_new_txn_temp_id
557: , serial_number, serial_number, 1
558: , SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
559: FROM mtl_allocations_gtmp
560: WHERE transaction_temp_id = p_transaction_temp_id
561: AND ROWNUM <= l_rem_pri_qty;
562: l_insert_count := SQL%ROWCOUNT;
563:

Line 1010: FROM mtl_allocations_gtmp

1006: SELECT lot_number
1007: ,SUM(transaction_quantity) transaction_quantity
1008: ,SUM(primary_quantity) primary_quantity
1009: ,DECODE(SUM(NVL(secondary_quantity,0)),0,NULL,SUM(NVL(secondary_quantity,0))) secondary_quantity --INVCONV kkillams
1010: FROM mtl_allocations_gtmp
1011: WHERE transaction_temp_id = p_transaction_temp_id
1012: GROUP BY lot_number;
1013:
1014:

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

1099: IF l_debug = 1 THEN
1100: print_debug('Populating Temp Table for a Lot Ctrl Item', l_api_name, g_info);
1101: END IF;
1102:
1103: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, transaction_quantity, primary_quantity
1104: ,secondary_quantity) --INVCONV kkillams
1105: SELECT p_transaction_temp_id, mtlt.lot_number, SUM(mtlt.transaction_quantity), SUM(mtlt.primary_quantity)
1106: ,DECODE(SUM(NVL(mtlt.secondary_quantity,0)),0,NULL,SUM(NVL(mtlt.secondary_quantity,0))) --INVCONV kkillams
1107: FROM mtl_transaction_lots_temp mtlt

Line 1159: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, serial_number)

1155: IF l_debug = 1 THEN
1156: print_debug('Populating Temp Table for a Serial Ctrl Item', l_api_name, g_info);
1157: END IF;
1158:
1159: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, serial_number)
1160: SELECT p_transaction_temp_id, msn.serial_number
1161: FROM mtl_serial_numbers msn
1162: WHERE p_transaction_temp_id IS NOT NULL
1163: AND msn.group_mark_id = p_transaction_temp_id

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

1196: IF l_debug = 1 THEN
1197: print_debug('Populating Temp Table for a Lot and Serial Ctrl Item', l_api_name, g_info);
1198: END IF;
1199:
1200: INSERT INTO mtl_allocations_gtmp(transaction_temp_id, lot_number, serial_number, transaction_quantity, primary_quantity)
1201: SELECT p_transaction_temp_id, mtlt.lot_number, msn.serial_number, 1, 1
1202: FROM mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn
1203: WHERE p_transaction_temp_id IS NOT NULL
1204: AND mtlt.transaction_temp_id = p_transaction_temp_id

Line 1294: DELETE mtl_allocations_gtmp;

1290: END IF;
1291: END IF;
1292:
1293: -- First clear Allocations Temp Table.
1294: DELETE mtl_allocations_gtmp;
1295:
1296: IF l_lot_control_code = 2 AND l_serial_control_code IN(1, 6) THEN
1297: populate_tt_lot(x_return_status, p_transaction_temp_id, p_mo_line_id);
1298: ELSIF l_lot_control_code = 1 AND l_serial_control_code NOT IN(1, 6) THEN