DBA Data[Home] [Help]

APPS.INV_PICK_RELEASE_PVT dependencies on INV_PICK_RELEASE_PVT

Line 1: PACKAGE BODY inv_pick_release_pvt AS

1: PACKAGE BODY inv_pick_release_pvt AS
2: /* $Header: INVVPICB.pls 120.45.12020000.7 2013/03/29 16:31:28 brana ship $ */
3:
4: -- Global constant holding the package name
5:

Line 14: g_pkg_name CONSTANT VARCHAR2(30) := 'INV_Pick_Release_PVT';

10:
11: g_backorder_cache all_item_reservation_type;
12: g_cleared_cache all_item_reservation_type;
13:
14: g_pkg_name CONSTANT VARCHAR2(30) := 'INV_Pick_Release_PVT';
15: is_debug BOOLEAN := NULL;
16: g_sub_reservable_type NUMBER := 1;
17: g_transaction_type_id NUMBER;
18: g_transaction_source_type_id NUMBER;

Line 57: print_debug('g_use_backorder_cache = '||g_use_backorder_cache, 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');

53: End If;
54: END IF;
55:
56: if is_debug then
57: print_debug('g_use_backorder_cache = '||g_use_backorder_cache, 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');
58: end if;
59:
60: -- Check whether backorder caching is turned off
61: -- Bug 6997809, the profile value when No is 2, so changing 0 to 2.

Line 69: print_debug('Profile is No, returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');

65:
66: -- Bug 6997809, the profile value when No is 2, so changing 0 to 2.
67: IF g_use_backorder_cache = 2 THEN
68: If is_debug then
69: print_debug('Profile is No, returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');
70: end if;
71: RETURN FALSE;
72: END IF;
73:

Line 88: print_debug('l_quantity_reserved > 0, returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');

84: AND demand_source_line_detail IS NULL;
85:
86: IF l_quantity_reserved > 0 THEN
87: if is_debug then
88: print_debug('l_quantity_reserved > 0, returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');
89: end if;
90: RETURN FALSE;
91: END IF;
92: END IF;

Line 98: print_debug('Found item cache, returning TRUE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');

94: -- IF an entry exists in the cache for this item verify Org and batch then return TRUE
95: IF g_backorder_cache.EXISTS(p_inventory_item_id) THEN
96: IF g_backorder_cache(p_inventory_item_id) = p_org_id THEN
97: if is_debug then
98: print_debug('Found item cache, returning TRUE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');
99: end if;
100: RETURN TRUE;
101: END IF;
102: END IF;

Line 105: print_debug('End returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');

101: END IF;
102: END IF;
103: -- IF no reservation exists or no match found in cache then return FALSE
104: if is_debug then
105: print_debug('End returning FALSE', 'INV_PICK_RELEASE_PVT.CHECK_BACKORDER_CACHE');
106: end if;
107: RETURN FALSE;
108: END;
109:

Line 199: print_debug('Move Order Line not found ' || p_mo_line_id,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

195: INTO l_move_order_type;
196: IF NOT c_mo_type%FOUND THEN
197: x_return_status := fnd_api.g_ret_sts_error;
198: IF is_debug THEN
199: print_debug('Move Order Line not found ' || p_mo_line_id,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
200: END IF;
201: END IF;
202: CLOSE c_mo_type;
203:

Line 226: print_debug('Delivery Detail not found ' || p_mo_line_id,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

222:
223: IF NOT c_detail_info%FOUND THEN
224: x_return_status := fnd_api.g_ret_sts_error;
225: IF is_debug THEN
226: print_debug('Delivery Detail not found ' || p_mo_line_id,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
227: END IF;
228: ELSE
229: l_minmaxinrectype.source_code := l_detail_info.source_code;
230: l_minmaxinrectype.line_id := l_detail_info.source_line_id;

Line 269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

265: x_max_tolerance2 := l_max_quantity2 - l_req_quantity2;
266: x_min_tolerance2 := 0;
267:
268: IF is_debug THEN
269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

266: x_min_tolerance2 := 0;
267:
268: IF is_debug THEN
269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

267:
268: IF is_debug THEN
269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

268: IF is_debug THEN
269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project

Line 273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

269: print_debug('Return Status '||x_return_status,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

270: print_debug('Req Qty '||l_req_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

271: print_debug('Max Qty '||l_max_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
272: print_debug('Min Qty '||l_min_quantity,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

273: print_debug('Qty UOM '||l_quantity_uom,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

274: print_debug('Max Tolerance '||x_max_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

Line 279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

275: print_debug('Min Tolerance '||x_min_tolerance,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
283: END IF;

Line 280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

276: --MUOM Fulfillment Project
277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
283: END IF;
284: END IF; -- if c_detail_info found

Line 281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

277: print_debug('Req Qty2 '||l_detail_info.requested_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
283: END IF;
284: END IF; -- if c_detail_info found
285: CLOSE c_detail_info;

Line 282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');

278: print_debug('Max Qty2 '||l_max_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
279: print_debug('Min Qty2 '||l_min_quantity2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
280: print_debug('Qty UOM2'||l_quantity_uom2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
281: print_debug('Max Tolerance2 '||x_max_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
282: print_debug('Min Tolerance2 '||x_min_tolerance2,'INV_PICK_RELEASE_PVT.GET_TOLERANCE');
283: END IF;
284: END IF; -- if c_detail_info found
285: CLOSE c_detail_info;
286: ELSE

Line 342: 'INV_PICK_RELEASE_PVT.RESERVATION_MATCHES');

338: IF l_mo_from_sub IS NOT NULL THEN
339: IF l_mo_from_sub <> nvl(p_res_rec.subinventory_code,l_mo_from_sub) THEN
340: IF (is_debug) THEN
341: print_debug('Reservation with different SUB to move order skipped ',
342: 'INV_PICK_RELEASE_PVT.RESERVATION_MATCHES');
343: END IF;
344: return 2;
345: END IF;
346: l_mo_from_loc := p_mo_line_rec.from_locator_id;

Line 351: 'INV_PICK_RELEASE_PVT.RESERVATION_MATCHES');

347: IF l_mo_from_loc IS NOT NULL THEN
348: IF l_mo_from_loc <> nvl(p_res_rec.locator_id,l_mo_from_loc) THEN
349: IF (is_debug) THEN
350: print_debug('Reservation with different Locator to move order skipped ',
351: 'INV_PICK_RELEASE_PVT.RESERVATION_MATCHES');
352: END IF;
353: return 2;
354: END IF;
355: END IF;

Line 402: 'INV_PICK_RELEASE_PVT.GET_PICK_SLIP_NUMBER');

398: -- Otherwise calls Inventory's GET_PICK_SLIP_NUMBER
399: IF wsh_code_control.get_code_release_level < '110509' THEN
400: IF (is_debug) THEN
401: print_debug('Calling WSH_PR_PICK_SLIP_NUMBER.GET_PICK_SLIP_NUMBER',
402: 'INV_PICK_RELEASE_PVT.GET_PICK_SLIP_NUMBER');
403: END IF;
404: wsh_pr_pick_slip_number.get_pick_slip_number(
405: p_ps_mode => p_ps_mode
406: , p_pick_grouping_rule_id => p_pick_grouping_rule_id

Line 623: print_debug('Inside Process_Reservations', 'Inv_Pick_Release_PVT.Process_Reservations');

619:
620:
621: BEGIN
622: IF (is_debug ) THEN
623: print_debug('Inside Process_Reservations', 'Inv_Pick_Release_PVT.Process_Reservations');
624: END IF;
625:
626: BEGIN
627: -- Bug 4494038: exclude crossdock reservations

Line 665: print_debug('All primary reservation qty: '||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

661: l_non_inv_sec_reservation_qty := 0;
662: g_item_non_inv_rsv(p_mo_line_rec.inventory_item_id) := 0;
663: END;
664: IF is_debug THEN
665: print_debug('All primary reservation qty: '||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
666: print_debug('All secondary reservation qty: '||l_non_inv_sec_reservation_qty , 'Inv_Pick_Release_PVT.Process_Reservations');
667: END IF;
668:
669: l_qry_rsv_rec.organization_id := p_mo_line_rec.organization_id;

Line 666: print_debug('All secondary reservation qty: '||l_non_inv_sec_reservation_qty , 'Inv_Pick_Release_PVT.Process_Reservations');

662: g_item_non_inv_rsv(p_mo_line_rec.inventory_item_id) := 0;
663: END;
664: IF is_debug THEN
665: print_debug('All primary reservation qty: '||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
666: print_debug('All secondary reservation qty: '||l_non_inv_sec_reservation_qty , 'Inv_Pick_Release_PVT.Process_Reservations');
667: END IF;
668:
669: l_qry_rsv_rec.organization_id := p_mo_line_rec.organization_id;
670: l_qry_rsv_rec.inventory_item_id := p_mo_line_rec.inventory_item_id;

Line 692: print_debug('return error from query reservation: '||l_api_return_status,'INV_Pick_Release_PVT.Process_Reservations');

688:
689: -- Return an error if the query reservations call failed
690: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
691: IF (is_debug) THEN
692: print_debug('return error from query reservation: '||l_api_return_status,'INV_Pick_Release_PVT.Process_Reservations');
693: END IF;
694: fnd_message.set_name('INV', 'INV_QRY_RSV_FAILED');
695: fnd_msg_pub.ADD;
696: RAISE fnd_api.g_exc_unexpected_error;

Line 700: print_debug('Unstaged l_non_inv_reservations_qty '|| l_non_inv_reservations_qty,'Inv_Pick_Release_PVT.Process_Reservations');

696: RAISE fnd_api.g_exc_unexpected_error;
697: END IF;
698:
699: IF (is_debug) THEN
700: print_debug('Unstaged l_non_inv_reservations_qty '|| l_non_inv_reservations_qty,'Inv_Pick_Release_PVT.Process_Reservations');
701: END IF;
702:
703: -- Check if the picking subinventory (if specified on the MO) is
704: -- reservable OR not

Line 711: print_debug('Error setting from sub cache','Inv_Pick_Release_PVT.Process_Reservations');

707: p_mo_line_rec.organization_id,
708: p_mo_line_rec.from_subinventory_code);
709: If NOT l_return_value Then
710: if is_debug then
711: print_debug('Error setting from sub cache','Inv_Pick_Release_PVT.Process_Reservations');
712: end if;
713: RAISE fnd_api.g_exc_unexpected_error;
714: End If;
715: g_sub_reservable_type := INV_CACHE.fromsub_rec.reservable_type;

Line 743: 'Inv_Pick_Release_PVT.process_reservations');

739: END IF;
740:
741: IF (is_debug) THEN
742: print_debug('l_primary_reservation_qty'|| l_primary_reservation_qty,
743: 'Inv_Pick_Release_PVT.process_reservations');
744:
745: -- Bug 6989438
746: print_debug('l_secondary_reservation_qty'|| l_secondary_reservation_qty,
747: 'Inv_Pick_Release_PVT.process_reservations');

Line 747: 'Inv_Pick_Release_PVT.process_reservations');

743: 'Inv_Pick_Release_PVT.process_reservations');
744:
745: -- Bug 6989438
746: print_debug('l_secondary_reservation_qty'|| l_secondary_reservation_qty,
747: 'Inv_Pick_Release_PVT.process_reservations');
748:
749: print_debug('try to match the reservation exist with the current move order ', 'Inv_Pick_Release_PVT.process_reservations');
750: END IF;
751:

Line 749: print_debug('try to match the reservation exist with the current move order ', 'Inv_Pick_Release_PVT.process_reservations');

745: -- Bug 6989438
746: print_debug('l_secondary_reservation_qty'|| l_secondary_reservation_qty,
747: 'Inv_Pick_Release_PVT.process_reservations');
748:
749: print_debug('try to match the reservation exist with the current move order ', 'Inv_Pick_Release_PVT.process_reservations');
750: END IF;
751:
752: IF reservation_matches(p_mo_line_rec, l_demand_reservations(l_res_tbl_index)) = 1
753: AND NVL(l_staged_flag, 'N') = 'N' THEN

Line 808: 'Inv_Pick_Release_PVT.Process_Reservations');

804: p_mo_line_rec.inventory_item_id);
805: If NOT l_return_value Then
806: if is_debug then
807: print_debug('Error setting from sub cache',
808: 'Inv_Pick_Release_PVT.Process_Reservations');
809: end if;
810: RAISE fnd_api.g_exc_unexpected_error;
811: End If;
812:

Line 838: print_debug('Cannot convert uom to primary uom', 'Inv_Pick_release_pvt.process_reservations');

834: );
835:
836: IF (l_quantity_to_detail = -99999) THEN
837: IF (is_debug) THEN
838: print_debug('Cannot convert uom to primary uom', 'Inv_Pick_release_pvt.process_reservations');
839: END IF;
840: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
841: fnd_message.set_token('UOM', l_primary_uom);
842: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

868: l_is_serial_control := FALSE;
869: END IF;
870:
871: IF (is_debug) THEN
872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

Line 873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

869: END IF;
870:
871: IF (is_debug) THEN
872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

Line 874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');

870:
871: IF (is_debug) THEN
872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
878: END IF;

Line 875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');

871: IF (is_debug) THEN
872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
878: END IF;
879:

Line 876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

872: print_debug('l_reserved_quantity = ' ||l_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
878: END IF;
879:
880: IF (l_non_inv_reservations_qty > 0 AND l_quantity_to_detail > l_reserved_quantity -- Bug 3440014

Line 877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

873: print_debug('l_sec_reserved_quantity = ' ||l_sec_reserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
874: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
875: print_debug('l_sec_quantity_to_detail = ' ||l_sec_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
876: print_debug('l_non_inv_reservations_qty = ' ||l_non_inv_reservations_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
877: print_debug('l_non_inv_sec_reservation_qty = ' ||l_non_inv_sec_reservation_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
878: END IF;
879:
880: IF (l_non_inv_reservations_qty > 0 AND l_quantity_to_detail > l_reserved_quantity -- Bug 3440014
881: ) THEN

Line 883: print_debug('Adjust l_quantity_to_detail honor supply rsv', 'Inv_Pick_Release_PVT.Process_Reservations');

879:
880: IF (l_non_inv_reservations_qty > 0 AND l_quantity_to_detail > l_reserved_quantity -- Bug 3440014
881: ) THEN
882: IF (is_debug) THEN
883: print_debug('Adjust l_quantity_to_detail honor supply rsv', 'Inv_Pick_Release_PVT.Process_Reservations');
884: END IF;
885: -- Bug 4171297, if the order line has Wip supply reservation then l_quantity_to_detail
886: -- should be calculated based on order line quantity. Adding the below logic to calculate
887: -- the l_quantity_to_detail.

Line 891: print_debug('Error setting cache for order line', 'Inv_Pick_Release_PVT.Process_Reservations');

887: -- the l_quantity_to_detail.
888: l_return_value := INV_CACHE.set_oola_rec(p_demand_info.oe_line_id);
889: IF NOT l_return_value Then
890: IF (is_debug) THEN
891: print_debug('Error setting cache for order line', 'Inv_Pick_Release_PVT.Process_Reservations');
892: END IF;
893: RAISE fnd_api.g_exc_unexpected_error;
894: END IF;
895:

Line 900: print_debug('l_order_line_qty_unconv = ' ||l_order_line_qty_unconv, 'Inv_Pick_Release_PVT.Process_Reservations');

896: l_order_line_qty_unconv := INV_CACHE.oola_rec.ordered_quantity;
897: l_order_line_uom := INV_CACHE.oola_rec.order_quantity_uom;
898:
899: IF (is_debug) THEN
900: print_debug('l_order_line_qty_unconv = ' ||l_order_line_qty_unconv, 'Inv_Pick_Release_PVT.Process_Reservations');
901: print_debug('l_order_line_uom = ' ||l_order_line_uom, 'Inv_Pick_Release_PVT.Process_Reservations');
902: END IF;
903:
904: IF (l_primary_uom <> l_order_line_uom) THEN

Line 901: print_debug('l_order_line_uom = ' ||l_order_line_uom, 'Inv_Pick_Release_PVT.Process_Reservations');

897: l_order_line_uom := INV_CACHE.oola_rec.order_quantity_uom;
898:
899: IF (is_debug) THEN
900: print_debug('l_order_line_qty_unconv = ' ||l_order_line_qty_unconv, 'Inv_Pick_Release_PVT.Process_Reservations');
901: print_debug('l_order_line_uom = ' ||l_order_line_uom, 'Inv_Pick_Release_PVT.Process_Reservations');
902: END IF;
903:
904: IF (l_primary_uom <> l_order_line_uom) THEN
905: l_order_line_qty := inv_convert.inv_um_convert(

Line 917: print_debug('Cannot convert order quantity to primary uom', 'Inv_Pick_release_pvt.process_reservations');

913: );
914:
915: IF (l_order_line_qty = -99999) THEN
916: IF (is_debug) THEN
917: print_debug('Cannot convert order quantity to primary uom', 'Inv_Pick_release_pvt.process_reservations');
918: END IF;
919: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
920: fnd_message.set_token('UOM', l_primary_uom);
921: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 930: print_debug('l_order_line_qty = ' ||l_order_line_qty, 'Inv_Pick_Release_PVT.Process_Reservations');

926: l_order_line_qty := l_order_line_qty_unconv;
927: END IF;
928:
929: IF (is_debug) THEN
930: print_debug('l_order_line_qty = ' ||l_order_line_qty, 'Inv_Pick_Release_PVT.Process_Reservations');
931: END IF;
932:
933: -- Calculated using the following formula least of move order line quantity and
934: -- order line quantity - all reservations + calculated reserved quantity for line

Line 943: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');

939: + l_primary_reservation_qty - l_reserved_quantity));
940: --l_order_line_qty - (l_non_inv_reservation_qty - l_reserved_quantity + l_primary_staged_qty));
941:
942: IF (is_debug) THEN
943: print_debug('l_quantity_to_detail = ' ||l_quantity_to_detail, 'Inv_Pick_Release_PVT.Process_Reservations');
944: END IF;
945: l_sec_quantity_to_detail := l_sec_quantity_to_detail * (l_quantity_to_detail / l_orig_quantity_to_detail);
946: END IF; /* IF (l_non_inv_reservations_qty > 0 AND l_quantity_to_detail > l_reserved_quantity */ -- Bug 3440014
947:

Line 964: print_debug(' Fulfill Base = '||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');

960: x_fulfillment_base => l_fulfill_base
961: );
962:
963: IF (is_debug) THEN
964: print_debug(' Fulfill Base = '||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');
965: END IF;
966:
967: -- Handle reserving additional quantity if necessary
968: --MUOM Fulfillment Project

Line 989: print_debug('l_unreserved_quantity is '|| l_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');

985: END IF;
986:
987:
988: IF (is_debug) THEN
989: print_debug('l_unreserved_quantity is '|| l_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');
990: print_debug('l_sec_unreserved_quantity is '|| l_sec_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');
991: END IF;
992:
993: IF p_mo_line_rec.from_subinventory_code IS NOT NULL AND g_sub_reservable_type = 1 THEN

Line 990: print_debug('l_sec_unreserved_quantity is '|| l_sec_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');

986:
987:
988: IF (is_debug) THEN
989: print_debug('l_unreserved_quantity is '|| l_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');
990: print_debug('l_sec_unreserved_quantity is '|| l_sec_unreserved_quantity,'Inv_Pick_Release_PVT.Process_Reservations');
991: END IF;
992:
993: IF p_mo_line_rec.from_subinventory_code IS NOT NULL AND g_sub_reservable_type = 1 THEN
994: source_from_sub := p_mo_line_rec.from_subinventory_code;

Line 1045: print_debug('Reservable qty from qtytree '|| l_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');

1041: , x_satt => l_sec_qty_att
1042: , x_satr => l_sec_qty_available_to_reserve
1043: );
1044: IF (is_debug) THEN
1045: print_debug('Reservable qty from qtytree '|| l_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');
1046: print_debug('Reservable qty2 from qtytree '|| l_sec_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');
1047: END IF;
1048:
1049: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN

Line 1046: print_debug('Reservable qty2 from qtytree '|| l_sec_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');

1042: , x_satr => l_sec_qty_available_to_reserve
1043: );
1044: IF (is_debug) THEN
1045: print_debug('Reservable qty from qtytree '|| l_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');
1046: print_debug('Reservable qty2 from qtytree '|| l_sec_qty_available_to_reserve, 'Inv_Pick_Release_PVT.Process_Reservations');
1047: END IF;
1048:
1049: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1050: IF (is_debug) THEN

Line 1051: print_debug('Error from query quantity tree', 'Inv_Pick_Release_PVT.Process_Reservations');

1047: END IF;
1048:
1049: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1050: IF (is_debug) THEN
1051: print_debug('Error from query quantity tree', 'Inv_Pick_Release_PVT.Process_Reservations');
1052: END IF;
1053: fnd_message.set_name('INV', 'INV_QRY_QTY_FAILED');
1054: fnd_msg_pub.ADD;
1055: RAISE fnd_api.g_exc_unexpected_error;

Line 1059: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_qty_att = '||l_qty_att||', p_demand_source_type = '||p_demand_source_type, 'Inv_Pick_Release_PVT.Process_Reservations');

1055: RAISE fnd_api.g_exc_unexpected_error;
1056: END IF;
1057:
1058: IF (is_debug) THEN
1059: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_qty_att = '||l_qty_att||', p_demand_source_type = '||p_demand_source_type, 'Inv_Pick_Release_PVT.Process_Reservations');
1060: END IF;
1061:
1062: --Bug 8560030, added below code in order to allow picking of non-rsvable lots for Internal Orders.
1063: IF (l_qty_available_to_reserve <= 0 AND l_qty_att > 0 AND p_demand_source_type = 8 AND l_is_lot_control) THEN

Line 1067: print_debug('g_prf_pick_nonrsv_lots = '||g_prf_pick_nonrsv_lots, 'Inv_Pick_Release_PVT.Process_Reservations');

1063: IF (l_qty_available_to_reserve <= 0 AND l_qty_att > 0 AND p_demand_source_type = 8 AND l_is_lot_control) THEN
1064: IF g_prf_pick_nonrsv_lots IS NULL THEN
1065: g_prf_pick_nonrsv_lots := NVL(FND_PROFILE.VALUE('INV_PICK_NONRSV_LOTS'),2);
1066: IF (is_debug) THEN
1067: print_debug('g_prf_pick_nonrsv_lots = '||g_prf_pick_nonrsv_lots, 'Inv_Pick_Release_PVT.Process_Reservations');
1068: END IF;
1069: END IF;
1070: IF g_prf_pick_nonrsv_lots = 1 THEN
1071: g_pick_nonrsv_lots := 1;

Line 1080: print_debug('l_quantity_to_reserve = '||l_quantity_to_reserve||', l_unreserved_quantity = '||l_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

1076: l_sec_quantity_to_reserve := l_sec_unreserved_quantity;
1077:
1078: --MUOM Fulfillment Project
1079: IF (is_debug) THEN
1080: print_debug('l_quantity_to_reserve = '||l_quantity_to_reserve||', l_unreserved_quantity = '||l_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1081: print_debug('l_sec_quantity_to_reserve = '||l_sec_quantity_to_reserve||', l_sec_unreserved_quantity = '||l_sec_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1082: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_sec_qty_available_to_reserve = '||l_sec_qty_available_to_reserve||' , l_fulfill_base ='||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');
1083: END IF;
1084:

Line 1081: print_debug('l_sec_quantity_to_reserve = '||l_sec_quantity_to_reserve||', l_sec_unreserved_quantity = '||l_sec_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

1077:
1078: --MUOM Fulfillment Project
1079: IF (is_debug) THEN
1080: print_debug('l_quantity_to_reserve = '||l_quantity_to_reserve||', l_unreserved_quantity = '||l_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1081: print_debug('l_sec_quantity_to_reserve = '||l_sec_quantity_to_reserve||', l_sec_unreserved_quantity = '||l_sec_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1082: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_sec_qty_available_to_reserve = '||l_sec_qty_available_to_reserve||' , l_fulfill_base ='||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');
1083: END IF;
1084:
1085: IF ((l_qty_available_to_reserve < l_unreserved_quantity and l_fulfill_base<>'S') or

Line 1082: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_sec_qty_available_to_reserve = '||l_sec_qty_available_to_reserve||' , l_fulfill_base ='||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');

1078: --MUOM Fulfillment Project
1079: IF (is_debug) THEN
1080: print_debug('l_quantity_to_reserve = '||l_quantity_to_reserve||', l_unreserved_quantity = '||l_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1081: print_debug('l_sec_quantity_to_reserve = '||l_sec_quantity_to_reserve||', l_sec_unreserved_quantity = '||l_sec_unreserved_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1082: print_debug('l_qty_available_to_reserve = '||l_qty_available_to_reserve||', l_sec_qty_available_to_reserve = '||l_sec_qty_available_to_reserve||' , l_fulfill_base ='||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Reservations');
1083: END IF;
1084:
1085: IF ((l_qty_available_to_reserve < l_unreserved_quantity and l_fulfill_base<>'S') or
1086: ( l_fulfill_base='S' and l_sec_qty_available_to_reserve<=l_sec_unreserved_quantity))

Line 1116: print_debug('Org wide reservation exist', 'Inv_Pick_Release_PVT.Process_Reservations');

1112: l_update_rsv_rec := l_qry_rsv_rec;
1113: l_update_rsv_rec.primary_reservation_quantity := l_update_rsv_rec.primary_reservation_quantity + l_quantity_to_reserve;
1114: l_update_rsv_rec.reservation_quantity := NULL; -- Force update of reserved qty
1115: IF (is_debug) THEN
1116: print_debug('Org wide reservation exist', 'Inv_Pick_Release_PVT.Process_Reservations');
1117: print_debug('update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
1118: END IF;
1119: inv_reservation_pub.update_reservation(
1120: p_api_version_number => 1.0

Line 1117: print_debug('update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

1113: l_update_rsv_rec.primary_reservation_quantity := l_update_rsv_rec.primary_reservation_quantity + l_quantity_to_reserve;
1114: l_update_rsv_rec.reservation_quantity := NULL; -- Force update of reserved qty
1115: IF (is_debug) THEN
1116: print_debug('Org wide reservation exist', 'Inv_Pick_Release_PVT.Process_Reservations');
1117: print_debug('update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
1118: END IF;
1119: inv_reservation_pub.update_reservation(
1120: p_api_version_number => 1.0
1121: , p_init_msg_lst => fnd_api.g_false

Line 1134: print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

1130: );
1131:
1132: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1133: IF (is_debug) THEN
1134: print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
1135: END IF;
1136: fnd_message.set_name('INV', 'INV_UPD_RSV_FAILED');
1137: fnd_msg_pub.ADD;
1138: RAISE fnd_api.g_exc_unexpected_error;

Line 1143: 'Inv_Pick_release_pvt.Process_Reservations');

1139: ELSE
1140: --Requery the reservation record and update it in the local table.
1141: IF (is_debug) THEN
1142: print_debug('query that reservation again',
1143: 'Inv_Pick_release_pvt.Process_Reservations');
1144: END IF;
1145: l_qry_rsv_rec_by_id.reservation_id := l_update_rsv_rec.reservation_id;
1146: inv_reservation_pub.query_reservation(
1147: p_api_version_number => 1.0

Line 1171: print_debug('updating quantity tree','Inv_Pick_Release_PVT.Process_Reservations');

1167: END IF;
1168: */
1169: --update quantity tree
1170: IF is_debug THEN
1171: print_debug('updating quantity tree','Inv_Pick_Release_PVT.Process_Reservations');
1172: END IF;
1173:
1174: -- Added following secondary qty related section for Bug 7377744
1175: inv_quantity_tree_pub.update_quantities(

Line 1217: print_debug('Error from query quantity tree', 'Inv_Pick_Release_PVT.Process_Reservations');

1213: , x_satr => l_sec_qty_available_to_reserve
1214: );
1215: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1216: IF (is_debug) THEN
1217: print_debug('Error from query quantity tree', 'Inv_Pick_Release_PVT.Process_Reservations');
1218: END IF;
1219: fnd_message.set_name('INV', 'INV_QRY_QTY_FAILED');
1220: fnd_msg_pub.ADD;
1221: RAISE fnd_api.g_exc_unexpected_error;

Line 1256: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');

1252: );
1253:
1254: IF (l_new_rsv_quantity = -99999) THEN
1255: IF (is_debug) THEN
1256: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');
1257: END IF;
1258: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
1259: fnd_message.set_token('UOM', l_secondary_uom);
1260: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 1277: print_debug('Cannot convert primary uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');

1273: );
1274:
1275: IF (l_new_rsv_quantity = -99999) THEN
1276: IF (is_debug) THEN
1277: print_debug('Cannot convert primary uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');
1278: END IF;
1279: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
1280: fnd_message.set_token('UOM', l_primary_uom);
1281: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 1287: print_debug('0 New prim rsv qty: ' || l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

1283: RAISE fnd_api.g_exc_unexpected_error;
1284: END IF;
1285: END IF;
1286: IF (is_debug) THEN
1287: print_debug('0 New prim rsv qty: ' || l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1288: print_debug('New rsv qty: ' || l_new_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1289: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1290: END IF;
1291:

Line 1288: print_debug('New rsv qty: ' || l_new_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

1284: END IF;
1285: END IF;
1286: IF (is_debug) THEN
1287: print_debug('0 New prim rsv qty: ' || l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1288: print_debug('New rsv qty: ' || l_new_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1289: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1290: END IF;
1291:
1292: UPDATE mtl_reservations

Line 1289: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');

1285: END IF;
1286: IF (is_debug) THEN
1287: print_debug('0 New prim rsv qty: ' || l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1288: print_debug('New rsv qty: ' || l_new_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1289: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Reservations');
1290: END IF;
1291:
1292: UPDATE mtl_reservations
1293: SET primary_reservation_quantity = l_new_prim_rsv_quantity

Line 1306: print_debug('Error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');

1302: , x_msg_data => x_msg_data);
1303:
1304: IF l_api_return_status = fnd_api.g_ret_sts_error THEN
1305: IF (is_debug) THEN
1306: print_debug('Error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');
1307: END IF;
1308: RAISE fnd_api.g_exc_error;
1309: END IF;
1310: --

Line 1313: print_debug('Unexp. error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');

1309: END IF;
1310: --
1311: IF l_api_return_status = fnd_api.g_ret_sts_unexp_error THEN
1312: IF (is_debug) THEN
1313: print_debug('Unexp. error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');
1314: END IF;
1315: RAISE fnd_api.g_exc_unexpected_error;
1316: END IF;
1317:

Line 1326: 'Inv_Pick_Release_Pvt.Process_Reservations');

1322: ELSIF ( l_lot_divisible_flag = 'Y') THEN
1323: -- If no org-wide reservation existed before, created one now.
1324: IF (is_debug) THEN
1325: print_debug('no org-wide reservation exist, need to create one',
1326: 'Inv_Pick_Release_Pvt.Process_Reservations');
1327: END IF;
1328: --Bug 12655248 The secondary uom and secondary quantity should be null when the tracking quantity at item level is not Primary and secondary
1329: IF(INV_CACHE.item_rec.tracking_quantity_ind<>'PS') THEN
1330: l_secondary_uom:=NULL;

Line 1428: print_debug('create new reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

1424: END IF;
1425:
1426:
1427: IF (is_debug) THEN
1428: print_debug('create new reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
1429: END IF;
1430: inv_reservation_pub.create_reservation(
1431: p_api_version_number => 1.0
1432: , p_init_msg_lst => fnd_api.g_false

Line 1450: print_debug('error in create reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

1446:
1447: -- Return an error if the create reservation call failed
1448: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1449: IF (is_debug) THEN
1450: print_debug('error in create reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
1451: END IF;
1452: fnd_message.set_name('INV', 'INV_QRY_RSV_FAILED');
1453: fnd_msg_pub.ADD;
1454: RAISE fnd_api.g_exc_unexpected_error;

Line 1463: , 'Inv-Pick_Release_PVT.Process_Reservations');

1459: IF p_allow_partial_pick = fnd_api.g_false
1460: AND l_qty_succ_reserved < l_quantity_to_reserve THEN
1461: IF (is_debug) THEN
1462: print_debug('p_allow_partial_pick is false and could not reserve the quantity requested'
1463: , 'Inv-Pick_Release_PVT.Process_Reservations');
1464: END IF;
1465: fnd_message.set_name('INV', 'INV_COULD_NOT_PICK_FULL');
1466: fnd_msg_pub.ADD;
1467: RAISE fnd_api.g_exc_unexpected_error;

Line 1499: print_debug('Reservation created for: '|| x_rsv_qty_available, 'Inv-Pick_Release_PVT.Process_Reservations');

1495: l_demand_rsvs_ordered(l_res_ordered_index) := l_demand_reservations(l_res_tbl_index);
1496: -- Update with the actual reservation quantity
1497: x_rsv_qty_available := l_demand_reservations(l_res_tbl_index).primary_reservation_quantity;
1498: IF (is_debug) THEN
1499: print_debug('Reservation created for: '|| x_rsv_qty_available, 'Inv-Pick_Release_PVT.Process_Reservations');
1500: END IF; -- debug on
1501: END IF; -- An org-wide reservation existed
1502: END IF; -- The quantity to reserve was > 0
1503: END IF; --l_reserved_quantity < l_quantity_to_detail

Line 1512: print_debug('l_reservation_count = '|| l_reservation_count, 'Inv-Pick_Release_PVT.Process_Reservations');

1508:
1509: l_reservation_count := NVL(l_demand_rsvs_ordered.count,0);
1510:
1511: IF (is_debug) then
1512: print_debug('l_reservation_count = '|| l_reservation_count, 'Inv-Pick_Release_PVT.Process_Reservations');
1513: END IF;
1514:
1515: IF (l_reservation_count > 0) THEN
1516: l_res_tbl_index := l_demand_rsvs_ordered.FIRST;

Line 1519: print_debug('Checking for Serial Reservations ', 'Inv-Pick_Release_PVT.Process_Reservations');

1515: IF (l_reservation_count > 0) THEN
1516: l_res_tbl_index := l_demand_rsvs_ordered.FIRST;
1517: l_res_ordered_index := l_demand_rsvs_ordered.FIRST;
1518: IF (is_debug) then
1519: print_debug('Checking for Serial Reservations ', 'Inv-Pick_Release_PVT.Process_Reservations');
1520: END IF;
1521: LOOP
1522: IF ((nvl(l_demand_rsvs_ordered(l_res_tbl_index).primary_reservation_quantity,0)
1523: - nvl(l_demand_rsvs_ordered(l_res_tbl_index).detailed_quantity,0) > 0) AND l_fulfill_base <> 'S' ) OR

Line 1538: print_debug('Serial Count = '|| l_rsv_serials.count, 'Inv-Pick_Release_PVT.Process_Reservations');

1534: END IF;
1535: END IF;
1536:
1537: IF (is_debug) then
1538: print_debug('Serial Count = '|| l_rsv_serials.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1539: print_debug('Subinventory : '|| l_demand_rsvs_ordered(l_res_tbl_index).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1540: END IF;
1541: -- {{ Test Case # UTK-REALLOC-3.2.1:40 }}
1542: -- Description: Single non-detailed reservation should allocate

Line 1539: print_debug('Subinventory : '|| l_demand_rsvs_ordered(l_res_tbl_index).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');

1535: END IF;
1536:
1537: IF (is_debug) then
1538: print_debug('Serial Count = '|| l_rsv_serials.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1539: print_debug('Subinventory : '|| l_demand_rsvs_ordered(l_res_tbl_index).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1540: END IF;
1541: -- {{ Test Case # UTK-REALLOC-3.2.1:40 }}
1542: -- Description: Single non-detailed reservation should allocate
1543: -- {{ Test Case # UTK-REALLOC-3.2.1:41 }}

Line 1549: print_debug('No Serials for this reservation', 'Inv-Pick_Release_PVT.Process_Reservations');

1545: -- {{ Test Case # UTK-REALLOC-3.2.1:42 }}
1546: -- Description: Reservation that is already partially allocated should not re-allocate allocated serials
1547: IF (nvl(l_rsv_serials.COUNT,0) = 0) OR (l_demand_rsvs_ordered(l_res_tbl_index).subinventory_code IS NULL) THEN
1548: IF (is_debug) then
1549: print_debug('No Serials for this reservation', 'Inv-Pick_Release_PVT.Process_Reservations');
1550: END IF;
1551: x_demand_rsvs_ordered(l_res_ordered_index) := l_demand_rsvs_ordered(l_res_tbl_index);
1552: l_res_ordered_index := l_res_ordered_index + 1;
1553: ELSE

Line 1566: print_debug('Serial Number - ' || l_rsv_serials(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');

1562: l_demand_rsvs_ordered(l_res_tbl_index).primary_reservation_quantity := l_demand_rsvs_ordered(l_res_tbl_index).primary_reservation_quantity - 1;
1563: l_demand_rsvs_ordered(l_res_tbl_index).secondary_reservation_quantity := l_demand_rsvs_ordered(l_res_tbl_index).secondary_reservation_quantity - l_pri_sec_conv;
1564: l_res_ordered_index := l_res_ordered_index + 1;
1565: IF (is_debug) then
1566: print_debug('Serial Number - ' || l_rsv_serials(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1567: print_debug('l_res_ordered_index ' || l_res_ordered_index, 'Inv-Pick_Release_PVT.Process_Reservations');
1568: END IF;
1569: END LOOP;
1570: -- {{ Test Case # UTK-REALLOC-3.2.1:43 }}

Line 1567: print_debug('l_res_ordered_index ' || l_res_ordered_index, 'Inv-Pick_Release_PVT.Process_Reservations');

1563: l_demand_rsvs_ordered(l_res_tbl_index).secondary_reservation_quantity := l_demand_rsvs_ordered(l_res_tbl_index).secondary_reservation_quantity - l_pri_sec_conv;
1564: l_res_ordered_index := l_res_ordered_index + 1;
1565: IF (is_debug) then
1566: print_debug('Serial Number - ' || l_rsv_serials(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1567: print_debug('l_res_ordered_index ' || l_res_ordered_index, 'Inv-Pick_Release_PVT.Process_Reservations');
1568: END IF;
1569: END LOOP;
1570: -- {{ Test Case # UTK-REALLOC-3.2.1:43 }}
1571: -- Description: Reservation for qty>1 with 1 serial number should allocate serial and do remainder

Line 1589: print_debug('Return from process_Reservations','Inv-Pick_Release_PVT.Process_Reservations');

1585: --x_demand_rsvs_ordered := l_new_demand_rsvs_ordered;
1586:
1587: --x_demand_rsvs_ordered := l_demand_rsvs_ordered;
1588: IF (is_debug) THEN
1589: print_debug('Return from process_Reservations','Inv-Pick_Release_PVT.Process_Reservations');
1590: print_debug('Final Reservation Count : ' || x_demand_rsvs_ordered.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1591: IF x_demand_rsvs_ordered.COUNT > 0 THEN
1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');

Line 1590: print_debug('Final Reservation Count : ' || x_demand_rsvs_ordered.count, 'Inv-Pick_Release_PVT.Process_Reservations');

1586:
1587: --x_demand_rsvs_ordered := l_demand_rsvs_ordered;
1588: IF (is_debug) THEN
1589: print_debug('Return from process_Reservations','Inv-Pick_Release_PVT.Process_Reservations');
1590: print_debug('Final Reservation Count : ' || x_demand_rsvs_ordered.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1591: IF x_demand_rsvs_ordered.COUNT > 0 THEN
1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');

Line 1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');

1589: print_debug('Return from process_Reservations','Inv-Pick_Release_PVT.Process_Reservations');
1590: print_debug('Final Reservation Count : ' || x_demand_rsvs_ordered.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1591: IF x_demand_rsvs_ordered.COUNT > 0 THEN
1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');
1595: print_debug('Lot - ' || x_demand_rsvs_ordered(i).lot_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1596: print_debug('Serial Number - ' || x_demand_rsvs_ordered(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1597: END LOOP;

Line 1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');

1590: print_debug('Final Reservation Count : ' || x_demand_rsvs_ordered.count, 'Inv-Pick_Release_PVT.Process_Reservations');
1591: IF x_demand_rsvs_ordered.COUNT > 0 THEN
1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');
1595: print_debug('Lot - ' || x_demand_rsvs_ordered(i).lot_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1596: print_debug('Serial Number - ' || x_demand_rsvs_ordered(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1597: END LOOP;
1598: END IF;

Line 1595: print_debug('Lot - ' || x_demand_rsvs_ordered(i).lot_number, 'Inv-Pick_Release_PVT.Process_Reservations');

1591: IF x_demand_rsvs_ordered.COUNT > 0 THEN
1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');
1595: print_debug('Lot - ' || x_demand_rsvs_ordered(i).lot_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1596: print_debug('Serial Number - ' || x_demand_rsvs_ordered(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1597: END LOOP;
1598: END IF;
1599: END IF;

Line 1596: print_debug('Serial Number - ' || x_demand_rsvs_ordered(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');

1592: FOR i in x_demand_rsvs_ordered.FIRST..x_demand_rsvs_ordered.LAST LOOP
1593: print_debug('Subinevntory code - ' || x_demand_rsvs_ordered(i).subinventory_code, 'Inv-Pick_Release_PVT.Process_Reservations');
1594: print_debug('Locator - ' || x_demand_rsvs_ordered(i).locator_id, 'Inv-Pick_Release_PVT.Process_Reservations');
1595: print_debug('Lot - ' || x_demand_rsvs_ordered(i).lot_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1596: print_debug('Serial Number - ' || x_demand_rsvs_ordered(i).serial_number, 'Inv-Pick_Release_PVT.Process_Reservations');
1597: END LOOP;
1598: END IF;
1599: END IF;
1600: EXCEPTION

Line 1615: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');

1611: WHEN OTHERS THEN
1612: x_return_status := fnd_api.g_ret_sts_unexp_error;
1613:
1614: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1615: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');
1616: END IF;
1617:
1618: -- Get message count and data
1619: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1660: print_debug('Inside Process_Unreservable', 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1656: --8430412
1657:
1658: BEGIN
1659: IF (is_debug) THEN
1660: print_debug('Inside Process_Unreservable', 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1661: END IF;
1662: x_return_status := fnd_api.g_ret_sts_success;
1663:
1664: /* bug 1560334 jxlu */

Line 1717: print_debug('Default Sub is'|| l_default_subinventory, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1713: l_default_locator_id := g_default_locator_id;
1714: END IF;
1715:
1716: IF (is_debug) THEN
1717: print_debug('Default Sub is'|| l_default_subinventory, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1718: print_debug('Default Loc is'|| l_default_locator_id, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1719: END IF;
1720:
1721: -- 8430412 begin added the following logic to get revision for non-reservable item.

Line 1718: print_debug('Default Loc is'|| l_default_locator_id, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1714: END IF;
1715:
1716: IF (is_debug) THEN
1717: print_debug('Default Sub is'|| l_default_subinventory, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1718: print_debug('Default Loc is'|| l_default_locator_id, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1719: END IF;
1720:
1721: -- 8430412 begin added the following logic to get revision for non-reservable item.
1722: IF nvl(inv_cache.item_rec.revision_qty_control_code,1) = 2 THEN -- revision controlled

Line 1724: print_debug('Revision_ctrl: '||inv_cache.item_rec.revision_qty_control_code,'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1720:
1721: -- 8430412 begin added the following logic to get revision for non-reservable item.
1722: IF nvl(inv_cache.item_rec.revision_qty_control_code,1) = 2 THEN -- revision controlled
1723: IF (is_debug) THEN
1724: print_debug('Revision_ctrl: '||inv_cache.item_rec.revision_qty_control_code,'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1725: END IF;
1726:
1727: l_rule_id := inv_cache.item_rec.picking_rule_id;
1728:

Line 1738: print_debug('Default picking rule id: '|| l_rule_id, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1734: END IF;
1735: END IF;
1736:
1737: IF (is_debug) THEN
1738: print_debug('Default picking rule id: '|| l_rule_id, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1739: END IF;
1740:
1741: IF l_rule_id is not NULL THEN
1742:

Line 1751: print_debug('Revision Sort: '|| l_revision_rule, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1747:
1748: END IF;
1749:
1750: IF (is_debug) THEN
1751: print_debug('Revision Sort: '|| l_revision_rule, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1752: END IF;
1753:
1754: IF l_revision_rule is not NULL THEN
1755: CASE l_revision_rule

Line 1778: print_debug('Revision : '|| l_revision, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1774:
1775: EXECUTE IMMEDIATE l_stmt INTO l_revision USING p_mo_line_rec.organization_id, p_mo_line_rec.inventory_item_id;
1776:
1777: IF (is_debug) THEN
1778: print_debug('Revision : '|| l_revision, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1779: END IF;
1780:
1781: ELSE --revision sort not defined
1782:

Line 1786: print_debug('call bom_revisions.get_revision to get revsion, revision date = '||l_txn_date, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1782:
1783: l_txn_date := nvl(inv_cache.mo_transaction_date, SYSDATE);
1784:
1785: IF (is_debug) THEN
1786: print_debug('call bom_revisions.get_revision to get revsion, revision date = '||l_txn_date, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1787: END IF;
1788:
1789: bom_revisions.GET_REVISION (type => 'PART'
1790: ,org_id => p_mo_line_rec.organization_id

Line 1796: print_debug('Revision : '||l_revision, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1792: ,rev_date => l_txn_date
1793: ,itm_rev => l_revision);
1794:
1795: IF (is_debug) THEN
1796: print_debug('Revision : '||l_revision, 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1797: END IF;
1798:
1799: END IF;
1800: END IF; -- revision ctrl

Line 1816: 'Inv_Pick_Release_PVT.Process_Unreservable_Items');

1812: l_shipping_attr(1).action_flag := 'U';
1813: l_shipping_attr(1).revision := l_revision; --8430412
1814: IF (is_debug) THEN
1815: print_debug('Calling WSH_Interface.Update_Shipping_Attributes',
1816: 'Inv_Pick_Release_PVT.Process_Unreservable_Items');
1817: END IF;
1818: wsh_interface.update_shipping_attributes(
1819: p_source_code => 'INV'
1820: , p_changed_attributes => l_shipping_attr

Line 1825: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1821: , x_return_status => l_return_status
1822: );
1823: IF (is_debug) THEN
1824: print_debug('after update shipping attributes',
1825: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1826: END IF;
1827:
1828: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1829: IF (is_debug) THEN

Line 1831: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1827:
1828: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1829: IF (is_debug) THEN
1830: print_debug('return error from update shipping attributes',
1831: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1832: END IF;
1833: RAISE fnd_api.g_exc_error;
1834: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1835: IF (is_debug) THEN

Line 1837: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1833: RAISE fnd_api.g_exc_error;
1834: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1835: IF (is_debug) THEN
1836: print_debug('return error from update shipping attributes',
1837: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1838: END IF;
1839: RAISE fnd_api.g_exc_unexpected_error;
1840: END IF;
1841:

Line 1846: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1842: -- call the get pick slip number
1843:
1844: IF (is_debug) THEN
1845: print_debug('calling get_pick_slip_number',
1846: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1847: END IF;
1848: -- Bug 2666620: Inline branching to call either WSH or INV get_pick_slip_number
1849: /* FP-J PAR Replenishment Counts: It is not required to send dest_subinv,
1850: dest_locator_id, project_id and task_id. Dest Sub / Loc not required because

Line 1875: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1871: , p_revision => p_mo_line_rec.revision
1872: );
1873: IF (is_debug) THEN
1874: print_debug('after calling get_pick_slip_number',
1875: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1876: END IF;
1877:
1878: IF l_return_status <> fnd_api.g_ret_sts_success
1879: OR l_pick_slip_number = -1 THEN

Line 1882: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1878: IF l_return_status <> fnd_api.g_ret_sts_success
1879: OR l_pick_slip_number = -1 THEN
1880: IF (is_debug) THEN
1881: print_debug('return error from get_pick_slip_number',
1882: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1883: END IF;
1884: fnd_message.set_name('INV', 'INV_NO_PICK_SLIP_NUMBER');
1885: fnd_msg_pub.ADD;
1886: RAISE fnd_api.g_exc_unexpected_error;

Line 1899: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1895: );
1896: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1897: IF (is_debug) THEN
1898: print_debug('return error from WSH_INV_INTEGRATION.find_printer',
1899: 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1900: END IF;
1901: RAISE fnd_api.g_exc_unexpected_error;
1902: END IF;
1903: end if ;

Line 1907: 'Inv_pick_release_pvt.process_unreservable_items');

1903: end if ;
1904:
1905: IF (is_debug) THEN
1906: print_debug('update move order line',
1907: 'Inv_pick_release_pvt.process_unreservable_items');
1908: END IF;
1909:
1910: p_mo_line_rec.quantity_detailed := p_mo_line_rec.quantity;
1911: p_mo_line_rec.quantity_delivered := p_mo_line_rec.quantity;

Line 1918: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1914: p_mo_line_rec.line_status := 5;
1915:
1916: -- Bug 6989438
1917: IF (is_debug) THEN
1918: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1919: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1920: END IF;
1921:
1922: UPDATE mtl_txn_request_lines

Line 1919: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');

1915:
1916: -- Bug 6989438
1917: IF (is_debug) THEN
1918: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1919: print_debug('p_mo_line_rec.quantity '|| p_mo_line_rec.quantity, 'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
1920: END IF;
1921:
1922: UPDATE mtl_txn_request_lines
1923: SET quantity_detailed = p_mo_line_rec.quantity,

Line 1935: 'Inv_pick_release_pvt.process_unreservable_items');

1931: x_pick_slip_number := l_pick_slip_number;
1932: x_ready_to_print := l_ready_to_print;
1933: IF (is_debug) THEN
1934: print_debug('end of process_unreservable_items ',
1935: 'Inv_pick_release_pvt.process_unreservable_items');
1936: END IF;
1937: EXCEPTION
1938: WHEN fnd_api.g_exc_error THEN
1939: x_return_status := fnd_api.g_ret_sts_error;

Line 1950: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');

1946: WHEN OTHERS THEN
1947: x_return_status := fnd_api.g_ret_sts_unexp_error;
1948:
1949: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1950: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');
1951: END IF;
1952:
1953: -- Get message count and data
1954: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1996: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');

1992: End If;
1993: END IF;
1994: IF (is_debug) THEN
1995: print_debug('inside process_prj_dynamic_locator',
1996: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');
1997: END IF;
1998: x_return_status := fnd_api.g_ret_sts_success;
1999:
2000: IF p_to_subinventory IS NULL THEN

Line 2009: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2005:
2006: IF (p_mo_line_rec.project_id IS NOT NULL) THEN
2007: IF (is_debug) THEN
2008: print_debug('Move ORder has project reference',
2009: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2010: END IF;
2011:
2012: l_return_value := INV_CACHE.set_org_rec(p_mo_line_rec.organization_id);
2013: IF NOT l_return_value THEN

Line 2016: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');

2012: l_return_value := INV_CACHE.set_org_rec(p_mo_line_rec.organization_id);
2013: IF NOT l_return_value THEN
2014: IF (is_debug) THEN
2015: print_debug('error setting org cache',
2016: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');
2017: END IF;
2018: RAISE fnd_api.g_exc_unexpected_error;
2019: END IF;
2020: l_org_loc_control := INV_CACHE.org_rec.stock_locator_control_code;

Line 2028: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');

2024: p_mo_line_rec.inventory_item_id);
2025: IF NOT l_return_value THEN
2026: IF (is_debug) THEN
2027: print_debug('error setting item cache',
2028: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');
2029: END IF;
2030: RAISE fnd_api.g_exc_unexpected_error;
2031: END IF;
2032: l_item_loc_control := INV_CACHE.item_rec.location_control_code;

Line 2040: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');

2036: l_to_subinventory);
2037: IF NOT l_return_value THEN
2038: IF (is_debug) THEN
2039: print_debug('error setting to sub cache',
2040: 'Inv_Pick_Release_PVt.Process_Prj_Dynamic_Locator');
2041: END IF;
2042: RAISE fnd_api.g_exc_unexpected_error;
2043: END IF;
2044: l_sub_loc_control := INV_CACHE.tosub_rec.locator_type;

Line 2047: print_debug('l_org_loc_control is '|| l_org_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2043: END IF;
2044: l_sub_loc_control := INV_CACHE.tosub_rec.locator_type;
2045:
2046: IF (is_debug) THEN
2047: print_debug('l_org_loc_control is '|| l_org_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2048: print_debug('l_item_loc_control is '|| l_item_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2049: print_debug('l_sub_loc_control is '|| l_sub_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2050: END IF;
2051:

Line 2048: print_debug('l_item_loc_control is '|| l_item_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2044: l_sub_loc_control := INV_CACHE.tosub_rec.locator_type;
2045:
2046: IF (is_debug) THEN
2047: print_debug('l_org_loc_control is '|| l_org_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2048: print_debug('l_item_loc_control is '|| l_item_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2049: print_debug('l_sub_loc_control is '|| l_sub_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2050: END IF;
2051:
2052: IF (l_org_loc_control = 3

Line 2049: print_debug('l_sub_loc_control is '|| l_sub_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2045:
2046: IF (is_debug) THEN
2047: print_debug('l_org_loc_control is '|| l_org_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2048: print_debug('l_item_loc_control is '|| l_item_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2049: print_debug('l_sub_loc_control is '|| l_sub_loc_control, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2050: END IF;
2051:
2052: IF (l_org_loc_control = 3
2053: OR (l_org_loc_control = 4

Line 2063: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2059: )
2060: ) THEN
2061: IF (is_debug) THEN
2062: print_debug('inside the locator control code',
2063: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2064: END IF;
2065:
2066: BEGIN
2067: SELECT *

Line 2074: print_debug('after select l_locator', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2070: WHERE inventory_location_id = p_to_locator_id
2071: AND organization_id = p_mo_line_rec.organization_id
2072: AND subinventory_code = l_to_subinventory;
2073: IF (is_debug) THEN
2074: print_debug('after select l_locator', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2075: END IF;
2076: /*
2077: SELECT *
2078: INTO l_org

Line 2083: print_debug('after select organization', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2079: FROM mtl_parameters
2080: WHERE organization_id = p_mo_line_rec.organization_id;
2081:
2082: IF (is_debug) THEN
2083: print_debug('after select organization', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2084: END IF;
2085:
2086: SELECT *
2087: INTO l_sub

Line 2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2089: WHERE secondary_inventory_name = p_mo_line_rec.to_subinventory_code
2090: AND organization_id = p_mo_line_rec.organization_id;
2091: */
2092: IF (is_debug) THEN
2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

Line 2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2090: AND organization_id = p_mo_line_rec.organization_id;
2091: */
2092: IF (is_debug) THEN
2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2098: END IF;

Line 2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2091: */
2092: IF (is_debug) THEN
2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2098: END IF;
2099:

Line 2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2092: IF (is_debug) THEN
2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2098: END IF;
2099:
2100: IF (l_locator.segment19 IS NULL

Line 2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2093: print_debug('l_locator.segment1 = '|| l_locator.segment1, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2094: print_debug('l_locator.segment2 = '|| l_locator.segment2, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2095: print_debug('l_locator.segment3 = '|| l_locator.segment3, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2096: print_debug('l_locator.segment19 = '|| l_locator.segment19, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2097: print_debug('l_locator.segment20 = '|| l_locator.segment20, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2098: END IF;
2099:
2100: IF (l_locator.segment19 IS NULL
2101: AND l_locator.segment20 IS NULL

Line 2122: print_debug('INV_Validate error', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2118: IF (success = inv_validate.t) THEN
2119: l_new_to_locator_id := l_locator.inventory_location_id;
2120: ELSE
2121: IF (is_debug) THEN
2122: print_debug('INV_Validate error', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2123: END IF;
2124: /*FND_MSG_PUB.Count_And_Get (p_count => l_count , p_data => l_message , p_encoded => 'T');
2125: if( l_count = 0 ) then
2126: IF (is_debug) THEN

Line 2159: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2155:
2156: IF l_new_to_locator_id IS NOT NULL THEN
2157: IF (is_debug) THEN
2158: print_debug('new locator id is '|| l_new_to_locator_id,
2159: 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2160: END IF;
2161:
2162: If p_mo_line_rec.to_locator_id <> l_new_to_locator_id AND
2163: p_mo_line_rec.to_locator_id IS NOT NULL Then

Line 2172: print_debug('new locator id is '|| l_new_to_locator_id, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');

2168:
2169: p_mo_line_rec.to_locator_id := l_new_to_locator_id;
2170: End If; -- update mtrl
2171: IF (is_debug) THEN
2172: print_debug('new locator id is '|| l_new_to_locator_id, 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
2173: END IF; --debug
2174: END IF; -- new locator id is not null
2175: END IF; --locator controlled
2176: END IF;

Line 2192: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');

2188: WHEN OTHERS THEN
2189: x_return_status := fnd_api.g_ret_sts_unexp_error;
2190:
2191: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2192: fnd_msg_pub.add_exc_msg(g_pkg_name, 'INV_PICK_RELEASE_PVT');
2193: END IF;
2194:
2195: -- Get message count and data
2196: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2205: -- INV_Pick_Release_PVT

2201: -- Name
2202: -- PROCEDURE Process_Line
2203: --
2204: -- Package
2205: -- INV_Pick_Release_PVT
2206: --
2207: -- Purpose
2208: -- Pick releases the move order line passed in. Any necessary validation is
2209: -- assumed to have been done by the caller.

Line 2388: print_debug('Inside Process_Line', 'Inv_Pick_Release_PVT.Process_Line');

2384: is_debug := FALSE;
2385: End If;
2386: END IF;
2387: IF (is_debug) THEN
2388: print_debug('Inside Process_Line', 'Inv_Pick_Release_PVT.Process_Line');
2389: gmi_reservation_util.println('inside Inv_Pick_Release_PVT.Process_Line');
2390: END IF;
2391:
2392: SAVEPOINT process_line_pvt;

Line 2389: gmi_reservation_util.println('inside Inv_Pick_Release_PVT.Process_Line');

2385: End If;
2386: END IF;
2387: IF (is_debug) THEN
2388: print_debug('Inside Process_Line', 'Inv_Pick_Release_PVT.Process_Line');
2389: gmi_reservation_util.println('inside Inv_Pick_Release_PVT.Process_Line');
2390: END IF;
2391:
2392: SAVEPOINT process_line_pvt;
2393: x_detail_rec_count := 0;

Line 2482: print_debug('No data found-Delivery Info', 'Inv_Pick_Release_PVT.Process_Line');

2478: end if;
2479: EXCEPTION
2480: WHEN NO_DATA_FOUND THEN
2481: IF (is_debug) THEN
2482: print_debug('No data found-Delivery Info', 'Inv_Pick_Release_PVT.Process_Line');
2483: gmi_reservation_util.println('Process_LineNo data found-Delivery Info');
2484: END IF;
2485: ROLLBACK TO process_line_pvt;
2486: fnd_message.set_name('INV', 'INV_DELIV_INFO_MISSING');

Line 2496: print_debug('Error setting item cache', 'Inv_Pick_Release_PVT.Process_Line');

2492: END IF;
2493: l_return_value := INV_CACHE.set_item_rec(p_mo_line_rec.organization_id, p_mo_line_rec.inventory_item_id);
2494: IF NOT l_return_value THEN
2495: If is_debug THEN
2496: print_debug('Error setting item cache', 'Inv_Pick_Release_PVT.Process_Line');
2497: End If;
2498: raise fnd_api.g_exc_unexpected_error;
2499: End If;
2500: l_reservable_type:= INV_CACHE.item_rec.reservable_type;

Line 2512: print_debug('Error setting item cache','Inv_Pick_Release_PVT.Process_Line');

2508: ELSE
2509: l_return_value := INV_CACHE.set_mtt_rec(p_mo_line_rec.transaction_type_id);
2510: IF NOT l_return_value THEN
2511: If is_debug THEN
2512: print_debug('Error setting item cache','Inv_Pick_Release_PVT.Process_Line');
2513: End If;
2514: raise fnd_api.g_exc_unexpected_error;
2515: End If;
2516: l_demand_source_type := INV_CACHE.mtt_rec.transaction_source_type_id;

Line 2530: print_debug('No Mtl_Sales_Order ID found for oe header', 'Inv_Pick_Release_PVT.Process_Line');

2526:
2527: l_return_value := INV_CACHE.set_mso_rec(l_demand_info.oe_header_id);
2528: IF NOT l_return_value THEN
2529: IF (is_debug) THEN
2530: print_debug('No Mtl_Sales_Order ID found for oe header', 'Inv_Pick_Release_PVT.Process_Line');
2531: gmi_reservation_util.println('No Mtl_Sales_Order ID found for oe header');
2532: END IF;
2533: fnd_message.set_name('INV', 'INV_COULD_NOT_GET_MSO_HEADER');
2534: fnd_msg_pub.ADD;

Line 2543: print_debug('p_mo_line_rec.unit_number is '|| p_mo_line_rec.unit_number, 'Inv_Pick_Release_PVT.Process_Line');

2539:
2540: IF (is_debug) THEN
2541: gmi_reservation_util.println('Process_Line, l_mso_header_id '|| l_mso_header_id);
2542:
2543: print_debug('p_mo_line_rec.unit_number is '|| p_mo_line_rec.unit_number, 'Inv_Pick_Release_PVT.Process_Line');
2544: print_debug('p_mo_line_Rec.project_id is '|| p_mo_line_rec.project_id, 'Inv_Pick_Release_PVT.Process_Line');
2545: print_debug('p_mo_line_Rec.task_id is '|| p_mo_line_rec.task_id, 'Inv_Pick_Release_PVT.Process_Line');
2546: END IF;
2547:

Line 2544: print_debug('p_mo_line_Rec.project_id is '|| p_mo_line_rec.project_id, 'Inv_Pick_Release_PVT.Process_Line');

2540: IF (is_debug) THEN
2541: gmi_reservation_util.println('Process_Line, l_mso_header_id '|| l_mso_header_id);
2542:
2543: print_debug('p_mo_line_rec.unit_number is '|| p_mo_line_rec.unit_number, 'Inv_Pick_Release_PVT.Process_Line');
2544: print_debug('p_mo_line_Rec.project_id is '|| p_mo_line_rec.project_id, 'Inv_Pick_Release_PVT.Process_Line');
2545: print_debug('p_mo_line_Rec.task_id is '|| p_mo_line_rec.task_id, 'Inv_Pick_Release_PVT.Process_Line');
2546: END IF;
2547:
2548: -- Retrieve reservation information for that demand source

Line 2545: print_debug('p_mo_line_Rec.task_id is '|| p_mo_line_rec.task_id, 'Inv_Pick_Release_PVT.Process_Line');

2541: gmi_reservation_util.println('Process_Line, l_mso_header_id '|| l_mso_header_id);
2542:
2543: print_debug('p_mo_line_rec.unit_number is '|| p_mo_line_rec.unit_number, 'Inv_Pick_Release_PVT.Process_Line');
2544: print_debug('p_mo_line_Rec.project_id is '|| p_mo_line_rec.project_id, 'Inv_Pick_Release_PVT.Process_Line');
2545: print_debug('p_mo_line_Rec.task_id is '|| p_mo_line_rec.task_id, 'Inv_Pick_Release_PVT.Process_Line');
2546: END IF;
2547:
2548: -- Retrieve reservation information for that demand source
2549: -- only if the item is reservable

Line 2552: print_debug('Calling process_reservations', 'Inv_Pick_Release_PVT.Process_Line');

2548: -- Retrieve reservation information for that demand source
2549: -- only if the item is reservable
2550: IF (l_reservable_type = 1) THEN
2551: IF (is_debug) THEN
2552: print_debug('Calling process_reservations', 'Inv_Pick_Release_PVT.Process_Line');
2553: END IF;
2554: --bug#7377744
2555: process_reservations(
2556: x_return_status => l_api_return_status

Line 2579: print_debug('Calling process_unreservable_items', 'Inv_Pick_Release_PVT.Process_Line');

2575: ELSIF (l_reservable_type = 2) THEN
2576: -- bug 1412145 for non reservable item, just update shipping attr with released_status = 'Y'
2577: -- update the qty_Detailed and qty_Delivered in the move order line
2578: IF (is_debug) THEN
2579: print_debug('Calling process_unreservable_items', 'Inv_Pick_Release_PVT.Process_Line');
2580: END IF;
2581: l_call_mode := NULL;
2582: process_unreservable_items(
2583: x_return_status => l_api_return_status

Line 2609: print_debug('Error setting header cache', 'Inv_Pick_Release_PVT.Process_Line');

2605:
2606: l_return_value := INV_CACHE.set_mtrh_rec(p_mo_line_rec.header_id);
2607: IF NOT l_return_value THEN
2608: If is_debug THEN
2609: print_debug('Error setting header cache', 'Inv_Pick_Release_PVT.Process_Line');
2610: End If;
2611: raise fnd_api.g_exc_unexpected_error;
2612: END IF;
2613: l_request_number := INV_CACHE.mtrh_rec.request_number;

Line 2628: print_debug('No Data found - document set','Inv_Pick_Release_PVT.Process_Line');

2624: WHERE NAME = l_request_number;
2625: EXCEPTION
2626: WHEN NO_DATA_FOUND THEN
2627: IF is_debug THEN
2628: print_debug('No Data found - document set','Inv_Pick_Release_PVT.Process_Line');
2629: END IF;
2630: x_return_status := fnd_api.g_ret_sts_error;
2631: RAISE fnd_api.g_exc_error;
2632: END;

Line 2647: print_debug('Error in Print Pick Slip', 'Inv_Pick_Release_PVT.Process_Line');

2643: );
2644:
2645: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
2646: IF (is_debug) THEN
2647: print_debug('Error in Print Pick Slip', 'Inv_Pick_Release_PVT.Process_Line');
2648: END IF;
2649: ROLLBACK TO process_line_pvt;
2650: fnd_message.set_name('INV', 'INV_PRINT_PICK_SLIP_FAILED');
2651: fnd_message.set_token('PICK_SLIP_NUM', TO_CHAR(l_pick_slip_number));

Line 2659: print_debug('Non-standard reservable type: ' || l_reservable_type, 'Inv_Pick_Release_PVT.Process_Line');

2655: END IF; -- ready to print
2656:
2657: GOTO end_pick;
2658: ELSE
2659: print_debug('Non-standard reservable type: ' || l_reservable_type, 'Inv_Pick_Release_PVT.Process_Line');
2660: END IF; -- The item is reservable
2661:
2662: l_lot_control_code:= INV_CACHE.item_rec.lot_control_code;
2663:

Line 2674: print_debug('Could not reserve any qty skip suggestion', 'Inv_Pick_Release_PVT.Process_Line');

2670: -- If the sub is not reservable we still want to move further
2671: IF g_sub_reservable_type = 1 THEN
2672: IF (l_demand_rsvs_ordered.COUNT = 0 AND l_lot_divisible_flag = 'Y' AND g_pick_nonrsv_lots <> 1) THEN -- Bug 8560030
2673: IF (is_debug) THEN
2674: print_debug('Could not reserve any qty skip suggestion', 'Inv_Pick_Release_PVT.Process_Line');
2675: END IF;
2676: GOTO rsv_failed;
2677: END IF;
2678: END IF;

Line 2694: print_debug('Calling get tolerance', 'Inv_Pick_Release_PVT.Process_Line');

2690: -- {{ Test Case # UTK-REALLOC-3.2.6:61 }}
2691: -- Description: Tolerances on Non-lot indivisible items should not be considered
2692: IF l_lot_divisible_flag = 'N' THEN
2693: IF (is_debug) THEN
2694: print_debug('Calling get tolerance', 'Inv_Pick_Release_PVT.Process_Line');
2695: END IF;
2696: get_tolerance(p_mo_line_id => p_mo_line_rec.line_id,
2697: x_return_status => l_api_return_status,
2698: x_msg_count => x_msg_count,

Line 2705: print_debug('max tolerance is '|| l_max_tolerance || ' , min tolerance is ' || l_min_tolerance, 'Inv_Pick_Release_PVT.Process_line');

2701: x_min_tolerance => l_min_tolerance,
2702: x_max_tolerance2 => l_max_tolerance2,
2703: x_min_tolerance2 => l_min_tolerance2 );
2704: IF (is_debug) THEN
2705: print_debug('max tolerance is '|| l_max_tolerance || ' , min tolerance is ' || l_min_tolerance, 'Inv_Pick_Release_PVT.Process_line');
2706: print_debug('max tolerance is '|| l_max_tolerance2 || ' , min tolerance is ' || l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_line');
2707: END IF;
2708: END IF;
2709:

Line 2706: print_debug('max tolerance is '|| l_max_tolerance2 || ' , min tolerance is ' || l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_line');

2702: x_max_tolerance2 => l_max_tolerance2,
2703: x_min_tolerance2 => l_min_tolerance2 );
2704: IF (is_debug) THEN
2705: print_debug('max tolerance is '|| l_max_tolerance || ' , min tolerance is ' || l_min_tolerance, 'Inv_Pick_Release_PVT.Process_line');
2706: print_debug('max tolerance is '|| l_max_tolerance2 || ' , min tolerance is ' || l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_line');
2707: END IF;
2708: END IF;
2709:
2710: IF (is_debug) THEN

Line 2711: print_debug('calling create suggestions', 'Inv_Pick_Release_PVT.Process_Line');

2707: END IF;
2708: END IF;
2709:
2710: IF (is_debug) THEN
2711: print_debug('calling create suggestions', 'Inv_Pick_Release_PVT.Process_Line');
2712: print_debug('line_id is '|| p_mo_line_rec.line_id, 'Inv_Pick_Release_PVT.Process_line');
2713: END IF;
2714: --Bug3237702 starts added for caching
2715: inv_cache.tolocator_id := p_mo_line_rec.to_locator_id;

Line 2712: print_debug('line_id is '|| p_mo_line_rec.line_id, 'Inv_Pick_Release_PVT.Process_line');

2708: END IF;
2709:
2710: IF (is_debug) THEN
2711: print_debug('calling create suggestions', 'Inv_Pick_Release_PVT.Process_Line');
2712: print_debug('line_id is '|| p_mo_line_rec.line_id, 'Inv_Pick_Release_PVT.Process_line');
2713: END IF;
2714: --Bug3237702 starts added for caching
2715: inv_cache.tolocator_id := p_mo_line_rec.to_locator_id;
2716: inv_cache.tosubinventory_code := p_mo_line_rec.to_subinventory_code;

Line 2738: print_debug('l_return_status = '|| l_api_return_status, 'Inv_Pick_Release_PVT.Process_Line');

2734: g_pick_nonrsv_lots := 2; -- Bug 8560030
2735:
2736: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
2737: IF (is_debug) THEN
2738: print_debug('l_return_status = '|| l_api_return_status, 'Inv_Pick_Release_PVT.Process_Line');
2739: print_debug('inv detailing failed', 'Inv_Pick_Release_PVT.Process_Line');
2740: END IF;
2741: /*As a part of bug 1826833, commented the line below and
2742: uncommented the the message printing code below

Line 2739: print_debug('inv detailing failed', 'Inv_Pick_Release_PVT.Process_Line');

2735:
2736: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
2737: IF (is_debug) THEN
2738: print_debug('l_return_status = '|| l_api_return_status, 'Inv_Pick_Release_PVT.Process_Line');
2739: print_debug('inv detailing failed', 'Inv_Pick_Release_PVT.Process_Line');
2740: END IF;
2741: /*As a part of bug 1826833, commented the line below and
2742: uncommented the the message printing code below
2743: */

Line 2744: -- print_debug(replace(x_msg_data,chr(0),'#'), 'Inv_Pick_Release_PVT.Process_Line');

2740: END IF;
2741: /*As a part of bug 1826833, commented the line below and
2742: uncommented the the message printing code below
2743: */
2744: -- print_debug(replace(x_msg_data,chr(0),'#'), 'Inv_Pick_Release_PVT.Process_Line');
2745: fnd_msg_pub.count_and_get(p_count => l_count, p_data => l_message, p_encoded => 'F');
2746:
2747: IF (l_count = 0) THEN
2748: IF (is_debug) THEN

Line 2750: 'Inv_Pick_Release_PVT.Process_Line');

2746:
2747: IF (l_count = 0) THEN
2748: IF (is_debug) THEN
2749: print_debug('no message from detailing engine',
2750: 'Inv_Pick_Release_PVT.Process_Line');
2751: END IF;
2752: ELSIF (l_count = 1) THEN
2753: IF (is_debug) THEN
2754: print_debug(l_message, 'Inv_Pick_Release_PVT.Process_Line');

Line 2754: print_debug(l_message, 'Inv_Pick_Release_PVT.Process_Line');

2750: 'Inv_Pick_Release_PVT.Process_Line');
2751: END IF;
2752: ELSIF (l_count = 1) THEN
2753: IF (is_debug) THEN
2754: print_debug(l_message, 'Inv_Pick_Release_PVT.Process_Line');
2755: END IF;
2756: ELSE
2757: FOR i IN 1 .. l_count LOOP
2758: l_message := fnd_msg_pub.get(i, 'F');

Line 2760: print_debug(l_message, 'Inv_Pick_Release_PVT.Process_Line');

2756: ELSE
2757: FOR i IN 1 .. l_count LOOP
2758: l_message := fnd_msg_pub.get(i, 'F');
2759: IF (is_debug) THEN
2760: print_debug(l_message, 'Inv_Pick_Release_PVT.Process_Line');
2761: END IF;
2762: END LOOP;
2763:
2764: fnd_msg_pub.delete_msg();

Line 2772: print_debug('Error setting header cache', 'Inv_Pick_Release_PVT.Process_Line');

2768:
2769: l_return_value := INV_CACHE.set_mtrh_rec(p_mo_line_rec.header_id);
2770: IF NOT l_return_value THEN
2771: If is_debug THEN
2772: print_debug('Error setting header cache', 'Inv_Pick_Release_PVT.Process_Line');
2773: End If;
2774: raise fnd_api.g_exc_unexpected_error;
2775: END IF;
2776: l_request_number := INV_CACHE.mtrh_rec.request_number;

Line 2786: print_debug('after calling create suggestions with return status = '||l_api_return_status, 'Inv_Pick_Release_PVT.Process_Line');

2782: RAISE fnd_api.g_exc_unexpected_error;
2783: END IF;
2784:
2785: IF (is_debug) THEN
2786: print_debug('after calling create suggestions with return status = '||l_api_return_status, 'Inv_Pick_Release_PVT.Process_Line');
2787: END IF;
2788:
2789: -- Update the detailed quantity (and if possible, the sourcing information)
2790: -- of the Move Order Line

Line 2806: print_debug('l_quantity detailed is '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

2802: FROM mtl_material_transactions_temp
2803: WHERE move_order_line_id = p_mo_line_rec.line_id;
2804: -- Bug 6989438
2805: IF (is_debug) THEN
2806: print_debug('l_quantity detailed is '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2807: print_debug('l_sec_quantity detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2808: print_debug('l_num_detail_recs is '|| l_num_detail_recs, 'Inv_Pick_Release_PVT.Process_Line');
2809: END IF;
2810:

Line 2807: print_debug('l_sec_quantity detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

2803: WHERE move_order_line_id = p_mo_line_rec.line_id;
2804: -- Bug 6989438
2805: IF (is_debug) THEN
2806: print_debug('l_quantity detailed is '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2807: print_debug('l_sec_quantity detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2808: print_debug('l_num_detail_recs is '|| l_num_detail_recs, 'Inv_Pick_Release_PVT.Process_Line');
2809: END IF;
2810:
2811: --Bug#6085577. l_quantity_detailed_conv should hold quantity in the UOM of MTRL.

Line 2808: print_debug('l_num_detail_recs is '|| l_num_detail_recs, 'Inv_Pick_Release_PVT.Process_Line');

2804: -- Bug 6989438
2805: IF (is_debug) THEN
2806: print_debug('l_quantity detailed is '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2807: print_debug('l_sec_quantity detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
2808: print_debug('l_num_detail_recs is '|| l_num_detail_recs, 'Inv_Pick_Release_PVT.Process_Line');
2809: END IF;
2810:
2811: --Bug#6085577. l_quantity_detailed_conv should hold quantity in the UOM of MTRL.
2812: l_primary_uom:= INV_CACHE.item_rec.primary_uom_code; --Get primary UOM of item.

Line 2814: print_debug('Move Order line UOM '||p_mo_line_rec.uom_code || 'Pri UOM:'|| l_primary_uom,'Inv_Pick_Release_PVT.Process_Line');

2810:
2811: --Bug#6085577. l_quantity_detailed_conv should hold quantity in the UOM of MTRL.
2812: l_primary_uom:= INV_CACHE.item_rec.primary_uom_code; --Get primary UOM of item.
2813: IF (is_debug) THEN
2814: print_debug('Move Order line UOM '||p_mo_line_rec.uom_code || 'Pri UOM:'|| l_primary_uom,'Inv_Pick_Release_PVT.Process_Line');
2815: END IF;
2816: IF (p_mo_line_rec.uom_code <> l_primary_uom ) THEN
2817: l_quantity_detailed_conv := inv_convert.inv_um_convert(
2818: item_id => p_mo_line_rec.inventory_item_id

Line 2833: print_debug('no detail records found', 'Inv_Pick_Release_PVT.Process_line');

2829:
2830: EXCEPTION
2831: WHEN NO_DATA_FOUND THEN
2832: IF (is_debug) THEN
2833: print_debug('no detail records found', 'Inv_Pick_Release_PVT.Process_line');
2834: END IF;
2835: l_quantity_detailed := 0;
2836: l_sec_quantity_detailed := 0;
2837: l_quantity_detailed_conv := 0;

Line 2849: print_debug('Error - could not pick full', 'Inv_Pick_Release_PVT.Process_Line');

2845: -- than the requested quantity
2846: IF l_quantity_detailed < p_mo_line_rec.primary_quantity - l_min_tolerance THEN
2847: IF p_allow_partial_pick = fnd_api.g_false THEN
2848: IF (is_debug) THEN
2849: print_debug('Error - could not pick full', 'Inv_Pick_Release_PVT.Process_Line');
2850: END IF;
2851: ROLLBACK TO process_line_pvt;
2852: fnd_message.set_name('INV', 'INV_COULD_NOT_PICK_FULL');
2853: fnd_msg_pub.ADD;

Line 2859: print_debug('l_partially_detailed is 1', 'Inv_Pick_Release_PVT.Process_Line');

2855: ELSE
2856: -- Set a flag to later set the return status for success,
2857: -- but only partially detailed
2858: IF (is_debug) THEN
2859: print_debug('l_partially_detailed is 1', 'Inv_Pick_Release_PVT.Process_Line');
2860: END IF;
2861: l_partially_detailed := 1;
2862: END IF;
2863: ELSE

Line 2865: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');

2861: l_partially_detailed := 1;
2862: END IF;
2863: ELSE
2864: IF (is_debug) THEN
2865: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');
2866: IF l_quantity_detailed < p_mo_line_rec.primary_quantity THEN
2867: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');
2868: END IF;
2869: END IF;

Line 2867: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');

2863: ELSE
2864: IF (is_debug) THEN
2865: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');
2866: IF l_quantity_detailed < p_mo_line_rec.primary_quantity THEN
2867: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');
2868: END IF;
2869: END IF;
2870: l_partially_detailed := 2;
2871: END IF;

Line 2883: print_debug('Fulfill Base = '||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Line');

2879: );
2880:
2881:
2882: IF (is_debug) THEN
2883: print_debug('Fulfill Base = '||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Line');
2884: print_debug('l_sec_quantity_detailed = ' ||l_sec_quantity_detailed||
2885: ' p_mo_line_rec.secondary_quantity = '||p_mo_line_rec.secondary_quantity
2886: ||'l_min_tolerance2 = ' ||l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_Line');
2887: END IF;

Line 2886: ||'l_min_tolerance2 = ' ||l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_Line');

2882: IF (is_debug) THEN
2883: print_debug('Fulfill Base = '||l_fulfill_base, 'Inv_Pick_Release_PVT.Process_Line');
2884: print_debug('l_sec_quantity_detailed = ' ||l_sec_quantity_detailed||
2885: ' p_mo_line_rec.secondary_quantity = '||p_mo_line_rec.secondary_quantity
2886: ||'l_min_tolerance2 = ' ||l_min_tolerance2, 'Inv_Pick_Release_PVT.Process_Line');
2887: END IF;
2888:
2889: IF l_fulfill_base = 'S' THEN
2890: IF l_sec_quantity_detailed < p_mo_line_rec.secondary_quantity - l_min_tolerance2 THEN

Line 2893: print_debug('Error - could not pick full', 'Inv_Pick_Release_PVT.Process_Line');

2889: IF l_fulfill_base = 'S' THEN
2890: IF l_sec_quantity_detailed < p_mo_line_rec.secondary_quantity - l_min_tolerance2 THEN
2891: IF p_allow_partial_pick = fnd_api.g_false THEN
2892: IF (is_debug) THEN
2893: print_debug('Error - could not pick full', 'Inv_Pick_Release_PVT.Process_Line');
2894: END IF;
2895: ROLLBACK TO process_line_pvt;
2896: fnd_message.set_name('INV', 'INV_COULD_NOT_PICK_FULL');
2897: fnd_msg_pub.ADD;

Line 2903: print_debug('l_partially_detailed is 1', 'Inv_Pick_Release_PVT.Process_Line');

2899: ELSE
2900: -- Set a flag to later set the return status for success,
2901: -- but only partially detailed
2902: IF (is_debug) THEN
2903: print_debug('l_partially_detailed is 1', 'Inv_Pick_Release_PVT.Process_Line');
2904: END IF;
2905: l_partially_detailed := 1;
2906: END IF;
2907: ELSE

Line 2909: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');

2905: l_partially_detailed := 1;
2906: END IF;
2907: ELSE
2908: IF (is_debug) THEN
2909: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');
2910: IF l_sec_quantity_detailed < p_mo_line_rec.secondary_quantity THEN
2911: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');
2912: END IF;
2913: END IF;

Line 2911: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');

2907: ELSE
2908: IF (is_debug) THEN
2909: print_debug('l_partially_detailed is 2', 'Inv_Pick_Release_PVT.Process_Line');
2910: IF l_sec_quantity_detailed < p_mo_line_rec.secondary_quantity THEN
2911: print_debug('Underallocated with tolerance', 'Inv_Pick_Release_PVT.Process_Line');
2912: END IF;
2913: END IF;
2914: l_partially_detailed := 2;
2915: END IF;

Line 2934: print_debug('p_mo_line_rec.quantity_delivered '||p_mo_line_rec.quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');

2930: p_mo_line_rec.pick_slip_date := SYSDATE;
2931:
2932: -- Bug 6989438
2933: IF (is_debug) THEN
2934: print_debug('p_mo_line_rec.quantity_delivered '||p_mo_line_rec.quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');
2935: print_debug('p_mo_line_rec.secondary_quantity_delivered '||p_mo_line_rec.secondary_quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');
2936: end if;
2937: UPDATE MTL_TXN_REQUEST_LINES
2938: SET quantity_detailed = NVL(p_mo_line_rec.quantity_delivered,0),

Line 2935: print_debug('p_mo_line_rec.secondary_quantity_delivered '||p_mo_line_rec.secondary_quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');

2931:
2932: -- Bug 6989438
2933: IF (is_debug) THEN
2934: print_debug('p_mo_line_rec.quantity_delivered '||p_mo_line_rec.quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');
2935: print_debug('p_mo_line_rec.secondary_quantity_delivered '||p_mo_line_rec.secondary_quantity_delivered, 'Inv_Pick_Release_PVT.Process_Line');
2936: end if;
2937: UPDATE MTL_TXN_REQUEST_LINES
2938: SET quantity_detailed = NVL(p_mo_line_rec.quantity_delivered,0),
2939: secondary_quantity_detailed = NVL(p_mo_line_rec.secondary_quantity_delivered,0),

Line 2954: print_debug('updating reservations created as suggestions failed', 'Inv_Pick_Release_PVT.Process_Line');

2950: l_reservation_id := l_demand_rsvs_ordered(l_index).reservation_id;
2951: l_new_prim_rsv_quantity := l_demand_rsvs_ordered(l_index).primary_reservation_quantity - NVL(l_rsv_qty_available, 0);
2952: l_new_sec_rsv_quantity := l_demand_rsvs_ordered(l_index).secondary_reservation_quantity - NVL(l_rsv_qty2_available, 0);
2953: IF (is_debug) THEN
2954: print_debug('updating reservations created as suggestions failed', 'Inv_Pick_Release_PVT.Process_Line');
2955: print_debug('reduce reservation by '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
2956: print_debug('reduce secondary reservation by '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
2957: END IF;
2958:

Line 2955: print_debug('reduce reservation by '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');

2951: l_new_prim_rsv_quantity := l_demand_rsvs_ordered(l_index).primary_reservation_quantity - NVL(l_rsv_qty_available, 0);
2952: l_new_sec_rsv_quantity := l_demand_rsvs_ordered(l_index).secondary_reservation_quantity - NVL(l_rsv_qty2_available, 0);
2953: IF (is_debug) THEN
2954: print_debug('updating reservations created as suggestions failed', 'Inv_Pick_Release_PVT.Process_Line');
2955: print_debug('reduce reservation by '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
2956: print_debug('reduce secondary reservation by '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
2957: END IF;
2958:
2959: --if setting new quantity to 0, call delete

Line 2956: print_debug('reduce secondary reservation by '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');

2952: l_new_sec_rsv_quantity := l_demand_rsvs_ordered(l_index).secondary_reservation_quantity - NVL(l_rsv_qty2_available, 0);
2953: IF (is_debug) THEN
2954: print_debug('updating reservations created as suggestions failed', 'Inv_Pick_Release_PVT.Process_Line');
2955: print_debug('reduce reservation by '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
2956: print_debug('reduce secondary reservation by '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
2957: END IF;
2958:
2959: --if setting new quantity to 0, call delete
2960: If l_new_prim_rsv_quantity = 0 Then

Line 2964: print_debug('Delete org level reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

2960: If l_new_prim_rsv_quantity = 0 Then
2961: --CHANGE - should pass validation flag that does not validate but
2962: --does update quantity tree
2963: IF is_debug THEN
2964: print_debug('Delete org level reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
2965: END IF;
2966: inv_reservation_pvt.delete_reservation(
2967: p_api_version_number => 1.0
2968: ,p_init_msg_lst => fnd_api.g_false

Line 2979: print_debug('return error from delete_reservation', 'Inv_Pick_Release_Pvt.Process_Line');

2975: );
2976:
2977: IF (l_api_return_status = fnd_api.g_ret_sts_error) THEN
2978: IF (is_debug) THEN
2979: print_debug('return error from delete_reservation', 'Inv_Pick_Release_Pvt.Process_Line');
2980: END IF;
2981: RAISE fnd_api.g_exc_error;
2982: ELSIF l_api_return_status = fnd_api.g_ret_sts_unexp_error THEN
2983: IF (is_debug) THEN

Line 2984: print_debug('return unexpected error from delete_reservation','Inv_Pick_Release_Pvt.Process_Line');

2980: END IF;
2981: RAISE fnd_api.g_exc_error;
2982: ELSIF l_api_return_status = fnd_api.g_ret_sts_unexp_error THEN
2983: IF (is_debug) THEN
2984: print_debug('return unexpected error from delete_reservation','Inv_Pick_Release_Pvt.Process_Line');
2985: END IF;
2986: RAISE fnd_api.g_exc_unexpected_error;
2987: END IF;
2988:

Line 2992: print_debug('updating quantity tree', 'Inv_Pick_Release_PVT.Process_Line');

2988:
2989: Else
2990: --update quantity tree
2991: IF is_debug THEN
2992: print_debug('updating quantity tree', 'Inv_Pick_Release_PVT.Process_Line');
2993: END IF;
2994: l_primary_uom:= INV_CACHE.item_rec.primary_uom_code;
2995: l_secondary_uom:= INV_CACHE.item_rec.secondary_uom_code;
2996: l_revision_control_code:=INV_CACHE.item_rec.revision_qty_control_code;

Line 3063: 'Inv_Pick_Release_PVT.Process_Line');

3059: );
3060: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
3061: IF (is_debug) THEN
3062: print_debug('Error from update quantity tree',
3063: 'Inv_Pick_Release_PVT.Process_Line');
3064: END IF;
3065: RAISE fnd_api.g_exc_unexpected_error;
3066: END IF;
3067:

Line 3091: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');

3087: );
3088:
3089: IF (l_new_rsv_quantity = -99999) THEN
3090: IF (is_debug) THEN
3091: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');
3092: END IF;
3093: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3094: fnd_message.set_token('UOM', l_secondary_uom);
3095: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3113: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_line');

3109:
3110:
3111: IF (l_new_rsv_quantity = -99999) THEN
3112: IF (is_debug) THEN
3113: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_line');
3114: END IF;
3115: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3116: fnd_message.set_token('UOM', l_primary_uom);
3117: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3125: print_debug('1 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3121: END IF;
3122:
3123: -- Bug 6989438
3124: IF (is_debug) THEN
3125: print_debug('1 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3126: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3127: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3128: END IF;
3129: UPDATE mtl_reservations

Line 3126: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3122:
3123: -- Bug 6989438
3124: IF (is_debug) THEN
3125: print_debug('1 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3126: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3127: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3128: END IF;
3129: UPDATE mtl_reservations
3130: SET primary_reservation_quantity = l_new_prim_rsv_quantity

Line 3127: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3123: -- Bug 6989438
3124: IF (is_debug) THEN
3125: print_debug('1 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3126: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3127: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3128: END IF;
3129: UPDATE mtl_reservations
3130: SET primary_reservation_quantity = l_new_prim_rsv_quantity
3131: ,reservation_quantity = l_new_rsv_quantity

Line 3143: print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');

3139: , x_msg_data => x_msg_data);
3140:
3141: IF l_api_return_status = fnd_api.g_ret_sts_error THEN
3142: IF (is_debug) THEN
3143: print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');
3144: END IF;
3145: RAISE fnd_api.g_exc_error;
3146: END IF;
3147: --

Line 3150: print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');

3146: END IF;
3147: --
3148: IF l_api_return_status = fnd_api.g_ret_sts_unexp_error THEN
3149: IF (is_debug) THEN
3150: print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');
3151: END IF;
3152: RAISE fnd_api.g_exc_unexpected_error;
3153: END IF;
3154:

Line 3168: print_debug('Checking whether to unreserve non-detailed quantity or not', 'Inv_Pick_Release_PVT.Process_Line');

3164: l_res_ordered_index := l_demand_rsvs_ordered.LAST;
3165: IF l_demand_rsvs_ordered.COUNT > 0 AND l_partially_detailed = 1 AND l_num_detail_recs > 0 THEN
3166:
3167: IF (l_debug = 1) THEN
3168: print_debug('Checking whether to unreserve non-detailed quantity or not', 'Inv_Pick_Release_PVT.Process_Line');
3169: END IF;
3170:
3171: l_reduce_rsv_qty := l_rsv_qty_available;
3172: l_reduce_rsv_qty2:= l_rsv_qty2_available;

Line 3196: print_debug('l_reduce_rsv_qty = '||l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');

3192: l_new_prim_rsv_quantity := l_demand_rsvs_ordered(l_res_ordered_index).primary_reservation_quantity - NVL(l_reduce_rsv_qty, 0);
3193: l_new_sec_rsv_quantity := l_demand_rsvs_ordered(l_res_ordered_index).secondary_reservation_quantity - NVL(l_reduce_rsv_qty2, 0);
3194:
3195: IF (l_debug = 1) THEN
3196: print_debug('l_reduce_rsv_qty = '||l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3197: print_debug('l_new_prim_rsv_quantity = '||l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3198: print_debug('l_new_sec_rsv_quantity = '||l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3199: END IF;
3200:

Line 3197: print_debug('l_new_prim_rsv_quantity = '||l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');

3193: l_new_sec_rsv_quantity := l_demand_rsvs_ordered(l_res_ordered_index).secondary_reservation_quantity - NVL(l_reduce_rsv_qty2, 0);
3194:
3195: IF (l_debug = 1) THEN
3196: print_debug('l_reduce_rsv_qty = '||l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3197: print_debug('l_new_prim_rsv_quantity = '||l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3198: print_debug('l_new_sec_rsv_quantity = '||l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3199: END IF;
3200:
3201: IF NVL(l_reduce_rsv_qty,0) > 0 THEN

Line 3198: print_debug('l_new_sec_rsv_quantity = '||l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');

3194:
3195: IF (l_debug = 1) THEN
3196: print_debug('l_reduce_rsv_qty = '||l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3197: print_debug('l_new_prim_rsv_quantity = '||l_new_prim_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3198: print_debug('l_new_sec_rsv_quantity = '||l_new_sec_rsv_quantity, 'Inv_Pick_Release_PVT.Process_Line');
3199: END IF;
3200:
3201: IF NVL(l_reduce_rsv_qty,0) > 0 THEN
3202: IF (l_debug = 1) THEN

Line 3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');

3199: END IF;
3200:
3201: IF NVL(l_reduce_rsv_qty,0) > 0 THEN
3202: IF (l_debug = 1) THEN
3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');
3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');

Line 3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');

3200:
3201: IF NVL(l_reduce_rsv_qty,0) > 0 THEN
3202: IF (l_debug = 1) THEN
3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');
3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3208: END IF;

Line 3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');

3201: IF NVL(l_reduce_rsv_qty,0) > 0 THEN
3202: IF (l_debug = 1) THEN
3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');
3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3208: END IF;
3209:

Line 3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');

3202: IF (l_debug = 1) THEN
3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');
3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3208: END IF;
3209:
3210: --handle conversion to reservation UOM

Line 3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');

3203: print_debug('updating reservations created as suggestions got created with partial qty', 'Inv_Pick_Release_PVT.Process_Line');
3204: print_debug('system generated reservation '|| l_rsv_qty_available, 'Inv_Pick_Release_PVT.Process_Line');
3205: print_debug('system generated sec reservation '||l_rsv_qty2_available, 'Inv_Pick_Release_PVT.Process_Line');
3206: print_debug('reduce reservation by '|| l_reduce_rsv_qty, 'Inv_Pick_Release_PVT.Process_Line');
3207: print_debug('reduce sec reservation by '|| l_reduce_rsv_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3208: END IF;
3209:
3210: --handle conversion to reservation UOM
3211: IF l_demand_rsvs_ordered(l_res_ordered_index).reservation_uom_code IS NULL THEN

Line 3232: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');

3228: );
3229:
3230: IF (l_new_rsv_quantity = -99999) THEN
3231: IF (is_debug) THEN
3232: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');
3233: END IF;
3234: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3235: fnd_message.set_token('UOM', l_secondary_uom);
3236: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3253: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_line');

3249: );
3250:
3251: IF (l_new_rsv_quantity = -99999) THEN
3252: IF (is_debug) THEN
3253: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_line');
3254: END IF;
3255: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3256: fnd_message.set_token('UOM', l_primary_uom);
3257: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3263: print_debug('2 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3259: RAISE fnd_api.g_exc_unexpected_error;
3260: END IF;
3261: END IF;
3262: IF (is_debug) THEN
3263: print_debug('2 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3264: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3265: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3266: END IF;
3267: /* bug 7253296 - error in quantity tree */

Line 3264: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3260: END IF;
3261: END IF;
3262: IF (is_debug) THEN
3263: print_debug('2 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3264: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3265: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3266: END IF;
3267: /* bug 7253296 - error in quantity tree */
3268: /*l_demand_rsvs_ordered(l_res_ordered_index).primary_reservation_quantity := l_new_prim_rsv_quantity;

Line 3265: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');

3261: END IF;
3262: IF (is_debug) THEN
3263: print_debug('2 New prim rsv qty: ' || l_new_prim_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3264: print_debug('New rsv qty: ' || l_new_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3265: print_debug('New sec rsv qty: ' || l_new_sec_rsv_quantity,'Inv_Pick_Release_PVT.Process_Line');
3266: END IF;
3267: /* bug 7253296 - error in quantity tree */
3268: /*l_demand_rsvs_ordered(l_res_ordered_index).primary_reservation_quantity := l_new_prim_rsv_quantity;
3269: l_demand_rsvs_ordered(l_res_ordered_index).reservation_quantity := l_new_rsv_quantity;

Line 3297: print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');

3293: );
3294:
3295: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
3296: IF (is_debug) THEN
3297: print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
3298: END IF;
3299: fnd_message.set_name('INV', 'INV_UPD_RSV_FAILED');
3300: fnd_msg_pub.ADD;
3301: RAISE fnd_api.g_exc_unexpected_error;

Line 3312: print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');

3308: , x_msg_data => x_msg_data);
3309:
3310: IF l_api_return_status = fnd_api.g_ret_sts_error THEN
3311: IF (is_debug) THEN
3312: print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');
3313: END IF;
3314: RAISE fnd_api.g_exc_error;
3315: END IF;
3316: --

Line 3319: print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');

3315: END IF;
3316: --
3317: IF l_api_return_status = fnd_api.g_ret_sts_unexp_error THEN
3318: IF (is_debug) THEN
3319: print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');
3320: END IF;
3321: RAISE fnd_api.g_exc_unexpected_error;
3322: END IF;*/
3323: /* end bug 7253296 */

Line 3333: print_debug('calling inv_convert.inv_uom_convert', 'Inv_Pick_Release_PVT.Process_Line');

3329: -- records match (otherwise update the line with NULL)
3330: IF l_num_detail_recs > 0 THEN
3331: -- Calculate the quantity detailed in the UOM of the move order line
3332: IF (is_debug) THEN
3333: print_debug('calling inv_convert.inv_uom_convert', 'Inv_Pick_Release_PVT.Process_Line');
3334: print_debug('l_quantity_detailed = '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3335: print_debug('l_sec_quantity_detailed = '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3336: END IF;
3337:

Line 3334: print_debug('l_quantity_detailed = '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

3330: IF l_num_detail_recs > 0 THEN
3331: -- Calculate the quantity detailed in the UOM of the move order line
3332: IF (is_debug) THEN
3333: print_debug('calling inv_convert.inv_uom_convert', 'Inv_Pick_Release_PVT.Process_Line');
3334: print_debug('l_quantity_detailed = '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3335: print_debug('l_sec_quantity_detailed = '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3336: END IF;
3337:
3338: l_quantity_detailed_conv := nvl(l_quantity_detailed_conv,0) + Nvl(p_mo_line_rec.quantity_delivered,0);

Line 3335: print_debug('l_sec_quantity_detailed = '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

3331: -- Calculate the quantity detailed in the UOM of the move order line
3332: IF (is_debug) THEN
3333: print_debug('calling inv_convert.inv_uom_convert', 'Inv_Pick_Release_PVT.Process_Line');
3334: print_debug('l_quantity_detailed = '|| l_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3335: print_debug('l_sec_quantity_detailed = '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3336: END IF;
3337:
3338: l_quantity_detailed_conv := nvl(l_quantity_detailed_conv,0) + Nvl(p_mo_line_rec.quantity_delivered,0);
3339: l_sec_quantity_detailed := nvl(l_sec_quantity_detailed,0) + Nvl(p_mo_line_rec.secondary_quantity_delivered,0);

Line 3349: print_debug('Quantity_detailed is '|| l_quantity_detailed_conv, 'Inv_Pick_Release_PVT.Process_Line');

3345: p_mo_line_rec.pick_slip_date := sysdate;
3346:
3347: -- Bug 6989438
3348: IF (is_debug) THEN
3349: print_debug('Quantity_detailed is '|| l_quantity_detailed_conv, 'Inv_Pick_Release_PVT.Process_Line');
3350: print_debug('sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3351: END IF;
3352:
3353: UPDATE MTL_TXN_REQUEST_LINES

Line 3350: print_debug('sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

3346:
3347: -- Bug 6989438
3348: IF (is_debug) THEN
3349: print_debug('Quantity_detailed is '|| l_quantity_detailed_conv, 'Inv_Pick_Release_PVT.Process_Line');
3350: print_debug('sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3351: END IF;
3352:
3353: UPDATE MTL_TXN_REQUEST_LINES
3354: SET quantity_detailed = l_quantity_detailed_conv,

Line 3409: print_debug('updating quantity tree', 'Inv_Pick_Release_PVT.Process_Line');

3405: l_rsv_detailed_qty2 := 0;
3406: END;
3407: --update quantity tree
3408: IF is_debug THEN
3409: print_debug('updating quantity tree', 'Inv_Pick_Release_PVT.Process_Line');
3410: END IF;
3411: inv_quantity_tree_pub.update_quantities(
3412: p_api_version_number => 1.0
3413: , p_init_msg_lst => fnd_api.g_false

Line 3453: print_debug('Error from update quantity tree', 'Inv_Pick_Release_PVT.Process_Line');

3449: , x_satr => l_sec_qty_available_to_reserve
3450: );
3451: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
3452: IF (is_debug) THEN
3453: print_debug('Error from update quantity tree', 'Inv_Pick_Release_PVT.Process_Line');
3454: END IF;
3455: RAISE fnd_api.g_exc_unexpected_error;
3456: END IF;
3457: IF (is_debug) THEN

Line 3458: print_debug('update reservation with quantity_detailed', 'Inv_Pick_Release_PVT.Process_Line');

3454: END IF;
3455: RAISE fnd_api.g_exc_unexpected_error;
3456: END IF;
3457: IF (is_debug) THEN
3458: print_debug('update reservation with quantity_detailed', 'Inv_Pick_Release_PVT.Process_Line');
3459: print_debug('quantity_detailed'|| l_reservation_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3460: print_debug('prev_quantity_detailed'|| l_prev_rsv_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3461: END IF;
3462:

Line 3459: print_debug('quantity_detailed'|| l_reservation_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');

3455: RAISE fnd_api.g_exc_unexpected_error;
3456: END IF;
3457: IF (is_debug) THEN
3458: print_debug('update reservation with quantity_detailed', 'Inv_Pick_Release_PVT.Process_Line');
3459: print_debug('quantity_detailed'|| l_reservation_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3460: print_debug('prev_quantity_detailed'|| l_prev_rsv_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3461: END IF;
3462:
3463: -- Bug Fix 5624514

Line 3460: print_debug('prev_quantity_detailed'|| l_prev_rsv_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');

3456: END IF;
3457: IF (is_debug) THEN
3458: print_debug('update reservation with quantity_detailed', 'Inv_Pick_Release_PVT.Process_Line');
3459: print_debug('quantity_detailed'|| l_reservation_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3460: print_debug('prev_quantity_detailed'|| l_prev_rsv_detailed_qty, 'Inv_Pick_Release_PVT.Process_Line');
3461: END IF;
3462:
3463: -- Bug Fix 5624514
3464: --handle conversion to reservation UOM

Line 3488: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');

3484: );
3485:
3486: IF (l_new_rsv_quantity = -99999) THEN
3487: IF (is_debug) THEN
3488: print_debug('Cannot convert Seconday uom to rsv uom', 'Inv_Pick_release_pvt.process_reservations');
3489: END IF;
3490: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3491: fnd_message.set_token('UOM', l_secondary_uom);
3492: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3508: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_reservations');

3504: , to_name => NULL
3505: );
3506: IF (l_rsv_detailed_qty_conv = -99999) THEN
3507: IF (is_debug) THEN
3508: print_debug('Cannot convert primary uom to rsv uom','Inv_Pick_release_pvt.process_reservations');
3509: END IF;
3510: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
3511: fnd_message.set_token('UOM', l_primary_uom);
3512: fnd_message.set_token('ROUTINE', 'Pick Release process');

Line 3519: print_debug('quantity_detailed conv'|| l_rsv_detailed_qty_conv, 'Inv_Pick_Release_PVT.Process_Line');

3515: END IF;
3516: END IF;
3517: -- End of Bug Fix 5624514
3518: IF (is_debug) THEN
3519: print_debug('quantity_detailed conv'|| l_rsv_detailed_qty_conv, 'Inv_Pick_Release_PVT.Process_Line');
3520: END IF;
3521: -- Upper tolerance may lead to allocation above the reservation
3522: -- {{ Test Case # UTK-REALLOC-3.2.6:64 }}
3523: -- Description: If allocation is greater than reservation, increase the reserved quantity

Line 3528: print_debug('l_rsv_detailed_qty_conv '|| l_rsv_detailed_qty_conv, 'Inv_Pick_Release_PVT.Process_Line');

3524:
3525:
3526: -- Bug 6989438
3527: IF (is_debug) THEN
3528: print_debug('l_rsv_detailed_qty_conv '|| l_rsv_detailed_qty_conv, 'Inv_Pick_Release_PVT.Process_Line');
3529: print_debug('l_rsv_detailed_qty2 '|| l_rsv_detailed_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3530: END IF;
3531:
3532: UPDATE mtl_reservations

Line 3529: print_debug('l_rsv_detailed_qty2 '|| l_rsv_detailed_qty2, 'Inv_Pick_Release_PVT.Process_Line');

3525:
3526: -- Bug 6989438
3527: IF (is_debug) THEN
3528: print_debug('l_rsv_detailed_qty_conv '|| l_rsv_detailed_qty_conv, 'Inv_Pick_Release_PVT.Process_Line');
3529: print_debug('l_rsv_detailed_qty2 '|| l_rsv_detailed_qty2, 'Inv_Pick_Release_PVT.Process_Line');
3530: END IF;
3531:
3532: UPDATE mtl_reservations
3533: SET reservation_quantity = greatest(reservation_quantity, l_rsv_detailed_qty_conv) -- Bug Fix 5624514

Line 3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');

3558: -- or if the sub is dynamic locator contro, and there is project and task
3559: -- for the move order line, then create a new locator with the project
3560: -- and task.
3561: IF (is_debug) THEN
3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');
3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');
3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');

Line 3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');

3559: -- for the move order line, then create a new locator with the project
3560: -- and task.
3561: IF (is_debug) THEN
3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');
3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');
3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');
3567: END IF;

Line 3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');

3560: -- and task.
3561: IF (is_debug) THEN
3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');
3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');
3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');
3567: END IF;
3568:

Line 3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');

3561: IF (is_debug) THEN
3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');
3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');
3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');
3567: END IF;
3568:
3569: /*Bug Number:3229204:l_to_locator_id was passed as a parameter for p_to_locator_id as well

Line 3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');

3562: print_debug('Calling process_prj_dynamic_locator with the following values','Inv_Pick_Release_PVT.Process_Line');
3563: print_debug('p_from_locator_id ==> '||l_from_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3564: print_debug('p_to_locator_id ==> '||l_to_locator_id, 'Inv_Pick_Release_PVT.Process_Line');
3565: print_debug('p_mold_temp_id ==> '||l_mold_temp_id, 'Inv_Pick_Release_PVT.Process_Line');
3566: print_debug('p_mold_sub_code ==> '||l_mold_sub_code, 'Inv_Pick_Release_PVT.Process_Line');
3567: END IF;
3568:
3569: /*Bug Number:3229204:l_to_locator_id was passed as a parameter for p_to_locator_id as well
3570: as x_to_locator_id .x_to_locator id is a out parameter with no copy hint,which was causing

Line 3594: print_debug('Value of locator id obtained from process_prj_dynamic_locator '||l_dest_locator_id,'Inv_Pick_Release_PVT.Process_Line');

3590: RAISE fnd_api.g_exc_unexpected_error;
3591: END IF;
3592:
3593: IF (is_debug) THEN
3594: print_debug('Value of locator id obtained from process_prj_dynamic_locator '||l_dest_locator_id,'Inv_Pick_Release_PVT.Process_Line');
3595: END IF;
3596:
3597:
3598: -- patchset J, bulk picking -------------------

Line 3607: print_debug('PATCHSET J -- BULK PICKING, do not assign pick slip number now', 'Inv_Pick_Release_PVT.Process_Line');

3603: p_organization_id => p_mo_line_rec.organization_id
3604: ) = TRUE
3605: and WMS_CONTROL.G_CURRENT_RELEASE_LEVEL >= INV_RELEASE.G_J_RELEASE_LEVEL) then
3606: IF (l_debug = 1) THEN
3607: print_debug('PATCHSET J -- BULK PICKING, do not assign pick slip number now', 'Inv_Pick_Release_PVT.Process_Line');
3608: END IF;
3609: ELSE -- INV org or before patchset J
3610:
3611: IF (is_debug) THEN

Line 3612: print_debug('get pick slip number','Inv_Pick_Release_PVT.Process_Line');

3608: END IF;
3609: ELSE -- INV org or before patchset J
3610:
3611: IF (is_debug) THEN
3612: print_debug('get pick slip number','Inv_Pick_Release_PVT.Process_Line');
3613: END IF;
3614: l_call_mode := NULL;
3615: -- Bug 2666620: Inline branching to call either WSH or INV get_pick_slip_number
3616: /* FP-J PAR Replenishment Counts: Pass 4 new parameters for grouping */

Line 3643: print_debug('l_call_mode'|| l_call_mode, 'Inv_Pick_Release_PVT.Process_Line');

3639: , p_locator_id => l_from_locator_id
3640: , p_revision => l_revision
3641: );
3642: IF (is_debug) THEN
3643: print_debug('l_call_mode'|| l_call_mode, 'Inv_Pick_Release_PVT.Process_Line');
3644: END IF;
3645:
3646: IF l_api_return_status <> fnd_api.g_ret_sts_success OR l_pick_slip_number = -1 THEN
3647: ROLLBACK TO process_line_pvt;

Line 3662: print_debug('return error from WSH_INV_INTEGRATION.find_printer','Inv_Pick_Release_Pvt.Process_Line');

3658: ) ;
3659:
3660: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
3661: IF (is_debug) THEN
3662: print_debug('return error from WSH_INV_INTEGRATION.find_printer','Inv_Pick_Release_Pvt.Process_Line');
3663: END IF;
3664: RAISE fnd_api.g_exc_unexpected_error;
3665: END IF;
3666: END IF ;

Line 3692: print_debug('Error setting header cache','Inv_Pick_Release_PVT.Process_Line');

3688:
3689: l_return_value := INV_CACHE.set_mtrh_rec(p_mo_line_rec.header_id);
3690: IF NOT l_return_value THEN
3691: If is_debug THEN
3692: print_debug('Error setting header cache','Inv_Pick_Release_PVT.Process_Line');
3693: End If;
3694: raise fnd_api.g_exc_unexpected_error;
3695: END IF;
3696: l_request_number := INV_CACHE.mtrh_rec.request_number;

Line 3712: 'Inv_Pick_Release_PVT.Process_Line');

3708: EXCEPTION
3709: WHEN NO_DATA_FOUND THEN
3710: IF is_debug THEN
3711: print_debug('No Data found - document set',
3712: 'Inv_Pick_Release_PVT.Process_Line');
3713: END IF;
3714: x_return_status := fnd_api.g_ret_sts_error;
3715: RAISE fnd_api.g_exc_error;
3716: END;

Line 3750: print_debug('x_return_status is '|| x_return_status, 'Inv_Pick_Release_PVT.Process_Line');

3746: -- set the return status to 'P' (for partial) instead.
3747: IF x_return_status = fnd_api.g_ret_sts_success
3748: AND l_partially_detailed = 1 THEN
3749: IF (is_debug) THEN
3750: print_debug('x_return_status is '|| x_return_status, 'Inv_Pick_Release_PVT.Process_Line');
3751: END IF;
3752: x_return_status := 'P';
3753: END IF;
3754:

Line 3761: print_debug('Quantity_detailed is '|| l_quantity_detailed,'Inv_Pick_Release_PVT.Process_Line');

3757: into l_quantity_detailed
3758: , l_sec_quantity_detailed
3759: from mtl_txn_request_lines
3760: WHERE line_id = p_mo_line_rec.line_id;
3761: print_debug('Quantity_detailed is '|| l_quantity_detailed,'Inv_Pick_Release_PVT.Process_Line');
3762: print_debug('2nd after select sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3763:
3764: --x_detail_rec_count := l_num_detail_recs;
3765: -- Standard call to commit

Line 3762: print_debug('2nd after select sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');

3758: , l_sec_quantity_detailed
3759: from mtl_txn_request_lines
3760: WHERE line_id = p_mo_line_rec.line_id;
3761: print_debug('Quantity_detailed is '|| l_quantity_detailed,'Inv_Pick_Release_PVT.Process_Line');
3762: print_debug('2nd after select sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');
3763:
3764: --x_detail_rec_count := l_num_detail_recs;
3765: -- Standard call to commit
3766: <>

Line 3771: print_debug('Commit? is '|| p_commit, 'Inv_Pick_Release_PVT.Process_Line');

3767: IF p_commit = fnd_api.g_true
3768: AND p_allow_partial_pick = fnd_api.g_true THEN
3769: COMMIT;
3770: END IF;
3771: print_debug('Commit? is '|| p_commit, 'Inv_Pick_Release_PVT.Process_Line');
3772:
3773: x_detail_rec_count := l_num_detail_recs;
3774: EXCEPTION
3775: WHEN fnd_api.g_exc_error THEN

Line 3791: END inv_pick_release_pvt;

3787:
3788: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3789:
3790: END process_line;
3791: END inv_pick_release_pvt;