DBA Data[Home] [Help]

APPS.WMS_DIRECT_SHIP_PVT dependencies on DUAL

Line 1161: open x_missing_item_cur FOR select 1 from dual;

1157: IF (l_debug = 1) THEN
1158: debug('Dummy Cur: Delivery Id : '||p_delivery_id||' Org Id '
1159: ||p_organization_id||' Dock Door '||p_dock_door_id,'Missing_Item_Cur');
1160: END IF;
1161: open x_missing_item_cur FOR select 1 from dual;
1162: return;
1163: END;
1164: END IF;
1165: END MISSING_ITEM_CUR;

Line 3110: l_dual_uom_item BOOLEAN := FALSE;

3106: /* Mrana: 7/6/06: 5350778 : Added foll. variables */
3107: l_lot_ctrl_code NUMBER := 1;
3108: l_lot_divisible_flag VARCHAR2(1) := NULL;
3109: l_relieve_rsv VARCHAR2(1) := NULL;
3110: l_dual_uom_item BOOLEAN := FALSE;
3111:
3112: TYPE delivery_detail_r IS RECORD(
3113: delivery_detail_id NUMBER
3114: , source_line_id NUMBER

Line 3272: l_dual_uom_item := TRUE;

3268: END IF;
3269:
3270: IF inv_cache.set_item_rec(p_org_id,l_item_id) THEN
3271: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
3272: l_dual_uom_item := TRUE;
3273: IF (l_debug = 1) THEN
3274: DEBUG('Item is dual UOM', 'Unload Truck');
3275: END IF;
3276: ELSE

Line 3274: DEBUG('Item is dual UOM', 'Unload Truck');

3270: IF inv_cache.set_item_rec(p_org_id,l_item_id) THEN
3271: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
3272: l_dual_uom_item := TRUE;
3273: IF (l_debug = 1) THEN
3274: DEBUG('Item is dual UOM', 'Unload Truck');
3275: END IF;
3276: ELSE
3277: l_dual_uom_item := FALSE;
3278: IF (l_debug = 1) THEN

Line 3277: l_dual_uom_item := FALSE;

3273: IF (l_debug = 1) THEN
3274: DEBUG('Item is dual UOM', 'Unload Truck');
3275: END IF;
3276: ELSE
3277: l_dual_uom_item := FALSE;
3278: IF (l_debug = 1) THEN
3279: DEBUG('Item is NOT dual UOM', 'Unload Truck');
3280: END IF;
3281: END IF;

Line 3279: DEBUG('Item is NOT dual UOM', 'Unload Truck');

3275: END IF;
3276: ELSE
3277: l_dual_uom_item := FALSE;
3278: IF (l_debug = 1) THEN
3279: DEBUG('Item is NOT dual UOM', 'Unload Truck');
3280: END IF;
3281: END IF;
3282: ELSE
3283: IF (l_debug = 1) THEN

Line 3372: IF l_dual_uom_item THEN

3368: DEBUG('l_relieve_rsv : ' || l_relieve_rsv, 'Unload_truck');
3369: END IF;
3370:
3371: --Return the delivery line to stock
3372: IF l_dual_uom_item THEN
3373: inv_shipping_transaction_pub.inv_line_return_to_stock(
3374: p_delivery_id => NULL
3375: , p_delivery_line_id => l_delivery_detail_id
3376: , p_shipped_quantity => 0

Line 4210: FROM DUAL;

4206: * We will use this Transaction temp Id as the group Mark Id aslo.
4207: ********************/
4208: SELECT mtl_material_transactions_s.NEXTVAL
4209: INTO x_transaction_temp_id
4210: FROM DUAL;
4211:
4212: -- Update group_mark_id to reflect newly created transaction_temp_id
4213: l_group_mark_id := x_transaction_temp_id;
4214:

Line 4818: l_dual_uom_item BOOLEAN := FALSE;

4814: l_new_delivery_detail_id NUMBER;
4815: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
4816: l_trip_id NUMBER;
4817: l_oe_order_header_id NUMBER;
4818: l_dual_uom_item BOOLEAN := FALSE;
4819:
4820: CURSOR c_lpn_heirarchy(p_outermost_lpn_id NUMBER) IS
4821: SELECT lpn_id
4822: FROM wms_license_plate_numbers

Line 4900: l_dual_uom_item := TRUE;

4896: IF inv_cache.set_item_rec(p_organization_id,
4897: l_mtl_reservation_tbl(l_mtl_reservation_tbl.FIRST).inventory_item_id)
4898: THEN
4899: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
4900: l_dual_uom_item := TRUE;
4901: IF (l_debug = 1) THEN
4902: DEBUG('Item is dual UOM', 'Overship Staged Lines');
4903: END IF;
4904: ELSE

Line 4902: DEBUG('Item is dual UOM', 'Overship Staged Lines');

4898: THEN
4899: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
4900: l_dual_uom_item := TRUE;
4901: IF (l_debug = 1) THEN
4902: DEBUG('Item is dual UOM', 'Overship Staged Lines');
4903: END IF;
4904: ELSE
4905: l_dual_uom_item := FALSE;
4906: IF (l_debug = 1) THEN

Line 4905: l_dual_uom_item := FALSE;

4901: IF (l_debug = 1) THEN
4902: DEBUG('Item is dual UOM', 'Overship Staged Lines');
4903: END IF;
4904: ELSE
4905: l_dual_uom_item := FALSE;
4906: IF (l_debug = 1) THEN
4907: DEBUG('Item is NOT dual UOM', 'Overship Staged Lines');
4908: END IF;
4909: END IF;

Line 4907: DEBUG('Item is NOT dual UOM', 'Overship Staged Lines');

4903: END IF;
4904: ELSE
4905: l_dual_uom_item := FALSE;
4906: IF (l_debug = 1) THEN
4907: DEBUG('Item is NOT dual UOM', 'Overship Staged Lines');
4908: END IF;
4909: END IF;
4910: ELSE
4911: IF (l_debug = 1) THEN

Line 4975: IF l_dual_uom_item THEN

4971: l_shipping_attr_tab.DELETE;
4972: l_shipping_attr_tab(1).picked_quantity := l_picked_qty + l_mtl_reservation_tbl(i).primary_reservation_quantity;
4973: l_shipping_attr_tab(1).shipped_quantity := l_shipped_qty + l_mtl_reservation_tbl(i).primary_reservation_quantity;
4974:
4975: IF l_dual_uom_item THEN
4976: l_shipping_attr_tab(1).picked_quantity2 := l_sec_picked_qty
4977: + l_mtl_reservation_tbl(i).secondary_reservation_quantity;
4978: l_shipping_attr_tab(1).shipped_quantity2 := l_sec_shipped_qty
4979: + l_mtl_reservation_tbl(i).secondary_reservation_quantity;

Line 5087: IF l_dual_uom_item THEN

5083: l_shipping_attr_tab(1).transfer_lpn_id := l_mtl_reservation_tbl(i).lpn_id;
5084: l_shipping_attr_tab(1).picked_quantity := l_mtl_reservation_tbl(i).primary_reservation_quantity;
5085: l_shipping_attr_tab(1).shipped_quantity := l_mtl_reservation_tbl(i).primary_reservation_quantity;
5086:
5087: IF l_dual_uom_item THEN
5088: l_shipping_attr_tab(1).picked_quantity2 := l_mtl_reservation_tbl(i).secondary_reservation_quantity;
5089: l_shipping_attr_tab(1).shipped_quantity2 := l_mtl_reservation_tbl(i).secondary_reservation_quantity;
5090: END IF;
5091:

Line 5302: SELECT 1 FROM dual

5298: ,p_lpn_id IN VARCHAR2
5299: ,p_lot_number IN VARCHAR2
5300: ,p_revision IN VARCHAR2
5301: ) IS
5302: SELECT 1 FROM dual
5303: WHERE EXISTS
5304: (SELECT 1
5305: FROM wms_ds_ct_wt_gtemp
5306: WHERE org_id = p_organization_id

Line 5398: l_dual_uom_item BOOLEAN := FALSE;

5394: **********************************/
5395: l_ignore_for_planning wsh_delivery_details.ignore_for_planning%type;
5396: l_tms_interface_flag wsh_new_deliveries.TMS_INTERFACE_FLAG%type;
5397:
5398: l_dual_uom_item BOOLEAN := FALSE;
5399:
5400: BEGIN
5401:
5402: IF (l_debug = 1) THEN

Line 5542: l_dual_uom_item := TRUE;

5538: END IF;
5539:
5540: IF inv_cache.set_item_rec(p_organization_id, l_inventory_item_id) THEN
5541: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
5542: l_dual_uom_item := TRUE;
5543: IF (l_debug = 1) THEN
5544: DEBUG('Item is dual UOM', 'Stage_LPNS');
5545: END IF;
5546: ELSE

Line 5544: DEBUG('Item is dual UOM', 'Stage_LPNS');

5540: IF inv_cache.set_item_rec(p_organization_id, l_inventory_item_id) THEN
5541: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
5542: l_dual_uom_item := TRUE;
5543: IF (l_debug = 1) THEN
5544: DEBUG('Item is dual UOM', 'Stage_LPNS');
5545: END IF;
5546: ELSE
5547: l_dual_uom_item := FALSE;
5548: IF (l_debug = 1) THEN

Line 5547: l_dual_uom_item := FALSE;

5543: IF (l_debug = 1) THEN
5544: DEBUG('Item is dual UOM', 'Stage_LPNS');
5545: END IF;
5546: ELSE
5547: l_dual_uom_item := FALSE;
5548: IF (l_debug = 1) THEN
5549: DEBUG('Item is NOT dual UOM', 'Stage_LPNS');
5550: END IF;
5551: END IF;

Line 5549: DEBUG('Item is NOT dual UOM', 'Stage_LPNS');

5545: END IF;
5546: ELSE
5547: l_dual_uom_item := FALSE;
5548: IF (l_debug = 1) THEN
5549: DEBUG('Item is NOT dual UOM', 'Stage_LPNS');
5550: END IF;
5551: END IF;
5552: ELSE
5553: IF (l_debug = 1) THEN

Line 5748: IF l_dual_uom_item THEN

5744: l_lpn_count := l_lpn_count + 1;
5745: IF i = 1 THEN -- get the total per LPN only once for multiple eligible WDDs
5746: l_total_lpn_rsv_qty := l_total_lpn_rsv_qty +
5747: l_mtl_reservation_tbl(j).primary_reservation_quantity; --MR:added for 4440809
5748: IF l_dual_uom_item THEN
5749: l_total_lpn_rsv_sec_qty := l_total_lpn_rsv_sec_qty +
5750: l_mtl_reservation_tbl(j).secondary_reservation_quantity; --MR:added for 4440809
5751: END IF;
5752: END IF;

Line 5772: IF l_dual_uom_item THEN

5768:
5769: FOR j IN l_rsv_index .. l_mtl_reservation_tbl.COUNT
5770: LOOP
5771: l_shipping_attr(1).pending_quantity := 0;
5772: IF l_dual_uom_item THEN
5773: l_shipping_attr(1).pending_quantity2 := 0;
5774: END IF;
5775: IF l_mtl_reservation_tbl(j).lpn_id IS NULL THEN
5776: GOTO next_resv_rec;

Line 5822: IF l_dual_uom_item THEN

5818:
5819: IF g_fulfillment_base = 'P' AND l_rsv_qty <= 0
5820: THEN
5821: l_rsv_qty := l_mtl_reservation_tbl(j).primary_reservation_quantity;
5822: IF l_dual_uom_item THEN
5823: l_rsv_sec_qty := l_mtl_reservation_tbl(j).secondary_reservation_quantity;
5824: END IF;
5825: ELSIF g_fulfillment_base = 'S' AND l_rsv_sec_qty <= 0
5826: THEN

Line 5834: IF l_dual_uom_item THEN

5830:
5831: -- Added for bug 4440809
5832: IF l_processing_staged_Lines = 'Y' THEN
5833: l_total_lpn_rsv_qty := l_rsv_qty;
5834: IF l_dual_uom_item THEN
5835: l_total_lpn_rsv_sec_qty := l_rsv_sec_qty;
5836: END IF;
5837: END IF;
5838:

Line 5865: IF l_dual_uom_item THEN

5861: IF l_rsv_qty < l_total_lpn_rsv_qty THEN
5862: IF (i >= l_last_del_index) THEN
5863: l_shipping_attr(1).action_flag := 'M';
5864: l_shipping_attr(1).pending_quantity := (l_total_lpn_rsv_qty - l_rsv_qty);
5865: IF l_dual_uom_item THEN
5866: l_shipping_attr(1).pending_quantity2 := (l_total_lpn_rsv_sec_qty - l_rsv_sec_qty);
5867: END IF;
5868: ELSE
5869: l_shipping_attr(1).action_flag := 'U';

Line 5882: IF l_dual_uom_item THEN

5878: END IF;
5879: END IF;
5880:
5881: l_shipping_attr(1).picked_quantity := l_rsv_qty;
5882: IF l_dual_uom_item THEN
5883: l_shipping_attr(1).picked_quantity2 := l_rsv_sec_qty;
5884: END IF;
5885: /* bug 13582056 */
5886: l_shipping_attr(1).released_status := 'Y';

Line 5893: IF l_dual_uom_item THEN

5889: IF (i >= l_last_del_index) THEN
5890: IF l_rsv_qty < l_total_lpn_rsv_qty THEN
5891: l_shipping_attr(1).action_flag := 'M';
5892: l_shipping_attr(1).pending_quantity := (l_total_lpn_rsv_qty - l_rsv_qty);
5893: IF l_dual_uom_item THEN
5894: l_shipping_attr(1).pending_quantity2 := (l_total_lpn_rsv_sec_qty - l_rsv_sec_qty);
5895: END IF;
5896: ELSIF l_rsv_qty = l_total_lpn_rsv_qty THEN
5897: l_shipping_attr(1).action_flag := 'U';

Line 5907: IF l_dual_uom_item THEN

5903: END IF;
5904: l_delivery_detail_tab(i).requested_quantity := l_rsv_qty; -- **MR 01/04/06
5905: l_total_lpn_rsv_qty := l_total_lpn_rsv_qty - l_rsv_qty;
5906: l_rsv_qty := 0;
5907: IF l_dual_uom_item THEN
5908: l_delivery_detail_tab(i).requested_quantity2 := l_rsv_sec_qty;
5909: l_total_lpn_rsv_sec_qty := l_total_lpn_rsv_sec_qty - l_rsv_sec_qty;
5910: l_rsv_sec_qty := 0;
5911: END IF;

Line 5919: IF l_dual_uom_item THEN

5915: l_shipping_attr(1).picked_quantity := l_delivery_detail_tab(i).requested_quantity;
5916: l_rsv_qty := l_rsv_qty - l_delivery_detail_tab(i).requested_quantity ;
5917: l_shipping_attr(1).action_flag := 'U';
5918: l_delivery_detail_tab(i).requested_quantity := l_rsv_qty; -- **MR 01/04/06
5919: IF l_dual_uom_item THEN
5920: l_total_lpn_rsv_sec_qty := l_total_lpn_rsv_sec_qty
5921: - l_delivery_detail_tab(i).requested_quantity2;
5922: l_shipping_attr(1).picked_quantity2 := l_delivery_detail_tab(i).requested_quantity2;
5923: l_rsv_sec_qty := l_rsv_sec_qty - l_delivery_detail_tab(i).requested_quantity2;

Line 5930: IF l_dual_uom_item THEN

5926: END IF; -- (i >= l_last_del_index) THEN
5927: ELSIF l_rsv_qty = l_delivery_detail_tab(i).requested_quantity THEN
5928: l_total_lpn_rsv_qty := l_total_lpn_rsv_qty - l_rsv_qty;
5929: l_rsv_qty := 0;
5930: IF l_dual_uom_item THEN
5931: l_total_lpn_rsv_sec_qty := l_total_lpn_rsv_sec_qty - l_rsv_sec_qty;
5932: l_rsv_sec_qty := 0;
5933: END IF;
5934: END IF;

Line 5974: FROM DUAL;

5970:
5971: IF (l_delivery_detail_tab(i).transaction_temp_id IS NULL) THEN
5972: SELECT mtl_material_transactions_s.NEXTVAL
5973: INTO l_delivery_detail_tab(i).transaction_temp_id
5974: FROM DUAL;
5975:
5976: -- update wds with transaction_temp_id, will be used in unload lpn if required bug# 2829514
5977: UPDATE wms_direct_ship_temp
5978: SET transaction_temp_id = l_delivery_detail_tab(i).transaction_temp_id

Line 6151: IF l_dual_uom_item THEN

6147: END;
6148: END IF;
6149: END IF;
6150:
6151: IF l_dual_uom_item THEN
6152: OPEN c_ds_ct_wt_gtemp_exists(l_shipping_attr(1).ship_from_org_id
6153: ,l_shipping_attr(1).inventory_item_id
6154: ,l_shipping_attr(1).transfer_lpn_id
6155: ,l_shipping_attr(1).lot_number

Line 6181: DEBUG('Dual UoM items but no entry in WMS_DS_CT_WT_GTEMP so use uom_convert to get picked_quantity2', 'stage_lpns');

6177: , l_shipping_attr(1).picked_quantity);
6178: ELSE
6179: IF NVL(l_shipping_attr(1).picked_quantity2, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
6180: IF (l_debug = 1) THEN
6181: DEBUG('Dual UoM items but no entry in WMS_DS_CT_WT_GTEMP so use uom_convert to get picked_quantity2', 'stage_lpns');
6182: END IF;
6183: l_shipping_attr(1).picked_quantity2 := inv_convert.inv_um_convert (
6184: item_id => l_shipping_attr(1).inventory_item_id,
6185: lot_number => l_shipping_attr(1).lot_number,

Line 6197: DEBUG('Non dual item so call get_catch_weight if pricing is secondary', 'stage_lpns');

6193: END IF;
6194: END IF;
6195: ELSE
6196: IF (l_debug = 1) THEN
6197: DEBUG('Non dual item so call get_catch_weight if pricing is secondary', 'stage_lpns');
6198: END IF;
6199: IF(l_delivery_detail_tab(i).ont_pricing_qty_source='S') THEN
6200: l_shipping_attr(1).picked_quantity2 := GET_CATCH_WEIGHT(
6201: l_shipping_attr(1).ship_from_org_id

Line 6237: IF l_dual_uom_item THEN

6233: RAISE fnd_api.g_exc_unexpected_error;
6234: END IF;
6235:
6236: l_delivery_detail_tab(i).requested_quantity := 0;
6237: IF l_dual_uom_item THEN
6238: l_delivery_detail_tab(i).requested_quantity2 := 0;
6239: END IF;
6240:
6241: --

Line 6267: IF l_dual_uom_item THEN

6263: -- Bug : 4440809 : Start
6264: IF l_rsv_qty < l_total_lpn_rsv_qty THEN
6265: l_shipping_attr(1).action_flag := 'M';
6266: l_shipping_attr(1).pending_quantity := (l_total_lpn_rsv_qty - l_rsv_qty);
6267: IF l_dual_uom_item THEN
6268: l_shipping_attr(1).pending_quantity2 := (l_total_lpn_rsv_sec_qty - l_rsv_sec_qty);
6269: END IF;
6270: ELSIF l_rsv_qty = l_total_lpn_rsv_qty THEN
6271: IF l_delivery_detail_tab(i).requested_quantity - l_rsv_qty > 0

Line 6276: IF l_dual_uom_item THEN

6272: THEN
6273: l_shipping_attr(1).action_flag := 'M';
6274: l_shipping_attr(1).pending_quantity :=
6275: l_delivery_detail_tab(i).requested_quantity - l_rsv_qty;
6276: IF l_dual_uom_item THEN
6277: l_shipping_attr(1).pending_quantity2 :=
6278: -- l_delivery_detail_tab(i).requested_quantity2 - l_rsv_sec_qty; Commented for bug 14576405
6279: --Added for bug 14576405 start
6280: l_delivery_detail_tab(i).requested_quantity2 - inv_convert.inv_um_convert (

Line 6299: IF l_dual_uom_item THEN

6295: l_shipping_attr(1).picked_quantity := l_rsv_qty;
6296: l_shipping_attr(1).released_status := 'Y';
6297: l_total_lpn_rsv_qty := l_total_lpn_rsv_qty - l_rsv_qty;
6298:
6299: IF l_dual_uom_item THEN
6300: l_shipping_attr(1).picked_quantity2 := l_rsv_sec_qty;
6301: l_total_lpn_rsv_sec_qty := l_total_lpn_rsv_sec_qty - l_rsv_sec_qty;
6302: END IF;
6303:

Line 6319: FROM DUAL;

6315:
6316: IF (l_delivery_detail_tab(i).transaction_temp_id IS NULL) THEN
6317: SELECT mtl_material_transactions_s.NEXTVAL
6318: INTO l_delivery_detail_tab(i).transaction_temp_id
6319: FROM DUAL;
6320:
6321: l_invpcinrectype.transaction_temp_id := l_delivery_detail_tab(i).transaction_temp_id;
6322:
6323: -- update wds with transaction_temp_id, will be used in unload lpn if required bug# 2829514

Line 6492: IF l_dual_uom_item THEN

6488:
6489: --patchset J. Shipping API cleanup
6490: l_delivery_detail_tab(i).requested_quantity := l_delivery_detail_tab(i).requested_quantity - l_rsv_qty;
6491:
6492: IF l_dual_uom_item THEN
6493: l_delivery_detail_tab(i).requested_quantity2 := l_delivery_detail_tab(i).requested_quantity2 - l_rsv_sec_qty;
6494: END IF;
6495:
6496: --Call shipping api to set transaction_temp_id global variable

Line 6555: IF l_dual_uom_item THEN

6551: END;
6552: END IF;
6553: END IF;
6554:
6555: IF l_dual_uom_item THEN
6556: OPEN c_ds_ct_wt_gtemp_exists(l_shipping_attr(1).ship_from_org_id
6557: ,l_shipping_attr(1).inventory_item_id
6558: ,l_shipping_attr(1).transfer_lpn_id
6559: ,l_shipping_attr(1).lot_number

Line 6585: DEBUG('Dual UoM items but no entry in WMS_DS_CT_WT_GTEMP so use uom_convert to get picked_quantity2', 'stage_lpns');

6581: , l_shipping_attr(1).picked_quantity);
6582: ELSE
6583: IF NVL(l_shipping_attr(1).picked_quantity2, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
6584: IF (l_debug = 1) THEN
6585: DEBUG('Dual UoM items but no entry in WMS_DS_CT_WT_GTEMP so use uom_convert to get picked_quantity2', 'stage_lpns');
6586: END IF;
6587: l_shipping_attr(1).picked_quantity2 := inv_convert.inv_um_convert (
6588: item_id => l_shipping_attr(1).inventory_item_id,
6589: lot_number => l_shipping_attr(1).lot_number,

Line 6601: DEBUG('Non dual item so call get_catch_weight if pricing is secondary', 'stage_lpns');

6597: END IF;
6598: END IF;
6599: ELSE
6600: IF (l_debug = 1) THEN
6601: DEBUG('Non dual item so call get_catch_weight if pricing is secondary', 'stage_lpns');
6602: END IF;
6603: IF(l_delivery_detail_tab(i).ont_pricing_qty_source='S') THEN
6604: l_shipping_attr(1).picked_quantity2 := GET_CATCH_WEIGHT(
6605: l_shipping_attr(1).ship_from_org_id

Line 6655: IF l_dual_uom_item THEN

6651:
6652: l_rsv_index := j + 1;
6653: l_rsv_qty := 0;
6654:
6655: IF l_dual_uom_item THEN
6656: l_rsv_sec_qty := 0;
6657: END IF;
6658: END IF; --} Res. Qty Match l_rsv_qty < l_delivery_detail_tab(i).requested_quantity
6659: -- IF-2

Line 6774: FROM DUAL;

6770:
6771: IF (l_delivery_detail_tab(i).transaction_temp_id IS NULL) THEN
6772: SELECT mtl_material_transactions_s.NEXTVAL
6773: INTO l_delivery_detail_tab(i).transaction_temp_id
6774: FROM DUAL;
6775:
6776: -- update wds with transaction_temp_id, will be used in unload lpn if required bug# 2829514
6777: UPDATE wms_direct_ship_temp
6778: SET transaction_temp_id = l_delivery_detail_tab(i).transaction_temp_id

Line 7044: FROM DUAL;

7040:
7041: IF (l_delivery_detail_tab(i).transaction_temp_id IS NULL) THEN
7042: SELECT mtl_material_transactions_s.NEXTVAL
7043: INTO l_delivery_detail_tab(i).transaction_temp_id
7044: FROM DUAL;
7045:
7046: l_invpcinrectype.transaction_temp_id := l_delivery_detail_tab(i).transaction_temp_id;
7047:
7048: -- update wds with transaction_temp_id, will be used in unload lpn if required bug# 2829514

Line 9095: FROM DUAL

9091: WHEN NO_DATA_FOUND THEN
9092: BEGIN
9093: SELECT 1
9094: INTO l_num
9095: FROM DUAL
9096: WHERE EXISTS(
9097: SELECT 1
9098: FROM wsh_delivery_assignments_v wda, wsh_delivery_details_ob_grp_v wdd
9099: WHERE wdd.delivery_detail_id = wda.delivery_detail_id

Line 9415: l_dual_uom_item BOOLEAN := FALSE;

9411: l_lpn_contents_cur l_lpn_contents_cur_type;
9412: l_qty_to_pick NUMBER := 0; --Bug#5262108
9413: l_rsv_count NUMBER := NULL; -- 13830442
9414: l_sec_qty_to_pick NUMBER := 0;
9415: l_dual_uom_item BOOLEAN := FALSE;
9416: BEGIN
9417: IF (l_debug = 1) THEN
9418: DEBUG('Process_LPN called with parameters : p_lpn_id = ' || p_lpn_id || ' : p_org_id = ' || p_org_id, 'Process_LPN');
9419: END IF;

Line 9850: l_dual_uom_item := TRUE;

9846: END IF;
9847:
9848: IF inv_cache.set_item_rec(p_org_id, g_lpn_contents_tab(c_index).inventory_item_id) THEN
9849: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
9850: l_dual_uom_item := TRUE;
9851: IF (l_debug = 1) THEN
9852: DEBUG('Item is dual UOM', 'Process_LPN');
9853: END IF;
9854: ELSE

Line 9852: DEBUG('Item is dual UOM', 'Process_LPN');

9848: IF inv_cache.set_item_rec(p_org_id, g_lpn_contents_tab(c_index).inventory_item_id) THEN
9849: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
9850: l_dual_uom_item := TRUE;
9851: IF (l_debug = 1) THEN
9852: DEBUG('Item is dual UOM', 'Process_LPN');
9853: END IF;
9854: ELSE
9855: l_dual_uom_item := FALSE;
9856: IF (l_debug = 1) THEN

Line 9855: l_dual_uom_item := FALSE;

9851: IF (l_debug = 1) THEN
9852: DEBUG('Item is dual UOM', 'Process_LPN');
9853: END IF;
9854: ELSE
9855: l_dual_uom_item := FALSE;
9856: IF (l_debug = 1) THEN
9857: DEBUG('Item is NOT dual UOM', 'Process_LPN');
9858: END IF;
9859: END IF;

Line 9857: DEBUG('Item is NOT dual UOM', 'Process_LPN');

9853: END IF;
9854: ELSE
9855: l_dual_uom_item := FALSE;
9856: IF (l_debug = 1) THEN
9857: DEBUG('Item is NOT dual UOM', 'Process_LPN');
9858: END IF;
9859: END IF;
9860: ELSE
9861: IF (l_debug = 1) THEN

Line 9981: FROM DUAL

9977: --Bug 2909327:Changed the call to check wsh_delivery_details instead of oel*/
9978: BEGIN
9979: SELECT 1
9980: INTO l_order_line_status
9981: FROM DUAL
9982: WHERE EXISTS(SELECT delivery_detail_id
9983: FROM wsh_delivery_details_ob_grp_v
9984: WHERE released_status IN('R','B')
9985: AND source_line_id = l_order_line_rec.line_id)

Line 10130: IF NVL(OE_DUAL_UOM_UTIL.get_fulfillment_base(l_mtl_reservation_tab(resv_index).demand_source_line_id), 'P')

10126: DEBUG('Check Holds Succeeded', 'Process LPN');
10127: END IF;
10128: END IF;
10129:
10130: IF NVL(OE_DUAL_UOM_UTIL.get_fulfillment_base(l_mtl_reservation_tab(resv_index).demand_source_line_id), 'P')
10131: <> g_fulfillment_base
10132: THEN
10133: -- Mixed fulfillment modes detected, error out
10134: IF (l_debug = 1) THEN

Line 10188: IF l_dual_uom_item THEN

10184: l_mtl_reservation_tab(resv_index).primary_reservation_quantity := l_qty_to_pick;
10185: l_old_upd_resv_rec.reservation_id := l_mtl_reservation_tab(resv_index).reservation_id;
10186: l_new_upd_resv_rec.primary_reservation_quantity := l_mtl_reservation_tab(resv_index).primary_reservation_quantity;
10187:
10188: IF l_dual_uom_item THEN
10189: l_mtl_reservation_tab(resv_index).secondary_reservation_quantity := l_sec_qty_to_pick;
10190: l_new_upd_resv_rec.secondary_reservation_quantity := l_sec_qty_to_pick;
10191: END IF;
10192:

Line 10195: ELSIF l_dual_uom_item AND

10191: END IF;
10192:
10193: IF l_mtl_reservation_tab(resv_index).reservation_uom_code = l_mtl_reservation_tab(resv_index).primary_uom_code THEN
10194: l_new_upd_resv_rec.reservation_quantity := l_mtl_reservation_tab(resv_index).primary_reservation_quantity;
10195: ELSIF l_dual_uom_item AND
10196: l_mtl_reservation_tab(resv_index).reservation_uom_code
10197: = NVL(l_mtl_reservation_tab(resv_index).secondary_uom_code,'@@@')
10198: THEN
10199: l_new_upd_resv_rec.reservation_quantity := l_mtl_reservation_tab(resv_index).secondary_reservation_quantity;

Line 10326: IF l_dual_uom_item THEN

10322: -- set processed quantity
10323: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).processed_quantity :=
10324: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).processed_quantity
10325: + l_mtl_reservation_tab(resv_index).primary_reservation_quantity;
10326: IF l_dual_uom_item THEN
10327: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).sec_processed_qty :=
10328: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).sec_processed_qty
10329: + l_mtl_reservation_tab(resv_index).secondary_reservation_quantity;
10330: END IF;

Line 10340: IF l_dual_uom_item THEN

10336: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).line_id
10337: := l_mtl_reservation_tab(resv_index).demand_source_line_id;
10338: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).inventory_item_id
10339: := l_mtl_reservation_tab(resv_index).inventory_item_id;
10340: IF l_dual_uom_item THEN
10341: l_processed_lines_tab(l_mtl_reservation_tab(resv_index).demand_source_line_id).sec_processed_qty
10342: := l_mtl_reservation_tab(resv_index).secondary_reservation_quantity;
10343: END IF;
10344:

Line 10363: IF l_dual_uom_item THEN

10359: g_lpn_contents_tab(c_index).quantity :=
10360: g_lpn_contents_tab(c_index).quantity - l_mtl_reservation_tab(resv_index).primary_reservation_quantity;
10361: g_total_lpn_quantity := g_total_lpn_quantity - l_mtl_reservation_tab(resv_index).primary_reservation_quantity;
10362:
10363: IF l_dual_uom_item THEN
10364: g_lpn_contents_tab(c_index).secondary_quantity := g_lpn_contents_tab(c_index).secondary_quantity
10365: - l_mtl_reservation_tab(resv_index).secondary_reservation_quantity;
10366: g_total_lpn_sec_qty := g_total_lpn_sec_qty - l_mtl_reservation_tab(resv_index).secondary_reservation_quantity;
10367: END IF;

Line 10432: FROM DUAL;

10428: -- get group_id
10429: BEGIN
10430: SELECT mtl_material_transactions_s.NEXTVAL
10431: INTO g_group_id
10432: FROM DUAL;
10433: EXCEPTION
10434: WHEN NO_DATA_FOUND THEN
10435: g_group_id := 0;
10436: END;

Line 10509: FROM DUAL;

10505: IF (l_processed_lines_tab(l_temp_index).serial_required_flag = 'Y') THEN
10506: BEGIN
10507: SELECT mtl_material_transactions_s.NEXTVAL
10508: INTO l_trx_temp_id
10509: FROM DUAL;
10510: EXCEPTION
10511: WHEN NO_DATA_FOUND THEN
10512: IF (l_debug = 1) THEN
10513: DEBUG('Unable to get transaction_temp_id', 'Process_LPN');

Line 10674: l_dual_uom_item BOOLEAN := FALSE;

10670: l_count_wdst NUMBER; --Bug#4546137.
10671: l_overship_case VARCHAR2(1) := 'N' ; --Bug#5262108
10672: l_qty_to_pick NUMBER; --Bug#5262108.
10673: l_sec_qty_to_pick NUMBER;
10674: l_dual_uom_item BOOLEAN := FALSE;
10675: l_deviation_allowed BOOLEAN := FALSE;
10676: l_lot_conv_exists BOOLEAN := FALSE;
10677: l_mtlstat_prev_unchk BOOLEAN := FALSE;
10678: l_dummy_num NUMBER;

Line 10695: SELECT 1 FROM dual

10691: p_organization_id IN NUMBER
10692: , p_item_id IN NUMBER
10693: , p_lot_number IN VARCHAR2
10694: ) IS
10695: SELECT 1 FROM dual
10696: WHERE EXISTS
10697: ( SELECT 1
10698: FROM mtl_lot_uom_class_conversions
10699: WHERE organization_id = p_organization_id

Line 10819: l_dual_uom_item := TRUE;

10815: END IF;
10816:
10817: IF inv_cache.set_item_rec(p_org_id, p_inventory_item_id) THEN
10818: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
10819: l_dual_uom_item := TRUE;
10820: IF (l_debug = 1) THEN
10821: DEBUG('Item is dual UOM','Process_Line');
10822: END IF;
10823: IF NVL(inv_cache.item_rec.dual_uom_deviation_high,0) > 0

Line 10821: DEBUG('Item is dual UOM','Process_Line');

10817: IF inv_cache.set_item_rec(p_org_id, p_inventory_item_id) THEN
10818: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
10819: l_dual_uom_item := TRUE;
10820: IF (l_debug = 1) THEN
10821: DEBUG('Item is dual UOM','Process_Line');
10822: END IF;
10823: IF NVL(inv_cache.item_rec.dual_uom_deviation_high,0) > 0
10824: OR NVL(inv_cache.item_rec.dual_uom_deviation_low,0) > 0
10825: THEN

Line 10823: IF NVL(inv_cache.item_rec.dual_uom_deviation_high,0) > 0

10819: l_dual_uom_item := TRUE;
10820: IF (l_debug = 1) THEN
10821: DEBUG('Item is dual UOM','Process_Line');
10822: END IF;
10823: IF NVL(inv_cache.item_rec.dual_uom_deviation_high,0) > 0
10824: OR NVL(inv_cache.item_rec.dual_uom_deviation_low,0) > 0
10825: THEN
10826: l_deviation_allowed := TRUE;
10827: IF (l_debug = 1) THEN

Line 10824: OR NVL(inv_cache.item_rec.dual_uom_deviation_low,0) > 0

10820: IF (l_debug = 1) THEN
10821: DEBUG('Item is dual UOM','Process_Line');
10822: END IF;
10823: IF NVL(inv_cache.item_rec.dual_uom_deviation_high,0) > 0
10824: OR NVL(inv_cache.item_rec.dual_uom_deviation_low,0) > 0
10825: THEN
10826: l_deviation_allowed := TRUE;
10827: IF (l_debug = 1) THEN
10828: DEBUG('Deviation is allowed','Process_Line');

Line 10837: l_dual_uom_item := FALSE;

10833: DEBUG('Deviation is NOT allowed','Process_Line');
10834: END IF;
10835: END IF;
10836: ELSE
10837: l_dual_uom_item := FALSE;
10838: l_deviation_allowed := FALSE;
10839: IF (l_debug = 1) THEN
10840: DEBUG('Item is NOT dual UOM','Process_Line');
10841: END IF;

Line 10840: DEBUG('Item is NOT dual UOM','Process_Line');

10836: ELSE
10837: l_dual_uom_item := FALSE;
10838: l_deviation_allowed := FALSE;
10839: IF (l_debug = 1) THEN
10840: DEBUG('Item is NOT dual UOM','Process_Line');
10841: END IF;
10842: END IF;
10843: ELSE
10844: IF (l_debug = 1) THEN

Line 10850: IF NVL(OE_DUAL_UOM_UTIL.get_fulfillment_base(p_order_line_id), 'P') <> g_fulfillment_base

10846: END IF;
10847: RAISE fnd_api.g_exc_unexpected_error;
10848: END IF;
10849:
10850: IF NVL(OE_DUAL_UOM_UTIL.get_fulfillment_base(p_order_line_id), 'P') <> g_fulfillment_base
10851: THEN
10852: -- Mixed fulfillment modes detected, error out
10853: IF (l_debug = 1) THEN
10854: DEBUG('Cannot mix fulfillment modes', 'Process_Line');

Line 10964: IF l_dual_uom_item THEN

10960: l_mtl_reservation_tab_count := 0;
10961:
10962: IF l_mtl_resv_tab_count_temp > 0 THEN
10963: l_other_resv_qty := 0;
10964: IF l_dual_uom_item THEN
10965: l_other_resv_sec_qty := 0;
10966: END IF;
10967:
10968: FOR rec IN 1 .. l_mtl_resv_tab_count_temp LOOP

Line 10978: IF l_dual_uom_item THEN

10974: l_mtl_reservation_tab_count := l_mtl_reservation_tab_count + 1;
10975: l_mtl_reservation_tab(l_mtl_reservation_tab_count) := l_mtl_reservation_tab_temp(rec);
10976: ELSE
10977: l_other_resv_qty := l_other_resv_qty + l_resv_rec.primary_reservation_quantity;
10978: IF l_dual_uom_item THEN
10979: l_other_resv_sec_qty := l_other_resv_sec_qty + l_resv_rec.secondary_reservation_quantity;
10980: END IF;
10981: END IF;
10982: END LOOP; -- for rec

Line 10997: IF l_dual_uom_item THEN

10993: FOR resv_rec IN 1 .. l_mtl_reservation_tab_count LOOP
10994: IF l_mtl_reservation_tab(resv_rec).lpn_id IS NOT NULL THEN /* 3322799 */
10995: IF (l_mtl_reservation_tab(resv_rec).lpn_id = p_lpn_id) THEN
10996: l_quantity_reserved := l_quantity_reserved + l_mtl_reservation_tab(resv_rec).primary_reservation_quantity;
10997: IF l_dual_uom_item THEN
10998: l_sec_qty_reserved := l_sec_qty_reserved + l_mtl_reservation_tab(resv_rec).secondary_reservation_quantity;
10999: END IF;
11000: ELSIF l_mtl_reservation_tab(resv_rec).staged_flag = 'Y' THEN --Bug#5262108. Added ELSE part.
11001: l_other_resv_qty := l_other_resv_qty + l_mtl_reservation_tab(resv_rec).primary_reservation_quantity;

Line 11002: IF l_dual_uom_item THEN

10998: l_sec_qty_reserved := l_sec_qty_reserved + l_mtl_reservation_tab(resv_rec).secondary_reservation_quantity;
10999: END IF;
11000: ELSIF l_mtl_reservation_tab(resv_rec).staged_flag = 'Y' THEN --Bug#5262108. Added ELSE part.
11001: l_other_resv_qty := l_other_resv_qty + l_mtl_reservation_tab(resv_rec).primary_reservation_quantity;
11002: IF l_dual_uom_item THEN
11003: l_other_resv_sec_qty := l_other_resv_sec_qty
11004: + l_mtl_reservation_tab(resv_rec).secondary_reservation_quantity;
11005: END IF;
11006: END IF;

Line 11010: IF l_dual_uom_item THEN

11006: END IF;
11007: ELSE
11008: l_quantity_to_transfer_resv := l_quantity_to_transfer_resv
11009: + l_mtl_reservation_tab(resv_rec).primary_reservation_quantity;
11010: IF l_dual_uom_item THEN
11011: l_sec_qty_to_transfer_resv := l_sec_qty_to_transfer_resv
11012: + l_mtl_reservation_tab(resv_rec).secondary_reservation_quantity;
11013: END IF;
11014: END IF;

Line 11025: IF l_dual_uom_item THEN

11021: AND ((l_sec_qty_to_transfer_resv + l_sec_qty_reserved) < NVL(p_sec_ordered_qty,0)) ) )
11022: THEN
11023: l_quantity_create_resv := (p_ordered_quantity - l_other_resv_qty)
11024: - (l_quantity_to_transfer_resv + l_quantity_reserved);
11025: IF l_dual_uom_item THEN
11026: l_sec_qty_create_resv := (p_sec_ordered_qty - l_other_resv_sec_qty)
11027: - (l_sec_qty_to_transfer_resv + l_sec_qty_reserved);
11028: END IF;
11029: l_create_reservation_flag := 'Y';

Line 11062: IF l_dual_uom_item THEN

11058: DEBUG('No reservation record found', 'Process_Line');
11059: END IF;
11060:
11061: l_quantity_create_resv := p_ordered_quantity - NVL(l_other_resv_qty,0);
11062: IF l_dual_uom_item THEN
11063: l_sec_qty_create_resv := p_sec_ordered_qty - NVL(l_other_resv_sec_qty,0);
11064: END IF;
11065:
11066: l_create_reservation_flag := 'Y';

Line 11081: IF l_dual_uom_item THEN

11077: l_resv_rec := l_mtl_reservation_tab(resv_rec);
11078:
11079: -- bug 4285681
11080: l_current_rsv_rem_qty := l_resv_rec.primary_reservation_quantity;
11081: IF l_dual_uom_item THEN
11082: l_curr_rsv_rem_sec_qty := l_resv_rec.secondary_reservation_quantity;
11083: END IF;
11084:
11085: IF l_resv_rec.lpn_id IS NULL THEN --{

Line 11201: IF l_dual_uom_item THEN

11197:
11198: -- bug 4285681
11199: IF(NVL(l_transactable_qty, 0) > NVL(g_lpn_contents_tab(lpnc_rec).quantity,0)) THEN
11200: l_transactable_qty := g_lpn_contents_tab(lpnc_rec).quantity;
11201: IF l_dual_uom_item THEN
11202: l_sec_transactable_qty := g_lpn_contents_tab(lpnc_rec).secondary_quantity;
11203: END IF;
11204: END IF;
11205:

Line 11236: IF l_dual_uom_item THEN

11232:
11233: IF((NVL(l_transactable_qty,0) < NVL(l_resv_rec.primary_reservation_quantity,0))
11234: AND (NVL(l_transactable_qty,0) < NVL(l_quantity_to_transfer_resv,0))) THEN
11235: l_new_resv_rec.primary_reservation_quantity := l_transactable_qty;
11236: IF l_dual_uom_item THEN
11237: l_new_resv_rec.secondary_reservation_quantity := l_sec_transactable_qty;
11238: END IF;
11239: ELSIF ((NVL(l_resv_rec.primary_reservation_quantity,0) < NVL(l_quantity_to_transfer_resv,0))
11240: AND (NVL(l_resv_rec.primary_reservation_quantity,0) < NVL(l_transactable_qty,0))) THEN

Line 11242: IF l_dual_uom_item THEN

11238: END IF;
11239: ELSIF ((NVL(l_resv_rec.primary_reservation_quantity,0) < NVL(l_quantity_to_transfer_resv,0))
11240: AND (NVL(l_resv_rec.primary_reservation_quantity,0) < NVL(l_transactable_qty,0))) THEN
11241: l_new_resv_rec.primary_reservation_quantity := l_resv_rec.primary_reservation_quantity;
11242: IF l_dual_uom_item THEN
11243: l_new_resv_rec.secondary_reservation_quantity := l_resv_rec.secondary_reservation_quantity;
11244: END IF;
11245: ELSE
11246: l_new_resv_rec.primary_reservation_quantity := l_quantity_to_transfer_resv;

Line 11247: IF l_dual_uom_item THEN

11243: l_new_resv_rec.secondary_reservation_quantity := l_resv_rec.secondary_reservation_quantity;
11244: END IF;
11245: ELSE
11246: l_new_resv_rec.primary_reservation_quantity := l_quantity_to_transfer_resv;
11247: IF l_dual_uom_item THEN
11248: l_new_resv_rec.secondary_reservation_quantity := l_sec_qty_to_transfer_resv;
11249: END IF;
11250: END IF;
11251:

Line 11289: ELSIF l_dual_uom_item

11285: END IF;
11286:
11287: IF l_resv_rec.reservation_uom_code = l_resv_rec.primary_uom_code THEN
11288: l_new_resv_rec.reservation_quantity := l_new_resv_rec.primary_reservation_quantity;
11289: ELSIF l_dual_uom_item
11290: AND l_resv_rec.reservation_uom_code = NVL(l_resv_rec.secondary_uom_code,'@@@')
11291: THEN
11292: l_new_resv_rec.reservation_quantity := l_new_resv_rec.secondary_reservation_quantity;
11293: ELSE

Line 11388: IF l_dual_uom_item THEN

11384: - l_new_resv_rec.primary_reservation_quantity;
11385: g_total_lpn_quantity := g_total_lpn_quantity - l_new_resv_rec.primary_reservation_quantity;
11386: l_processed_quantity := l_processed_quantity + l_new_resv_rec.primary_reservation_quantity;
11387:
11388: IF l_dual_uom_item THEN
11389: l_sec_qty_to_transfer_resv := l_sec_qty_to_transfer_resv
11390: - l_new_resv_rec.secondary_reservation_quantity;
11391: l_curr_rsv_rem_sec_qty := l_curr_rsv_rem_sec_qty
11392: - l_new_resv_rec.secondary_reservation_quantity;

Line 11462: IF l_dual_uom_item THEN

11458: END IF;
11459: --Calculate the quantity to create reservation.
11460: IF(g_fulfillment_base = 'P' AND NVL(l_qty_to_pick,0) < NVL(g_total_lpn_quantity, 0))THEN
11461: l_quantity_create_resv := l_qty_to_pick;
11462: IF l_dual_uom_item THEN
11463: l_sec_qty_create_resv := l_sec_qty_to_pick;
11464: END IF;
11465: ELSIF(g_fulfillment_base = 'S' AND NVL(l_sec_qty_to_pick,0) < NVL(g_total_lpn_sec_qty, 0)) THEN
11466: l_quantity_create_resv := ROUND((l_sec_qty_to_pick * g_total_lpn_quantity)/g_total_lpn_sec_qty,5);

Line 11470: IF l_dual_uom_item THEN

11466: l_quantity_create_resv := ROUND((l_sec_qty_to_pick * g_total_lpn_quantity)/g_total_lpn_sec_qty,5);
11467: l_sec_qty_create_resv := l_sec_qty_to_pick;
11468: ELSE
11469: l_quantity_create_resv := g_total_lpn_quantity;
11470: IF l_dual_uom_item THEN
11471: l_sec_qty_create_resv := g_total_lpn_sec_qty;
11472: END IF;
11473: END IF;
11474:

Line 11497: IF l_dual_uom_item AND l_lpn_cont_rec.lot_number IS NOT NULL THEN

11493: END IF;
11494:
11495: l_lpn_cont_rec := g_lpn_contents_tab(lpnc_rec);
11496:
11497: IF l_dual_uom_item AND l_lpn_cont_rec.lot_number IS NOT NULL THEN
11498: OPEN c_lot_conv_exists(p_org_id,p_inventory_item_id,l_lpn_cont_rec.lot_number);
11499: FETCH c_lot_conv_exists INTO l_dummy_num;
11500:
11501: IF c_lot_conv_exists%FOUND THEN

Line 11599: -- IF dual uom item

11595: --
11596: -- Psuedo-code for deriving secondary quantity, and adjusting
11597: -- primary quantity if fulfillment is based on secondary
11598: --
11599: -- IF dual uom item
11600: -- IF primary-based fulfillment
11601: -- Primary is lesser of transactable, qty_to_create_resv
11602: --
11603: -- Adjust secondary as follows:

Line 11635: IF l_dual_uom_item THEN --{

11631: -- ELSE
11632: -- Primary is lesser of transactable, qty_to_create_resv
11633: -- END IF
11634: --
11635: IF l_dual_uom_item THEN --{
11636: IF g_fulfillment_base = 'P' THEN --{
11637: l_reservation_record.primary_reservation_quantity :=
11638: LEAST(l_transactable_qty, l_quantity_create_resv); --Bug#5262108
11639: IF l_lot_conv_exists THEN

Line 11684: -- Not a dual UOM item

11680: END IF;
11681: END IF; --}
11682: --}
11683: ELSE
11684: -- Not a dual UOM item
11685: l_reservation_record.primary_reservation_quantity :=
11686: LEAST(l_transactable_qty, l_quantity_create_resv); --Bug#5262108
11687: l_reservation_record.secondary_reservation_quantity := NULL;
11688: END IF;

Line 11705: IF l_dual_uom_item THEN

11701: l_reservation_record.demand_source_line_id := p_order_line_id;
11702: l_reservation_record.reservation_uom_id := NULL;
11703: l_reservation_record.reservation_uom_code := inv_cache.item_rec.primary_uom_code;
11704: l_reservation_record.primary_uom_code := inv_cache.item_rec.primary_uom_code;
11705: IF l_dual_uom_item THEN
11706: l_reservation_record.secondary_uom_code := inv_cache.item_rec.secondary_uom_code;
11707: ELSE
11708: l_reservation_record.secondary_uom_code := NULL;
11709: END IF;

Line 11799: IF l_dual_uom_item THEN

11795: - l_reservation_record.primary_reservation_quantity;
11796: l_processed_quantity := l_processed_quantity + l_reservation_record.primary_reservation_quantity;
11797: g_total_lpn_quantity := g_total_lpn_quantity - l_reservation_record.primary_reservation_quantity;
11798:
11799: IF l_dual_uom_item THEN
11800: g_lpn_contents_tab(lpnc_rec).secondary_quantity := g_lpn_contents_tab(lpnc_rec).secondary_quantity
11801: - l_reservation_record.secondary_reservation_quantity;
11802: l_processed_sec_qty := l_processed_sec_qty + l_reservation_record.secondary_reservation_quantity;
11803: g_total_lpn_sec_qty := g_total_lpn_sec_qty - l_reservation_record.secondary_reservation_quantity;

Line 11808: IF l_dual_uom_item THEN

11804: END IF;
11805:
11806: IF l_create_reservation_flag = 'Y' THEN
11807: l_quantity_create_resv := l_quantity_create_resv - l_reservation_record.primary_reservation_quantity;
11808: IF l_dual_uom_item THEN
11809: l_sec_qty_create_resv := l_sec_qty_create_resv
11810: - l_reservation_record.secondary_reservation_quantity;
11811: END IF;
11812: ELSE

Line 11814: IF l_dual_uom_item THEN

11810: - l_reservation_record.secondary_reservation_quantity;
11811: END IF;
11812: ELSE
11813: l_qty_reserved_tmp := l_qty_reserved_tmp + l_reservation_record.primary_reservation_quantity;
11814: IF l_dual_uom_item THEN
11815: l_sec_qty_res_tmp := l_sec_qty_res_tmp + l_reservation_record.secondary_reservation_quantity;
11816: END IF;
11817: END IF;
11818:

Line 11924: FROM DUAL;

11920: IF (l_serial_required_flag = 'Y') THEN
11921: BEGIN
11922: SELECT mtl_material_transactions_s.NEXTVAL
11923: INTO l_trx_temp_id
11924: FROM DUAL;
11925: EXCEPTION
11926: WHEN NO_DATA_FOUND THEN
11927: IF (l_debug = 1) THEN
11928: DEBUG('Error getting transaction_temp_id', 'Process_Line');

Line 12571: l_dual_uom_item BOOLEAN := FALSE;

12567: l_avail_req_quantity NUMBER;
12568: l_avail_req_sec_qty NUMBER;
12569: l_staged_qty NUMBER := 0; -- Bug#5262108
12570: l_staged_sec_qty NUMBER := 0;
12571: l_dual_uom_item BOOLEAN := FALSE;
12572: BEGIN
12573: IF (l_debug = 1) THEN
12574: DEBUG('p_lpn_id=' || p_lpn_id, 'Perform_Overship_Distribution');
12575: DEBUG('p_org_id=' || p_org_id, 'Perform_Overship_Distribution');

Line 12598: l_dual_uom_item := TRUE;

12594: OR (g_fulfillment_base = 'S' AND NVL(l_lpn_cont_rec.secondary_quantity,0) > 0) --{
12595: THEN -- overship needed
12596: IF inv_cache.set_item_rec(p_org_id, l_lpn_cont_rec.inventory_item_id) THEN
12597: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
12598: l_dual_uom_item := TRUE;
12599: IF (l_debug = 1) THEN
12600: DEBUG('Item is dual UOM', 'Perform_Overship_Distribution');
12601: END IF;
12602: ELSE

Line 12600: DEBUG('Item is dual UOM', 'Perform_Overship_Distribution');

12596: IF inv_cache.set_item_rec(p_org_id, l_lpn_cont_rec.inventory_item_id) THEN
12597: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN
12598: l_dual_uom_item := TRUE;
12599: IF (l_debug = 1) THEN
12600: DEBUG('Item is dual UOM', 'Perform_Overship_Distribution');
12601: END IF;
12602: ELSE
12603: l_dual_uom_item := FALSE;
12604: IF (l_debug = 1) THEN

Line 12603: l_dual_uom_item := FALSE;

12599: IF (l_debug = 1) THEN
12600: DEBUG('Item is dual UOM', 'Perform_Overship_Distribution');
12601: END IF;
12602: ELSE
12603: l_dual_uom_item := FALSE;
12604: IF (l_debug = 1) THEN
12605: DEBUG('Item is NOT dual UOM', 'Perform_Overship_Distribution');
12606: END IF;
12607: END IF;

Line 12605: DEBUG('Item is NOT dual UOM', 'Perform_Overship_Distribution');

12601: END IF;
12602: ELSE
12603: l_dual_uom_item := FALSE;
12604: IF (l_debug = 1) THEN
12605: DEBUG('Item is NOT dual UOM', 'Perform_Overship_Distribution');
12606: END IF;
12607: END IF;
12608: ELSE
12609: IF (l_debug = 1) THEN

Line 12760: IF l_dual_uom_item THEN

12756:
12757: -- commented for 5262108 l_max_shippable_quantity := l_minmaxoutrectype.max_remaining_quantity; --Removed trunc bug3994915
12758:
12759: l_max_shippable_quantity := l_max_quantity_allowed; -- 5262108
12760: IF l_dual_uom_item THEN
12761: l_max_shippable_sec_qty := l_max_sec_qty_allowed;
12762: END IF;
12763:
12764: IF (l_debug = 1) THEN

Line 12882: IF(g_fulfillment_base = 'S' AND l_dual_uom_item) THEN

12878: DEBUG('l_total_resvd_sec_qty= ' || l_total_resvd_sec_qty, 'Perform_Overship_Distribution');
12879: DEBUG('l_transactable_qty= ' || l_transactable_qty, 'Perform_Overship_Distribution');
12880: END IF;
12881:
12882: IF(g_fulfillment_base = 'S' AND l_dual_uom_item) THEN
12883: IF((NVL(l_lpn_cont_rec.secondary_quantity,0) <= NVL(l_sec_transactable_qty,0)) AND
12884: (NVL(l_lpn_cont_rec.secondary_quantity,0) <= NVL((l_max_shippable_sec_qty + l_staged_sec_qty - l_total_resvd_sec_qty),0))) THEN
12885: l_sec_qty_overship := l_lpn_cont_rec.secondary_quantity;
12886: l_qty_overship := l_lpn_cont_rec.quantity;

Line 12904: IF l_dual_uom_item THEN

12900: ELSE
12901: IF((NVL(l_lpn_cont_rec.quantity,0) <= NVL(l_transactable_qty,0)) AND
12902: (NVL(l_lpn_cont_rec.quantity,0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN
12903: l_qty_overship := l_lpn_cont_rec.quantity;
12904: IF l_dual_uom_item THEN
12905: l_sec_qty_overship := l_lpn_cont_rec.secondary_quantity;
12906: END IF;
12907: ELSIF((NVL(l_transactable_qty, 0) <= NVL(l_lpn_cont_rec.quantity,0)) AND
12908: (NVL(l_transactable_qty, 0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN

Line 12910: IF l_dual_uom_item THEN

12906: END IF;
12907: ELSIF((NVL(l_transactable_qty, 0) <= NVL(l_lpn_cont_rec.quantity,0)) AND
12908: (NVL(l_transactable_qty, 0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN
12909: l_qty_overship := NVL(l_transactable_qty,0);
12910: IF l_dual_uom_item THEN
12911: l_sec_qty_overship := l_sec_transactable_qty;
12912: END IF;
12913: ELSE
12914: l_qty_overship := NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0);

Line 12915: IF l_dual_uom_item THEN

12911: l_sec_qty_overship := l_sec_transactable_qty;
12912: END IF;
12913: ELSE
12914: l_qty_overship := NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0);
12915: IF l_dual_uom_item THEN
12916: l_sec_qty_overship := NVL((l_max_shippable_sec_qty + l_staged_sec_qty - l_total_resvd_sec_qty),0);
12917: END IF;
12918: END IF;
12919:

Line 12927: IF l_dual_uom_item THEN

12923:
12924: END IF;
12925:
12926: l_qty_updt_resv := l_mtl_reservation_tab(l_index_r).primary_reservation_quantity + l_qty_overship;
12927: IF l_dual_uom_item THEN
12928: l_sec_qty_updt_resv := l_mtl_reservation_tab(l_index_r).secondary_reservation_quantity + l_sec_qty_overship;
12929: END IF;
12930:
12931: IF (l_debug = 1) THEN

Line 12947: IF l_dual_uom_item THEN

12943: THEN
12944: l_old_upd_resv_rec.reservation_id := l_mtl_reservation_tab(l_index_r).reservation_id;
12945: l_upd_resv_rec.primary_reservation_quantity := l_qty_updt_resv;
12946:
12947: IF l_dual_uom_item THEN
12948: l_upd_resv_rec.secondary_reservation_quantity := l_sec_qty_updt_resv;
12949: END IF;
12950:
12951: IF l_mtl_reservation_tab(l_index_r).reservation_uom_code =

Line 12955: ELSIF l_dual_uom_item

12951: IF l_mtl_reservation_tab(l_index_r).reservation_uom_code =
12952: l_mtl_reservation_tab(l_index_r).primary_uom_code
12953: THEN
12954: l_upd_resv_rec.reservation_quantity := l_qty_updt_resv;
12955: ELSIF l_dual_uom_item
12956: AND l_mtl_reservation_tab(l_index_r).reservation_uom_code =
12957: NVL(l_mtl_reservation_tab(l_index_r).secondary_uom_code,'@@@')
12958: THEN
12959: l_upd_resv_rec.reservation_quantity := l_sec_qty_updt_resv;

Line 13031: IF l_dual_uom_item THEN

13027: g_lpn_contents_tab(l_index).quantity := g_lpn_contents_tab(l_index).quantity - l_qty_overship;
13028: l_lpn_cont_rec.quantity := l_lpn_cont_rec.quantity - l_qty_overship;
13029: g_total_lpn_quantity := g_total_lpn_quantity - l_qty_overship;
13030:
13031: IF l_dual_uom_item THEN
13032: g_lpn_contents_tab(l_index).secondary_quantity :=
13033: g_lpn_contents_tab(l_index).secondary_quantity - l_sec_qty_overship;
13034: l_lpn_cont_rec.secondary_quantity := l_lpn_cont_rec.secondary_quantity - l_sec_qty_overship;
13035: g_total_lpn_sec_qty := g_total_lpn_sec_qty - l_sec_qty_overship;

Line 13047: IF l_dual_uom_item THEN

13043: ELSE
13044: l_lpn_cont_qty_used(l_index) := l_qty_overship;
13045: END IF;
13046:
13047: IF l_dual_uom_item THEN
13048: IF l_lpn_sec_qty_used.EXISTS(l_index) THEN
13049: l_lpn_sec_qty_used(l_index) := l_lpn_sec_qty_used(l_index) + l_sec_qty_overship;
13050: ELSE
13051: l_lpn_sec_qty_used(l_index) := l_sec_qty_overship;

Line 13254: IF l_dual_uom_item THEN

13250: IF (g_fulfillment_base = 'P' AND l_transactable_qty > 0)
13251: OR (g_fulfillment_base = 'S' AND NVL(l_sec_transactable_qty,0) > 0) --{
13252: THEN
13253: l_max_shippable_quantity := l_max_quantity_allowed;
13254: IF l_dual_uom_item THEN
13255: l_max_shippable_sec_qty := l_max_sec_qty_allowed;
13256: END IF;
13257:
13258: IF (l_debug = 1) THEN

Line 13284: IF(g_fulfillment_base = 'S' AND l_dual_uom_item) THEN

13280: DEBUG(' l_lpn_cont_rec.secondary_quantity = ' || l_lpn_cont_rec.secondary_quantity, 'Perform_Overship_Distribution');
13281: DEBUG(' l_lpn_cont_rec.quantity = ' || l_lpn_cont_rec.quantity, 'Perform_Overship_Distribution');
13282: END IF;
13283:
13284: IF(g_fulfillment_base = 'S' AND l_dual_uom_item) THEN
13285: IF((NVL(l_lpn_cont_rec.secondary_quantity,0) <= NVL(l_sec_transactable_qty,0)) AND
13286: (NVL(l_lpn_cont_rec.secondary_quantity,0) <= NVL((l_max_shippable_sec_qty + l_staged_sec_qty - l_total_resvd_sec_qty),0))) THEN
13287: l_sec_qty_overship := l_lpn_cont_rec.secondary_quantity;
13288: l_qty_overship := l_lpn_cont_rec.quantity;

Line 13302: IF l_dual_uom_item THEN

13298: ELSE
13299: IF((NVL(l_lpn_cont_rec.quantity,0) <= NVL(l_transactable_qty,0)) AND
13300: (NVL(l_lpn_cont_rec.quantity,0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN
13301: l_qty_overship := l_lpn_cont_rec.quantity;
13302: IF l_dual_uom_item THEN
13303: l_sec_qty_overship := l_lpn_cont_rec.secondary_quantity;
13304: END IF;
13305: ELSIF((NVL(l_transactable_qty, 0) <= NVL(l_lpn_cont_rec.quantity,0)) AND
13306: (NVL(l_transactable_qty, 0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN

Line 13308: IF l_dual_uom_item THEN

13304: END IF;
13305: ELSIF((NVL(l_transactable_qty, 0) <= NVL(l_lpn_cont_rec.quantity,0)) AND
13306: (NVL(l_transactable_qty, 0) <= NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0))) THEN
13307: l_qty_overship := NVL(l_transactable_qty,0);
13308: IF l_dual_uom_item THEN
13309: l_sec_qty_overship := l_sec_transactable_qty;
13310: END IF;
13311: ELSE
13312: l_qty_overship := NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0);

Line 13313: IF l_dual_uom_item THEN

13309: l_sec_qty_overship := l_sec_transactable_qty;
13310: END IF;
13311: ELSE
13312: l_qty_overship := NVL((l_max_shippable_quantity + l_staged_qty - l_total_resvd_qty),0);
13313: IF l_dual_uom_item THEN
13314: l_sec_qty_overship := NVL((l_max_shippable_sec_qty + l_staged_sec_qty - l_total_resvd_sec_qty),0);
13315: END IF;
13316: END IF;
13317: END IF;

Line 13325: IF l_dual_uom_item THEN

13321: THEN
13322: -- create reservation
13323: l_reservation_record.primary_reservation_quantity := l_qty_overship;
13324:
13325: IF l_dual_uom_item THEN
13326: l_reservation_record.secondary_reservation_quantity := l_sec_qty_overship;
13327: END IF;
13328:
13329: -- No need for UOM conversion here since rsv UOM is hard-coded below to primary

Line 13344: IF l_dual_uom_item THEN

13340: l_reservation_record.demand_source_line_id := l_loaded_lines_rec.order_line_id;
13341: l_reservation_record.reservation_uom_id := NULL;
13342: l_reservation_record.reservation_uom_code := l_loaded_lines_rec.primary_uom_code;
13343: l_reservation_record.primary_uom_code := l_loaded_lines_rec.primary_uom_code;
13344: IF l_dual_uom_item THEN
13345: l_reservation_record.secondary_uom_code := l_loaded_lines_rec.secondary_uom_code;
13346: ELSE
13347: l_reservation_record.secondary_uom_code := NULL;
13348: END IF;

Line 13440: IF l_dual_uom_item THEN

13436: g_lpn_contents_tab(l_index).quantity := g_lpn_contents_tab(l_index).quantity - l_qty_overship;
13437: l_lpn_cont_rec.quantity := l_lpn_cont_rec.quantity - l_qty_overship;
13438: g_total_lpn_quantity := g_total_lpn_quantity - l_qty_overship;
13439:
13440: IF l_dual_uom_item THEN
13441: g_lpn_contents_tab(l_index).secondary_quantity :=
13442: g_lpn_contents_tab(l_index).secondary_quantity - l_sec_qty_overship;
13443: l_lpn_cont_rec.secondary_quantity := l_lpn_cont_rec.secondary_quantity - l_sec_qty_overship;
13444: g_total_lpn_sec_qty := g_total_lpn_sec_qty - l_sec_qty_overship;

Line 13456: IF l_dual_uom_item THEN

13452: ELSE
13453: l_lpn_cont_qty_used(l_index) := l_qty_overship;
13454: END IF;
13455:
13456: IF l_dual_uom_item THEN
13457: IF l_lpn_sec_qty_used.EXISTS(l_index) THEN
13458: l_lpn_sec_qty_used(l_index) := l_lpn_sec_qty_used(l_index) + l_sec_qty_overship;
13459: ELSE
13460: l_lpn_sec_qty_used(l_index) := l_sec_qty_overship;

Line 13853: DEBUG('No data found for LPN i.e no dual uom or pricing sec item in LPN', 'is_ct_wt_enabled');

13849: x_return_status := FND_API.G_RET_STS_SUCCESS;
13850: EXCEPTION
13851: WHEN NO_DATA_FOUND THEN
13852: IF (l_debug = 1) THEN
13853: DEBUG('No data found for LPN i.e no dual uom or pricing sec item in LPN', 'is_ct_wt_enabled');
13854: END IF;
13855: x_ct_wt_enabled := 0;
13856: WHEN OTHERS THEN
13857: IF (l_debug = 1) THEN