DBA Data[Home] [Help]

APPS.WMS_TASK_LOAD dependencies on MTL_TRANSACTION_LOTS_TEMP

Line 157: (p_lot_record IN mtl_transaction_lots_temp%ROWTYPE

153: ,p_substitute_lots IN VARCHAR2 --/* Bug 12670785 Lot Substitution enhancement for Serial Items ER */
154: ,p_full_lot_allocation IN VARCHAR2); -- Added for 14699845 (Flexible Lot Allocation)
155:
156: PROCEDURE proc_insert_mtlt
157: (p_lot_record IN mtl_transaction_lots_temp%ROWTYPE
158: ,x_return_status OUT NOCOPY VARCHAR2
159: ,x_msg_count OUT NOCOPY NUMBER
160: ,x_msg_data OUT NOCOPY VARCHAR2);
161:

Line 375: l_mtlt_rec mtl_transaction_lots_temp%ROWTYPE;

371: l_transaction_uom2 VARCHAR2(3);
372: l_conversion_factor NUMBER;
373: l_conversion_factor1 NUMBER;
374: l_conversion_factor2 NUMBER;
375: l_mtlt_rec mtl_transaction_lots_temp%ROWTYPE;
376: l_row_exists NUMBER;
377: i NUMBER;
378: j NUMBER;
379: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);

Line 416: FROM mtl_transaction_lots_temp

412:
413: CURSOR mtlt_cursor(v_transaction_temp_id NUMBER) IS
414: SELECT lot_number, primary_quantity, transaction_quantity, secondary_quantity
415: , serial_transaction_temp_id
416: FROM mtl_transaction_lots_temp
417: WHERE transaction_temp_id = v_transaction_temp_id
418: ORDER BY lot_number
419: FOR UPDATE;
420:

Line 601: FROM mtl_transaction_lots_temp

597:
598: BEGIN
599: SELECT serial_transaction_temp_id
600: INTO l_serial_transaction_temp_id
601: FROM mtl_transaction_lots_temp
602: WHERE transaction_temp_id = p_transaction_temp_id2
603: AND lot_number = l_lot_table1(i).lot_number;
604:
605: l_row_exists := 1;

Line 633: UPDATE mtl_transaction_lots_temp

629: IF (l_debug = 1) THEN
630: mydebug(i || 'Deleting Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
631: END IF;
632:
633: UPDATE mtl_transaction_lots_temp
634: SET primary_quantity = primary_quantity + l_lot_table1(i).delta_primary_quantity,
635: transaction_quantity = transaction_quantity +
636: Round(l_lot_table1(i).delta_primary_quantity * l_conversion_factor2,
637: l_g_decimal_precision),

Line 644: DELETE FROM mtl_transaction_lots_temp

640: last_updated_by = p_user_id
641: WHERE transaction_temp_id = p_transaction_temp_id2
642: AND lot_number = l_lot_table1(i).lot_number;
643:
644: DELETE FROM mtl_transaction_lots_temp
645: WHERE transaction_temp_id = p_transaction_temp_id1
646: AND lot_number = l_lot_table1(i).lot_number;
647:
648: ELSE -- row does not exist in 2

Line 654: UPDATE mtl_transaction_lots_temp

650: IF (l_debug = 1) THEN
651: mydebug(i || 'Transferring Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
652: END IF;
653:
654: UPDATE mtl_transaction_lots_temp
655: SET transaction_temp_id = p_transaction_temp_id2,
656: transaction_quantity = Round(primary_quantity * l_conversion_factor2, l_g_decimal_precision),
657: last_update_date = Sysdate,
658: last_updated_by = p_user_id

Line 666: UPDATE mtl_transaction_lots_temp

662: END IF;
663:
664: ELSIF l_lot_table1(i).update_mtlt THEN
665:
666: UPDATE mtl_transaction_lots_temp
667: SET primary_quantity = l_lot_table1(i).primary_quantity,
668: transaction_quantity = Round(l_lot_table1(i).primary_quantity * l_conversion_factor, l_g_decimal_precision),
669: secondary_quantity = l_lot_table1(i).secondary_quantity,
670: last_update_date = Sysdate,

Line 681: UPDATE mtl_transaction_lots_temp

677: IF (l_debug = 1) THEN
678: mydebug(i || 'Updating Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
679: END IF;
680:
681: UPDATE mtl_transaction_lots_temp
682: SET primary_quantity = primary_quantity + l_lot_table1(i).delta_primary_quantity,
683: transaction_quantity = transaction_quantity + Round(l_lot_table1(i).delta_primary_quantity * l_conversion_factor2,
684: l_g_decimal_precision),
685: secondary_quantity = secondary_quantity + l_lot_table1(i).delta_secondary_quantity,

Line 698: FROM mtl_transaction_lots_temp

694: END IF;
695:
696: SELECT *
697: INTO l_mtlt_rec
698: FROM mtl_transaction_lots_temp
699: WHERE transaction_temp_id = p_transaction_temp_id1
700: AND lot_number = l_lot_table1(i).lot_number;
701:
702: l_mtlt_rec.transaction_temp_id := p_transaction_temp_id2;

Line 954: FROM mtl_transaction_lots_temp

950:
951: BEGIN
952: SELECT serial_transaction_temp_id
953: INTO l_serial_transaction_temp_id
954: FROM mtl_transaction_lots_temp
955: WHERE transaction_temp_id = p_transaction_temp_id2
956: AND lot_number = l_lot_table1(i).lot_number;
957:
958: l_row_exists := 1;

Line 1031: UPDATE mtl_transaction_lots_temp

1027: IF (l_debug = 1) THEN
1028: mydebug(i || 'Deleting Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
1029: END IF;
1030:
1031: UPDATE mtl_transaction_lots_temp
1032: SET primary_quantity = primary_quantity + l_lot_table1(i).delta_primary_quantity,
1033: transaction_quantity = transaction_quantity +
1034: Round(l_lot_table1(i).delta_primary_quantity * l_conversion_factor2,
1035: l_g_decimal_precision),

Line 1041: DELETE FROM mtl_transaction_lots_temp

1037: last_updated_by = p_user_id
1038: WHERE transaction_temp_id = p_transaction_temp_id2
1039: AND lot_number = l_lot_table1(i).lot_number;
1040:
1041: DELETE FROM mtl_transaction_lots_temp
1042: WHERE transaction_temp_id = p_transaction_temp_id1
1043: AND lot_number = l_lot_table1(i).lot_number;
1044:
1045: ELSE -- row does not exist in 2

Line 1051: UPDATE mtl_transaction_lots_temp

1047: IF (l_debug = 1) THEN
1048: mydebug(i || 'Transferring Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
1049: END IF;
1050:
1051: UPDATE mtl_transaction_lots_temp
1052: SET transaction_temp_id = p_transaction_temp_id2,
1053: serial_transaction_temp_id = l_serial_transaction_temp_id,
1054: transaction_quantity = Round(primary_quantity * l_conversion_factor2, l_g_decimal_precision),
1055: last_update_date = Sysdate,

Line 1064: UPDATE mtl_transaction_lots_temp

1060: END IF;
1061:
1062: ELSIF l_lot_table1(i).update_mtlt THEN
1063:
1064: UPDATE mtl_transaction_lots_temp
1065: SET primary_quantity = l_lot_table1(i).primary_quantity,
1066: transaction_quantity = Round(l_lot_table1(i).primary_quantity * l_conversion_factor, l_g_decimal_precision),
1067: secondary_quantity = l_lot_table1(i).secondary_quantity,
1068: last_update_date = Sysdate,

Line 1079: UPDATE mtl_transaction_lots_temp

1075: IF (l_debug = 1) THEN
1076: mydebug(i || 'Updating Lot Number: ' || l_lot_table1(i).lot_number, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
1077: END IF;
1078:
1079: UPDATE mtl_transaction_lots_temp
1080: SET primary_quantity = primary_quantity + l_lot_table1(i).delta_primary_quantity,
1081: transaction_quantity = transaction_quantity + Round(l_lot_table1(i).delta_primary_quantity * l_conversion_factor2,
1082: l_g_decimal_precision),
1083: last_update_date = Sysdate,

Line 1095: FROM mtl_transaction_lots_temp

1091: END IF;
1092:
1093: SELECT *
1094: INTO l_mtlt_rec
1095: FROM mtl_transaction_lots_temp
1096: WHERE transaction_temp_id = p_transaction_temp_id1
1097: AND lot_number = l_lot_table1(i).lot_number;
1098:
1099: l_mtlt_rec.transaction_temp_id := p_transaction_temp_id2;

Line 3307: FROM mtl_transaction_lots_temp

3303: IF ((p_exception='OVER' OR l_fulfillment_base = 'S') AND p_lot_controlled='Y' AND p_full_lot_allocation='Y') THEN --Modified for 14699845 (Flexible Lot Allocation)
3304:
3305: SELECT SUM(primary_quantity), SUM(transaction_quantity), SUM(SECONDARY_QUANTITY)
3306: INTO l_rem_lot_pri_qty, l_rem_lot_trx_qty, l_rem_lot_sec_qty
3307: FROM mtl_transaction_lots_temp
3308: WHERE transaction_temp_id = p_transaction_temp_id
3309: GROUP BY transaction_temp_id;
3310:
3311: UPDATE mtl_material_transactions_temp

Line 3494: FROM mtl_transaction_lots_temp mtlt

3490:
3491: CURSOR cur_mtlt_to_copy_from (p_lot_number VARCHAR2
3492: ,p_lot_transaction_temp_id NUMBER ) IS
3493: SELECT mtlt.*
3494: FROM mtl_transaction_lots_temp mtlt
3495: WHERE transaction_temp_id = p_lot_transaction_temp_id
3496: AND lot_number = p_lot_number;
3497:
3498: l_rec_mtlt_to_copy_from mtl_transaction_lots_temp%ROWTYPE;

Line 3498: l_rec_mtlt_to_copy_from mtl_transaction_lots_temp%ROWTYPE;

3494: FROM mtl_transaction_lots_temp mtlt
3495: WHERE transaction_temp_id = p_lot_transaction_temp_id
3496: AND lot_number = p_lot_number;
3497:
3498: l_rec_mtlt_to_copy_from mtl_transaction_lots_temp%ROWTYPE;
3499:
3500: CURSOR cur_confirmed_lots_serials IS
3501: SELECT DISTINCT -- so that we get only lot records in case of lot+Serial item control
3502: lot_number

Line 3522: FROM mtl_transaction_lots_temp

3518: primary_quantity, secondary_quantity --BUG12670785
3519: FROM mtl_allocations_gtmp
3520: WHERE lot_number NOT IN (
3521: SELECT DISTINCT lot_number
3522: FROM mtl_transaction_lots_temp
3523: WHERE transaction_temp_id = p_lot_transaction_temp_id)
3524: ORDER BY lot_number;
3525:
3526: CURSOR cur_mtlts_deleted_ls IS

Line 3527: SELECT mtlt.transaction_temp_id, mtlt.lot_number, mtlt.primary_quantity FROM mtl_transaction_lots_temp mtlt

3523: WHERE transaction_temp_id = p_lot_transaction_temp_id)
3524: ORDER BY lot_number;
3525:
3526: CURSOR cur_mtlts_deleted_ls IS
3527: SELECT mtlt.transaction_temp_id, mtlt.lot_number, mtlt.primary_quantity FROM mtl_transaction_lots_temp mtlt
3528: WHERE mtlt.lot_number NOT IN (SELECT mag.lot_number FROM mtl_allocations_gtmp mag)
3529: AND mtlt.transaction_temp_id = p_transaction_temp_id;
3530:
3531: --/* Bug 9448490 Lot Substitution Project */ end

Line 3662: DELETE FROM mtl_transaction_lots_temp mtlt

3658: END LOOP;
3659: CLOSE cur_mtlts_deleted_ls;
3660:
3661:
3662: DELETE FROM mtl_transaction_lots_temp mtlt
3663: WHERE mtlt.lot_number NOT IN (SELECT NVL(lot_number, '@####') FROM mtl_allocations_gtmp) --Added NVL as in some cases p_lot_numbers had ':' extra causing insert with null values
3664: AND mtlt.transaction_temp_id = p_transaction_temp_id;
3665: --Debug stmts
3666: END IF;

Line 3777: UPDATE mtl_transaction_lots_temp

3773: -- lot qty in the selected, in the above cursor, MTLT equals qty that is needed for the new MTLT
3774: -- update the MTLT with new temp id instead of inserting a new and then deleting the old one
3775: l_progress := '200';
3776: mydebug('l_progress: ' || l_progress );
3777: UPDATE mtl_transaction_lots_temp
3778: SET transaction_temp_id = p_new_transaction_temp_id
3779: , transaction_quantity = rec_confirmed_lots_serials.transaction_quantity
3780: , primary_quantity = rec_confirmed_lots_serials.primary_quantity
3781: , secondary_quantity = rec_confirmed_lots_serials.secondary_quantity

Line 3819: UPDATE mtl_transaction_lots_temp

3815: -- the original MTLT still has some qty remaining...so update it.
3816: -- the original MTLT need not be adjusted for secondary quantity.
3817: -- It is not expected to be populated
3818: IF(p_fulfillment_base = 'S') THEN
3819: UPDATE mtl_transaction_lots_temp
3820: SET transaction_quantity = l_calc_lot_txn_qty
3821: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3822: ,secondary_quantity = secondary_quantity - rec_confirmed_lots_serials.secondary_quantity
3823: ,last_update_date = SYSDATE

Line 3831: UPDATE mtl_transaction_lots_temp

3827: IF SQL%NOTFOUND THEN
3828: RAISE fnd_api.G_EXC_ERROR;
3829: END IF;
3830: ELSE
3831: UPDATE mtl_transaction_lots_temp
3832: SET transaction_quantity = transaction_quantity - rec_confirmed_lots_serials.suggested_quantity
3833: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3834: ,secondary_quantity = NVL(secondary_quantity, rec_confirmed_lots_serials.secondary_quantity) - rec_confirmed_lots_serials.secondary_quantity
3835: ,last_update_date = SYSDATE

Line 3857: UPDATE mtl_transaction_lots_temp

3853: IF p_update = 'Y2'
3854: THEN
3855: l_progress := '240';
3856: mydebug('l_progress: ' || l_progress );
3857: UPDATE mtl_transaction_lots_temp
3858: SET transaction_quantity = transaction_quantity + rec_confirmed_lots_serials.transaction_quantity
3859: ,primary_quantity = primary_quantity + rec_confirmed_lots_serials.primary_quantity
3860: ,secondary_quantity = secondary_quantity + rec_confirmed_lots_serials.secondary_quantity
3861: ,last_update_date = SYSDATE

Line 3876: UPDATE mtl_transaction_lots_temp

3872: --lot qty in the selected MTLT = qty that is needed for the new MTLT
3873: --update the MTLT with new temp id instead of inserting a new and then deleting the old one
3874: l_progress := '250';
3875: mydebug('l_progress: ' || l_progress );
3876: UPDATE mtl_transaction_lots_temp
3877: SET transaction_temp_id = p_transaction_temp_id_to_merge --p_new_transaction_temp_id
3878: , secondary_quantity = rec_confirmed_lots_serials.secondary_quantity
3879: , secondary_unit_of_measure = p_confirmed_sec_uom
3880: -- For lot + serial controlled items

Line 3913: UPDATE mtl_transaction_lots_temp

3909: mydebug('l_progress: ' || l_progress );
3910: -- If new MTLT is inserted for p_transaction_temp_id_to_merge this means
3911: -- the original MTLT still has some qty remaining...so update it.
3912: IF(p_fulfillment_base = 'S') THEN
3913: UPDATE mtl_transaction_lots_temp
3914: SET transaction_quantity = l_calc_lot_txn_qty
3915: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3916: ,secondary_quantity = secondary_quantity - rec_confirmed_lots_serials.secondary_quantity
3917: ,last_update_date = SYSDATE

Line 3925: UPDATE mtl_transaction_lots_temp

3921: IF SQL%NOTFOUND THEN
3922: RAISE fnd_api.G_EXC_ERROR;
3923: END IF;
3924: ELSE
3925: UPDATE mtl_transaction_lots_temp
3926: SET transaction_quantity = transaction_quantity - rec_confirmed_lots_serials.suggested_quantity
3927: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3928: ,secondary_quantity = NVL(secondary_quantity, rec_confirmed_lots_serials.secondary_quantity) - rec_confirmed_lots_serials.secondary_quantity
3929: ,last_update_date = SYSDATE

Line 3950: DELETE mtl_transaction_lots_temp

3946: l_progress := '290';
3947: mydebug('l_progress: ' || l_progress );
3948: -- If all the qty from the original MTLT is consumed and merged to the
3949: -- p_transaction_temp_id_to_merge we do not need the original MTLT ..delete it
3950: DELETE mtl_transaction_lots_temp
3951: WHERE transaction_temp_id = p_transaction_temp_id -- l_rec_mtlt_to_copy_from.transaction_temp_id
3952: AND lot_number = rec_confirmed_lots_serials.lot_number;
3953: IF SQL%NOTFOUND THEN
3954: RAISE fnd_api.G_EXC_ERROR;

Line 3962: UPDATE mtl_transaction_lots_temp

3958: -- attached to p_transaction_temp_id .. as selected in the cursor above
3959: l_progress := '300';
3960: mydebug('l_progress: ' || l_progress );
3961: IF(p_fulfillment_base = 'S') THEN
3962: UPDATE mtl_transaction_lots_temp
3963: SET transaction_quantity = l_calc_lot_txn_qty
3964: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3965: ,secondary_quantity = rec_confirmed_lots_serials.secondary_quantity - rec_confirmed_lots_serials.secondary_quantity
3966: ,last_update_date = SYSDATE

Line 3974: UPDATE mtl_transaction_lots_temp

3970: IF SQL%NOTFOUND THEN
3971: RAISE fnd_api.G_EXC_ERROR;
3972: END IF;
3973: ELSE
3974: UPDATE mtl_transaction_lots_temp
3975: SET transaction_quantity = transaction_quantity - rec_confirmed_lots_serials.suggested_Quantity
3976: ,primary_quantity = primary_quantity - rec_confirmed_lots_serials.primary_quantity
3977: ,secondary_quantity = NVL(secondary_quantity, rec_confirmed_lots_serials.secondary_quantity) - rec_confirmed_lots_serials.secondary_quantity
3978: ,last_update_date = SYSDATE

Line 4008: UPDATE mtl_transaction_lots_temp

4004:
4005: THEN
4006: l_progress := '350';
4007: mydebug('l_progress: ' || l_progress );
4008: UPDATE mtl_transaction_lots_temp
4009: SET
4010: transaction_quantity = rec_confirmed_lots_serials.transaction_quantity
4011: ,primary_quantity = rec_confirmed_lots_serials.primary_quantity
4012: ,secondary_quantity = rec_confirmed_lots_serials.secondary_quantity

Line 4039: UPDATE mtl_transaction_lots_temp

4035: p_exception = 'OVER')
4036: THEN
4037: l_progress := '360';
4038: mydebug('l_progress: ' || l_progress );
4039: UPDATE mtl_transaction_lots_temp
4040: SET
4041: transaction_quantity = rec_confirmed_lots_serials.transaction_quantity
4042: ,primary_quantity = rec_confirmed_lots_serials.primary_quantity
4043: ,secondary_quantity = rec_confirmed_lots_serials.secondary_quantity

Line 4488: ( p_lot_record IN mtl_transaction_lots_temp%ROWTYPE

4484:
4485: END proc_process_confirmed_serials;
4486:
4487: PROCEDURE proc_insert_mtlt
4488: ( p_lot_record IN mtl_transaction_lots_temp%ROWTYPE
4489: ,x_return_status OUT NOCOPY VARCHAR2
4490: ,x_msg_count OUT NOCOPY NUMBER
4491: ,x_msg_data OUT NOCOPY VARCHAR2)
4492: IS

Line 4498: INSERT INTO mtl_transaction_lots_temp

4494: l_progress VARCHAR2(30) := '100';
4495: BEGIN
4496: mydebug('In.. ' || l_proc_name);
4497: x_return_status := l_g_ret_sts_success;
4498: INSERT INTO mtl_transaction_lots_temp
4499: (transaction_temp_id
4500: ,last_update_date
4501: ,last_updated_by
4502: ,creation_date

Line 5426: l_rec_mtlt_to_copy_from mtl_transaction_lots_temp%ROWTYPE;

5422: l_new_transaction_temp_id NUMBER := NULL;
5423: l_serial_transaction_temp_id NUMBER := NULL;
5424: l_transaction_temp_id NUMBER := NULL;
5425: l_original_sub_loc VARCHAR2(1) := 'N';
5426: l_rec_mtlt_to_copy_from mtl_transaction_lots_temp%ROWTYPE;
5427: l_suggested_mmtt_qty NUMBER := 0;
5428: l_suggested_mtlt_qty NUMBER := 0;
5429: -- bug #4141928 INV CONV
5430: l_suggested_mmtt_sec_qty NUMBER := 0;

Line 5487: FROM mtl_transaction_lots_temp mtlt

5483: , sum(mtlt.secondary_quantity) group_lot_secondary_quantity
5484: ,COUNT(*) group_lot_count
5485: ,MIN(mtlt.transaction_temp_id) group_lot_temp_id
5486: ,mtlt.lot_number
5487: FROM mtl_transaction_lots_temp mtlt
5488: , mtl_material_transactions_temp mmtt
5489: WHERE mmtt.transaction_header_id = p_transaction_header_id
5490: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
5491: AND mmtt.subinventory_code = p_subinventory_code

Line 5758: FROM mtl_transaction_lots_temp

5754: BEGIN
5755:
5756: SELECT 'Y'
5757: INTO l_lot_alloc_exist
5758: FROM mtl_transaction_lots_temp
5759: WHERE transaction_temp_id = p_transaction_temp_id
5760: AND ROWNUM = 1;
5761:
5762: mydebug('FlexibleLotAlloc: l_lot_alloc_exist ' || l_lot_alloc_exist);

Line 5847: FROM mtl_transaction_lots_temp mtlt

5843: , last_update_date = SYSDATE
5844: , last_updated_by = p_user_id
5845: WHERE transaction_temp_id IN
5846: (SELECT mtlt.serial_transaction_temp_id
5847: FROM mtl_transaction_lots_temp mtlt
5848: , mtl_material_transactions_temp mmtt
5849: WHERE mmtt.transaction_header_id = p_transaction_header_id
5850: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
5851: AND mmtt.subinventory_code = rec_mmtt1.subinventory_code

Line 5891: FROM mtl_transaction_lots_temp mtlt

5887: ,serial_number)
5888: IN (SELECT mmtt.organization_id
5889: ,mmtt.inventory_item_id
5890: ,msnt.fm_serial_number
5891: FROM mtl_transaction_lots_temp mtlt
5892: ,mtl_serial_numbers_temp msnt
5893: ,mtl_material_transactions_temp mmtt
5894: WHERE mmtt.transaction_header_id = p_transaction_header_id
5895: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id

Line 5930: FROM mtl_transaction_lots_temp mtlt

5926: DELETE mtl_serial_numbers_temp
5927: WHERE transaction_temp_id
5928: IN
5929: (SELECT mtlt.serial_transaction_temp_id
5930: FROM mtl_transaction_lots_temp mtlt
5931: , mtl_material_transactions_temp mmtt
5932: WHERE mmtt.transaction_header_id = p_transaction_header_id
5933: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
5934: AND mmtt.subinventory_code = rec_mmtt1.subinventory_code

Line 6024: UPDATE MTL_transaction_lots_temp mtlt

6020: So, there is no harm is updating qty too */
6021: l_progress := 1500;
6022: mydebug('l_progress .. ' || l_progress);
6023: IF (l_lot_alloc_exist ='Y') THEN -- Added for 14699845 (Flexible Lot Allocation)
6024: UPDATE MTL_transaction_lots_temp mtlt
6025: SET transaction_temp_id = rec_mmtt1.group_temp_id
6026: , primary_quantity = rec_mtlt1.group_lot_primary_quantity
6027: , transaction_quantity = l_suggested_mtlt_qty
6028: , secondary_quantity = decode (secondary_quantity, null, null, l_suggested_mtlt_sec_qty)

Line 6043: DELETE mtl_transaction_lots_temp

6039: mydebug('l_progress .. ' || l_progress);
6040: IF rec_mtlt1.group_lot_count > 1 THEN
6041: l_progress := 230;
6042: mydebug('l_progress .. ' || l_progress);
6043: DELETE mtl_transaction_lots_temp
6044: WHERE lot_number = rec_mtlt1.lot_number
6045: AND transaction_temp_id
6046: IN
6047: (SELECT mtlt.transaction_temp_id

Line 6049: ,mtl_transaction_lots_temp mtlt

6045: AND transaction_temp_id
6046: IN
6047: (SELECT mtlt.transaction_temp_id
6048: FROM mtl_material_transactions_temp mmtt
6049: ,mtl_transaction_lots_temp mtlt
6050: WHERE mmtt.transaction_header_id = p_transaction_header_id
6051: AND mmtt.transaction_temp_id <> rec_mmtt1.group_temp_id
6052: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
6053: AND mtlt.lot_number = rec_mtlt1.lot_number

Line 7542: FROM mtl_transaction_lots_temp

7538: WHERE mmtt.transaction_header_id = p_transaction_header_id;
7539:
7540: CURSOR lot_csr IS
7541: SELECT lot_number, serial_transaction_temp_id
7542: FROM mtl_transaction_lots_temp
7543: WHERE transaction_temp_id = p_temp_id;
7544:
7545: CURSOR insert_serial_allocated_csr (p_serial_lot_number VARCHAR2) IS
7546: SELECT serial_number

Line 7555: mtl_transaction_lots_temp mtlt,

7551: AND NVL(msn.lot_number,'@@') = NVL(p_serial_lot_number, '@@')
7552: AND msn.serial_number NOT IN
7553: ( select msnt.fm_serial_number
7554: from mtl_serial_numbers_temp msnt,
7555: mtl_transaction_lots_temp mtlt,
7556: mtl_material_transactions_temp mmtt
7557: where mmtt.inventory_item_id = p_item_id
7558: AND mmtt.organization_id = p_organization_id
7559: and mtlt.transaction_temp_id(+) = mmtt.transaction_temp_id

Line 7566: FROM mtl_material_transactions_temp mmtt, mtl_transaction_lots_temp mtlt

7562: and mmtt.transaction_temp_id = p_temp_id);
7563:
7564: CURSOR get_mmtt_qty (p_reservation_id NUMBER) IS
7565: SELECT NVL(SUM(mtlt.primary_quantity) , SUM(mmtt.primary_quantity))
7566: FROM mtl_material_transactions_temp mmtt, mtl_transaction_lots_temp mtlt
7567: WHERE mmtt.reservation_id = p_reservation_id
7568: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id(+);
7569:
7570: l_new_mmtt_qty NUMBER;

Line 8431: FROM mtl_transaction_lots_temp mtlt

8427: CURSOR lot_csr IS
8428: SELECT mtlt.primary_quantity
8429: , NVL(mtlt.secondary_quantity, 0) -- Bug #4141928
8430: , mtlt.lot_number
8431: FROM mtl_transaction_lots_temp mtlt
8432: WHERE mtlt.transaction_temp_id = p_temp_id
8433: --added material status check for lot under bug8398578
8434: AND inv_material_status_grp.is_status_applicable(
8435: p_wms_installed

Line 8470: FROM mtl_transaction_lots_temp mtlt

8466: AND inventory_item_id = p_item_id
8467: AND (revision = p_rev OR (revision IS NULL AND p_rev IS NULL))
8468: AND lot_number NOT IN (
8469: SELECT mtlt.lot_number
8470: FROM mtl_transaction_lots_temp mtlt
8471: WHERE mtlt.transaction_temp_id = p_temp_id
8472: )
8473: AND lot_number IS NOT NULL
8474: GROUP BY lot_number

Line 8928: FROM mtl_transaction_lots_temp mtlt

8924: AND NVL(wlc.revision, '-999') = NVL(p_rev, '-999')
8925: AND (p_changelotNoException <> 'N'
8926: OR (p_full_lot_allocation IN ('N', 'P'))
8927: OR EXISTS (SELECT 1
8928: FROM mtl_transaction_lots_temp mtlt
8929: WHERE mtlt.transaction_temp_id = p_temp_id
8930: AND mtlt.lot_number = wlc.lot_number)
8931: )); -- Modified for 14699845 (Flexible Lot Allocation)
8932:

Line 9061: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt

9057: END IF;
9058:
9059: SELECT COUNT(fm_serial_number)
9060: INTO l_serial_exist_cnt
9061: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt
9062: WHERE mtlt.transaction_temp_id = p_temp_id
9063: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id
9064: AND msnt.fm_serial_number IN(
9065: SELECT serial_number

Line 9809: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt

9805: END IF;
9806:
9807: SELECT COUNT(fm_serial_number)
9808: INTO l_serial_exist_cnt
9809: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt
9810: WHERE mtlt.transaction_temp_id = p_temp_id
9811: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id
9812: AND msnt.fm_serial_number IN(
9813: SELECT serial_number

Line 10344: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt

10340: AND p_action = 4 THEN
10341:
10342: SELECT COUNT(fm_serial_number)
10343: INTO l_total_serial_cnt
10344: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt
10345: WHERE mtlt.transaction_temp_id = p_temp_id
10346: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id;
10347:
10348: IF (l_debug = 1) THEN

Line 11522: mtl_transaction_lots_temp mtlt,

11518: transaction_quantity,
11519: primary_quantity)
11520: SELECT mtlt.lot_number,fm_serial_number,1,1
11521: FROM mtl_serial_numbers_temp msnt,
11522: mtl_transaction_lots_temp mtlt,
11523: mtl_serial_numbers msn
11524: WHERE mtlt.transaction_temp_id = p_temp_id
11525: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id
11526: AND msnt.fm_serial_number = msn.serial_number

Line 11609: FROM mtl_transaction_lots_temp mtlt,

11605: serial_number,
11606: transaction_quantity,
11607: primary_quantity)
11608: SELECT mtlt.lot_number, serial_number, 1, 1
11609: FROM mtl_transaction_lots_temp mtlt,
11610: mtl_serial_numbers msn
11611: WHERE mtlt.transaction_temp_id = p_temp_id
11612: AND msn.lpn_id = p_fromlpn_id
11613: AND mtlt.lot_number = msn.lot_number

Line 12064: FROM mtl_transaction_lots_temp mtlt

12060: SELECT mtlt.primary_quantity
12061: , mtlt.transaction_quantity
12062: , NVL(mtlt.secondary_quantity, 0) -- Bug #4141928
12063: , mtlt.lot_number
12064: FROM mtl_transaction_lots_temp mtlt
12065: WHERE mtlt.transaction_temp_id = p_temp_id
12066: --added material status check for lot under bug8398578
12067: AND inv_material_status_grp.is_status_applicable(
12068: NULL

Line 12107: FROM mtl_transaction_lots_temp mtlt

12103: AND inventory_item_id = p_item_id
12104: AND (revision = p_rev OR (revision IS NULL AND p_rev IS NULL))
12105: AND lot_number NOT IN (
12106: SELECT mtlt.lot_number
12107: FROM mtl_transaction_lots_temp mtlt
12108: WHERE mtlt.transaction_temp_id = p_temp_id
12109: )
12110: AND lot_number IS NOT NULL
12111: GROUP BY lot_number

Line 12116: FROM mtl_transaction_lots_temp mtlt

12112: UNION
12113: SELECT mtlt.primary_quantity
12114: , mtlt.transaction_quantity
12115: , mtlt.lot_number
12116: FROM mtl_transaction_lots_temp mtlt
12117: WHERE mtlt.transaction_temp_id = p_temp_id
12118: ORDER BY lot_number;
12119: --/* Bug 9448490 Lot Substitution Project */ end
12120:

Line 12169: mtl_transaction_lots_temp mtlt,

12165: transaction_quantity,
12166: primary_quantity)
12167: SELECT mtlt.lot_number,fm_serial_number,1,1
12168: FROM mtl_serial_numbers_temp msnt,
12169: mtl_transaction_lots_temp mtlt,
12170: mtl_serial_numbers msn
12171: WHERE mtlt.transaction_temp_id = p_temp_id
12172: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id
12173: AND msnt.fm_serial_number = msn.serial_number

Line 14268: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt,

14264: l_count := 0;
14265: BEGIN
14266: SELECT 1
14267: INTO l_count
14268: FROM mtl_serial_numbers_temp msnt, mtl_transaction_lots_temp mtlt,
14269: mtl_material_transactions_temp mmtt
14270: WHERE (p_from_serial BETWEEN msnt.fm_serial_number AND msnt.to_serial_number
14271: OR p_to_serial BETWEEN msnt.fm_serial_number AND msnt.to_serial_number)
14272: AND mmtt.inventory_item_id = p_item_id

Line 14296: FROM mtl_transaction_lots_temp

14292: begin
14293:
14294: SELECT serial_transaction_temp_id
14295: INTO p_serial_transaction_temp_id
14296: FROM mtl_transaction_lots_temp
14297: WHERE transaction_temp_id = p_transaction_temp_id
14298: AND lot_number= p_lot;
14299: exception
14300: when others then

Line 14314: UPDATE mtl_transaction_lots_temp

14310: FROM DUAL;
14311:
14312: l_progress := '50';
14313:
14314: UPDATE mtl_transaction_lots_temp
14315: SET serial_transaction_temp_id = p_serial_transaction_temp_id
14316: WHERE transaction_temp_id = p_transaction_temp_id
14317: AND lot_number= p_lot;
14318:

Line 14483: mtl_transaction_lots_temp mtlt

14479: l_lot,
14480: l_transaction_action_id, -- Bug 4632519
14481: l_transaction_type_id -- Bug 4632519
14482: from mtl_material_Transactions_temp mmtt,
14483: mtl_transaction_lots_temp mtlt
14484: where mmtt.inventory_item_id = p_inventory_item_id
14485: and mmtt.organization_id = p_organization_id
14486: and mmtt.transfer_lpn_id = p_transfer_lpn_id
14487: and mmtt.content_lpn_id is null

Line 14584: INSERT INTO mtl_transaction_lots_temp

14580:
14581: BEGIN
14582: x_return_status := fnd_api.g_ret_sts_success;
14583: mydebug(' Inside insert mtlt' );
14584: INSERT INTO mtl_transaction_lots_temp
14585: (
14586: transaction_temp_id
14587: , last_update_date
14588: , last_updated_by

Line 14874: FROM mtl_transaction_lots_temp mtlt

14870: AND inventory_item_id = p_item_id
14871: AND (revision = p_rev OR (revision IS NULL AND p_rev IS NULL))
14872: AND lot_number NOT IN (
14873: SELECT mtlt.lot_number
14874: FROM mtl_transaction_lots_temp mtlt
14875: WHERE mtlt.transaction_temp_id = p_temp_id
14876: )
14877: AND lot_number IS NOT NULL
14878: GROUP BY lot_number

Line 14893: FROM mtl_transaction_lots_temp mtlt

14889: AND inventory_item_id = p_item_id
14890: AND (revision = p_rev OR (revision IS NULL AND p_rev IS NULL))
14891: AND lot_number NOT IN (
14892: SELECT mtlt.lot_number
14893: FROM mtl_transaction_lots_temp mtlt
14894: WHERE mtlt.transaction_temp_id = p_temp_id
14895: )
14896: AND lot_number IS NOT NULL
14897: GROUP BY lot_number

Line 15373: UPDATE mtl_transaction_lots_temp

15369: mydebug ('Inside proc_decrement_allocated_mtlts before update to MTLT l_sec_qty :' || l_sec_qty);
15370: mydebug ('Inside proc_decrement_allocated_mtlts before l_tuom :' || l_tuom);
15371: mydebug ('Inside proc_decrement_allocated_mtlts before update to MTLT l_txn_qty :' || l_txn_qty);
15372:
15373: UPDATE mtl_transaction_lots_temp
15374: SET transaction_quantity = l_txn_qty,
15375: primary_quantity = l_prim_qty,
15376: secondary_quantity = l_sec_qty
15377: WHERE transaction_temp_id = p_temp_id

Line 15380: DELETE FROM mtl_transaction_lots_temp

15376: secondary_quantity = l_sec_qty
15377: WHERE transaction_temp_id = p_temp_id
15378: AND lot_number = l_lot_number;
15379:
15380: DELETE FROM mtl_transaction_lots_temp
15381: WHERE transaction_quantity = 0
15382: AND transaction_temp_id = p_temp_id
15383: AND lot_number = l_lot_number;
15384: END IF;

Line 15466: FROM wms_lpn_contents wlc, mtl_transaction_lots_temp mtlt

15462: IS
15463: CURSOR c_lots_in_lpn
15464: IS
15465: SELECT mtlt.lot_number, 'Y' allocated_lot
15466: FROM wms_lpn_contents wlc, mtl_transaction_lots_temp mtlt
15467: WHERE wlc.parent_lpn_id = p_lpn_id
15468: AND wlc.organization_id = p_org_id
15469: AND wlc.inventory_item_id = p_item_id
15470: AND NVL (wlc.revision, '-999') = NVL (p_rev, '-999')

Line 15482: FROM mtl_transaction_lots_temp mtlt

15478: AND wlc.inventory_item_id = p_item_id
15479: AND NVL (wlc.revision, '-999') = NVL (p_rev, '-999')
15480: AND NOT EXISTS (
15481: SELECT 1
15482: FROM mtl_transaction_lots_temp mtlt
15483: WHERE mtlt.transaction_temp_id = p_transaction_temp_id
15484: AND mtlt.lot_number = wlc.lot_number);
15485:
15486: CURSOR c_serials_in_lpn (v_lpn_id NUMBER, v_lot_number VARCHAR2)

Line 15602: FROM mtl_transaction_lots_temp mtlt

15598: AND NVL(wlc.revision,'-999') = NVL(p_rev,'-999')
15599: AND wlc.organization_id = p_organization_id
15600: AND NOT EXISTS (
15601: SELECT 1
15602: FROM mtl_transaction_lots_temp mtlt
15603: WHERE mtlt.transaction_temp_id = p_transaction_temp_id
15604: AND mtlt.lot_number = wlc.lot_number);
15605:
15606: mydebug ('lpn_has_unalloc_lots: Returning TRUE ');

Line 15648: FROM mtl_transaction_lots_temp mtlt

15644: ,serial_number)
15645: IN (SELECT mmtt.organization_id
15646: ,mmtt.inventory_item_id
15647: ,msnt.fm_serial_number
15648: FROM mtl_transaction_lots_temp mtlt
15649: ,mtl_serial_numbers_temp msnt
15650: ,mtl_material_transactions_temp mmtt
15651: WHERE mmtt.transaction_header_id = p_transaction_header_id
15652: AND mmtt.transaction_temp_id = mtlt.transaction_temp_id

Line 15668: FROM mtl_transaction_lots_temp

15664: mydebug (p_api_name||' Updated '||SQL%ROWCOUNT||' rows in MSN');
15665:
15666: DELETE FROM mtl_serial_numbers_temp
15667: WHERE transaction_temp_id IN ((SELECT serial_transaction_temp_id
15668: FROM mtl_transaction_lots_temp
15669: WHERE transaction_temp_id IN (SELECT transaction_temp_id
15670: FROM mtl_material_transactions_temp
15671: WHERE transaction_header_id = p_transaction_header_id))
15672: UNION

Line 15680: DELETE FROM mtl_transaction_lots_temp

15676:
15677: mydebug (p_api_name||' Deleted '||SQL%ROWCOUNT||' rows from MSNT');
15678: END IF;
15679:
15680: DELETE FROM mtl_transaction_lots_temp
15681: WHERE transaction_temp_id IN (SELECT transaction_temp_id
15682: FROM mtl_material_transactions_temp
15683: WHERE transaction_header_id = p_transaction_header_id);
15684: