DBA Data[Home] [Help]

APPS.INV_RESERVATION_PVT dependencies on FND_API

Line 173: WHEN fnd_api.g_exc_error THEN

169: x_requested_qty := l_requested_qty;
170: x_requested_qty2 := l_requested_qty2;
171:
172: EXCEPTION
173: WHEN fnd_api.g_exc_error THEN
174: IF (l_debug = 1) THEN
175: debug_print('excepted error');
176: END IF;
177: x_requested_qty := 0;

Line 180: WHEN fnd_api.g_exc_unexpected_error THEN

176: END IF;
177: x_requested_qty := 0;
178: x_requested_qty2 := 0;
179: --
180: WHEN fnd_api.g_exc_unexpected_error THEN
181: IF (l_debug = 1) THEN
182: debug_print('unexpected error');
183: END IF;
184: x_requested_qty := 0;

Line 257: RAISE fnd_api.g_exc_unexpected_error;

253: IF NOT l_return_value THEN
254: IF (l_debug = 1) THEN
255: debug_print('error occurred while setting inv_cache.set_item_rec');
256: END IF;
257: RAISE fnd_api.g_exc_unexpected_error;
258: End IF;
259:
260:
261: IF p_rsv_rec.lot_number is NULL OR

Line 446: , p_supply_source_line_detail => Nvl(p_to_supply_source_line_detail,fnd_api.g_miss_num)

442: , p_fm_supply_source_type_id => p_fm_supply_source_type_id
443: , p_supply_source_type_id => p_to_supply_source_type_id
444: , p_supply_source_header_id => p_to_supply_source_header_id
445: , p_supply_source_line_id => p_to_supply_source_line_id
446: , p_supply_source_line_detail => Nvl(p_to_supply_source_line_detail,fnd_api.g_miss_num)
447: , p_project_id => p_to_project_id
448: , p_task_id => p_to_task_id
449: , p_api_version_number => 1.0
450: , p_init_msg_lst => fnd_api.g_false

Line 450: , p_init_msg_lst => fnd_api.g_false

446: , p_supply_source_line_detail => Nvl(p_to_supply_source_line_detail,fnd_api.g_miss_num)
447: , p_project_id => p_to_project_id
448: , p_task_id => p_to_task_id
449: , p_api_version_number => 1.0
450: , p_init_msg_lst => fnd_api.g_false
451: );
452:
453: IF (l_debug = 1) THEN
454: debug_print('After calling available supply to reserve ' || x_return_status);

Line 460: IF x_return_status = fnd_api.g_ret_sts_error THEN

456: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
457: END IF;
458:
459: --
460: IF x_return_status = fnd_api.g_ret_sts_error THEN
461: RAISE fnd_api.g_exc_error;
462: END IF;
463:
464: --

Line 461: RAISE fnd_api.g_exc_error;

457: END IF;
458:
459: --
460: IF x_return_status = fnd_api.g_ret_sts_error THEN
461: RAISE fnd_api.g_exc_error;
462: END IF;
463:
464: --
465: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 465: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

461: RAISE fnd_api.g_exc_error;
462: END IF;
463:
464: --
465: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;
468:
469: IF (p_fm_supply_source_type_id = p_to_supply_source_type_id AND

Line 466: RAISE fnd_api.g_exc_unexpected_error;

462: END IF;
463:
464: --
465: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;
468:
469: IF (p_fm_supply_source_type_id = p_to_supply_source_type_id AND
470: p_fm_supply_source_header_id = p_to_supply_source_header_id AND

Line 493: WHEN fnd_api.g_exc_error THEN

489: x_reservable_qty := l_reservable_qty;
490: x_qty_available := l_qty_available;
491:
492: EXCEPTION
493: WHEN fnd_api.g_exc_error THEN
494: x_return_status := fnd_api.g_ret_sts_error;
495: x_reservable_qty := 0;
496: x_qty_available := 0;
497: --

Line 494: x_return_status := fnd_api.g_ret_sts_error;

490: x_qty_available := l_qty_available;
491:
492: EXCEPTION
493: WHEN fnd_api.g_exc_error THEN
494: x_return_status := fnd_api.g_ret_sts_error;
495: x_reservable_qty := 0;
496: x_qty_available := 0;
497: --
498: WHEN fnd_api.g_exc_unexpected_error THEN

Line 498: WHEN fnd_api.g_exc_unexpected_error THEN

494: x_return_status := fnd_api.g_ret_sts_error;
495: x_reservable_qty := 0;
496: x_qty_available := 0;
497: --
498: WHEN fnd_api.g_exc_unexpected_error THEN
499: x_return_status := fnd_api.g_ret_sts_unexp_error;
500: x_reservable_qty := 0;
501: x_qty_available := 0;
502: --

Line 499: x_return_status := fnd_api.g_ret_sts_unexp_error;

495: x_reservable_qty := 0;
496: x_qty_available := 0;
497: --
498: WHEN fnd_api.g_exc_unexpected_error THEN
499: x_return_status := fnd_api.g_ret_sts_unexp_error;
500: x_reservable_qty := 0;
501: x_qty_available := 0;
502: --
503: WHEN OTHERS THEN

Line 504: x_return_status := fnd_api.g_ret_sts_unexp_error;

500: x_reservable_qty := 0;
501: x_qty_available := 0;
502: --
503: WHEN OTHERS THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error;
505: x_reservable_qty := 0;
506: x_qty_available := 0;
507: --
508: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 593: , p_demand_source_line_detail => Nvl(p_to_demand_source_line_detail,fnd_api.g_miss_num)

589: , p_primary_uom_code => p_to_primary_uom_code
590: , p_demand_source_type_id => p_to_demand_source_type_id
591: , p_demand_source_header_id => p_to_demand_source_header_id
592: , p_demand_source_line_id => p_to_demand_source_line_id
593: , p_demand_source_line_detail => Nvl(p_to_demand_source_line_detail,fnd_api.g_miss_num)
594: , p_project_id => p_to_project_id
595: , p_task_id => p_to_task_id
596: , p_api_version_number => 1.0
597: , p_init_msg_lst => fnd_api.g_false

Line 597: , p_init_msg_lst => fnd_api.g_false

593: , p_demand_source_line_detail => Nvl(p_to_demand_source_line_detail,fnd_api.g_miss_num)
594: , p_project_id => p_to_project_id
595: , p_task_id => p_to_task_id
596: , p_api_version_number => 1.0
597: , p_init_msg_lst => fnd_api.g_false
598: );
599:
600:
601: IF (l_debug = 1) THEN

Line 610: IF x_return_status = fnd_api.g_ret_sts_error THEN

606: debug_print('Available quantity on the document. l_qty_available2: ' || l_qty_available2);
607: END IF;
608:
609: --
610: IF x_return_status = fnd_api.g_ret_sts_error THEN
611: RAISE fnd_api.g_exc_error;
612: END IF;
613:
614: --

Line 611: RAISE fnd_api.g_exc_error;

607: END IF;
608:
609: --
610: IF x_return_status = fnd_api.g_ret_sts_error THEN
611: RAISE fnd_api.g_exc_error;
612: END IF;
613:
614: --
615: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 615: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

611: RAISE fnd_api.g_exc_error;
612: END IF;
613:
614: --
615: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
616: RAISE fnd_api.g_exc_unexpected_error;
617: END IF;
618:
619: IF (p_fm_demand_source_type_id = p_to_demand_source_type_id AND

Line 616: RAISE fnd_api.g_exc_unexpected_error;

612: END IF;
613:
614: --
615: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
616: RAISE fnd_api.g_exc_unexpected_error;
617: END IF;
618:
619: IF (p_fm_demand_source_type_id = p_to_demand_source_type_id AND
620: p_fm_demand_source_header_id = p_to_demand_source_header_id AND

Line 690: , p_init_msg_lst => fnd_api.g_false

686: p_organization_id => p_to_organization_id)) THEN
687: get_ship_qty_tolerance
688: (
689: p_api_version_number => 1.0
690: , p_init_msg_lst => fnd_api.g_false
691: , x_return_status => x_return_status
692: , x_msg_count => x_msg_count
693: , x_msg_data => x_msg_data
694: , p_demand_type_id => p_to_demand_source_type_id

Line 709: IF x_return_status = fnd_api.g_ret_sts_error THEN

705: debug_print('Reservation margin above ' || l_reservation_margin_above);
706: END IF;
707:
708: --
709: IF x_return_status = fnd_api.g_ret_sts_error THEN
710: RAISE fnd_api.g_exc_error;
711: END IF;
712:
713: --

Line 710: RAISE fnd_api.g_exc_error;

706: END IF;
707:
708: --
709: IF x_return_status = fnd_api.g_ret_sts_error THEN
710: RAISE fnd_api.g_exc_error;
711: END IF;
712:
713: --
714: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 714: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

710: RAISE fnd_api.g_exc_error;
711: END IF;
712:
713: --
714: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
715: RAISE fnd_api.g_exc_unexpected_error;
716: END IF;
717:
718: --MUOM Fulfillment Project

Line 715: RAISE fnd_api.g_exc_unexpected_error;

711: END IF;
712:
713: --
714: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
715: RAISE fnd_api.g_exc_unexpected_error;
716: END IF;
717:
718: --MUOM Fulfillment Project
719: inv_utilities.get_inv_fulfillment_base(

Line 747: WHEN fnd_api.g_exc_error THEN

743: x_reservable_qty2 := l_reservable_qty2;
744: x_qty_available2 := l_qty_available2;
745:
746: EXCEPTION
747: WHEN fnd_api.g_exc_error THEN
748: x_return_status := fnd_api.g_ret_sts_error;
749: x_reservable_qty := 0;
750: x_qty_available := 0;
751: x_reservable_qty2 := 0;

Line 748: x_return_status := fnd_api.g_ret_sts_error;

744: x_qty_available2 := l_qty_available2;
745:
746: EXCEPTION
747: WHEN fnd_api.g_exc_error THEN
748: x_return_status := fnd_api.g_ret_sts_error;
749: x_reservable_qty := 0;
750: x_qty_available := 0;
751: x_reservable_qty2 := 0;
752: x_qty_available2 := 0;

Line 754: WHEN fnd_api.g_exc_unexpected_error THEN

750: x_qty_available := 0;
751: x_reservable_qty2 := 0;
752: x_qty_available2 := 0;
753: --
754: WHEN fnd_api.g_exc_unexpected_error THEN
755: x_return_status := fnd_api.g_ret_sts_unexp_error;
756: x_reservable_qty := 0;
757: x_qty_available := 0;
758: x_reservable_qty2 := 0;

Line 755: x_return_status := fnd_api.g_ret_sts_unexp_error;

751: x_reservable_qty2 := 0;
752: x_qty_available2 := 0;
753: --
754: WHEN fnd_api.g_exc_unexpected_error THEN
755: x_return_status := fnd_api.g_ret_sts_unexp_error;
756: x_reservable_qty := 0;
757: x_qty_available := 0;
758: x_reservable_qty2 := 0;
759: x_qty_available2 := 0;

Line 762: x_return_status := fnd_api.g_ret_sts_unexp_error;

758: x_reservable_qty2 := 0;
759: x_qty_available2 := 0;
760: --
761: WHEN OTHERS THEN
762: x_return_status := fnd_api.g_ret_sts_unexp_error;
763: x_reservable_qty := 0;
764: x_qty_available := 0;
765: x_reservable_qty2 := 0;
766: x_qty_available2 := 0;

Line 780: , p_init_msg_lst IN VARCHAR2 Default Fnd_API.G_False

776: -- item
777: PROCEDURE get_ship_qty_tolerance
778: (
779: p_api_version_number IN NUMBER
780: , p_init_msg_lst IN VARCHAR2 Default Fnd_API.G_False
781: , x_return_status OUT NOCOPY VARCHAR2
782: , x_msg_count OUT NOCOPY NUMBER
783: , x_msg_data OUT NOCOPY VARCHAR2
784: , p_demand_type_id IN NUMBER

Line 812: x_return_status := fnd_api.g_ret_sts_success;

808:
809: l_debug := g_debug;
810:
811: -- Initialize return status
812: x_return_status := fnd_api.g_ret_sts_success;
813:
814: -- Standard call to check for call compatibility
815: IF NOT fnd_api.compatible_api_call(l_api_version_number
816: , p_api_version_number

Line 815: IF NOT fnd_api.compatible_api_call(l_api_version_number

811: -- Initialize return status
812: x_return_status := fnd_api.g_ret_sts_success;
813:
814: -- Standard call to check for call compatibility
815: IF NOT fnd_api.compatible_api_call(l_api_version_number
816: , p_api_version_number
817: , l_api_name
818: , G_PKG_NAME
819: ) THEN

Line 820: RAISE fnd_api.g_exc_unexpected_error;

816: , p_api_version_number
817: , l_api_name
818: , G_PKG_NAME
819: ) THEN
820: RAISE fnd_api.g_exc_unexpected_error;
821: END IF;
822: --
823: -- Initialize message list.
824: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 824: IF fnd_api.to_boolean(p_init_msg_lst) THEN

820: RAISE fnd_api.g_exc_unexpected_error;
821: END IF;
822: --
823: -- Initialize message list.
824: IF fnd_api.to_boolean(p_init_msg_lst) THEN
825: fnd_msg_pub.initialize;
826: END IF;
827:
828: IF p_demand_type_id IN (inv_reservation_global.g_source_type_oe,

Line 913: x_return_status := fnd_api.g_ret_sts_success;

909:
910: END IF;
911:
912: END IF;
913: x_return_status := fnd_api.g_ret_sts_success;
914:
915: EXCEPTION
916:
917: WHEN fnd_api.g_exc_error THEN

Line 917: WHEN fnd_api.g_exc_error THEN

913: x_return_status := fnd_api.g_ret_sts_success;
914:
915: EXCEPTION
916:
917: WHEN fnd_api.g_exc_error THEN
918: x_return_status := fnd_api.g_ret_sts_error;
919:
920: -- Get message count and data
921: fnd_msg_pub.count_and_get

Line 918: x_return_status := fnd_api.g_ret_sts_error;

914:
915: EXCEPTION
916:
917: WHEN fnd_api.g_exc_error THEN
918: x_return_status := fnd_api.g_ret_sts_error;
919:
920: -- Get message count and data
921: fnd_msg_pub.count_and_get
922: ( p_count => x_msg_count

Line 927: WHEN fnd_api.g_exc_unexpected_error THEN

923: , p_data => x_msg_data
924: , p_encoded => 'F'
925: );
926:
927: WHEN fnd_api.g_exc_unexpected_error THEN
928: x_return_status := fnd_api.g_ret_sts_unexp_error ;
929:
930: -- Get message count and data
931: fnd_msg_pub.count_and_get

Line 928: x_return_status := fnd_api.g_ret_sts_unexp_error ;

924: , p_encoded => 'F'
925: );
926:
927: WHEN fnd_api.g_exc_unexpected_error THEN
928: x_return_status := fnd_api.g_ret_sts_unexp_error ;
929:
930: -- Get message count and data
931: fnd_msg_pub.count_and_get
932: ( p_count => x_msg_count

Line 938: x_return_status := fnd_api.g_ret_sts_unexp_error ;

934: , p_encoded => 'F'
935: );
936:
937: WHEN OTHERS THEN
938: x_return_status := fnd_api.g_ret_sts_unexp_error ;
939:
940: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
941: THEN
942: fnd_msg_pub.add_exc_msg

Line 969: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

965: -- In px_rsv_rec, inventory_item_id must be valid;
966: -- either primary_uom_code, primary_reservation_quantity
967: -- or reservation_uom_code, reservation_quantity must be not null and valid
968: PROCEDURE convert_quantity(x_return_status OUT NOCOPY VARCHAR2, px_rsv_rec IN OUT NOCOPY inv_reservation_global.mtl_reservation_rec_type) IS
969: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
970: --l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
971: l_primary_uom_code VARCHAR2(3);
972: l_tmp_secondary_quantity NUMBER := NULL; -- INVCONV
973: l_tmp_quantity NUMBER := NULL;

Line 1021: RAISE fnd_api.g_exc_error;

1017: IF l_tmp_quantity = -99999 THEN
1018: -- conversion failed
1019: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-PRIMARY-UOM');
1020: fnd_msg_pub.ADD;
1021: RAISE fnd_api.g_exc_error;
1022: END IF;
1023:
1024: --
1025: px_rsv_rec.primary_reservation_quantity := l_tmp_quantity;

Line 1077: RAISE fnd_api.g_exc_error;

1073: IF l_tmp_quantity = -99999 THEN
1074: -- conversion failed
1075: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-RSV-UOM');
1076: fnd_msg_pub.ADD;
1077: RAISE fnd_api.g_exc_error;
1078: END IF;
1079: ELSE
1080: -- INVCONV upgrade inv_um_convert call
1081: l_tmp_quantity := inv_convert.inv_um_convert(

Line 1097: RAISE fnd_api.g_exc_error;

1093: IF l_tmp_quantity = -99999 THEN
1094: -- conversion failed
1095: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-RSV-UOM');
1096: fnd_msg_pub.ADD;
1097: RAISE fnd_api.g_exc_error;
1098: END IF;
1099: END IF;
1100:
1101: --

Line 1125: RAISE fnd_api.g_exc_error;

1121: IF l_tmp_secondary_quantity = -99999 THEN
1122: -- conversion failed
1123: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM'); -- INVCONV NEW MESSAGE
1124: fnd_msg_pub.ADD;
1125: RAISE fnd_api.g_exc_error;
1126: END IF;
1127: px_rsv_rec.secondary_reservation_quantity := l_tmp_secondary_quantity; -- INVCONV
1128: END IF;
1129:

Line 1134: px_rsv_rec.detailed_quantity = fnd_api.g_miss_num ) THEN --Bug#7482123.

1130: -- secondary_detailed_quantity could also be missing:
1131: IF px_rsv_rec.secondary_uom_code IS NOT NULL AND
1132: px_rsv_rec.secondary_detailed_quantity IS NULL THEN
1133: IF ( NVL(px_rsv_rec.detailed_quantity,0) = 0 OR
1134: px_rsv_rec.detailed_quantity = fnd_api.g_miss_num ) THEN --Bug#7482123.
1135: px_rsv_rec.secondary_detailed_quantity := 0;
1136: ELSE -- convert from detailed_quantity to secondary_detailed_quantity
1137: l_tmp_secondary_quantity := inv_convert.inv_um_convert(
1138: item_id => px_rsv_rec.inventory_item_id

Line 1153: RAISE fnd_api.g_exc_error;

1149: IF l_tmp_secondary_quantity = -99999 THEN
1150: -- conversion failed
1151: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM'); -- INVCONV NEW MESSAGE
1152: fnd_msg_pub.ADD;
1153: RAISE fnd_api.g_exc_error;
1154: END IF;
1155: px_rsv_rec.secondary_detailed_quantity := l_tmp_secondary_quantity; -- INVCONV
1156: END IF;
1157: END IF;

Line 1165: WHEN fnd_api.g_exc_error THEN

1161: --
1162: x_return_status := l_return_status;
1163: --
1164: EXCEPTION
1165: WHEN fnd_api.g_exc_error THEN
1166: x_return_status := fnd_api.g_ret_sts_error;
1167: --
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1166: x_return_status := fnd_api.g_ret_sts_error;

1162: x_return_status := l_return_status;
1163: --
1164: EXCEPTION
1165: WHEN fnd_api.g_exc_error THEN
1166: x_return_status := fnd_api.g_ret_sts_error;
1167: --
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_unexp_error;
1170: --

Line 1168: WHEN fnd_api.g_exc_unexpected_error THEN

1164: EXCEPTION
1165: WHEN fnd_api.g_exc_error THEN
1166: x_return_status := fnd_api.g_ret_sts_error;
1167: --
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_unexp_error;
1170: --
1171: WHEN OTHERS THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1169: x_return_status := fnd_api.g_ret_sts_unexp_error;

1165: WHEN fnd_api.g_exc_error THEN
1166: x_return_status := fnd_api.g_ret_sts_error;
1167: --
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_unexp_error;
1170: --
1171: WHEN OTHERS THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;
1173:

Line 1172: x_return_status := fnd_api.g_ret_sts_unexp_error;

1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_unexp_error;
1170: --
1171: WHEN OTHERS THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;
1173:
1174: --
1175: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1176: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Convert_Quantity');

Line 1188: IF p_rsv_rec.reservation_id <> fnd_api.g_miss_num THEN

1184: -- field in the input record is not missing, it
1185: -- would be copied to the output record
1186: PROCEDURE convert_missing_to_null(p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type, x_rsv_rec OUT NOCOPY inv_reservation_global.mtl_reservation_rec_type) IS
1187: BEGIN
1188: IF p_rsv_rec.reservation_id <> fnd_api.g_miss_num THEN
1189: x_rsv_rec.reservation_id := p_rsv_rec.reservation_id;
1190: ELSE
1191: x_rsv_rec.reservation_id := NULL;
1192: END IF;

Line 1195: IF p_rsv_rec.requirement_date <> fnd_api.g_miss_date THEN

1191: x_rsv_rec.reservation_id := NULL;
1192: END IF;
1193:
1194: --
1195: IF p_rsv_rec.requirement_date <> fnd_api.g_miss_date THEN
1196: x_rsv_rec.requirement_date := p_rsv_rec.requirement_date;
1197: ELSE
1198: x_rsv_rec.requirement_date := NULL;
1199: END IF;

Line 1202: IF p_rsv_rec.organization_id <> fnd_api.g_miss_num THEN

1198: x_rsv_rec.requirement_date := NULL;
1199: END IF;
1200:
1201: --
1202: IF p_rsv_rec.organization_id <> fnd_api.g_miss_num THEN
1203: x_rsv_rec.organization_id := p_rsv_rec.organization_id;
1204: ELSE
1205: x_rsv_rec.organization_id := NULL;
1206: END IF;

Line 1209: IF p_rsv_rec.inventory_item_id <> fnd_api.g_miss_num THEN

1205: x_rsv_rec.organization_id := NULL;
1206: END IF;
1207:
1208: --
1209: IF p_rsv_rec.inventory_item_id <> fnd_api.g_miss_num THEN
1210: x_rsv_rec.inventory_item_id := p_rsv_rec.inventory_item_id;
1211: ELSE
1212: x_rsv_rec.inventory_item_id := NULL;
1213: END IF;

Line 1216: IF p_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num THEN

1212: x_rsv_rec.inventory_item_id := NULL;
1213: END IF;
1214:
1215: --
1216: IF p_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num THEN
1217: x_rsv_rec.demand_source_type_id := p_rsv_rec.demand_source_type_id;
1218: ELSE
1219: x_rsv_rec.demand_source_type_id := NULL;
1220: END IF;

Line 1223: IF p_rsv_rec.demand_source_name <> fnd_api.g_miss_char THEN

1219: x_rsv_rec.demand_source_type_id := NULL;
1220: END IF;
1221:
1222: --
1223: IF p_rsv_rec.demand_source_name <> fnd_api.g_miss_char THEN
1224: x_rsv_rec.demand_source_name := p_rsv_rec.demand_source_name;
1225: ELSE
1226: x_rsv_rec.demand_source_name := NULL;
1227: END IF;

Line 1230: IF p_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num THEN

1226: x_rsv_rec.demand_source_name := NULL;
1227: END IF;
1228:
1229: --
1230: IF p_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num THEN
1231: x_rsv_rec.demand_source_delivery := p_rsv_rec.demand_source_delivery;
1232: ELSE
1233: x_rsv_rec.demand_source_delivery := NULL;
1234: END IF;

Line 1237: IF p_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num THEN

1233: x_rsv_rec.demand_source_delivery := NULL;
1234: END IF;
1235:
1236: --
1237: IF p_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num THEN
1238: x_rsv_rec.demand_source_header_id := p_rsv_rec.demand_source_header_id;
1239: ELSE
1240: x_rsv_rec.demand_source_header_id := NULL;
1241: END IF;

Line 1244: IF p_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num THEN

1240: x_rsv_rec.demand_source_header_id := NULL;
1241: END IF;
1242:
1243: --
1244: IF p_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num THEN
1245: x_rsv_rec.demand_source_line_id := p_rsv_rec.demand_source_line_id;
1246: ELSE
1247: x_rsv_rec.demand_source_line_id := NULL;
1248: END IF;

Line 1251: IF p_rsv_rec.primary_uom_code <> fnd_api.g_miss_char THEN

1247: x_rsv_rec.demand_source_line_id := NULL;
1248: END IF;
1249:
1250: --
1251: IF p_rsv_rec.primary_uom_code <> fnd_api.g_miss_char THEN
1252: x_rsv_rec.primary_uom_code := p_rsv_rec.primary_uom_code;
1253: ELSE
1254: x_rsv_rec.primary_uom_code := NULL;
1255: END IF;

Line 1258: IF p_rsv_rec.primary_uom_id <> fnd_api.g_miss_num THEN

1254: x_rsv_rec.primary_uom_code := NULL;
1255: END IF;
1256:
1257: --
1258: IF p_rsv_rec.primary_uom_id <> fnd_api.g_miss_num THEN
1259: x_rsv_rec.primary_uom_id := p_rsv_rec.primary_uom_id;
1260: ELSE
1261: x_rsv_rec.primary_uom_id := NULL;
1262: END IF;

Line 1265: IF p_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char THEN

1261: x_rsv_rec.primary_uom_id := NULL;
1262: END IF;
1263:
1264: -- INVCONV BEGIN
1265: IF p_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char THEN
1266: x_rsv_rec.secondary_uom_code := p_rsv_rec.secondary_uom_code;
1267: ELSE
1268: x_rsv_rec.secondary_uom_code := NULL;
1269: END IF;

Line 1272: IF p_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num THEN

1268: x_rsv_rec.secondary_uom_code := NULL;
1269: END IF;
1270:
1271: --
1272: IF p_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num THEN
1273: x_rsv_rec.secondary_uom_id := p_rsv_rec.secondary_uom_id;
1274: ELSE
1275: x_rsv_rec.secondary_uom_id := NULL;
1276: END IF;

Line 1280: IF p_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char THEN

1276: END IF;
1277: -- INVCONV END
1278:
1279: --
1280: IF p_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char THEN
1281: x_rsv_rec.reservation_uom_code := p_rsv_rec.reservation_uom_code;
1282: ELSE
1283: x_rsv_rec.reservation_uom_code := NULL;
1284: END IF;

Line 1287: IF p_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num THEN

1283: x_rsv_rec.reservation_uom_code := NULL;
1284: END IF;
1285:
1286: --
1287: IF p_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num THEN
1288: x_rsv_rec.reservation_uom_id := p_rsv_rec.reservation_uom_id;
1289: ELSE
1290: x_rsv_rec.reservation_uom_id := NULL;
1291: END IF;

Line 1294: IF p_rsv_rec.reservation_quantity <> fnd_api.g_miss_num THEN

1290: x_rsv_rec.reservation_uom_id := NULL;
1291: END IF;
1292:
1293: --
1294: IF p_rsv_rec.reservation_quantity <> fnd_api.g_miss_num THEN
1295: x_rsv_rec.reservation_quantity := p_rsv_rec.reservation_quantity;
1296: ELSE
1297: x_rsv_rec.reservation_quantity := NULL;
1298: END IF;

Line 1301: IF p_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num THEN

1297: x_rsv_rec.reservation_quantity := NULL;
1298: END IF;
1299:
1300: --
1301: IF p_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num THEN
1302: x_rsv_rec.primary_reservation_quantity := p_rsv_rec.primary_reservation_quantity;
1303: ELSE
1304: x_rsv_rec.primary_reservation_quantity := NULL;
1305: END IF;

Line 1308: IF p_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num THEN

1304: x_rsv_rec.primary_reservation_quantity := NULL;
1305: END IF;
1306:
1307: -- INVCONV BEGIN
1308: IF p_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num THEN
1309: x_rsv_rec.secondary_reservation_quantity := p_rsv_rec.secondary_reservation_quantity;
1310: ELSE
1311: x_rsv_rec.secondary_reservation_quantity := NULL;
1312: END IF;

Line 1316: IF p_rsv_rec.detailed_quantity <> fnd_api.g_miss_num THEN

1312: END IF;
1313: -- INVCONV END
1314:
1315: --
1316: IF p_rsv_rec.detailed_quantity <> fnd_api.g_miss_num THEN
1317: x_rsv_rec.detailed_quantity := p_rsv_rec.detailed_quantity;
1318: ELSE
1319: x_rsv_rec.detailed_quantity := NULL;
1320: END IF;

Line 1324: IF p_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num THEN

1320: END IF;
1321:
1322:
1323: -- INVCONV BEGIN
1324: IF p_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num THEN
1325: x_rsv_rec.secondary_detailed_quantity := p_rsv_rec.secondary_detailed_quantity;
1326: ELSE
1327: x_rsv_rec.secondary_detailed_quantity := NULL;
1328: END IF;

Line 1331: IF p_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num THEN

1327: x_rsv_rec.secondary_detailed_quantity := NULL;
1328: END IF;
1329: -- INVCONV END
1330: --
1331: IF p_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num THEN
1332: x_rsv_rec.autodetail_group_id := p_rsv_rec.autodetail_group_id;
1333: ELSE
1334: x_rsv_rec.autodetail_group_id := NULL;
1335: END IF;

Line 1338: IF p_rsv_rec.external_source_code <> fnd_api.g_miss_char THEN

1334: x_rsv_rec.autodetail_group_id := NULL;
1335: END IF;
1336:
1337: --
1338: IF p_rsv_rec.external_source_code <> fnd_api.g_miss_char THEN
1339: x_rsv_rec.external_source_code := p_rsv_rec.external_source_code;
1340: ELSE
1341: x_rsv_rec.external_source_code := NULL;
1342: END IF;

Line 1345: IF p_rsv_rec.external_source_line_id <> fnd_api.g_miss_num THEN

1341: x_rsv_rec.external_source_code := NULL;
1342: END IF;
1343:
1344: --
1345: IF p_rsv_rec.external_source_line_id <> fnd_api.g_miss_num THEN
1346: x_rsv_rec.external_source_line_id := p_rsv_rec.external_source_line_id;
1347: ELSE
1348: x_rsv_rec.external_source_line_id := NULL;
1349: END IF;

Line 1352: IF p_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num THEN

1348: x_rsv_rec.external_source_line_id := NULL;
1349: END IF;
1350:
1351: --
1352: IF p_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num THEN
1353: x_rsv_rec.supply_source_type_id := p_rsv_rec.supply_source_type_id;
1354: ELSE
1355: x_rsv_rec.supply_source_type_id := NULL;
1356: END IF;

Line 1359: IF p_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num THEN

1355: x_rsv_rec.supply_source_type_id := NULL;
1356: END IF;
1357:
1358: --
1359: IF p_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num THEN
1360: x_rsv_rec.supply_source_header_id := p_rsv_rec.supply_source_header_id;
1361: ELSE
1362: x_rsv_rec.supply_source_header_id := NULL;
1363: END IF;

Line 1366: IF p_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num THEN

1362: x_rsv_rec.supply_source_header_id := NULL;
1363: END IF;
1364:
1365: --
1366: IF p_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num THEN
1367: x_rsv_rec.supply_source_line_id := p_rsv_rec.supply_source_line_id;
1368: ELSE
1369: x_rsv_rec.supply_source_line_id := NULL;
1370: END IF;

Line 1373: IF p_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num THEN

1369: x_rsv_rec.supply_source_line_id := NULL;
1370: END IF;
1371:
1372: --
1373: IF p_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num THEN
1374: x_rsv_rec.supply_source_line_detail := p_rsv_rec.supply_source_line_detail;
1375: ELSE
1376: x_rsv_rec.supply_source_line_detail := NULL;
1377: END IF;

Line 1380: IF p_rsv_rec.supply_source_name <> fnd_api.g_miss_char THEN

1376: x_rsv_rec.supply_source_line_detail := NULL;
1377: END IF;
1378:
1379: --
1380: IF p_rsv_rec.supply_source_name <> fnd_api.g_miss_char THEN
1381: x_rsv_rec.supply_source_name := p_rsv_rec.supply_source_name;
1382: ELSE
1383: x_rsv_rec.supply_source_name := NULL;
1384: END IF;

Line 1387: IF p_rsv_rec.revision <> fnd_api.g_miss_char THEN

1383: x_rsv_rec.supply_source_name := NULL;
1384: END IF;
1385:
1386: --
1387: IF p_rsv_rec.revision <> fnd_api.g_miss_char THEN
1388: x_rsv_rec.revision := p_rsv_rec.revision;
1389: ELSE
1390: x_rsv_rec.revision := NULL;
1391: END IF;

Line 1394: IF p_rsv_rec.subinventory_code <> fnd_api.g_miss_char THEN

1390: x_rsv_rec.revision := NULL;
1391: END IF;
1392:
1393: --
1394: IF p_rsv_rec.subinventory_code <> fnd_api.g_miss_char THEN
1395: x_rsv_rec.subinventory_code := p_rsv_rec.subinventory_code;
1396: ELSE
1397: x_rsv_rec.subinventory_code := NULL;
1398: END IF;

Line 1401: IF p_rsv_rec.subinventory_id <> fnd_api.g_miss_num THEN

1397: x_rsv_rec.subinventory_code := NULL;
1398: END IF;
1399:
1400: --
1401: IF p_rsv_rec.subinventory_id <> fnd_api.g_miss_num THEN
1402: x_rsv_rec.subinventory_id := p_rsv_rec.subinventory_id;
1403: ELSE
1404: x_rsv_rec.subinventory_id := NULL;
1405: END IF;

Line 1408: IF p_rsv_rec.locator_id <> fnd_api.g_miss_num THEN

1404: x_rsv_rec.subinventory_id := NULL;
1405: END IF;
1406:
1407: --
1408: IF p_rsv_rec.locator_id <> fnd_api.g_miss_num THEN
1409: x_rsv_rec.locator_id := p_rsv_rec.locator_id;
1410: ELSE
1411: x_rsv_rec.locator_id := NULL;
1412: END IF;

Line 1415: IF p_rsv_rec.lot_number <> fnd_api.g_miss_char THEN

1411: x_rsv_rec.locator_id := NULL;
1412: END IF;
1413:
1414: --
1415: IF p_rsv_rec.lot_number <> fnd_api.g_miss_char THEN
1416: x_rsv_rec.lot_number := p_rsv_rec.lot_number;
1417: ELSE
1418: x_rsv_rec.lot_number := NULL;
1419: END IF;

Line 1422: IF p_rsv_rec.lot_number_id <> fnd_api.g_miss_num THEN

1418: x_rsv_rec.lot_number := NULL;
1419: END IF;
1420:
1421: --
1422: IF p_rsv_rec.lot_number_id <> fnd_api.g_miss_num THEN
1423: x_rsv_rec.lot_number_id := p_rsv_rec.lot_number_id;
1424: ELSE
1425: x_rsv_rec.lot_number_id := NULL;
1426: END IF;

Line 1429: IF p_rsv_rec.pick_slip_number <> fnd_api.g_miss_num THEN

1425: x_rsv_rec.lot_number_id := NULL;
1426: END IF;
1427:
1428: --
1429: IF p_rsv_rec.pick_slip_number <> fnd_api.g_miss_num THEN
1430: x_rsv_rec.pick_slip_number := p_rsv_rec.pick_slip_number;
1431: ELSE
1432: x_rsv_rec.pick_slip_number := NULL;
1433: END IF;

Line 1436: IF p_rsv_rec.attribute_category <> fnd_api.g_miss_char THEN

1432: x_rsv_rec.pick_slip_number := NULL;
1433: END IF;
1434:
1435: --
1436: IF p_rsv_rec.attribute_category <> fnd_api.g_miss_char THEN
1437: x_rsv_rec.attribute_category := p_rsv_rec.attribute_category;
1438: ELSE
1439: x_rsv_rec.attribute_category := NULL;
1440: END IF;

Line 1443: IF p_rsv_rec.attribute1 <> fnd_api.g_miss_char THEN

1439: x_rsv_rec.attribute_category := NULL;
1440: END IF;
1441:
1442: --
1443: IF p_rsv_rec.attribute1 <> fnd_api.g_miss_char THEN
1444: x_rsv_rec.attribute1 := p_rsv_rec.attribute1;
1445: ELSE
1446: x_rsv_rec.attribute1 := NULL;
1447: END IF;

Line 1449: IF p_rsv_rec.attribute2 <> fnd_api.g_miss_char THEN

1445: ELSE
1446: x_rsv_rec.attribute1 := NULL;
1447: END IF;
1448:
1449: IF p_rsv_rec.attribute2 <> fnd_api.g_miss_char THEN
1450: x_rsv_rec.attribute2 := p_rsv_rec.attribute2;
1451: ELSE
1452: x_rsv_rec.attribute2 := NULL;
1453: END IF;

Line 1455: IF p_rsv_rec.attribute3 <> fnd_api.g_miss_char THEN

1451: ELSE
1452: x_rsv_rec.attribute2 := NULL;
1453: END IF;
1454:
1455: IF p_rsv_rec.attribute3 <> fnd_api.g_miss_char THEN
1456: x_rsv_rec.attribute3 := p_rsv_rec.attribute3;
1457: ELSE
1458: x_rsv_rec.attribute3 := NULL;
1459: END IF;

Line 1461: IF p_rsv_rec.attribute4 <> fnd_api.g_miss_char THEN

1457: ELSE
1458: x_rsv_rec.attribute3 := NULL;
1459: END IF;
1460:
1461: IF p_rsv_rec.attribute4 <> fnd_api.g_miss_char THEN
1462: x_rsv_rec.attribute4 := p_rsv_rec.attribute4;
1463: ELSE
1464: x_rsv_rec.attribute4 := NULL;
1465: END IF;

Line 1467: IF p_rsv_rec.attribute5 <> fnd_api.g_miss_char THEN

1463: ELSE
1464: x_rsv_rec.attribute4 := NULL;
1465: END IF;
1466:
1467: IF p_rsv_rec.attribute5 <> fnd_api.g_miss_char THEN
1468: x_rsv_rec.attribute5 := p_rsv_rec.attribute5;
1469: ELSE
1470: x_rsv_rec.attribute5 := NULL;
1471: END IF;

Line 1473: IF p_rsv_rec.attribute6 <> fnd_api.g_miss_char THEN

1469: ELSE
1470: x_rsv_rec.attribute5 := NULL;
1471: END IF;
1472:
1473: IF p_rsv_rec.attribute6 <> fnd_api.g_miss_char THEN
1474: x_rsv_rec.attribute6 := p_rsv_rec.attribute6;
1475: ELSE
1476: x_rsv_rec.attribute6 := NULL;
1477: END IF;

Line 1479: IF p_rsv_rec.attribute7 <> fnd_api.g_miss_char THEN

1475: ELSE
1476: x_rsv_rec.attribute6 := NULL;
1477: END IF;
1478:
1479: IF p_rsv_rec.attribute7 <> fnd_api.g_miss_char THEN
1480: x_rsv_rec.attribute7 := p_rsv_rec.attribute7;
1481: ELSE
1482: x_rsv_rec.attribute7 := NULL;
1483: END IF;

Line 1485: IF p_rsv_rec.attribute8 <> fnd_api.g_miss_char THEN

1481: ELSE
1482: x_rsv_rec.attribute7 := NULL;
1483: END IF;
1484:
1485: IF p_rsv_rec.attribute8 <> fnd_api.g_miss_char THEN
1486: x_rsv_rec.attribute8 := p_rsv_rec.attribute8;
1487: ELSE
1488: x_rsv_rec.attribute8 := NULL;
1489: END IF;

Line 1491: IF p_rsv_rec.attribute9 <> fnd_api.g_miss_char THEN

1487: ELSE
1488: x_rsv_rec.attribute8 := NULL;
1489: END IF;
1490:
1491: IF p_rsv_rec.attribute9 <> fnd_api.g_miss_char THEN
1492: x_rsv_rec.attribute9 := p_rsv_rec.attribute9;
1493: ELSE
1494: x_rsv_rec.attribute9 := NULL;
1495: END IF;

Line 1497: IF p_rsv_rec.attribute10 <> fnd_api.g_miss_char THEN

1493: ELSE
1494: x_rsv_rec.attribute9 := NULL;
1495: END IF;
1496:
1497: IF p_rsv_rec.attribute10 <> fnd_api.g_miss_char THEN
1498: x_rsv_rec.attribute10 := p_rsv_rec.attribute10;
1499: ELSE
1500: x_rsv_rec.attribute10 := NULL;
1501: END IF;

Line 1503: IF p_rsv_rec.attribute11 <> fnd_api.g_miss_char THEN

1499: ELSE
1500: x_rsv_rec.attribute10 := NULL;
1501: END IF;
1502:
1503: IF p_rsv_rec.attribute11 <> fnd_api.g_miss_char THEN
1504: x_rsv_rec.attribute11 := p_rsv_rec.attribute11;
1505: ELSE
1506: x_rsv_rec.attribute11 := NULL;
1507: END IF;

Line 1509: IF p_rsv_rec.attribute12 <> fnd_api.g_miss_char THEN

1505: ELSE
1506: x_rsv_rec.attribute11 := NULL;
1507: END IF;
1508:
1509: IF p_rsv_rec.attribute12 <> fnd_api.g_miss_char THEN
1510: x_rsv_rec.attribute12 := p_rsv_rec.attribute12;
1511: ELSE
1512: x_rsv_rec.attribute12 := NULL;
1513: END IF;

Line 1515: IF p_rsv_rec.attribute13 <> fnd_api.g_miss_char THEN

1511: ELSE
1512: x_rsv_rec.attribute12 := NULL;
1513: END IF;
1514:
1515: IF p_rsv_rec.attribute13 <> fnd_api.g_miss_char THEN
1516: x_rsv_rec.attribute13 := p_rsv_rec.attribute13;
1517: ELSE
1518: x_rsv_rec.attribute13 := NULL;
1519: END IF;

Line 1521: IF p_rsv_rec.attribute14 <> fnd_api.g_miss_char THEN

1517: ELSE
1518: x_rsv_rec.attribute13 := NULL;
1519: END IF;
1520:
1521: IF p_rsv_rec.attribute14 <> fnd_api.g_miss_char THEN
1522: x_rsv_rec.attribute14 := p_rsv_rec.attribute14;
1523: ELSE
1524: x_rsv_rec.attribute14 := NULL;
1525: END IF;

Line 1527: IF p_rsv_rec.attribute15 <> fnd_api.g_miss_char THEN

1523: ELSE
1524: x_rsv_rec.attribute14 := NULL;
1525: END IF;
1526:
1527: IF p_rsv_rec.attribute15 <> fnd_api.g_miss_char THEN
1528: x_rsv_rec.attribute15 := p_rsv_rec.attribute15;
1529: ELSE
1530: x_rsv_rec.attribute15 := NULL;
1531: END IF;

Line 1533: IF p_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num THEN

1529: ELSE
1530: x_rsv_rec.attribute15 := NULL;
1531: END IF;
1532:
1533: IF p_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num THEN
1534: x_rsv_rec.ship_ready_flag := p_rsv_rec.ship_ready_flag;
1535: ELSE
1536: x_rsv_rec.ship_ready_flag := NULL;
1537: END IF;

Line 1539: IF p_rsv_rec.staged_flag <> fnd_api.g_miss_char THEN

1535: ELSE
1536: x_rsv_rec.ship_ready_flag := NULL;
1537: END IF;
1538:
1539: IF p_rsv_rec.staged_flag <> fnd_api.g_miss_char THEN
1540: x_rsv_rec.staged_flag := p_rsv_rec.staged_flag;
1541: ELSE
1542: x_rsv_rec.staged_flag := NULL;
1543: END IF;

Line 1545: IF p_rsv_rec.lpn_id <> fnd_api.g_miss_num THEN

1541: ELSE
1542: x_rsv_rec.staged_flag := NULL;
1543: END IF;
1544:
1545: IF p_rsv_rec.lpn_id <> fnd_api.g_miss_num THEN
1546: x_rsv_rec.lpn_id := p_rsv_rec.lpn_id;
1547: ELSE
1548: x_rsv_rec.lpn_id := NULL;
1549: END IF;

Line 1553: IF p_rsv_rec.crossdock_flag <> fnd_api.g_miss_char THEN

1549: END IF;
1550:
1551: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
1552: -- convert_missing_to_null API}}****/
1553: IF p_rsv_rec.crossdock_flag <> fnd_api.g_miss_char THEN
1554: x_rsv_rec.crossdock_flag := p_rsv_rec.crossdock_flag;
1555: ELSE
1556: x_rsv_rec.crossdock_flag := NULL;
1557: END IF;

Line 1559: IF p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num THEN

1555: ELSE
1556: x_rsv_rec.crossdock_flag := NULL;
1557: END IF;
1558:
1559: IF p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num THEN
1560: x_rsv_rec.crossdock_criteria_id := p_rsv_rec.crossdock_criteria_id;
1561: ELSE
1562: x_rsv_rec.crossdock_criteria_id := NULL;
1563: END IF;

Line 1565: IF p_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num THEN

1561: ELSE
1562: x_rsv_rec.crossdock_criteria_id := NULL;
1563: END IF;
1564:
1565: IF p_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num THEN
1566: x_rsv_rec.demand_source_line_detail := p_rsv_rec.demand_source_line_detail;
1567: ELSE
1568: x_rsv_rec.demand_source_line_detail := NULL;
1569: END IF;

Line 1571: IF p_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num THEN

1567: ELSE
1568: x_rsv_rec.demand_source_line_detail := NULL;
1569: END IF;
1570:
1571: IF p_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num THEN
1572: x_rsv_rec.serial_reservation_quantity := p_rsv_rec.serial_reservation_quantity;
1573: ELSE
1574: x_rsv_rec.serial_reservation_quantity := NULL;
1575: END IF;

Line 1577: IF p_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date THEN

1573: ELSE
1574: x_rsv_rec.serial_reservation_quantity := NULL;
1575: END IF;
1576:
1577: IF p_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date THEN
1578: x_rsv_rec.supply_receipt_date := p_rsv_rec.supply_receipt_date;
1579: ELSE
1580: x_rsv_rec.supply_receipt_date := NULL;
1581: END IF;

Line 1583: IF p_rsv_rec.demand_ship_date <> fnd_api.g_miss_date THEN

1579: ELSE
1580: x_rsv_rec.supply_receipt_date := NULL;
1581: END IF;
1582:
1583: IF p_rsv_rec.demand_ship_date <> fnd_api.g_miss_date THEN
1584: x_rsv_rec.demand_ship_date := p_rsv_rec.demand_ship_date;
1585: ELSE
1586: x_rsv_rec.demand_ship_date := NULL;
1587: END IF;

Line 1589: IF p_rsv_rec.project_id <> fnd_api.g_miss_num THEN

1585: ELSE
1586: x_rsv_rec.demand_ship_date := NULL;
1587: END IF;
1588:
1589: IF p_rsv_rec.project_id <> fnd_api.g_miss_num THEN
1590: x_rsv_rec.project_id := p_rsv_rec.project_id;
1591: ELSE
1592: x_rsv_rec.project_id := NULL;
1593: END IF;

Line 1595: IF p_rsv_rec.task_id <> fnd_api.g_miss_num THEN

1591: ELSE
1592: x_rsv_rec.project_id := NULL;
1593: END IF;
1594:
1595: IF p_rsv_rec.task_id <> fnd_api.g_miss_num THEN
1596: x_rsv_rec.task_id := p_rsv_rec.task_id;
1597: ELSE
1598: x_rsv_rec.task_id := NULL;
1599: END IF;

Line 1613: IF p_rsv_rec.requirement_date = fnd_api.g_miss_date THEN

1609: RETURN BOOLEAN IS
1610: BEGIN
1611: x_what_field := NULL;
1612:
1613: IF p_rsv_rec.requirement_date = fnd_api.g_miss_date THEN
1614: x_what_field := 'requirement_date';
1615: END IF;
1616:
1617: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN

Line 1617: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN

1613: IF p_rsv_rec.requirement_date = fnd_api.g_miss_date THEN
1614: x_what_field := 'requirement_date';
1615: END IF;
1616:
1617: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN
1618: x_what_field := 'organization_id';
1619: END IF;
1620:
1621: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN

Line 1621: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN

1617: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN
1618: x_what_field := 'organization_id';
1619: END IF;
1620:
1621: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN
1622: x_what_field := 'inventory_item_id';
1623: END IF;
1624:
1625: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN

Line 1625: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN

1621: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN
1622: x_what_field := 'inventory_item_id';
1623: END IF;
1624:
1625: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN
1626: x_what_field := 'demand_source_type_id';
1627: END IF;
1628:
1629: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN

Line 1629: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN

1625: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN
1626: x_what_field := 'demand_source_type_id';
1627: END IF;
1628:
1629: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN
1630: x_what_field := 'demand_source_name';
1631: END IF;
1632:
1633: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN

Line 1633: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN

1629: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN
1630: x_what_field := 'demand_source_name';
1631: END IF;
1632:
1633: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN
1634: x_what_field := 'demand_source_delivery';
1635: END IF;
1636:
1637: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN

Line 1637: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN

1633: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN
1634: x_what_field := 'demand_source_delivery';
1635: END IF;
1636:
1637: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN
1638: x_what_field := 'demand_source_header_id';
1639: END IF;
1640:
1641: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN

Line 1641: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN

1637: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN
1638: x_what_field := 'demand_source_header_id';
1639: END IF;
1640:
1641: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN
1642: x_what_field := 'demand_source_line_id';
1643: END IF;
1644:
1645: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN

Line 1645: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN

1641: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN
1642: x_what_field := 'demand_source_line_id';
1643: END IF;
1644:
1645: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN
1646: x_what_field := 'primary_uom_code';
1647: END IF;
1648:
1649: IF p_rsv_rec.primary_uom_id = fnd_api.g_miss_num THEN

Line 1649: IF p_rsv_rec.primary_uom_id = fnd_api.g_miss_num THEN

1645: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN
1646: x_what_field := 'primary_uom_code';
1647: END IF;
1648:
1649: IF p_rsv_rec.primary_uom_id = fnd_api.g_miss_num THEN
1650: x_what_field := 'primary_uom_id';
1651: END IF;
1652:
1653: -- INVCONV BEGIN

Line 1654: IF p_rsv_rec.secondary_uom_code = fnd_api.g_miss_char THEN

1650: x_what_field := 'primary_uom_id';
1651: END IF;
1652:
1653: -- INVCONV BEGIN
1654: IF p_rsv_rec.secondary_uom_code = fnd_api.g_miss_char THEN
1655: x_what_field := 'secondary_uom_code';
1656: END IF;
1657:
1658: IF p_rsv_rec.secondary_uom_id = fnd_api.g_miss_num THEN

Line 1658: IF p_rsv_rec.secondary_uom_id = fnd_api.g_miss_num THEN

1654: IF p_rsv_rec.secondary_uom_code = fnd_api.g_miss_char THEN
1655: x_what_field := 'secondary_uom_code';
1656: END IF;
1657:
1658: IF p_rsv_rec.secondary_uom_id = fnd_api.g_miss_num THEN
1659: x_what_field := 'secondary_uom_id';
1660: END IF;
1661: -- INVCONV END
1662:

Line 1663: IF p_rsv_rec.reservation_uom_code = fnd_api.g_miss_char THEN

1659: x_what_field := 'secondary_uom_id';
1660: END IF;
1661: -- INVCONV END
1662:
1663: IF p_rsv_rec.reservation_uom_code = fnd_api.g_miss_char THEN
1664: x_what_field := 'reservation_uom_code';
1665: END IF;
1666:
1667: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN

Line 1667: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN

1663: IF p_rsv_rec.reservation_uom_code = fnd_api.g_miss_char THEN
1664: x_what_field := 'reservation_uom_code';
1665: END IF;
1666:
1667: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN
1668: x_what_field := 'reservation_uom_id';
1669: END IF;
1670:
1671: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN

Line 1671: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN

1667: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN
1668: x_what_field := 'reservation_uom_id';
1669: END IF;
1670:
1671: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1672: x_what_field := 'reservation_quantity';
1673: END IF;
1674:
1675: IF p_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num THEN

Line 1675: IF p_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num THEN

1671: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1672: x_what_field := 'reservation_quantity';
1673: END IF;
1674:
1675: IF p_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num THEN
1676: x_what_field := 'primary_reservation_quantity';
1677: END IF;
1678:
1679: -- INVCONV BEGIN

Line 1680: IF p_rsv_rec.secondary_reservation_quantity = fnd_api.g_miss_num THEN

1676: x_what_field := 'primary_reservation_quantity';
1677: END IF;
1678:
1679: -- INVCONV BEGIN
1680: IF p_rsv_rec.secondary_reservation_quantity = fnd_api.g_miss_num THEN
1681: x_what_field := 'secondary_reservation_quantity';
1682: END IF;
1683: -- INVCONV END
1684:

Line 1685: IF p_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN

1681: x_what_field := 'secondary_reservation_quantity';
1682: END IF;
1683: -- INVCONV END
1684:
1685: IF p_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN
1686: x_what_field := 'detailed_quantity';
1687: END IF;
1688:
1689: -- INVCONV BEGIN

Line 1690: IF p_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN

1686: x_what_field := 'detailed_quantity';
1687: END IF;
1688:
1689: -- INVCONV BEGIN
1690: IF p_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN
1691: x_what_field := 'secondary_detailed_quantity';
1692: END IF;
1693: -- INVCONV BEGIN
1694:

Line 1695: IF p_rsv_rec.autodetail_group_id = fnd_api.g_miss_num THEN

1691: x_what_field := 'secondary_detailed_quantity';
1692: END IF;
1693: -- INVCONV BEGIN
1694:
1695: IF p_rsv_rec.autodetail_group_id = fnd_api.g_miss_num THEN
1696: x_what_field := 'autodetail_group_id';
1697: END IF;
1698:
1699: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN

Line 1699: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN

1695: IF p_rsv_rec.autodetail_group_id = fnd_api.g_miss_num THEN
1696: x_what_field := 'autodetail_group_id';
1697: END IF;
1698:
1699: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN
1700: x_what_field := 'external_source_code';
1701: END IF;
1702:
1703: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN

Line 1703: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN

1699: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN
1700: x_what_field := 'external_source_code';
1701: END IF;
1702:
1703: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN
1704: x_what_field := 'external_source_line_id';
1705: END IF;
1706:
1707: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN

Line 1707: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN

1703: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN
1704: x_what_field := 'external_source_line_id';
1705: END IF;
1706:
1707: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN
1708: x_what_field := 'supply_source_type_id';
1709: END IF;
1710:
1711: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN

Line 1711: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN

1707: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN
1708: x_what_field := 'supply_source_type_id';
1709: END IF;
1710:
1711: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN
1712: x_what_field := 'supply_source_header_id';
1713: END IF;
1714:
1715: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN

Line 1715: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN

1711: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN
1712: x_what_field := 'supply_source_header_id';
1713: END IF;
1714:
1715: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN
1716: x_what_field := 'supply_source_line_id';
1717: END IF;
1718:
1719: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN

Line 1719: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN

1715: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN
1716: x_what_field := 'supply_source_line_id';
1717: END IF;
1718:
1719: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN
1720: x_what_field := 'supply_source_name';
1721: END IF;
1722:
1723: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN

Line 1723: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN

1719: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN
1720: x_what_field := 'supply_source_name';
1721: END IF;
1722:
1723: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN
1724: x_what_field := 'supply_source_line_detail';
1725: END IF;
1726:
1727: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN

Line 1727: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN

1723: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN
1724: x_what_field := 'supply_source_line_detail';
1725: END IF;
1726:
1727: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN
1728: x_what_field := 'revision';
1729: END IF;
1730:
1731: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN

Line 1731: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN

1727: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN
1728: x_what_field := 'revision';
1729: END IF;
1730:
1731: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN
1732: x_what_field := 'subinventory_code';
1733: END IF;
1734:
1735: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN

Line 1735: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN

1731: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN
1732: x_what_field := 'subinventory_code';
1733: END IF;
1734:
1735: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN
1736: x_what_field := 'subinventory_id';
1737: END IF;
1738:
1739: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN

Line 1739: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN

1735: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN
1736: x_what_field := 'subinventory_id';
1737: END IF;
1738:
1739: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN
1740: x_what_field := 'locator_id';
1741: END IF;
1742:
1743: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN

Line 1743: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN

1739: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN
1740: x_what_field := 'locator_id';
1741: END IF;
1742:
1743: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN
1744: x_what_field := 'lot_number';
1745: END IF;
1746:
1747: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN

Line 1747: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN

1743: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN
1744: x_what_field := 'lot_number';
1745: END IF;
1746:
1747: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN
1748: x_what_field := 'lot_number_id';
1749: END IF;
1750:
1751: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN

Line 1751: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN

1747: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN
1748: x_what_field := 'lot_number_id';
1749: END IF;
1750:
1751: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN
1752: x_what_field := 'pick_slip_number';
1753: END IF;
1754:
1755: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN

Line 1755: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN

1751: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN
1752: x_what_field := 'pick_slip_number';
1753: END IF;
1754:
1755: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN
1756: x_what_field := 'lpn_id';
1757: END IF;
1758:
1759: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN

Line 1759: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN

1755: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN
1756: x_what_field := 'lpn_id';
1757: END IF;
1758:
1759: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN
1760: x_what_field := 'attribute_category';
1761: END IF;
1762:
1763: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN

Line 1763: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN

1759: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN
1760: x_what_field := 'attribute_category';
1761: END IF;
1762:
1763: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN
1764: x_what_field := 'attribute1';
1765: END IF;
1766:
1767: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN

Line 1767: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN

1763: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN
1764: x_what_field := 'attribute1';
1765: END IF;
1766:
1767: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN
1768: x_what_field := 'attribute2';
1769: END IF;
1770:
1771: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN

Line 1771: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN

1767: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN
1768: x_what_field := 'attribute2';
1769: END IF;
1770:
1771: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN
1772: x_what_field := 'attribute3';
1773: END IF;
1774:
1775: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN

Line 1775: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN

1771: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN
1772: x_what_field := 'attribute3';
1773: END IF;
1774:
1775: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN
1776: x_what_field := 'attribute4';
1777: END IF;
1778:
1779: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN

Line 1779: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN

1775: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN
1776: x_what_field := 'attribute4';
1777: END IF;
1778:
1779: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN
1780: x_what_field := 'attribute5';
1781: END IF;
1782:
1783: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN

Line 1783: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN

1779: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN
1780: x_what_field := 'attribute5';
1781: END IF;
1782:
1783: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN
1784: x_what_field := 'attribute6';
1785: END IF;
1786:
1787: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN

Line 1787: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN

1783: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN
1784: x_what_field := 'attribute6';
1785: END IF;
1786:
1787: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN
1788: x_what_field := 'attribute7';
1789: END IF;
1790:
1791: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN

Line 1791: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN

1787: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN
1788: x_what_field := 'attribute7';
1789: END IF;
1790:
1791: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN
1792: x_what_field := 'attribute8';
1793: END IF;
1794:
1795: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN

Line 1795: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN

1791: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN
1792: x_what_field := 'attribute8';
1793: END IF;
1794:
1795: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN
1796: x_what_field := 'attribute9';
1797: END IF;
1798:
1799: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN

Line 1799: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN

1795: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN
1796: x_what_field := 'attribute9';
1797: END IF;
1798:
1799: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN
1800: x_what_field := 'attribute10';
1801: END IF;
1802:
1803: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN

Line 1803: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN

1799: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN
1800: x_what_field := 'attribute10';
1801: END IF;
1802:
1803: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN
1804: x_what_field := 'attribute11';
1805: END IF;
1806:
1807: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN

Line 1807: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN

1803: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN
1804: x_what_field := 'attribute11';
1805: END IF;
1806:
1807: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN
1808: x_what_field := 'attribute12';
1809: END IF;
1810:
1811: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN

Line 1811: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN

1807: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN
1808: x_what_field := 'attribute12';
1809: END IF;
1810:
1811: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN
1812: x_what_field := 'attribute13';
1813: END IF;
1814:
1815: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN

Line 1815: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN

1811: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN
1812: x_what_field := 'attribute13';
1813: END IF;
1814:
1815: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN
1816: x_what_field := 'attribute14';
1817: END IF;
1818:
1819: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

Line 1819: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

1815: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN
1816: x_what_field := 'attribute14';
1817: END IF;
1818:
1819: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1820: x_what_field := 'attribute15';
1821: END IF;
1822:
1823: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

Line 1823: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

1819: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1820: x_what_field := 'attribute15';
1821: END IF;
1822:
1823: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1824: x_what_field := 'attribute15';
1825: END IF;
1826:
1827: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN

Line 1827: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN

1823: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1824: x_what_field := 'attribute15';
1825: END IF;
1826:
1827: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN
1828: x_what_field := 'ship_ready_flag';
1829: END IF;
1830:
1831: IF p_rsv_rec.staged_flag = fnd_api.g_miss_char THEN

Line 1831: IF p_rsv_rec.staged_flag = fnd_api.g_miss_char THEN

1827: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN
1828: x_what_field := 'ship_ready_flag';
1829: END IF;
1830:
1831: IF p_rsv_rec.staged_flag = fnd_api.g_miss_char THEN
1832: p_rsv_rec.staged_flag := NULL;
1833: END IF;
1834:
1835: /**** {{ R12 Enhanced reservations code changes. Adding new columns to

Line 1837: IF p_rsv_rec.crossdock_flag = fnd_api.g_miss_char THEN

1833: END IF;
1834:
1835: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
1836: -- check_missing API }}****/
1837: IF p_rsv_rec.crossdock_flag = fnd_api.g_miss_char THEN
1838: p_rsv_rec.crossdock_flag := NULL;
1839: END IF;
1840:
1841: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN

Line 1841: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN

1837: IF p_rsv_rec.crossdock_flag = fnd_api.g_miss_char THEN
1838: p_rsv_rec.crossdock_flag := NULL;
1839: END IF;
1840:
1841: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN
1842: p_rsv_rec.crossdock_criteria_id := NULL;
1843: END IF;
1844:
1845: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN

Line 1845: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN

1841: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN
1842: p_rsv_rec.crossdock_criteria_id := NULL;
1843: END IF;
1844:
1845: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN
1846: p_rsv_rec.demand_source_line_detail := NULL;
1847: END IF;
1848:
1849: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN

Line 1849: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN

1845: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN
1846: p_rsv_rec.demand_source_line_detail := NULL;
1847: END IF;
1848:
1849: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN
1850: p_rsv_rec.serial_reservation_quantity := NULL;
1851: END IF;
1852:
1853: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN

Line 1853: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN

1849: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN
1850: p_rsv_rec.serial_reservation_quantity := NULL;
1851: END IF;
1852:
1853: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN
1854: p_rsv_rec.supply_receipt_date := NULL;
1855: END IF;
1856:
1857: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN

Line 1857: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN

1853: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN
1854: p_rsv_rec.supply_receipt_date := NULL;
1855: END IF;
1856:
1857: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN
1858: p_rsv_rec.demand_ship_date := NULL;
1859: END IF;
1860:
1861: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN

Line 1861: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN

1857: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN
1858: p_rsv_rec.demand_ship_date := NULL;
1859: END IF;
1860:
1861: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN
1862: p_rsv_rec.project_id := NULL;
1863: END IF;
1864:
1865: IF p_rsv_rec.task_id = fnd_api.g_miss_num THEN

Line 1865: IF p_rsv_rec.task_id = fnd_api.g_miss_num THEN

1861: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN
1862: p_rsv_rec.project_id := NULL;
1863: END IF;
1864:
1865: IF p_rsv_rec.task_id = fnd_api.g_miss_num THEN
1866: p_rsv_rec.task_id := NULL;
1867: END IF;
1868:
1869: /*** End R12 ***/

Line 1905: IF p_to_rsv_rec.reservation_id <> fnd_api.g_miss_num

1901: END IF;
1902:
1903: l_debug := g_debug;
1904:
1905: IF p_to_rsv_rec.reservation_id <> fnd_api.g_miss_num
1906: OR p_to_rsv_rec.reservation_id IS NULL THEN
1907: x_to_rsv_rec.reservation_id := p_to_rsv_rec.reservation_id;
1908: ELSE
1909: x_to_rsv_rec.reservation_id := p_original_rsv_rec.reservation_id;

Line 1913: IF p_to_rsv_rec.requirement_date <> fnd_api.g_miss_date

1909: x_to_rsv_rec.reservation_id := p_original_rsv_rec.reservation_id;
1910: END IF;
1911:
1912: --
1913: IF p_to_rsv_rec.requirement_date <> fnd_api.g_miss_date
1914: OR p_to_rsv_rec.requirement_date IS NULL THEN
1915: x_to_rsv_rec.requirement_date := p_to_rsv_rec.requirement_date;
1916: ELSE
1917: x_to_rsv_rec.requirement_date := p_original_rsv_rec.requirement_date;

Line 1921: IF p_to_rsv_rec.organization_id <> fnd_api.g_miss_num

1917: x_to_rsv_rec.requirement_date := p_original_rsv_rec.requirement_date;
1918: END IF;
1919:
1920: --
1921: IF p_to_rsv_rec.organization_id <> fnd_api.g_miss_num
1922: OR p_to_rsv_rec.organization_id IS NULL THEN
1923: x_to_rsv_rec.organization_id := p_to_rsv_rec.organization_id;
1924: ELSE
1925: x_to_rsv_rec.organization_id := p_original_rsv_rec.organization_id;

Line 1929: IF p_to_rsv_rec.inventory_item_id <> fnd_api.g_miss_num

1925: x_to_rsv_rec.organization_id := p_original_rsv_rec.organization_id;
1926: END IF;
1927:
1928: --
1929: IF p_to_rsv_rec.inventory_item_id <> fnd_api.g_miss_num
1930: OR p_to_rsv_rec.inventory_item_id IS NULL THEN
1931: x_to_rsv_rec.inventory_item_id := p_to_rsv_rec.inventory_item_id;
1932: ELSE
1933: x_to_rsv_rec.inventory_item_id := p_original_rsv_rec.inventory_item_id;

Line 1937: IF p_to_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num

1933: x_to_rsv_rec.inventory_item_id := p_original_rsv_rec.inventory_item_id;
1934: END IF;
1935:
1936: --
1937: IF p_to_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num
1938: OR p_to_rsv_rec.demand_source_type_id IS NULL THEN
1939: x_to_rsv_rec.demand_source_type_id := p_to_rsv_rec.demand_source_type_id;
1940: ELSE
1941: x_to_rsv_rec.demand_source_type_id := p_original_rsv_rec.demand_source_type_id;

Line 1945: IF p_to_rsv_rec.demand_source_name <> fnd_api.g_miss_char

1941: x_to_rsv_rec.demand_source_type_id := p_original_rsv_rec.demand_source_type_id;
1942: END IF;
1943:
1944: --
1945: IF p_to_rsv_rec.demand_source_name <> fnd_api.g_miss_char
1946: OR p_to_rsv_rec.demand_source_name IS NULL THEN
1947: x_to_rsv_rec.demand_source_name := p_to_rsv_rec.demand_source_name;
1948: ELSE
1949: x_to_rsv_rec.demand_source_name := p_original_rsv_rec.demand_source_name;

Line 1953: IF p_to_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num

1949: x_to_rsv_rec.demand_source_name := p_original_rsv_rec.demand_source_name;
1950: END IF;
1951:
1952: --
1953: IF p_to_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num
1954: OR p_to_rsv_rec.demand_source_delivery IS NULL THEN
1955: x_to_rsv_rec.demand_source_delivery := p_to_rsv_rec.demand_source_delivery;
1956: ELSE
1957: x_to_rsv_rec.demand_source_delivery := p_original_rsv_rec.demand_source_delivery;

Line 1961: IF p_to_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num

1957: x_to_rsv_rec.demand_source_delivery := p_original_rsv_rec.demand_source_delivery;
1958: END IF;
1959:
1960: --
1961: IF p_to_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num
1962: OR p_to_rsv_rec.demand_source_header_id IS NULL THEN
1963: x_to_rsv_rec.demand_source_header_id := p_to_rsv_rec.demand_source_header_id;
1964: ELSE
1965: x_to_rsv_rec.demand_source_header_id := p_original_rsv_rec.demand_source_header_id;

Line 1969: IF p_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num

1965: x_to_rsv_rec.demand_source_header_id := p_original_rsv_rec.demand_source_header_id;
1966: END IF;
1967:
1968: --
1969: IF p_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num
1970: OR p_to_rsv_rec.demand_source_line_id IS NULL THEN
1971: x_to_rsv_rec.demand_source_line_id := p_to_rsv_rec.demand_source_line_id;
1972: ELSE
1973: x_to_rsv_rec.demand_source_line_id := p_original_rsv_rec.demand_source_line_id;

Line 1977: IF p_to_rsv_rec.primary_uom_code <> fnd_api.g_miss_char

1973: x_to_rsv_rec.demand_source_line_id := p_original_rsv_rec.demand_source_line_id;
1974: END IF;
1975:
1976: --
1977: IF p_to_rsv_rec.primary_uom_code <> fnd_api.g_miss_char
1978: OR p_to_rsv_rec.primary_uom_code IS NULL THEN
1979: x_to_rsv_rec.primary_uom_code := p_to_rsv_rec.primary_uom_code;
1980: ELSE
1981: x_to_rsv_rec.primary_uom_code := p_original_rsv_rec.primary_uom_code;

Line 1985: IF p_to_rsv_rec.primary_uom_id <> fnd_api.g_miss_num

1981: x_to_rsv_rec.primary_uom_code := p_original_rsv_rec.primary_uom_code;
1982: END IF;
1983:
1984: --
1985: IF p_to_rsv_rec.primary_uom_id <> fnd_api.g_miss_num
1986: OR p_to_rsv_rec.primary_uom_id IS NULL THEN
1987: x_to_rsv_rec.primary_uom_id := p_to_rsv_rec.primary_uom_id;
1988: ELSE
1989: x_to_rsv_rec.primary_uom_id := p_original_rsv_rec.primary_uom_id;

Line 1993: IF p_to_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char

1989: x_to_rsv_rec.primary_uom_id := p_original_rsv_rec.primary_uom_id;
1990: END IF;
1991:
1992: -- INVCONV BEGIN
1993: IF p_to_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char
1994: OR p_to_rsv_rec.secondary_uom_code IS NULL THEN
1995: x_to_rsv_rec.secondary_uom_code := p_to_rsv_rec.secondary_uom_code;
1996: ELSE
1997: x_to_rsv_rec.secondary_uom_code := p_original_rsv_rec.secondary_uom_code;

Line 2001: IF p_to_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num

1997: x_to_rsv_rec.secondary_uom_code := p_original_rsv_rec.secondary_uom_code;
1998: END IF;
1999:
2000: --
2001: IF p_to_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num
2002: OR p_to_rsv_rec.secondary_uom_id IS NULL THEN
2003: x_to_rsv_rec.secondary_uom_id := p_to_rsv_rec.secondary_uom_id;
2004: ELSE
2005: x_to_rsv_rec.secondary_uom_id := p_original_rsv_rec.secondary_uom_id;

Line 2009: IF p_to_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char

2005: x_to_rsv_rec.secondary_uom_id := p_original_rsv_rec.secondary_uom_id;
2006: END IF;
2007: -- INVCONV END
2008: --
2009: IF p_to_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char
2010: OR p_to_rsv_rec.reservation_uom_code IS NULL THEN
2011: x_to_rsv_rec.reservation_uom_code := p_to_rsv_rec.reservation_uom_code;
2012: ELSE
2013: x_to_rsv_rec.reservation_uom_code := p_original_rsv_rec.reservation_uom_code;

Line 2017: IF p_to_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num

2013: x_to_rsv_rec.reservation_uom_code := p_original_rsv_rec.reservation_uom_code;
2014: END IF;
2015:
2016: --
2017: IF p_to_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num
2018: OR p_to_rsv_rec.reservation_uom_id IS NULL THEN
2019: x_to_rsv_rec.reservation_uom_id := p_to_rsv_rec.reservation_uom_id;
2020: ELSE
2021: x_to_rsv_rec.reservation_uom_id := p_original_rsv_rec.reservation_uom_id;

Line 2025: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num

2021: x_to_rsv_rec.reservation_uom_id := p_original_rsv_rec.reservation_uom_id;
2022: END IF;
2023:
2024: --
2025: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
2026: AND p_to_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
2027: -- neither primary quantity or reservaton quantity is
2028: -- specified for the to row
2029: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;

Line 2026: AND p_to_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN

2022: END IF;
2023:
2024: --
2025: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
2026: AND p_to_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
2027: -- neither primary quantity or reservaton quantity is
2028: -- specified for the to row
2029: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;
2030: x_to_rsv_rec.reservation_quantity := p_original_rsv_rec.reservation_quantity;

Line 2031: ELSIF p_to_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num

2027: -- neither primary quantity or reservaton quantity is
2028: -- specified for the to row
2029: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;
2030: x_to_rsv_rec.reservation_quantity := p_original_rsv_rec.reservation_quantity;
2031: ELSIF p_to_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num
2032: OR p_to_rsv_rec.primary_reservation_quantity IS NULL THEN
2033: -- primary_reservation_quantity is specified for the to row
2034: -- here null is considered as a value
2035: x_to_rsv_rec.primary_reservation_quantity := p_to_rsv_rec.primary_reservation_quantity;

Line 2064: and (p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num AND p_to_rsv_rec.secondary_reservation_quantity IS NOT NULL)

2060: and p_original_rsv_rec.reservation_quantity = p_to_rsv_rec.reservation_quantity and p_original_rsv_rec.demand_source_type_id = p_to_rsv_rec.demand_source_type_id THEN
2061: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.reservation_quantity;
2062: ELSIF p_to_rsv_rec.demand_source_type_id = 5 and p_to_rsv_rec.reservation_quantity is not null and x_to_rsv_rec.reservation_uom_code is not null
2063: and x_to_rsv_rec.reservation_uom_code <> x_to_rsv_rec.primary_uom_code and x_to_rsv_rec.reservation_uom_code = x_to_rsv_rec.secondary_uom_code
2064: and (p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num AND p_to_rsv_rec.secondary_reservation_quantity IS NOT NULL)
2065: and p_original_rsv_rec.demand_source_type_id = p_to_rsv_rec.demand_source_type_id THEN
2066: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.secondary_reservation_quantity;
2067: -- MUOM Fulfillment project
2068: ELSIF l_fulfill_base = 'S' and p_to_rsv_rec.demand_source_type_id in (2,8) AND p_to_rsv_rec.reservation_quantity is not null and x_to_rsv_rec.reservation_uom_code is not null

Line 2070: and (p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num AND p_to_rsv_rec.secondary_reservation_quantity IS NOT NULL)

2066: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.secondary_reservation_quantity;
2067: -- MUOM Fulfillment project
2068: ELSIF l_fulfill_base = 'S' and p_to_rsv_rec.demand_source_type_id in (2,8) AND p_to_rsv_rec.reservation_quantity is not null and x_to_rsv_rec.reservation_uom_code is not null
2069: and x_to_rsv_rec.reservation_uom_code <> x_to_rsv_rec.primary_uom_code and x_to_rsv_rec.reservation_uom_code = x_to_rsv_rec.secondary_uom_code
2070: and (p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num AND p_to_rsv_rec.secondary_reservation_quantity IS NOT NULL)
2071: and p_original_rsv_rec.demand_source_type_id = p_to_rsv_rec.demand_source_type_id THEN
2072: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.secondary_reservation_quantity;
2073: ELSE
2074: IF (l_debug = 1) THEN

Line 2081: -- primary_reservation_quantity is fnd_api.g_miss_num

2077: x_to_rsv_rec.reservation_quantity := NULL;
2078: END IF;
2079:
2080: ELSE
2081: -- primary_reservation_quantity is fnd_api.g_miss_num
2082: -- but reservation_quantity is null or
2083: -- value other than fnd_api.g_miss_num
2084: -- for the to row
2085: x_to_rsv_rec.primary_reservation_quantity := NULL;

Line 2083: -- value other than fnd_api.g_miss_num

2079:
2080: ELSE
2081: -- primary_reservation_quantity is fnd_api.g_miss_num
2082: -- but reservation_quantity is null or
2083: -- value other than fnd_api.g_miss_num
2084: -- for the to row
2085: x_to_rsv_rec.primary_reservation_quantity := NULL;
2086: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.reservation_quantity;
2087: END IF;

Line 2091: IF p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num

2087: END IF;
2088:
2089: --
2090: -- INVCONV BEGIN
2091: IF p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num
2092: OR p_to_rsv_rec.secondary_reservation_quantity IS NULL THEN
2093: x_to_rsv_rec.secondary_reservation_quantity := p_to_rsv_rec.secondary_reservation_quantity;
2094: ELSE
2095: x_to_rsv_rec.secondary_reservation_quantity := p_original_rsv_rec.secondary_reservation_quantity;

Line 2099: IF p_to_rsv_rec.detailed_quantity <> fnd_api.g_miss_num

2095: x_to_rsv_rec.secondary_reservation_quantity := p_original_rsv_rec.secondary_reservation_quantity;
2096: END IF;
2097: -- INVCONV END
2098:
2099: IF p_to_rsv_rec.detailed_quantity <> fnd_api.g_miss_num
2100: OR p_to_rsv_rec.detailed_quantity IS NULL THEN
2101: x_to_rsv_rec.detailed_quantity := p_to_rsv_rec.detailed_quantity;
2102: ELSE
2103: x_to_rsv_rec.detailed_quantity := p_original_rsv_rec.detailed_quantity;

Line 2107: IF p_to_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num

2103: x_to_rsv_rec.detailed_quantity := p_original_rsv_rec.detailed_quantity;
2104: END IF;
2105:
2106: -- INVCONV BEGIN
2107: IF p_to_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num
2108: OR p_to_rsv_rec.secondary_detailed_quantity IS NULL THEN
2109: x_to_rsv_rec.secondary_detailed_quantity := p_to_rsv_rec.secondary_detailed_quantity;
2110: ELSE
2111: x_to_rsv_rec.secondary_detailed_quantity := p_original_rsv_rec.secondary_detailed_quantity;

Line 2115: IF p_to_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num

2111: x_to_rsv_rec.secondary_detailed_quantity := p_original_rsv_rec.secondary_detailed_quantity;
2112: END IF;
2113: -- INVCONV END
2114:
2115: IF p_to_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num
2116: OR p_to_rsv_rec.autodetail_group_id IS NULL THEN
2117: x_to_rsv_rec.autodetail_group_id := p_to_rsv_rec.autodetail_group_id;
2118: ELSE
2119: x_to_rsv_rec.autodetail_group_id := p_original_rsv_rec.autodetail_group_id;

Line 2123: IF p_to_rsv_rec.external_source_code <> fnd_api.g_miss_char

2119: x_to_rsv_rec.autodetail_group_id := p_original_rsv_rec.autodetail_group_id;
2120: END IF;
2121:
2122: --
2123: IF p_to_rsv_rec.external_source_code <> fnd_api.g_miss_char
2124: OR p_to_rsv_rec.external_source_code IS NULL THEN
2125: x_to_rsv_rec.external_source_code := p_to_rsv_rec.external_source_code;
2126: ELSE
2127: x_to_rsv_rec.external_source_code := p_original_rsv_rec.external_source_code;

Line 2131: IF p_to_rsv_rec.external_source_line_id <> fnd_api.g_miss_num

2127: x_to_rsv_rec.external_source_code := p_original_rsv_rec.external_source_code;
2128: END IF;
2129:
2130: --
2131: IF p_to_rsv_rec.external_source_line_id <> fnd_api.g_miss_num
2132: OR p_to_rsv_rec.external_source_line_id IS NULL THEN
2133: x_to_rsv_rec.external_source_line_id := p_to_rsv_rec.external_source_line_id;
2134: ELSE
2135: x_to_rsv_rec.external_source_line_id := p_original_rsv_rec.external_source_line_id;

Line 2139: IF p_to_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num

2135: x_to_rsv_rec.external_source_line_id := p_original_rsv_rec.external_source_line_id;
2136: END IF;
2137:
2138: --
2139: IF p_to_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num
2140: OR p_to_rsv_rec.supply_source_type_id IS NULL THEN
2141: x_to_rsv_rec.supply_source_type_id := p_to_rsv_rec.supply_source_type_id;
2142: ELSE
2143: x_to_rsv_rec.supply_source_type_id := p_original_rsv_rec.supply_source_type_id;

Line 2147: IF p_to_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num

2143: x_to_rsv_rec.supply_source_type_id := p_original_rsv_rec.supply_source_type_id;
2144: END IF;
2145:
2146: --
2147: IF p_to_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num
2148: OR p_to_rsv_rec.supply_source_header_id IS NULL THEN
2149: x_to_rsv_rec.supply_source_header_id := p_to_rsv_rec.supply_source_header_id;
2150: ELSE
2151: x_to_rsv_rec.supply_source_header_id := p_original_rsv_rec.supply_source_header_id;

Line 2155: IF p_to_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num

2151: x_to_rsv_rec.supply_source_header_id := p_original_rsv_rec.supply_source_header_id;
2152: END IF;
2153:
2154: --
2155: IF p_to_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num
2156: OR p_to_rsv_rec.supply_source_line_id IS NULL THEN
2157: x_to_rsv_rec.supply_source_line_id := p_to_rsv_rec.supply_source_line_id;
2158: ELSE
2159: x_to_rsv_rec.supply_source_line_id := p_original_rsv_rec.supply_source_line_id;

Line 2163: IF p_to_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num

2159: x_to_rsv_rec.supply_source_line_id := p_original_rsv_rec.supply_source_line_id;
2160: END IF;
2161:
2162: --
2163: IF p_to_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num
2164: OR p_to_rsv_rec.supply_source_line_detail IS NULL THEN
2165: x_to_rsv_rec.supply_source_line_detail := p_to_rsv_rec.supply_source_line_detail;
2166: ELSE
2167: x_to_rsv_rec.supply_source_line_detail := p_original_rsv_rec.supply_source_line_detail;

Line 2171: IF p_to_rsv_rec.supply_source_name <> fnd_api.g_miss_char

2167: x_to_rsv_rec.supply_source_line_detail := p_original_rsv_rec.supply_source_line_detail;
2168: END IF;
2169:
2170: --
2171: IF p_to_rsv_rec.supply_source_name <> fnd_api.g_miss_char
2172: OR p_to_rsv_rec.supply_source_name IS NULL THEN
2173: x_to_rsv_rec.supply_source_name := p_to_rsv_rec.supply_source_name;
2174: ELSE
2175: x_to_rsv_rec.supply_source_name := p_original_rsv_rec.supply_source_name;

Line 2179: IF p_to_rsv_rec.revision <> fnd_api.g_miss_char

2175: x_to_rsv_rec.supply_source_name := p_original_rsv_rec.supply_source_name;
2176: END IF;
2177:
2178: --
2179: IF p_to_rsv_rec.revision <> fnd_api.g_miss_char
2180: OR p_to_rsv_rec.revision IS NULL THEN
2181: x_to_rsv_rec.revision := p_to_rsv_rec.revision;
2182: ELSE
2183: x_to_rsv_rec.revision := p_original_rsv_rec.revision;

Line 2187: IF p_to_rsv_rec.subinventory_code <> fnd_api.g_miss_char

2183: x_to_rsv_rec.revision := p_original_rsv_rec.revision;
2184: END IF;
2185:
2186: --
2187: IF p_to_rsv_rec.subinventory_code <> fnd_api.g_miss_char
2188: OR p_to_rsv_rec.subinventory_code IS NULL THEN
2189: x_to_rsv_rec.subinventory_code := p_to_rsv_rec.subinventory_code;
2190: ELSE
2191: x_to_rsv_rec.subinventory_code := p_original_rsv_rec.subinventory_code;

Line 2195: IF p_to_rsv_rec.subinventory_id <> fnd_api.g_miss_num

2191: x_to_rsv_rec.subinventory_code := p_original_rsv_rec.subinventory_code;
2192: END IF;
2193:
2194: --
2195: IF p_to_rsv_rec.subinventory_id <> fnd_api.g_miss_num
2196: OR p_to_rsv_rec.subinventory_id IS NULL THEN
2197: x_to_rsv_rec.subinventory_id := p_to_rsv_rec.subinventory_id;
2198: ELSE
2199: x_to_rsv_rec.subinventory_id := p_original_rsv_rec.subinventory_id;

Line 2203: IF p_to_rsv_rec.locator_id <> fnd_api.g_miss_num

2199: x_to_rsv_rec.subinventory_id := p_original_rsv_rec.subinventory_id;
2200: END IF;
2201:
2202: --
2203: IF p_to_rsv_rec.locator_id <> fnd_api.g_miss_num
2204: OR p_to_rsv_rec.locator_id IS NULL THEN
2205: x_to_rsv_rec.locator_id := p_to_rsv_rec.locator_id;
2206: ELSE
2207: x_to_rsv_rec.locator_id := p_original_rsv_rec.locator_id;

Line 2211: IF p_to_rsv_rec.lot_number <> fnd_api.g_miss_char

2207: x_to_rsv_rec.locator_id := p_original_rsv_rec.locator_id;
2208: END IF;
2209:
2210: --
2211: IF p_to_rsv_rec.lot_number <> fnd_api.g_miss_char
2212: OR p_to_rsv_rec.lot_number IS NULL THEN
2213: x_to_rsv_rec.lot_number := p_to_rsv_rec.lot_number;
2214: ELSE
2215: x_to_rsv_rec.lot_number := p_original_rsv_rec.lot_number;

Line 2219: IF p_to_rsv_rec.lot_number_id <> fnd_api.g_miss_num

2215: x_to_rsv_rec.lot_number := p_original_rsv_rec.lot_number;
2216: END IF;
2217:
2218: --
2219: IF p_to_rsv_rec.lot_number_id <> fnd_api.g_miss_num
2220: OR p_to_rsv_rec.lot_number_id IS NULL THEN
2221: x_to_rsv_rec.lot_number_id := p_to_rsv_rec.lot_number_id;
2222: ELSE
2223: x_to_rsv_rec.lot_number_id := p_original_rsv_rec.lot_number_id;

Line 2227: IF p_to_rsv_rec.pick_slip_number <> fnd_api.g_miss_num

2223: x_to_rsv_rec.lot_number_id := p_original_rsv_rec.lot_number_id;
2224: END IF;
2225:
2226: --
2227: IF p_to_rsv_rec.pick_slip_number <> fnd_api.g_miss_num
2228: OR p_to_rsv_rec.pick_slip_number IS NULL THEN
2229: x_to_rsv_rec.pick_slip_number := p_to_rsv_rec.pick_slip_number;
2230: ELSE
2231: x_to_rsv_rec.pick_slip_number := p_original_rsv_rec.pick_slip_number;

Line 2235: IF p_to_rsv_rec.lpn_id <> fnd_api.g_miss_num

2231: x_to_rsv_rec.pick_slip_number := p_original_rsv_rec.pick_slip_number;
2232: END IF;
2233:
2234: --
2235: IF p_to_rsv_rec.lpn_id <> fnd_api.g_miss_num
2236: OR p_to_rsv_rec.lpn_id IS NULL THEN
2237: x_to_rsv_rec.lpn_id := p_to_rsv_rec.lpn_id;
2238: ELSE
2239: x_to_rsv_rec.lpn_id := p_original_rsv_rec.lpn_id;

Line 2243: IF p_to_rsv_rec.attribute_category <> fnd_api.g_miss_char

2239: x_to_rsv_rec.lpn_id := p_original_rsv_rec.lpn_id;
2240: END IF;
2241:
2242: --
2243: IF p_to_rsv_rec.attribute_category <> fnd_api.g_miss_char
2244: OR p_to_rsv_rec.attribute_category IS NULL THEN
2245: x_to_rsv_rec.attribute_category := p_to_rsv_rec.attribute_category;
2246: ELSE
2247: x_to_rsv_rec.attribute_category := p_original_rsv_rec.attribute_category;

Line 2251: IF p_to_rsv_rec.attribute1 <> fnd_api.g_miss_char

2247: x_to_rsv_rec.attribute_category := p_original_rsv_rec.attribute_category;
2248: END IF;
2249:
2250: --
2251: IF p_to_rsv_rec.attribute1 <> fnd_api.g_miss_char
2252: OR p_to_rsv_rec.attribute1 IS NULL THEN
2253: x_to_rsv_rec.attribute1 := p_to_rsv_rec.attribute1;
2254: ELSE
2255: x_to_rsv_rec.attribute1 := p_original_rsv_rec.attribute1;

Line 2258: IF p_to_rsv_rec.attribute2 <> fnd_api.g_miss_char

2254: ELSE
2255: x_to_rsv_rec.attribute1 := p_original_rsv_rec.attribute1;
2256: END IF;
2257:
2258: IF p_to_rsv_rec.attribute2 <> fnd_api.g_miss_char
2259: OR p_to_rsv_rec.attribute2 IS NULL THEN
2260: x_to_rsv_rec.attribute2 := p_to_rsv_rec.attribute2;
2261: ELSE
2262: x_to_rsv_rec.attribute2 := p_original_rsv_rec.attribute2;

Line 2265: IF p_to_rsv_rec.attribute3 <> fnd_api.g_miss_char

2261: ELSE
2262: x_to_rsv_rec.attribute2 := p_original_rsv_rec.attribute2;
2263: END IF;
2264:
2265: IF p_to_rsv_rec.attribute3 <> fnd_api.g_miss_char
2266: OR p_to_rsv_rec.attribute3 IS NULL THEN
2267: x_to_rsv_rec.attribute3 := p_to_rsv_rec.attribute3;
2268: ELSE
2269: x_to_rsv_rec.attribute3 := p_original_rsv_rec.attribute3;

Line 2272: IF p_to_rsv_rec.attribute4 <> fnd_api.g_miss_char

2268: ELSE
2269: x_to_rsv_rec.attribute3 := p_original_rsv_rec.attribute3;
2270: END IF;
2271:
2272: IF p_to_rsv_rec.attribute4 <> fnd_api.g_miss_char
2273: OR p_to_rsv_rec.attribute4 IS NULL THEN
2274: x_to_rsv_rec.attribute4 := p_to_rsv_rec.attribute4;
2275: ELSE
2276: x_to_rsv_rec.attribute4 := p_original_rsv_rec.attribute4;

Line 2279: IF p_to_rsv_rec.attribute5 <> fnd_api.g_miss_char

2275: ELSE
2276: x_to_rsv_rec.attribute4 := p_original_rsv_rec.attribute4;
2277: END IF;
2278:
2279: IF p_to_rsv_rec.attribute5 <> fnd_api.g_miss_char
2280: OR p_to_rsv_rec.attribute5 IS NULL THEN
2281: x_to_rsv_rec.attribute5 := p_to_rsv_rec.attribute5;
2282: ELSE
2283: x_to_rsv_rec.attribute5 := p_original_rsv_rec.attribute5;

Line 2286: IF p_to_rsv_rec.attribute6 <> fnd_api.g_miss_char

2282: ELSE
2283: x_to_rsv_rec.attribute5 := p_original_rsv_rec.attribute5;
2284: END IF;
2285:
2286: IF p_to_rsv_rec.attribute6 <> fnd_api.g_miss_char
2287: OR p_to_rsv_rec.attribute6 IS NULL THEN
2288: x_to_rsv_rec.attribute6 := p_to_rsv_rec.attribute6;
2289: ELSE
2290: x_to_rsv_rec.attribute6 := p_original_rsv_rec.attribute6;

Line 2293: IF p_to_rsv_rec.attribute7 <> fnd_api.g_miss_char

2289: ELSE
2290: x_to_rsv_rec.attribute6 := p_original_rsv_rec.attribute6;
2291: END IF;
2292:
2293: IF p_to_rsv_rec.attribute7 <> fnd_api.g_miss_char
2294: OR p_to_rsv_rec.attribute7 IS NULL THEN
2295: x_to_rsv_rec.attribute7 := p_to_rsv_rec.attribute7;
2296: ELSE
2297: x_to_rsv_rec.attribute7 := p_original_rsv_rec.attribute7;

Line 2300: IF p_to_rsv_rec.attribute8 <> fnd_api.g_miss_char

2296: ELSE
2297: x_to_rsv_rec.attribute7 := p_original_rsv_rec.attribute7;
2298: END IF;
2299:
2300: IF p_to_rsv_rec.attribute8 <> fnd_api.g_miss_char
2301: OR p_to_rsv_rec.attribute8 IS NULL THEN
2302: x_to_rsv_rec.attribute8 := p_to_rsv_rec.attribute8;
2303: ELSE
2304: x_to_rsv_rec.attribute8 := p_original_rsv_rec.attribute8;

Line 2307: IF p_to_rsv_rec.attribute9 <> fnd_api.g_miss_char

2303: ELSE
2304: x_to_rsv_rec.attribute8 := p_original_rsv_rec.attribute8;
2305: END IF;
2306:
2307: IF p_to_rsv_rec.attribute9 <> fnd_api.g_miss_char
2308: OR p_to_rsv_rec.attribute9 IS NULL THEN
2309: x_to_rsv_rec.attribute9 := p_to_rsv_rec.attribute9;
2310: ELSE
2311: x_to_rsv_rec.attribute9 := p_original_rsv_rec.attribute9;

Line 2314: IF p_to_rsv_rec.attribute10 <> fnd_api.g_miss_char

2310: ELSE
2311: x_to_rsv_rec.attribute9 := p_original_rsv_rec.attribute9;
2312: END IF;
2313:
2314: IF p_to_rsv_rec.attribute10 <> fnd_api.g_miss_char
2315: OR p_to_rsv_rec.attribute10 IS NULL THEN
2316: x_to_rsv_rec.attribute10 := p_to_rsv_rec.attribute10;
2317: ELSE
2318: x_to_rsv_rec.attribute10 := p_original_rsv_rec.attribute10;

Line 2321: IF p_to_rsv_rec.attribute11 <> fnd_api.g_miss_char

2317: ELSE
2318: x_to_rsv_rec.attribute10 := p_original_rsv_rec.attribute10;
2319: END IF;
2320:
2321: IF p_to_rsv_rec.attribute11 <> fnd_api.g_miss_char
2322: OR p_to_rsv_rec.attribute11 IS NULL THEN
2323: x_to_rsv_rec.attribute11 := p_to_rsv_rec.attribute11;
2324: ELSE
2325: x_to_rsv_rec.attribute11 := p_original_rsv_rec.attribute11;

Line 2328: IF p_to_rsv_rec.attribute12 <> fnd_api.g_miss_char

2324: ELSE
2325: x_to_rsv_rec.attribute11 := p_original_rsv_rec.attribute11;
2326: END IF;
2327:
2328: IF p_to_rsv_rec.attribute12 <> fnd_api.g_miss_char
2329: OR p_to_rsv_rec.attribute12 IS NULL THEN
2330: x_to_rsv_rec.attribute12 := p_to_rsv_rec.attribute12;
2331: ELSE
2332: x_to_rsv_rec.attribute12 := p_original_rsv_rec.attribute12;

Line 2335: IF p_to_rsv_rec.attribute13 <> fnd_api.g_miss_char

2331: ELSE
2332: x_to_rsv_rec.attribute12 := p_original_rsv_rec.attribute12;
2333: END IF;
2334:
2335: IF p_to_rsv_rec.attribute13 <> fnd_api.g_miss_char
2336: OR p_to_rsv_rec.attribute13 IS NULL THEN
2337: x_to_rsv_rec.attribute13 := p_to_rsv_rec.attribute13;
2338: ELSE
2339: x_to_rsv_rec.attribute13 := p_original_rsv_rec.attribute13;

Line 2342: IF p_to_rsv_rec.attribute14 <> fnd_api.g_miss_char

2338: ELSE
2339: x_to_rsv_rec.attribute13 := p_original_rsv_rec.attribute13;
2340: END IF;
2341:
2342: IF p_to_rsv_rec.attribute14 <> fnd_api.g_miss_char
2343: OR p_to_rsv_rec.attribute14 IS NULL THEN
2344: x_to_rsv_rec.attribute14 := p_to_rsv_rec.attribute14;
2345: ELSE
2346: x_to_rsv_rec.attribute14 := p_original_rsv_rec.attribute14;

Line 2349: IF p_to_rsv_rec.attribute15 <> fnd_api.g_miss_char

2345: ELSE
2346: x_to_rsv_rec.attribute14 := p_original_rsv_rec.attribute14;
2347: END IF;
2348:
2349: IF p_to_rsv_rec.attribute15 <> fnd_api.g_miss_char
2350: OR p_to_rsv_rec.attribute15 IS NULL THEN
2351: x_to_rsv_rec.attribute15 := p_to_rsv_rec.attribute15;
2352: ELSE
2353: x_to_rsv_rec.attribute15 := p_original_rsv_rec.attribute15;

Line 2356: IF p_to_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num

2352: ELSE
2353: x_to_rsv_rec.attribute15 := p_original_rsv_rec.attribute15;
2354: END IF;
2355:
2356: IF p_to_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num
2357: OR p_to_rsv_rec.ship_ready_flag IS NULL THEN
2358: x_to_rsv_rec.ship_ready_flag := p_to_rsv_rec.ship_ready_flag;
2359: ELSE
2360: x_to_rsv_rec.ship_ready_flag := p_original_rsv_rec.ship_ready_flag;

Line 2363: IF p_to_rsv_rec.staged_flag <> fnd_api.g_miss_char

2359: ELSE
2360: x_to_rsv_rec.ship_ready_flag := p_original_rsv_rec.ship_ready_flag;
2361: END IF;
2362:
2363: IF p_to_rsv_rec.staged_flag <> fnd_api.g_miss_char
2364: OR p_to_rsv_rec.staged_flag IS NULL THEN
2365: x_to_rsv_rec.staged_flag := p_to_rsv_rec.staged_flag;
2366: ELSE
2367: x_to_rsv_rec.staged_flag := p_original_rsv_rec.staged_flag;

Line 2372: IF p_to_rsv_rec.crossdock_flag <> fnd_api.g_miss_char

2368: END IF;
2369:
2370: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
2371: -- construct_to_reservation_row API }}****/
2372: IF p_to_rsv_rec.crossdock_flag <> fnd_api.g_miss_char
2373: OR p_to_rsv_rec.crossdock_flag IS NULL THEN
2374: x_to_rsv_rec.crossdock_flag := p_to_rsv_rec.crossdock_flag;
2375: ELSE
2376: x_to_rsv_rec.crossdock_flag := p_original_rsv_rec.crossdock_flag;

Line 2379: IF p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num

2375: ELSE
2376: x_to_rsv_rec.crossdock_flag := p_original_rsv_rec.crossdock_flag;
2377: END IF;
2378:
2379: IF p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num
2380: OR p_to_rsv_rec.crossdock_criteria_id IS NULL THEN
2381: x_to_rsv_rec.crossdock_criteria_id := p_to_rsv_rec.crossdock_criteria_id;
2382: ELSE
2383: x_to_rsv_rec.crossdock_criteria_id := p_original_rsv_rec.crossdock_criteria_id;

Line 2386: IF p_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num

2382: ELSE
2383: x_to_rsv_rec.crossdock_criteria_id := p_original_rsv_rec.crossdock_criteria_id;
2384: END IF;
2385:
2386: IF p_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num
2387: OR p_to_rsv_rec.demand_source_line_detail IS NULL THEN
2388: x_to_rsv_rec.demand_source_line_detail := p_to_rsv_rec.demand_source_line_detail;
2389: ELSE
2390: x_to_rsv_rec.demand_source_line_detail := p_original_rsv_rec.demand_source_line_detail;

Line 2393: IF p_to_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num

2389: ELSE
2390: x_to_rsv_rec.demand_source_line_detail := p_original_rsv_rec.demand_source_line_detail;
2391: END IF;
2392:
2393: IF p_to_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num
2394: OR p_to_rsv_rec.serial_reservation_quantity IS NULL THEN
2395: x_to_rsv_rec.serial_reservation_quantity := p_to_rsv_rec.serial_reservation_quantity;
2396: ELSE
2397: x_to_rsv_rec.serial_reservation_quantity := p_original_rsv_rec.serial_reservation_quantity;

Line 2400: IF p_to_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date

2396: ELSE
2397: x_to_rsv_rec.serial_reservation_quantity := p_original_rsv_rec.serial_reservation_quantity;
2398: END IF;
2399:
2400: IF p_to_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date
2401: OR p_to_rsv_rec.supply_receipt_date IS NULL THEN
2402: x_to_rsv_rec.supply_receipt_date := p_to_rsv_rec.supply_receipt_date;
2403: ELSE
2404: x_to_rsv_rec.supply_receipt_date := p_original_rsv_rec.supply_receipt_date;

Line 2407: IF p_to_rsv_rec.demand_ship_date <> fnd_api.g_miss_date

2403: ELSE
2404: x_to_rsv_rec.supply_receipt_date := p_original_rsv_rec.supply_receipt_date;
2405: END IF;
2406:
2407: IF p_to_rsv_rec.demand_ship_date <> fnd_api.g_miss_date
2408: OR p_to_rsv_rec.demand_ship_date IS NULL THEN
2409: x_to_rsv_rec.demand_ship_date := p_to_rsv_rec.demand_ship_date;
2410: ELSE
2411: x_to_rsv_rec.demand_ship_date := p_original_rsv_rec.demand_ship_date;

Line 2414: IF p_to_rsv_rec.project_id <> fnd_api.g_miss_num

2410: ELSE
2411: x_to_rsv_rec.demand_ship_date := p_original_rsv_rec.demand_ship_date;
2412: END IF;
2413:
2414: IF p_to_rsv_rec.project_id <> fnd_api.g_miss_num
2415: OR p_to_rsv_rec.project_id IS NULL THEN
2416: x_to_rsv_rec.project_id := p_to_rsv_rec.project_id;
2417: ELSE
2418: x_to_rsv_rec.project_id := p_original_rsv_rec.project_id;

Line 2421: IF p_to_rsv_rec.task_id <> fnd_api.g_miss_num

2417: ELSE
2418: x_to_rsv_rec.project_id := p_original_rsv_rec.project_id;
2419: END IF;
2420:
2421: IF p_to_rsv_rec.task_id <> fnd_api.g_miss_num
2422: OR p_to_rsv_rec.task_id IS NULL THEN
2423: x_to_rsv_rec.task_id := p_to_rsv_rec.task_id;
2424: ELSE
2425: x_to_rsv_rec.task_id := p_original_rsv_rec.task_id;

Line 2573: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2569:
2570: PROCEDURE get_wip_entity_type
2571: (
2572: p_api_version_number IN NUMBER
2573: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2574: , x_return_status OUT NOCOPY VARCHAR2
2575: , x_msg_count OUT NOCOPY NUMBER
2576: , x_msg_data OUT NOCOPY VARCHAR2
2577: , p_organization_id IN NUMBER DEFAULT null

Line 2604: RAISE fnd_api.g_exc_error;

2600:
2601: IF (p_source_type_id <> INV_RESERVATION_GLOBAL.g_source_type_wip) THEN
2602: fnd_message.set_name('INV', 'INV_INVALID_SUPPLY_SOURCE');
2603: fnd_msg_pub.add;
2604: RAISE fnd_api.g_exc_error;
2605: END IF;
2606:
2607: BEGIN
2608: SELECT we.entity_type, wdj.maintenance_object_source INTO

Line 2619: RAISE fnd_api.g_exc_error;

2615: debug_print('No WIP entity record found for the source header passed' );
2616: END IF;
2617: fnd_message.set_name('INV', 'INV_INVALID_WIP_ENTITY_TYPE');
2618: fnd_msg_pub.add;
2619: RAISE fnd_api.g_exc_error;
2620: END ;
2621:
2622: IF l_wip_entity_id = inv_reservation_global.g_wip_source_type_discrete then
2623: l_wip_entity_type := inv_reservation_global.g_wip_source_type_discrete;

Line 2655: WHEN fnd_api.g_exc_error THEN

2651: x_wip_entity_type := l_wip_entity_type;
2652: x_wip_job_type := l_wip_job_type;
2653:
2654: EXCEPTION
2655: WHEN fnd_api.g_exc_error THEN
2656: x_return_status := fnd_api.g_ret_sts_error;
2657: -- Get message count and data
2658: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2659: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2656: x_return_status := fnd_api.g_ret_sts_error;

2652: x_wip_job_type := l_wip_job_type;
2653:
2654: EXCEPTION
2655: WHEN fnd_api.g_exc_error THEN
2656: x_return_status := fnd_api.g_ret_sts_error;
2657: -- Get message count and data
2658: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2659: WHEN fnd_api.g_exc_unexpected_error THEN
2660: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2659: WHEN fnd_api.g_exc_unexpected_error THEN

2655: WHEN fnd_api.g_exc_error THEN
2656: x_return_status := fnd_api.g_ret_sts_error;
2657: -- Get message count and data
2658: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2659: WHEN fnd_api.g_exc_unexpected_error THEN
2660: x_return_status := fnd_api.g_ret_sts_unexp_error;
2661: -- Get message count and data
2662: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2663: WHEN OTHERS THEN

Line 2660: x_return_status := fnd_api.g_ret_sts_unexp_error;

2656: x_return_status := fnd_api.g_ret_sts_error;
2657: -- Get message count and data
2658: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2659: WHEN fnd_api.g_exc_unexpected_error THEN
2660: x_return_status := fnd_api.g_ret_sts_unexp_error;
2661: -- Get message count and data
2662: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2663: WHEN OTHERS THEN
2664: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2664: x_return_status := fnd_api.g_ret_sts_unexp_error;

2660: x_return_status := fnd_api.g_ret_sts_unexp_error;
2661: -- Get message count and data
2662: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2663: WHEN OTHERS THEN
2664: x_return_status := fnd_api.g_ret_sts_unexp_error;
2665:
2666: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2667: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2668: END IF;

Line 2707: x_return_status := fnd_api.g_ret_sts_success;

2703: IF (l_debug = 1) THEN
2704: debug_print('Number of rows update: ' || l_update_count);
2705: END IF;
2706:
2707: x_return_status := fnd_api.g_ret_sts_success;
2708: EXCEPTION
2709: WHEN fnd_api.g_exc_error THEN
2710: x_return_status := fnd_api.g_ret_sts_error;
2711: -- Get message count and data

Line 2709: WHEN fnd_api.g_exc_error THEN

2705: END IF;
2706:
2707: x_return_status := fnd_api.g_ret_sts_success;
2708: EXCEPTION
2709: WHEN fnd_api.g_exc_error THEN
2710: x_return_status := fnd_api.g_ret_sts_error;
2711: -- Get message count and data
2712: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2713: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2710: x_return_status := fnd_api.g_ret_sts_error;

2706:
2707: x_return_status := fnd_api.g_ret_sts_success;
2708: EXCEPTION
2709: WHEN fnd_api.g_exc_error THEN
2710: x_return_status := fnd_api.g_ret_sts_error;
2711: -- Get message count and data
2712: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2713: WHEN fnd_api.g_exc_unexpected_error THEN
2714: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2713: WHEN fnd_api.g_exc_unexpected_error THEN

2709: WHEN fnd_api.g_exc_error THEN
2710: x_return_status := fnd_api.g_ret_sts_error;
2711: -- Get message count and data
2712: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2713: WHEN fnd_api.g_exc_unexpected_error THEN
2714: x_return_status := fnd_api.g_ret_sts_unexp_error;
2715: -- Get message count and data
2716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2717: WHEN OTHERS THEN

Line 2714: x_return_status := fnd_api.g_ret_sts_unexp_error;

2710: x_return_status := fnd_api.g_ret_sts_error;
2711: -- Get message count and data
2712: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2713: WHEN fnd_api.g_exc_unexpected_error THEN
2714: x_return_status := fnd_api.g_ret_sts_unexp_error;
2715: -- Get message count and data
2716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2717: WHEN OTHERS THEN
2718: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2718: x_return_status := fnd_api.g_ret_sts_unexp_error;

2714: x_return_status := fnd_api.g_ret_sts_unexp_error;
2715: -- Get message count and data
2716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2717: WHEN OTHERS THEN
2718: x_return_status := fnd_api.g_ret_sts_unexp_error;
2719:
2720: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2721: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2722: END IF;

Line 2731: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2727: END update_serial_rsv_quantity;
2728:
2729: PROCEDURE is_serial_number_reserved(
2730: p_api_version_number IN NUMBER
2731: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2732: , x_return_status OUT NOCOPY VARCHAR2
2733: , x_msg_count OUT NOCOPY NUMBER
2734: , x_msg_data OUT NOCOPY VARCHAR2
2735: , p_serial_number_tbl IN inv_reservation_global.serial_number_tbl_type

Line 2782: x_return_status := fnd_api.g_ret_sts_success;

2778: ', serial number = ' || x_serial_number_tbl(i).serial_number);
2779: END LOOP;
2780: END IF;
2781:
2782: x_return_status := fnd_api.g_ret_sts_success;
2783: EXCEPTION
2784: WHEN fnd_api.g_exc_error THEN
2785: x_return_status := fnd_api.g_ret_sts_error;
2786: -- Get message count and data

Line 2784: WHEN fnd_api.g_exc_error THEN

2780: END IF;
2781:
2782: x_return_status := fnd_api.g_ret_sts_success;
2783: EXCEPTION
2784: WHEN fnd_api.g_exc_error THEN
2785: x_return_status := fnd_api.g_ret_sts_error;
2786: -- Get message count and data
2787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2788: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2785: x_return_status := fnd_api.g_ret_sts_error;

2781:
2782: x_return_status := fnd_api.g_ret_sts_success;
2783: EXCEPTION
2784: WHEN fnd_api.g_exc_error THEN
2785: x_return_status := fnd_api.g_ret_sts_error;
2786: -- Get message count and data
2787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2788: WHEN fnd_api.g_exc_unexpected_error THEN
2789: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2788: WHEN fnd_api.g_exc_unexpected_error THEN

2784: WHEN fnd_api.g_exc_error THEN
2785: x_return_status := fnd_api.g_ret_sts_error;
2786: -- Get message count and data
2787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2788: WHEN fnd_api.g_exc_unexpected_error THEN
2789: x_return_status := fnd_api.g_ret_sts_unexp_error;
2790: -- Get message count and data
2791: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2792: WHEN OTHERS THEN

Line 2789: x_return_status := fnd_api.g_ret_sts_unexp_error;

2785: x_return_status := fnd_api.g_ret_sts_error;
2786: -- Get message count and data
2787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2788: WHEN fnd_api.g_exc_unexpected_error THEN
2789: x_return_status := fnd_api.g_ret_sts_unexp_error;
2790: -- Get message count and data
2791: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2792: WHEN OTHERS THEN
2793: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2793: x_return_status := fnd_api.g_ret_sts_unexp_error;

2789: x_return_status := fnd_api.g_ret_sts_unexp_error;
2790: -- Get message count and data
2791: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2792: WHEN OTHERS THEN
2793: x_return_status := fnd_api.g_ret_sts_unexp_error;
2794:
2795: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2796: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2797: END IF;

Line 2805: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2801: END is_serial_number_reserved;
2802:
2803: PROCEDURE is_serial_reserved(
2804: p_api_version_number IN NUMBER
2805: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2806: , x_return_status OUT NOCOPY VARCHAR2
2807: , x_msg_count OUT NOCOPY NUMBER
2808: , x_msg_data OUT NOCOPY VARCHAR2
2809: , p_serial_number_tbl IN inv_reservation_global.serial_number_tbl_type

Line 2937: x_return_status := fnd_api.g_ret_sts_success;

2933: ', serial number = ' || x_serial_number_tbl(i).serial_number);
2934: END LOOP;
2935: END IF;
2936:
2937: x_return_status := fnd_api.g_ret_sts_success;
2938: EXCEPTION
2939: WHEN fnd_api.g_exc_error THEN
2940: x_return_status := fnd_api.g_ret_sts_error;
2941: -- Get message count and data

Line 2939: WHEN fnd_api.g_exc_error THEN

2935: END IF;
2936:
2937: x_return_status := fnd_api.g_ret_sts_success;
2938: EXCEPTION
2939: WHEN fnd_api.g_exc_error THEN
2940: x_return_status := fnd_api.g_ret_sts_error;
2941: -- Get message count and data
2942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2943: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2940: x_return_status := fnd_api.g_ret_sts_error;

2936:
2937: x_return_status := fnd_api.g_ret_sts_success;
2938: EXCEPTION
2939: WHEN fnd_api.g_exc_error THEN
2940: x_return_status := fnd_api.g_ret_sts_error;
2941: -- Get message count and data
2942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2943: WHEN fnd_api.g_exc_unexpected_error THEN
2944: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2943: WHEN fnd_api.g_exc_unexpected_error THEN

2939: WHEN fnd_api.g_exc_error THEN
2940: x_return_status := fnd_api.g_ret_sts_error;
2941: -- Get message count and data
2942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2943: WHEN fnd_api.g_exc_unexpected_error THEN
2944: x_return_status := fnd_api.g_ret_sts_unexp_error;
2945: -- Get message count and data
2946: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2947: WHEN OTHERS THEN

Line 2944: x_return_status := fnd_api.g_ret_sts_unexp_error;

2940: x_return_status := fnd_api.g_ret_sts_error;
2941: -- Get message count and data
2942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2943: WHEN fnd_api.g_exc_unexpected_error THEN
2944: x_return_status := fnd_api.g_ret_sts_unexp_error;
2945: -- Get message count and data
2946: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2947: WHEN OTHERS THEN
2948: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2948: x_return_status := fnd_api.g_ret_sts_unexp_error;

2944: x_return_status := fnd_api.g_ret_sts_unexp_error;
2945: -- Get message count and data
2946: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2947: WHEN OTHERS THEN
2948: x_return_status := fnd_api.g_ret_sts_unexp_error;
2949:
2950: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2951: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2952: END IF;

Line 2988: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

2984: , p_organization_id IN NUMBER DEFAULT NULL -- MUOM Fulfillemnt Project
2985: , p_demand_source_line_id IN NUMBER DEFAULT NULL -- MUOM Fulfillemnt Project
2986: , p_demand_source_type_id IN NUMBER DEFAULT NULL -- MUOM Fulfillemnt Project
2987: ) IS
2988: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2989: l_qoh NUMBER;
2990: l_rqoh NUMBER;
2991: l_qr NUMBER;
2992: l_qs NUMBER;

Line 3035: , p_init_msg_lst => fnd_api.g_true

3031:
3032: -- INVCONV Include secondary parameters below
3033: inv_quantity_tree_pvt.query_tree(
3034: p_api_version_number => 1.0
3035: , p_init_msg_lst => fnd_api.g_true
3036: , x_return_status => l_return_status
3037: , x_msg_count => l_msg_count
3038: , x_msg_data => l_msg_data
3039: , p_tree_id => p_tree_id

Line 3059: IF l_return_status = fnd_api.g_ret_sts_error THEN

3055: , x_satr => l_satr
3056: , p_lpn_id => p_lpn_id
3057: );
3058:
3059: IF l_return_status = fnd_api.g_ret_sts_error THEN
3060: RAISE fnd_api.g_exc_error;
3061: END IF;
3062:
3063: --

Line 3060: RAISE fnd_api.g_exc_error;

3056: , p_lpn_id => p_lpn_id
3057: );
3058:
3059: IF l_return_status = fnd_api.g_ret_sts_error THEN
3060: RAISE fnd_api.g_exc_error;
3061: END IF;
3062:
3063: --
3064: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3064: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3060: RAISE fnd_api.g_exc_error;
3061: END IF;
3062:
3063: --
3064: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3065: RAISE fnd_api.g_exc_unexpected_error;
3066: END IF;
3067:
3068: IF (l_debug = 1) THEN

Line 3065: RAISE fnd_api.g_exc_unexpected_error;

3061: END IF;
3062:
3063: --
3064: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3065: RAISE fnd_api.g_exc_unexpected_error;
3066: END IF;
3067:
3068: IF (l_debug = 1) THEN
3069: debug_print('l_atr ' || l_atr);

Line 3105: RAISE fnd_api.g_exc_error;

3101: IF l_net_qty < l_atr THEN
3102: -- Available to reserve cannot be subdivided
3103: fnd_message.set_name('INV', 'INV_LOT_INDIVISIBLE_VIOLATION'); -- INVCONV New Message
3104: fnd_msg_pub.ADD;
3105: RAISE fnd_api.g_exc_error;
3106: END IF;
3107: END IF;
3108: -- INVCONV END - lot_indivisible quantities cannot be split
3109: ELSIF p_action = 'DELETE' THEN

Line 3129: RAISE fnd_api.g_exc_unexpected_error;

3125: IF l_dual_control THEN -- INVCONV
3126: l_secondary_net_qty := -p_secondary_relieve_quantity;
3127: END IF; -- INVCONV
3128: ELSE
3129: RAISE fnd_api.g_exc_unexpected_error;
3130: END IF;
3131: --MUOM Fulfillment Project
3132: inv_utilities.get_inv_fulfillment_base(
3133: p_source_line_id => p_demand_source_line_id,

Line 3143: IF p_force_reservation_flag <> fnd_api.g_true

3139: IF (l_debug=1) THEN
3140: debug_print('Fulfill Base = '||l_fulfill_base);
3141: END IF;
3142:
3143: IF p_force_reservation_flag <> fnd_api.g_true
3144: AND l_net_qty > 0
3145: AND ((l_net_qty > l_atr AND p_partial_reservation_flag = fnd_api.g_false AND l_fulfill_base='P')
3146: OR (l_atr <= 0 AND p_partial_reservation_flag = fnd_api.g_true)
3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)

Line 3145: AND ((l_net_qty > l_atr AND p_partial_reservation_flag = fnd_api.g_false AND l_fulfill_base='P')

3141: END IF;
3142:
3143: IF p_force_reservation_flag <> fnd_api.g_true
3144: AND l_net_qty > 0
3145: AND ((l_net_qty > l_atr AND p_partial_reservation_flag = fnd_api.g_false AND l_fulfill_base='P')
3146: OR (l_atr <= 0 AND p_partial_reservation_flag = fnd_api.g_true)
3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)
3148: ) THEN
3149: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');

Line 3146: OR (l_atr <= 0 AND p_partial_reservation_flag = fnd_api.g_true)

3142:
3143: IF p_force_reservation_flag <> fnd_api.g_true
3144: AND l_net_qty > 0
3145: AND ((l_net_qty > l_atr AND p_partial_reservation_flag = fnd_api.g_false AND l_fulfill_base='P')
3146: OR (l_atr <= 0 AND p_partial_reservation_flag = fnd_api.g_true)
3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)
3148: ) THEN
3149: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
3150: fnd_msg_pub.ADD;

Line 3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)

3143: IF p_force_reservation_flag <> fnd_api.g_true
3144: AND l_net_qty > 0
3145: AND ((l_net_qty > l_atr AND p_partial_reservation_flag = fnd_api.g_false AND l_fulfill_base='P')
3146: OR (l_atr <= 0 AND p_partial_reservation_flag = fnd_api.g_true)
3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)
3148: ) THEN
3149: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
3150: fnd_msg_pub.ADD;
3151: RAISE fnd_api.g_exc_error;

Line 3151: RAISE fnd_api.g_exc_error;

3147: OR (l_fulfill_base ='S' AND l_secondary_net_qty > l_satr AND p_partial_reservation_flag = fnd_api.g_false)
3148: ) THEN
3149: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
3150: fnd_msg_pub.ADD;
3151: RAISE fnd_api.g_exc_error;
3152: END IF;
3153:
3154: IF (l_debug = 1) THEN
3155: debug_print('l_net_qty ' || l_net_qty);

Line 3195: , p_init_msg_lst => fnd_api.g_true

3191: l_quantity_type := inv_quantity_tree_pvt.g_qr_same_demand;
3192: --
3193: inv_quantity_tree_pvt.update_quantities(
3194: p_api_version_number => 1.0
3195: , p_init_msg_lst => fnd_api.g_true
3196: , x_return_status => l_return_status
3197: , x_msg_count => l_msg_count
3198: , x_msg_data => l_msg_data
3199: , p_tree_id => p_tree_id

Line 3223: IF l_return_status = fnd_api.g_ret_sts_error THEN

3219: , p_lpn_id => p_lpn_id
3220: );
3221:
3222: --
3223: IF l_return_status = fnd_api.g_ret_sts_error THEN
3224: RAISE fnd_api.g_exc_error;
3225: END IF;
3226:
3227: --

Line 3224: RAISE fnd_api.g_exc_error;

3220: );
3221:
3222: --
3223: IF l_return_status = fnd_api.g_ret_sts_error THEN
3224: RAISE fnd_api.g_exc_error;
3225: END IF;
3226:
3227: --
3228: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3228: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3224: RAISE fnd_api.g_exc_error;
3225: END IF;
3226:
3227: --
3228: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3229: RAISE fnd_api.g_exc_unexpected_error;
3230: END IF;
3231:
3232: --

Line 3229: RAISE fnd_api.g_exc_unexpected_error;

3225: END IF;
3226:
3227: --
3228: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3229: RAISE fnd_api.g_exc_unexpected_error;
3230: END IF;
3231:
3232: --
3233: x_qty_changed := l_net_qty;

Line 3239: WHEN fnd_api.g_exc_error THEN

3235: x_secondary_qty_changed := l_secondary_net_qty; -- INVCONV
3236: END IF; -- INVCONV
3237: x_return_status := l_return_status;
3238: EXCEPTION
3239: WHEN fnd_api.g_exc_error THEN
3240: x_return_status := fnd_api.g_ret_sts_error;
3241: --
3242: WHEN fnd_api.g_exc_unexpected_error THEN
3243: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3240: x_return_status := fnd_api.g_ret_sts_error;

3236: END IF; -- INVCONV
3237: x_return_status := l_return_status;
3238: EXCEPTION
3239: WHEN fnd_api.g_exc_error THEN
3240: x_return_status := fnd_api.g_ret_sts_error;
3241: --
3242: WHEN fnd_api.g_exc_unexpected_error THEN
3243: x_return_status := fnd_api.g_ret_sts_unexp_error;
3244: --

Line 3242: WHEN fnd_api.g_exc_unexpected_error THEN

3238: EXCEPTION
3239: WHEN fnd_api.g_exc_error THEN
3240: x_return_status := fnd_api.g_ret_sts_error;
3241: --
3242: WHEN fnd_api.g_exc_unexpected_error THEN
3243: x_return_status := fnd_api.g_ret_sts_unexp_error;
3244: --
3245: WHEN OTHERS THEN
3246: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3243: x_return_status := fnd_api.g_ret_sts_unexp_error;

3239: WHEN fnd_api.g_exc_error THEN
3240: x_return_status := fnd_api.g_ret_sts_error;
3241: --
3242: WHEN fnd_api.g_exc_unexpected_error THEN
3243: x_return_status := fnd_api.g_ret_sts_unexp_error;
3244: --
3245: WHEN OTHERS THEN
3246: x_return_status := fnd_api.g_ret_sts_unexp_error;
3247:

Line 3246: x_return_status := fnd_api.g_ret_sts_unexp_error;

3242: WHEN fnd_api.g_exc_unexpected_error THEN
3243: x_return_status := fnd_api.g_ret_sts_unexp_error;
3244: --
3245: WHEN OTHERS THEN
3246: x_return_status := fnd_api.g_ret_sts_unexp_error;
3247:
3248: --
3249: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3250: fnd_msg_pub.add_exc_msg(g_pkg_name, 'modify_tree_crt_del_rel');

Line 3287: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

3283: , p_to_revision_control IN BOOLEAN
3284: , p_to_lot_control IN BOOLEAN
3285: , p_action IN VARCHAR2
3286: , p_lot_divisible_flag IN VARCHAR2 -- INVCONV
3287: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
3288: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
3289: ) IS
3290:
3291: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 3288: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

3284: , p_to_lot_control IN BOOLEAN
3285: , p_action IN VARCHAR2
3286: , p_lot_divisible_flag IN VARCHAR2 -- INVCONV
3287: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
3288: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
3289: ) IS
3290:
3291: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3292: l_tmp_revision VARCHAR2(3);

Line 3291: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3287: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
3288: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
3289: ) IS
3290:
3291: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3292: l_tmp_revision VARCHAR2(3);
3293: l_tmp_lot_number VARCHAR2(80); -- BUG 4180127
3294: l_net_qty1 NUMBER;
3295: l_secondary_net_qty1 NUMBER; -- INVCONV

Line 3360: , p_init_msg_lst => fnd_api.g_true

3356: IF p_from_supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
3357: -- INVCONV - Incorporate secondaries
3358: inv_quantity_tree_pvt.update_quantities(
3359: p_api_version_number => 1.0
3360: , p_init_msg_lst => fnd_api.g_true
3361: , x_return_status => l_return_status
3362: , x_msg_count => l_msg_count
3363: , x_msg_data => l_msg_data
3364: , p_tree_id => p_from_tree_id

Line 3388: IF l_return_status = fnd_api.g_ret_sts_error THEN

3384: , p_lpn_id => p_from_lpn_id
3385: );
3386:
3387: --
3388: IF l_return_status = fnd_api.g_ret_sts_error THEN
3389: RAISE fnd_api.g_exc_error;
3390: END IF;
3391:
3392: --

Line 3389: RAISE fnd_api.g_exc_error;

3385: );
3386:
3387: --
3388: IF l_return_status = fnd_api.g_ret_sts_error THEN
3389: RAISE fnd_api.g_exc_error;
3390: END IF;
3391:
3392: --
3393: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3393: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3389: RAISE fnd_api.g_exc_error;
3390: END IF;
3391:
3392: --
3393: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3394: RAISE fnd_api.g_exc_unexpected_error;
3395: END IF;
3396:
3397: --

Line 3394: RAISE fnd_api.g_exc_unexpected_error;

3390: END IF;
3391:
3392: --
3393: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3394: RAISE fnd_api.g_exc_unexpected_error;
3395: END IF;
3396:
3397: --
3398: l_modify_tree1 := TRUE;

Line 3432: , p_init_msg_lst => fnd_api.g_true

3428: --
3429: -- INVCONV - Incorporate secondaries into call
3430: inv_quantity_tree_pvt.update_quantities(
3431: p_api_version_number => 1.0
3432: , p_init_msg_lst => fnd_api.g_true
3433: , x_return_status => l_return_status
3434: , x_msg_count => l_msg_count
3435: , x_msg_data => l_msg_data
3436: , p_tree_id => p_to_tree_id

Line 3460: IF l_return_status = fnd_api.g_ret_sts_error THEN

3456: , p_lpn_id => p_from_lpn_id
3457: );
3458:
3459: --
3460: IF l_return_status = fnd_api.g_ret_sts_error THEN
3461: -- fail to modify in tree2
3462: -- undo the modification in tree1
3463: -- INVCONV - Incorporate secondaries into call
3464: inv_quantity_tree_pvt.update_quantities(

Line 3466: , p_init_msg_lst => fnd_api.g_true

3462: -- undo the modification in tree1
3463: -- INVCONV - Incorporate secondaries into call
3464: inv_quantity_tree_pvt.update_quantities(
3465: p_api_version_number => 1.0
3466: , p_init_msg_lst => fnd_api.g_true
3467: , x_return_status => l_return_status
3468: , x_msg_count => l_msg_count
3469: , x_msg_data => l_msg_data
3470: , p_tree_id => p_from_tree_id

Line 3493: IF l_return_status = fnd_api.g_ret_sts_error THEN

3489: , x_satr => l_satr
3490: , p_lpn_id => p_from_lpn_id
3491: );
3492:
3493: IF l_return_status = fnd_api.g_ret_sts_error THEN
3494: -- can not add the reservation back on the tree
3495: -- panic
3496: RAISE fnd_api.g_exc_unexpected_error;
3497: END IF;

Line 3496: RAISE fnd_api.g_exc_unexpected_error;

3492:
3493: IF l_return_status = fnd_api.g_ret_sts_error THEN
3494: -- can not add the reservation back on the tree
3495: -- panic
3496: RAISE fnd_api.g_exc_unexpected_error;
3497: END IF;
3498:
3499: --
3500: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3500: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3496: RAISE fnd_api.g_exc_unexpected_error;
3497: END IF;
3498:
3499: --
3500: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3501: RAISE fnd_api.g_exc_unexpected_error;
3502: END IF;
3503:
3504: --

Line 3501: RAISE fnd_api.g_exc_unexpected_error;

3497: END IF;
3498:
3499: --
3500: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3501: RAISE fnd_api.g_exc_unexpected_error;
3502: END IF;
3503:
3504: --
3505: -- recover the quantity tree1 correctly, but

Line 3507: RAISE fnd_api.g_exc_error;

3503:
3504: --
3505: -- recover the quantity tree1 correctly, but
3506: -- since we failed to modify the tree, raise expected error
3507: RAISE fnd_api.g_exc_error;
3508: END IF;
3509:
3510: --
3511: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3511: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3507: RAISE fnd_api.g_exc_error;
3508: END IF;
3509:
3510: --
3511: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3512: RAISE fnd_api.g_exc_unexpected_error;
3513: END IF;
3514: END IF;
3515: --Start changes for Bug Number#3336837

Line 3512: RAISE fnd_api.g_exc_unexpected_error;

3508: END IF;
3509:
3510: --
3511: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3512: RAISE fnd_api.g_exc_unexpected_error;
3513: END IF;
3514: END IF;
3515: --Start changes for Bug Number#3336837
3516: -- Bug Number 3447373 Removed the qty validation for transfers

Line 3526: , p_init_msg_lst => fnd_api.g_true

3522:
3523: -- INVCONV - Incorporate secondaries into call
3524: inv_quantity_tree_pvt.query_tree(
3525: p_api_version_number => 1.0
3526: , p_init_msg_lst => fnd_api.g_true
3527: , x_return_status => l_return_status
3528: , x_msg_count => l_msg_count
3529: , x_msg_data => l_msg_data
3530: , p_tree_id => p_from_tree_id

Line 3550: IF l_return_status = fnd_api.g_ret_sts_error THEN

3546: , x_satr => l_satr
3547: , p_lpn_id => p_from_lpn_id
3548: );
3549:
3550: IF l_return_status = fnd_api.g_ret_sts_error THEN
3551: RAISE fnd_api.g_exc_unexpected_error;
3552: END IF;
3553:
3554: --

Line 3551: RAISE fnd_api.g_exc_unexpected_error;

3547: , p_lpn_id => p_from_lpn_id
3548: );
3549:
3550: IF l_return_status = fnd_api.g_ret_sts_error THEN
3551: RAISE fnd_api.g_exc_unexpected_error;
3552: END IF;
3553:
3554: --
3555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3551: RAISE fnd_api.g_exc_unexpected_error;
3552: END IF;
3553:
3554: --
3555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3556: RAISE fnd_api.g_exc_unexpected_error;
3557: END IF;
3558:
3559: -- INVCONV BEGIN - lot indivisible quantities must be fully consumed

Line 3556: RAISE fnd_api.g_exc_unexpected_error;

3552: END IF;
3553:
3554: --
3555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3556: RAISE fnd_api.g_exc_unexpected_error;
3557: END IF;
3558:
3559: -- INVCONV BEGIN - lot indivisible quantities must be fully consumed
3560: IF p_lot_divisible_flag = 'N' THEN

Line 3567: RAISE fnd_api.g_exc_error;

3563: END IF;
3564: IF l_atr > l_net_qty2 THEN
3565: fnd_message.set_name('INV', 'INV_LOT_INDIVISIBLE_VIOLATION');
3566: fnd_msg_pub.ADD;
3567: RAISE fnd_api.g_exc_error;
3568: END IF;
3569: END IF;
3570: -- INVCONV END
3571:

Line 3582: IF ( p_partial_reservation_flag = fnd_api.g_true AND l_net_qty2 > l_atr AND l_atr > 0)THEN -- Bug 6141096

3578: END IF;
3579:
3580: -- Bug 6141096: Fail the reservation if available to reserve(ATR) is less than or equal to zero, even if the
3581: -- the partial reservation flag is set to true.
3582: IF ( p_partial_reservation_flag = fnd_api.g_true AND l_net_qty2 > l_atr AND l_atr > 0)THEN -- Bug 6141096
3583: l_net_qty2 := l_atr;
3584: x_quantity_reserved := l_net_qty2;
3585:
3586: IF l_dual_control THEN -- INVCONV

Line 3591: AND (p_partial_reservation_flag <> fnd_api.g_true OR l_atr <= 0) -- Bug 6141096

3587: l_secondary_net_qty2 := l_satr; -- INVCONV
3588: x_secondary_quantity_reserved := l_secondary_net_qty2; -- INVCONV
3589: END IF; -- INVCONV
3590: ELSIF ( l_net_qty2 > l_atr
3591: AND (p_partial_reservation_flag <> fnd_api.g_true OR l_atr <= 0) -- Bug 6141096
3592: AND p_action='UPDATE'
3593: AND p_check_availability = fnd_api.g_true )THEN
3594: --rollback quantity tree changes .
3595: IF l_modify_tree1 THEN

Line 3593: AND p_check_availability = fnd_api.g_true )THEN

3589: END IF; -- INVCONV
3590: ELSIF ( l_net_qty2 > l_atr
3591: AND (p_partial_reservation_flag <> fnd_api.g_true OR l_atr <= 0) -- Bug 6141096
3592: AND p_action='UPDATE'
3593: AND p_check_availability = fnd_api.g_true )THEN
3594: --rollback quantity tree changes .
3595: IF l_modify_tree1 THEN
3596: -- INVCONV Incorporate secondaries
3597: inv_quantity_tree_pvt.update_quantities(

Line 3599: , p_init_msg_lst => fnd_api.g_true

3595: IF l_modify_tree1 THEN
3596: -- INVCONV Incorporate secondaries
3597: inv_quantity_tree_pvt.update_quantities(
3598: p_api_version_number => 1.0
3599: , p_init_msg_lst => fnd_api.g_true
3600: , x_return_status => l_return_status
3601: , x_msg_count => l_msg_count
3602: , x_msg_data => l_msg_data
3603: , p_tree_id => p_from_tree_id

Line 3629: IF l_return_status = fnd_api.g_ret_sts_error THEN

3625: IF (l_debug = 1) THEN
3626: debug_print('return status from Rollback Tree1 changes '||l_return_status);
3627: END IF;
3628:
3629: IF l_return_status = fnd_api.g_ret_sts_error THEN
3630: -- can not add the reservation back on the tree
3631: -- panic
3632: RAISE fnd_api.g_exc_unexpected_error;
3633: END IF;

Line 3632: RAISE fnd_api.g_exc_unexpected_error;

3628:
3629: IF l_return_status = fnd_api.g_ret_sts_error THEN
3630: -- can not add the reservation back on the tree
3631: -- panic
3632: RAISE fnd_api.g_exc_unexpected_error;
3633: END IF;
3634:
3635: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3636: RAISE fnd_api.g_exc_unexpected_error;

Line 3635: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3631: -- panic
3632: RAISE fnd_api.g_exc_unexpected_error;
3633: END IF;
3634:
3635: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3636: RAISE fnd_api.g_exc_unexpected_error;
3637: END IF;
3638: END IF;
3639:

Line 3636: RAISE fnd_api.g_exc_unexpected_error;

3632: RAISE fnd_api.g_exc_unexpected_error;
3633: END IF;
3634:
3635: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3636: RAISE fnd_api.g_exc_unexpected_error;
3637: END IF;
3638: END IF;
3639:
3640:

Line 3643: RAISE fnd_api.g_exc_error;

3639:
3640:
3641: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
3642: fnd_msg_pub.ADD;
3643: RAISE fnd_api.g_exc_error;
3644: END IF;
3645: --Changed for Qty validation. Bug 3336837
3646:
3647: --

Line 3656: , p_init_msg_lst => fnd_api.g_true

3652:
3653: -- INVCONV Incorporate Secondaries in call
3654: inv_quantity_tree_pvt.update_quantities(
3655: p_api_version_number => 1.0
3656: , p_init_msg_lst => fnd_api.g_true
3657: , x_return_status => l_return_status
3658: , x_msg_count => l_msg_count
3659: , x_msg_data => l_msg_data
3660: , p_tree_id => p_from_tree_id

Line 3683: IF l_return_status = fnd_api.g_ret_sts_success

3679: , x_satr => l_satr
3680: , p_lpn_id => p_from_lpn_id
3681: );
3682:
3683: IF l_return_status = fnd_api.g_ret_sts_success
3684: AND l_modify_tree2 THEN
3685:
3686: -- INVCONV Incorporate Secondaries in call
3687: inv_quantity_tree_pvt.update_quantities(

Line 3689: , p_init_msg_lst => fnd_api.g_true

3685:
3686: -- INVCONV Incorporate Secondaries in call
3687: inv_quantity_tree_pvt.update_quantities(
3688: p_api_version_number => 1.0
3689: , p_init_msg_lst => fnd_api.g_true
3690: , x_return_status => l_return_status
3691: , x_msg_count => l_msg_count
3692: , x_msg_data => l_msg_data
3693: , p_tree_id => p_to_tree_id

Line 3717: IF l_return_status = fnd_api.g_ret_sts_error THEN

3713: , p_lpn_id => p_to_lpn_id
3714: );
3715: END IF;
3716:
3717: IF l_return_status = fnd_api.g_ret_sts_error THEN
3718: -- fail to modify in tree2
3719: -- undo the modification in tree1 if l_modify_tree1 is true
3720: IF l_modify_tree1 THEN
3721: -- INVCONV - Incorporate secondaries

Line 3724: , p_init_msg_lst => fnd_api.g_true

3720: IF l_modify_tree1 THEN
3721: -- INVCONV - Incorporate secondaries
3722: inv_quantity_tree_pvt.update_quantities(
3723: p_api_version_number => 1.0
3724: , p_init_msg_lst => fnd_api.g_true
3725: , x_return_status => l_return_status
3726: , x_msg_count => l_msg_count
3727: , x_msg_data => l_msg_data
3728: , p_tree_id => p_from_tree_id

Line 3751: IF l_return_status = fnd_api.g_ret_sts_error THEN

3747: , x_satr => l_satr
3748: , p_lpn_id => p_from_lpn_id
3749: );
3750:
3751: IF l_return_status = fnd_api.g_ret_sts_error THEN
3752: -- can not add the reservation back on the tree
3753: -- panic
3754: RAISE fnd_api.g_exc_unexpected_error;
3755: END IF;

Line 3754: RAISE fnd_api.g_exc_unexpected_error;

3750:
3751: IF l_return_status = fnd_api.g_ret_sts_error THEN
3752: -- can not add the reservation back on the tree
3753: -- panic
3754: RAISE fnd_api.g_exc_unexpected_error;
3755: END IF;
3756:
3757: --
3758: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3758: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3754: RAISE fnd_api.g_exc_unexpected_error;
3755: END IF;
3756:
3757: --
3758: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3759: RAISE fnd_api.g_exc_unexpected_error;
3760: END IF;
3761:
3762: --

Line 3759: RAISE fnd_api.g_exc_unexpected_error;

3755: END IF;
3756:
3757: --
3758: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3759: RAISE fnd_api.g_exc_unexpected_error;
3760: END IF;
3761:
3762: --
3763: IF l_modify_tree2 THEN

Line 3767: , p_init_msg_lst => fnd_api.g_true

3763: IF l_modify_tree2 THEN
3764: -- INVCONV - Incorporate secondaries
3765: inv_quantity_tree_pvt.update_quantities(
3766: p_api_version_number => 1.0
3767: , p_init_msg_lst => fnd_api.g_true
3768: , x_return_status => l_return_status
3769: , x_msg_count => l_msg_count
3770: , x_msg_data => l_msg_data
3771: , p_tree_id => p_to_tree_id

Line 3794: IF l_return_status = fnd_api.g_ret_sts_error THEN

3790: , x_satr => l_satr
3791: , p_lpn_id => p_from_lpn_id
3792: );
3793:
3794: IF l_return_status = fnd_api.g_ret_sts_error THEN
3795: -- can not add the reservation back on the tree
3796: -- panic
3797: RAISE fnd_api.g_exc_unexpected_error;
3798: END IF;

Line 3797: RAISE fnd_api.g_exc_unexpected_error;

3793:
3794: IF l_return_status = fnd_api.g_ret_sts_error THEN
3795: -- can not add the reservation back on the tree
3796: -- panic
3797: RAISE fnd_api.g_exc_unexpected_error;
3798: END IF;
3799:
3800: --
3801: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3801: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3797: RAISE fnd_api.g_exc_unexpected_error;
3798: END IF;
3799:
3800: --
3801: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3802: RAISE fnd_api.g_exc_unexpected_error;
3803: END IF;
3804: END IF;
3805:

Line 3802: RAISE fnd_api.g_exc_unexpected_error;

3798: END IF;
3799:
3800: --
3801: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3802: RAISE fnd_api.g_exc_unexpected_error;
3803: END IF;
3804: END IF;
3805:
3806: -- recover the quantity tree1 correctly, but

Line 3808: RAISE fnd_api.g_exc_error;

3804: END IF;
3805:
3806: -- recover the quantity tree1 correctly, but
3807: -- since we failed to modify the tree, raise expected error
3808: RAISE fnd_api.g_exc_error;
3809: END IF;
3810:
3811: --
3812: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3812: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3808: RAISE fnd_api.g_exc_error;
3809: END IF;
3810:
3811: --
3812: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3813: RAISE fnd_api.g_exc_unexpected_error;
3814: END IF;
3815: END IF;
3816:

Line 3813: RAISE fnd_api.g_exc_unexpected_error;

3809: END IF;
3810:
3811: --
3812: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3813: RAISE fnd_api.g_exc_unexpected_error;
3814: END IF;
3815: END IF;
3816:
3817: x_return_status := l_return_status;

Line 3826: WHEN fnd_api.g_exc_error THEN

3822: END IF; -- INVCONV
3823:
3824: --
3825: EXCEPTION
3826: WHEN fnd_api.g_exc_error THEN
3827: x_return_status := fnd_api.g_ret_sts_error;
3828: --
3829: WHEN fnd_api.g_exc_unexpected_error THEN
3830: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3827: x_return_status := fnd_api.g_ret_sts_error;

3823:
3824: --
3825: EXCEPTION
3826: WHEN fnd_api.g_exc_error THEN
3827: x_return_status := fnd_api.g_ret_sts_error;
3828: --
3829: WHEN fnd_api.g_exc_unexpected_error THEN
3830: x_return_status := fnd_api.g_ret_sts_unexp_error;
3831: --

Line 3829: WHEN fnd_api.g_exc_unexpected_error THEN

3825: EXCEPTION
3826: WHEN fnd_api.g_exc_error THEN
3827: x_return_status := fnd_api.g_ret_sts_error;
3828: --
3829: WHEN fnd_api.g_exc_unexpected_error THEN
3830: x_return_status := fnd_api.g_ret_sts_unexp_error;
3831: --
3832: WHEN OTHERS THEN
3833: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3830: x_return_status := fnd_api.g_ret_sts_unexp_error;

3826: WHEN fnd_api.g_exc_error THEN
3827: x_return_status := fnd_api.g_ret_sts_error;
3828: --
3829: WHEN fnd_api.g_exc_unexpected_error THEN
3830: x_return_status := fnd_api.g_ret_sts_unexp_error;
3831: --
3832: WHEN OTHERS THEN
3833: x_return_status := fnd_api.g_ret_sts_unexp_error;
3834:

Line 3833: x_return_status := fnd_api.g_ret_sts_unexp_error;

3829: WHEN fnd_api.g_exc_unexpected_error THEN
3830: x_return_status := fnd_api.g_ret_sts_unexp_error;
3831: --
3832: WHEN OTHERS THEN
3833: x_return_status := fnd_api.g_ret_sts_unexp_error;
3834:
3835: --
3836: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3837: fnd_msg_pub.add_exc_msg(g_pkg_name, 'modify_tree_for_update_xfer');

Line 3849: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

3845: -- This procedure returns all reservations that satisfy the user
3846: -- specified criteria.
3847: PROCEDURE query_reservation(
3848: p_api_version_number IN NUMBER
3849: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
3850: , x_return_status OUT NOCOPY VARCHAR2
3851: , x_msg_count OUT NOCOPY NUMBER
3852: , x_msg_data OUT NOCOPY VARCHAR2
3853: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 3854: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

3850: , x_return_status OUT NOCOPY VARCHAR2
3851: , x_msg_count OUT NOCOPY NUMBER
3852: , x_msg_data OUT NOCOPY VARCHAR2
3853: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
3854: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
3855: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
3856: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
3857: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type
3858: , x_mtl_reservation_tbl_count OUT NOCOPY NUMBER

Line 3863: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3859: , x_error_code OUT NOCOPY NUMBER
3860: ) IS
3861: l_api_version_number CONSTANT NUMBER := 1.0;
3862: l_api_name CONSTANT VARCHAR2(30) := 'Query_Reservation';
3863: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3864: l_counter INTEGER;
3865: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
3866: l_sort_stmt VARCHAR2(2000);
3867: l_lock_stmt VARCHAR2(60);

Line 3871: l_miss_num NUMBER := fnd_api.g_miss_num;

3867: l_lock_stmt VARCHAR2(60);
3868: -- Bug 4881317
3869: l_qry_stmt VARCHAR2(15000);
3870: l_cursor_ref query_cur_ref_type;
3871: l_miss_num NUMBER := fnd_api.g_miss_num;
3872: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3873: l_miss_date DATE := fnd_api.g_miss_date;
3874: l_update BOOLEAN := FALSE;
3875: l_sort_default BOOLEAN := FALSE;

Line 3872: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;

3868: -- Bug 4881317
3869: l_qry_stmt VARCHAR2(15000);
3870: l_cursor_ref query_cur_ref_type;
3871: l_miss_num NUMBER := fnd_api.g_miss_num;
3872: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3873: l_miss_date DATE := fnd_api.g_miss_date;
3874: l_update BOOLEAN := FALSE;
3875: l_sort_default BOOLEAN := FALSE;
3876: l_res_cursor BOOLEAN := FALSE;

Line 3873: l_miss_date DATE := fnd_api.g_miss_date;

3869: l_qry_stmt VARCHAR2(15000);
3870: l_cursor_ref query_cur_ref_type;
3871: l_miss_num NUMBER := fnd_api.g_miss_num;
3872: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3873: l_miss_date DATE := fnd_api.g_miss_date;
3874: l_update BOOLEAN := FALSE;
3875: l_sort_default BOOLEAN := FALSE;
3876: l_res_cursor BOOLEAN := FALSE;
3877: l_demand_cursor BOOLEAN := FALSE;

Line 4766: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

4762: debug_print('Inside Query reservations...');
4763: END IF;
4764:
4765: -- Standard call to check for call compatibility
4766: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
4767: RAISE fnd_api.g_exc_unexpected_error;
4768: END IF;
4769:
4770: --

Line 4767: RAISE fnd_api.g_exc_unexpected_error;

4763: END IF;
4764:
4765: -- Standard call to check for call compatibility
4766: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
4767: RAISE fnd_api.g_exc_unexpected_error;
4768: END IF;
4769:
4770: --
4771: -- Initialize message list.

Line 4772: IF fnd_api.to_boolean(p_init_msg_lst) THEN

4768: END IF;
4769:
4770: --
4771: -- Initialize message list.
4772: IF fnd_api.to_boolean(p_init_msg_lst) THEN
4773: fnd_msg_pub.initialize;
4774: END IF;
4775:
4776: --

Line 4784: IF p_lock_records = fnd_api.g_true THEN

4780: debug_print('p_cancel_order_mode: ' || p_cancel_order_mode);
4781: END IF;
4782:
4783:
4784: IF p_lock_records = fnd_api.g_true THEN
4785: l_lock_stmt := ' FOR UPDATE NOWAIT';
4786: l_update := TRUE;
4787: END IF;
4788:

Line 4843: IF p_query_input.reservation_id <> fnd_api.g_miss_num

4839: debug_print('l_update is false ');
4840: END IF;
4841: END IF;
4842:
4843: IF p_query_input.reservation_id <> fnd_api.g_miss_num
4844: AND p_query_input.reservation_id IS NOT NULL THEN
4845: IF (l_debug = 1) then
4846: debug_print(' Inside ref cursor for reservation id');
4847: END IF;

Line 4950: ELSIF p_query_input.demand_source_line_id <> fnd_api.g_miss_num

4946: :reservation_id = reservation_id '
4947: || l_lock_stmt
4948: || l_sort_stmt USING p_query_input.reservation_id;
4949: END IF;
4950: ELSIF p_query_input.demand_source_line_id <> fnd_api.g_miss_num
4951: AND p_query_input.demand_source_line_id IS NOT NULL THEN
4952: IF (l_debug = 1) then
4953: debug_print(' Inside ref cursor for demand');
4954: END IF;

Line 5606: ELSIF p_query_input.inventory_item_id <> fnd_api.g_miss_num

5602:
5603: /***** End R12 ***/
5604: ;
5605: END IF;
5606: ELSIF p_query_input.inventory_item_id <> fnd_api.g_miss_num
5607: AND p_query_input.inventory_item_id IS NOT NULL
5608: AND p_query_input.organization_id <> fnd_api.g_miss_num
5609: AND p_query_input.organization_id IS NOT NULL THEN
5610: IF (l_debug = 1) then

Line 5608: AND p_query_input.organization_id <> fnd_api.g_miss_num

5604: ;
5605: END IF;
5606: ELSIF p_query_input.inventory_item_id <> fnd_api.g_miss_num
5607: AND p_query_input.inventory_item_id IS NOT NULL
5608: AND p_query_input.organization_id <> fnd_api.g_miss_num
5609: AND p_query_input.organization_id IS NOT NULL THEN
5610: IF (l_debug = 1) then
5611: debug_print (' Inside ref cursor for item/org');
5612: END IF;

Line 6238: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num

6234: /***** End R12 ***/
6235: ;
6236:
6237: -- kkoothan Added the following ELSE IF section as part of Bug Fix:2783806
6238: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num
6239: AND p_query_input.supply_source_header_id IS NOT NULL
6240: -- Bug 4881317 checking these conditions later
6241: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
6242: -- AND p_query_input.supply_source_line_id IS NOT NULL

Line 6241: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num

6237: -- kkoothan Added the following ELSE IF section as part of Bug Fix:2783806
6238: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num
6239: AND p_query_input.supply_source_header_id IS NOT NULL
6240: -- Bug 4881317 checking these conditions later
6241: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
6242: -- AND p_query_input.supply_source_line_id IS NOT NULL
6243: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num
6244: AND p_query_input.supply_source_type_id IS NOT NULL THEN
6245: IF (l_debug = 1) then

Line 6243: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num

6239: AND p_query_input.supply_source_header_id IS NOT NULL
6240: -- Bug 4881317 checking these conditions later
6241: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
6242: -- AND p_query_input.supply_source_line_id IS NOT NULL
6243: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num
6244: AND p_query_input.supply_source_type_id IS NOT NULL THEN
6245: IF (l_debug = 1) then
6246: debug_print(' Inside ref cursor for supply');
6247: END IF;

Line 6644: If ( p_query_input.supply_source_line_id < fnd_api.g_miss_num

6640: ';
6641: /***** End R12 ***/
6642:
6643: --Bug 4881317 If supply_source_line_id is passed, append the condition to the query
6644: If ( p_query_input.supply_source_line_id < fnd_api.g_miss_num
6645: AND p_query_input.supply_source_line_id IS NOT NULL )
6646: THEN
6647: OPEN l_cursor_ref FOR l_qry_stmt
6648: || 'AND supply_source_line_id = :supply_source_line_id

Line 7799: WHEN fnd_api.g_exc_error THEN

7795: x_return_status := l_return_status;
7796: x_error_code := inv_reservation_global.g_err_no_error;
7797: --
7798: EXCEPTION
7799: WHEN fnd_api.g_exc_error THEN
7800: x_return_status := fnd_api.g_ret_sts_error;
7801: -- Get message count and data
7802: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7803: WHEN fnd_api.g_exc_unexpected_error THEN

Line 7800: x_return_status := fnd_api.g_ret_sts_error;

7796: x_error_code := inv_reservation_global.g_err_no_error;
7797: --
7798: EXCEPTION
7799: WHEN fnd_api.g_exc_error THEN
7800: x_return_status := fnd_api.g_ret_sts_error;
7801: -- Get message count and data
7802: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7803: WHEN fnd_api.g_exc_unexpected_error THEN
7804: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 7803: WHEN fnd_api.g_exc_unexpected_error THEN

7799: WHEN fnd_api.g_exc_error THEN
7800: x_return_status := fnd_api.g_ret_sts_error;
7801: -- Get message count and data
7802: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7803: WHEN fnd_api.g_exc_unexpected_error THEN
7804: x_return_status := fnd_api.g_ret_sts_unexp_error;
7805: -- Get message count and data
7806: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7807: WHEN OTHERS THEN

Line 7804: x_return_status := fnd_api.g_ret_sts_unexp_error;

7800: x_return_status := fnd_api.g_ret_sts_error;
7801: -- Get message count and data
7802: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7803: WHEN fnd_api.g_exc_unexpected_error THEN
7804: x_return_status := fnd_api.g_ret_sts_unexp_error;
7805: -- Get message count and data
7806: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7807: WHEN OTHERS THEN
7808: IF SQLCODE = -54 THEN -- failed to lock

Line 7809: x_return_status := fnd_api.g_ret_sts_error;

7805: -- Get message count and data
7806: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7807: WHEN OTHERS THEN
7808: IF SQLCODE = -54 THEN -- failed to lock
7809: x_return_status := fnd_api.g_ret_sts_error;
7810: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7811: ELSE
7812: x_return_status := fnd_api.g_ret_sts_unexp_error;
7813:

Line 7812: x_return_status := fnd_api.g_ret_sts_unexp_error;

7808: IF SQLCODE = -54 THEN -- failed to lock
7809: x_return_status := fnd_api.g_ret_sts_error;
7810: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7811: ELSE
7812: x_return_status := fnd_api.g_ret_sts_unexp_error;
7813:
7814: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7815: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
7816: END IF;

Line 7830: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

7826:
7827: PROCEDURE query_reservation
7828: (
7829: p_api_version_number IN NUMBER
7830: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
7831: , x_return_status OUT NOCOPY VARCHAR2
7832: , x_msg_count OUT NOCOPY NUMBER
7833: , x_msg_data OUT NOCOPY VARCHAR2
7834: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 7835: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

7831: , x_return_status OUT NOCOPY VARCHAR2
7832: , x_msg_count OUT NOCOPY NUMBER
7833: , x_msg_data OUT NOCOPY VARCHAR2
7834: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
7835: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
7836: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
7837: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
7838: , p_serial_number_table IN inv_reservation_global.rsv_serial_number_table
7839: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type

Line 7852: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

7848: l_serial_table_index BINARY_INTEGER;
7849: l_output_index BINARY_INTEGER;
7850: l_reservation_index BINARY_INTEGER;
7851: l_reservation_id NUMBER;
7852: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
7853: l_debug NUMBER;
7854: l_serial_number varchar2(30);
7855: l_mtl_reservation_tbl
7856: inv_reservation_global.mtl_reservation_tbl_type;

Line 7884: p_init_msg_lst => fnd_api.g_false,

7880: -- First call the query reservations to get all the reservation
7881: -- records.
7882: inv_reservation_pvt.query_reservation
7883: (p_api_version_number => 1.0,
7884: p_init_msg_lst => fnd_api.g_false,
7885: x_return_status => l_return_status,
7886: x_msg_count => x_msg_count,
7887: x_msg_data => x_msg_data,
7888: p_query_input => l_rsv_rec,

Line 7889: p_lock_records => fnd_api.g_true,

7885: x_return_status => l_return_status,
7886: x_msg_count => x_msg_count,
7887: x_msg_data => x_msg_data,
7888: p_query_input => l_rsv_rec,
7889: p_lock_records => fnd_api.g_true,
7890: p_sort_by_req_date => p_sort_by_req_date,
7891: x_mtl_reservation_tbl => l_mtl_reservation_tbl,
7892: x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count,
7893: x_error_code => l_error_code

Line 7902: IF l_return_status = fnd_api.g_ret_sts_error THEN

7898: END IF;
7899:
7900: l_progress := 80;
7901:
7902: IF l_return_status = fnd_api.g_ret_sts_error THEN
7903:
7904: IF l_debug=1 THEN
7905: debug_print('Raising expected error'||l_return_status);
7906: END IF;

Line 7907: RAISE fnd_api.g_exc_error;

7903:
7904: IF l_debug=1 THEN
7905: debug_print('Raising expected error'||l_return_status);
7906: END IF;
7907: RAISE fnd_api.g_exc_error;
7908:
7909: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7910:
7911: IF l_debug=1 THEN

Line 7909: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7905: debug_print('Raising expected error'||l_return_status);
7906: END IF;
7907: RAISE fnd_api.g_exc_error;
7908:
7909: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7910:
7911: IF l_debug=1 THEN
7912: debug_print('Rasing Unexpected error'||l_return_status);
7913: END IF;

Line 7914: RAISE fnd_api.g_exc_unexpected_error;

7910:
7911: IF l_debug=1 THEN
7912: debug_print('Rasing Unexpected error'||l_return_status);
7913: END IF;
7914: RAISE fnd_api.g_exc_unexpected_error;
7915:
7916: END IF;
7917:
7918: IF (l_debug=1) THEN

Line 8017: WHEN fnd_api.g_exc_error THEN

8013: x_serial_number_table := l_serial_number_table;
8014: x_serial_number_table_count := l_serial_number_table.COUNT;
8015:
8016: EXCEPTION
8017: WHEN fnd_api.g_exc_error THEN
8018: x_return_status := fnd_api.g_ret_sts_error;
8019: -- Get message count and data
8020: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8021: WHEN fnd_api.g_exc_unexpected_error THEN

Line 8018: x_return_status := fnd_api.g_ret_sts_error;

8014: x_serial_number_table_count := l_serial_number_table.COUNT;
8015:
8016: EXCEPTION
8017: WHEN fnd_api.g_exc_error THEN
8018: x_return_status := fnd_api.g_ret_sts_error;
8019: -- Get message count and data
8020: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8021: WHEN fnd_api.g_exc_unexpected_error THEN
8022: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 8021: WHEN fnd_api.g_exc_unexpected_error THEN

8017: WHEN fnd_api.g_exc_error THEN
8018: x_return_status := fnd_api.g_ret_sts_error;
8019: -- Get message count and data
8020: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8021: WHEN fnd_api.g_exc_unexpected_error THEN
8022: x_return_status := fnd_api.g_ret_sts_unexp_error;
8023: -- Get message count and data
8024: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8025: WHEN OTHERS THEN

Line 8022: x_return_status := fnd_api.g_ret_sts_unexp_error;

8018: x_return_status := fnd_api.g_ret_sts_error;
8019: -- Get message count and data
8020: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8021: WHEN fnd_api.g_exc_unexpected_error THEN
8022: x_return_status := fnd_api.g_ret_sts_unexp_error;
8023: -- Get message count and data
8024: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8025: WHEN OTHERS THEN
8026: IF SQLCODE = -54 THEN -- failed to lock

Line 8027: x_return_status := fnd_api.g_ret_sts_error;

8023: -- Get message count and data
8024: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8025: WHEN OTHERS THEN
8026: IF SQLCODE = -54 THEN -- failed to lock
8027: x_return_status := fnd_api.g_ret_sts_error;
8028: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
8029: ELSE
8030: x_return_status := fnd_api.g_ret_sts_unexp_error;
8031:

Line 8030: x_return_status := fnd_api.g_ret_sts_unexp_error;

8026: IF SQLCODE = -54 THEN -- failed to lock
8027: x_return_status := fnd_api.g_ret_sts_error;
8028: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
8029: ELSE
8030: x_return_status := fnd_api.g_ret_sts_unexp_error;
8031:
8032: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
8033: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
8034: END IF;

Line 8046: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

8042: --
8043: PROCEDURE create_reservation
8044: (
8045: p_api_version_number IN NUMBER
8046: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
8047: , x_return_status OUT NOCOPY VARCHAR2
8048: , x_msg_count OUT NOCOPY NUMBER
8049: , x_msg_data OUT NOCOPY VARCHAR2
8050: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 8053: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

8049: , x_msg_data OUT NOCOPY VARCHAR2
8050: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
8051: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
8052: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
8053: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8054: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8055: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
8056: , p_over_reservation_flag IN NUMBER DEFAULT 0
8057: , x_quantity_reserved OUT NOCOPY NUMBER

Line 8054: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

8050: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
8051: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
8052: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
8053: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8054: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8055: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
8056: , p_over_reservation_flag IN NUMBER DEFAULT 0
8057: , x_quantity_reserved OUT NOCOPY NUMBER
8058: , x_secondary_quantity_reserved OUT NOCOPY NUMBER

Line 8055: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

8051: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
8052: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
8053: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8054: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
8055: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
8056: , p_over_reservation_flag IN NUMBER DEFAULT 0
8057: , x_quantity_reserved OUT NOCOPY NUMBER
8058: , x_secondary_quantity_reserved OUT NOCOPY NUMBER
8059: -- INVCONV

Line 8068: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

8064: , p_substitute_flag IN BOOLEAN DEFAULT FALSE /* Bug 6044651 */
8065: ) IS
8066: l_api_version_number CONSTANT NUMBER := 1.0;
8067: l_api_name CONSTANT VARCHAR2(30) := 'Create_Reservation';
8068: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
8069: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
8070: l_actual_primary_quantity NUMBER := NULL;
8071: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
8072: l_tmp_rsv_tbl_count NUMBER;

Line 8168: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

8164: END IF;
8165:
8166: --
8167: -- Standard call to check for call compatibility
8168: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
8169: RAISE fnd_api.g_exc_unexpected_error;
8170: END IF;
8171:
8172: --

Line 8169: RAISE fnd_api.g_exc_unexpected_error;

8165:
8166: --
8167: -- Standard call to check for call compatibility
8168: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
8169: RAISE fnd_api.g_exc_unexpected_error;
8170: END IF;
8171:
8172: --
8173: -- Initialize message list.

Line 8174: IF fnd_api.to_boolean(p_init_msg_lst) THEN

8170: END IF;
8171:
8172: --
8173: -- Initialize message list.
8174: IF fnd_api.to_boolean(p_init_msg_lst) THEN
8175: fnd_msg_pub.initialize;
8176: END IF;
8177:
8178: /**** {{ R12 Enhanced reservations code changes.Initializing orig parameters }}****/

Line 8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

8182: l_rsv_rec := p_rsv_rec;
8183:
8184: -- Set the original columns to g_miss_xxx as the user should not be
8185: -- setting these values. Do not query by them
8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

8183:
8184: -- Set the original columns to g_miss_xxx as the user should not be
8185: -- setting these values. Do not query by them
8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

8184: -- Set the original columns to g_miss_xxx as the user should not be
8185: -- setting these values. Do not query by them
8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

8185: -- setting these values. Do not query by them
8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

8186: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
8194:

Line 8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

8187: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
8194:
8195:

Line 8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

8188: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
8194:
8195:
8196: IF (l_rsv_rec.project_id IS NULL) THEN

Line 8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

8189: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
8190: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
8191: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
8192: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
8194:
8195:
8196: IF (l_rsv_rec.project_id IS NULL) THEN
8197: l_rsv_rec.project_id := fnd_api.g_miss_num;

Line 8197: l_rsv_rec.project_id := fnd_api.g_miss_num;

8193: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
8194:
8195:
8196: IF (l_rsv_rec.project_id IS NULL) THEN
8197: l_rsv_rec.project_id := fnd_api.g_miss_num;
8198: END IF;
8199: IF (l_rsv_rec.task_id IS NULL) THEN
8200: l_rsv_rec.task_id := fnd_api.g_miss_num;
8201: END IF;

Line 8200: l_rsv_rec.task_id := fnd_api.g_miss_num;

8196: IF (l_rsv_rec.project_id IS NULL) THEN
8197: l_rsv_rec.project_id := fnd_api.g_miss_num;
8198: END IF;
8199: IF (l_rsv_rec.task_id IS NULL) THEN
8200: l_rsv_rec.task_id := fnd_api.g_miss_num;
8201: END IF;
8202:
8203: l_progress :=50;
8204:

Line 8214: IF l_return_status = fnd_api.g_ret_sts_error THEN

8210: IF l_debug=1 THEN
8211: debug_print('Return Status from convert quantity'||l_return_status);
8212: END IF;
8213:
8214: IF l_return_status = fnd_api.g_ret_sts_error THEN
8215:
8216: IF l_debug=1 THEN
8217: debug_print('Raising expected error'||l_return_status);
8218: END IF;

Line 8219: RAISE fnd_api.g_exc_error;

8215:
8216: IF l_debug=1 THEN
8217: debug_print('Raising expected error'||l_return_status);
8218: END IF;
8219: RAISE fnd_api.g_exc_error;
8220:
8221: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8222:
8223: IF l_debug=1 THEN

Line 8221: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8217: debug_print('Raising expected error'||l_return_status);
8218: END IF;
8219: RAISE fnd_api.g_exc_error;
8220:
8221: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8222:
8223: IF l_debug=1 THEN
8224: debug_print('Rasing Unexpected error'||l_return_status);
8225: END IF;

Line 8226: RAISE fnd_api.g_exc_unexpected_error;

8222:
8223: IF l_debug=1 THEN
8224: debug_print('Rasing Unexpected error'||l_return_status);
8225: END IF;
8226: RAISE fnd_api.g_exc_unexpected_error;
8227:
8228: END IF;
8229:
8230: l_progress :=60;

Line 8240: p_init_msg_lst => fnd_api.g_false,

8236: l_progress := 70;
8237:
8238: inv_reservation_pvt.query_reservation
8239: (p_api_version_number => 1.0,
8240: p_init_msg_lst => fnd_api.g_false,
8241: x_return_status => l_return_status,
8242: x_msg_count => x_msg_count,
8243: x_msg_data => x_msg_data,
8244: p_query_input => l_rsv_rec,

Line 8245: p_lock_records => fnd_api.g_true,

8241: x_return_status => l_return_status,
8242: x_msg_count => x_msg_count,
8243: x_msg_data => x_msg_data,
8244: p_query_input => l_rsv_rec,
8245: p_lock_records => fnd_api.g_true,
8246: x_mtl_reservation_tbl => l_mtl_reservation_tbl,
8247: x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count,
8248: x_error_code => l_error_code
8249: );

Line 8258: IF l_return_status = fnd_api.g_ret_sts_error THEN

8254: END IF;
8255:
8256: l_progress := 80;
8257:
8258: IF l_return_status = fnd_api.g_ret_sts_error THEN
8259:
8260: IF l_debug=1 THEN
8261: debug_print('Raising expected error'||l_return_status);
8262: END IF;

Line 8263: RAISE fnd_api.g_exc_error;

8259:
8260: IF l_debug=1 THEN
8261: debug_print('Raising expected error'||l_return_status);
8262: END IF;
8263: RAISE fnd_api.g_exc_error;
8264:
8265: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8266:
8267: IF l_debug=1 THEN

Line 8265: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8261: debug_print('Raising expected error'||l_return_status);
8262: END IF;
8263: RAISE fnd_api.g_exc_error;
8264:
8265: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8266:
8267: IF l_debug=1 THEN
8268: debug_print('Rasing Unexpected error'||l_return_status);
8269: END IF;

Line 8270: RAISE fnd_api.g_exc_unexpected_error;

8266:
8267: IF l_debug=1 THEN
8268: debug_print('Rasing Unexpected error'||l_return_status);
8269: END IF;
8270: RAISE fnd_api.g_exc_unexpected_error;
8271:
8272: END IF;
8273:
8274: IF (l_debug=1) THEN

Line 8303: RAISE fnd_api.g_exc_error;

8299: debug_print('Serial numbers are passed with partial flag exists. error out');
8300: END IF;
8301: fnd_message.set_name('INV', 'INV_SER_PARTIAL_RSV_EXISTS');
8302: fnd_msg_pub.add;
8303: RAISE fnd_api.g_exc_error;
8304: END IF;
8305:
8306: IF l_debug=1 THEN
8307: inv_reservation_pvt.print_rsv_rec (p_rsv_rec);

Line 8320: OR (nvl(l_mtl_reservation_tbl(i).lot_number,'@@@')<>nvl(p_rsv_rec.lot_number,'@@@') AND p_rsv_rec.lot_number<>fnd_api.g_miss_char)

8316: -- revision controlled or has an LPN Id stamped or has a different SubInventory
8317: l_progress := 100;
8318:
8319: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
8320: OR (nvl(l_mtl_reservation_tbl(i).lot_number,'@@@')<>nvl(p_rsv_rec.lot_number,'@@@') AND p_rsv_rec.lot_number<>fnd_api.g_miss_char)
8321: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
8322: OR (nvl(l_mtl_reservation_tbl(i).lpn_id,-1)<>nvl(p_rsv_rec.lpn_id,-1)AND p_rsv_rec.lpn_id <> fnd_api.g_miss_num)
8323: OR (nvl(l_mtl_reservation_tbl(i).subinventory_code,'@@@')<>nvl(p_rsv_rec.subinventory_code,'@@@')AND p_rsv_rec.subinventory_code <>fnd_api.g_miss_char)) THEN
8324:

Line 8321: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)

8317: l_progress := 100;
8318:
8319: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
8320: OR (nvl(l_mtl_reservation_tbl(i).lot_number,'@@@')<>nvl(p_rsv_rec.lot_number,'@@@') AND p_rsv_rec.lot_number<>fnd_api.g_miss_char)
8321: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
8322: OR (nvl(l_mtl_reservation_tbl(i).lpn_id,-1)<>nvl(p_rsv_rec.lpn_id,-1)AND p_rsv_rec.lpn_id <> fnd_api.g_miss_num)
8323: OR (nvl(l_mtl_reservation_tbl(i).subinventory_code,'@@@')<>nvl(p_rsv_rec.subinventory_code,'@@@')AND p_rsv_rec.subinventory_code <>fnd_api.g_miss_char)) THEN
8324:
8325: IF (l_debug=1) THEN

Line 8322: OR (nvl(l_mtl_reservation_tbl(i).lpn_id,-1)<>nvl(p_rsv_rec.lpn_id,-1)AND p_rsv_rec.lpn_id <> fnd_api.g_miss_num)

8318:
8319: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
8320: OR (nvl(l_mtl_reservation_tbl(i).lot_number,'@@@')<>nvl(p_rsv_rec.lot_number,'@@@') AND p_rsv_rec.lot_number<>fnd_api.g_miss_char)
8321: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
8322: OR (nvl(l_mtl_reservation_tbl(i).lpn_id,-1)<>nvl(p_rsv_rec.lpn_id,-1)AND p_rsv_rec.lpn_id <> fnd_api.g_miss_num)
8323: OR (nvl(l_mtl_reservation_tbl(i).subinventory_code,'@@@')<>nvl(p_rsv_rec.subinventory_code,'@@@')AND p_rsv_rec.subinventory_code <>fnd_api.g_miss_char)) THEN
8324:
8325: IF (l_debug=1) THEN
8326: debug_print('Skipping reservation record');

Line 8323: OR (nvl(l_mtl_reservation_tbl(i).subinventory_code,'@@@')<>nvl(p_rsv_rec.subinventory_code,'@@@')AND p_rsv_rec.subinventory_code <>fnd_api.g_miss_char)) THEN

8319: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
8320: OR (nvl(l_mtl_reservation_tbl(i).lot_number,'@@@')<>nvl(p_rsv_rec.lot_number,'@@@') AND p_rsv_rec.lot_number<>fnd_api.g_miss_char)
8321: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
8322: OR (nvl(l_mtl_reservation_tbl(i).lpn_id,-1)<>nvl(p_rsv_rec.lpn_id,-1)AND p_rsv_rec.lpn_id <> fnd_api.g_miss_num)
8323: OR (nvl(l_mtl_reservation_tbl(i).subinventory_code,'@@@')<>nvl(p_rsv_rec.subinventory_code,'@@@')AND p_rsv_rec.subinventory_code <>fnd_api.g_miss_char)) THEN
8324:
8325: IF (l_debug=1) THEN
8326: debug_print('Skipping reservation record');
8327: END IF;

Line 8384: p_init_msg_lst => fnd_api.g_false,

8380: END IF;
8381:
8382: inv_reservation_pvt.update_reservation
8383: (p_api_version_number => 1.0,
8384: p_init_msg_lst => fnd_api.g_false,
8385: x_return_status => l_return_status,
8386: x_msg_count => x_msg_count,
8387: x_msg_data => x_msg_data,
8388: x_quantity_reserved => l_quantity_reserved,

Line 8396: p_check_availability => fnd_api.g_true,

8392: p_original_serial_number => p_serial_number,
8393: p_to_serial_number => l_dummy_serial_array,
8394: p_validation_flag => p_validation_flag, -- BUG 4705409
8395: p_partial_reservation_flag => p_partial_reservation_flag,
8396: p_check_availability => fnd_api.g_true,
8397: p_over_reservation_flag => p_over_reservation_flag
8398: );
8399:
8400: l_progress := 150;

Line 8406: IF l_return_status = fnd_api.g_ret_sts_error THEN

8402: IF (l_debug=1) THEN
8403: debug_print ('Return Status after updating reservations '||l_return_status);
8404: END IF;
8405:
8406: IF l_return_status = fnd_api.g_ret_sts_error THEN
8407:
8408: IF l_debug=1 THEN
8409: debug_print('Raising expected error'||l_return_status);
8410: END IF;

Line 8412: RAISE fnd_api.g_exc_error;

8408: IF l_debug=1 THEN
8409: debug_print('Raising expected error'||l_return_status);
8410: END IF;
8411:
8412: RAISE fnd_api.g_exc_error;
8413:
8414: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8415:
8416: IF l_debug=1 THEN

Line 8414: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8410: END IF;
8411:
8412: RAISE fnd_api.g_exc_error;
8413:
8414: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8415:
8416: IF l_debug=1 THEN
8417: debug_print('Raising Unexpected error'||l_return_status);
8418: END IF;

Line 8420: RAISE fnd_api.g_exc_unexpected_error;

8416: IF l_debug=1 THEN
8417: debug_print('Raising Unexpected error'||l_return_status);
8418: END IF;
8419:
8420: RAISE fnd_api.g_exc_unexpected_error;
8421: END IF;
8422:
8423: l_progress := 160;
8424:

Line 8489: RAISE fnd_api.g_exc_error;

8485:
8486: IF l_lock_status = 0 THEN
8487: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
8488: fnd_msg_pub.ADD;
8489: RAISE fnd_api.g_exc_error;
8490: END if;
8491:
8492: inv_reservation_lock_pvt.lock_supply_demand_record
8493: (p_organization_id => l_rsv_rec.organization_id

Line 8505: RAISE fnd_api.g_exc_error;

8501:
8502: IF l_lock_status = 0 THEN
8503: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
8504: fnd_msg_pub.ADD;
8505: RAISE fnd_api.g_exc_error;
8506: END if;
8507:
8508: l_lock_obtained := TRUE;
8509:

Line 8531: RAISE fnd_api.g_exc_error;

8527: IF ((NVL(l_rsv_rec.reservation_quantity,0) < 0) OR
8528: (NVL(l_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
8529: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
8530: fnd_msg_pub.ADD;
8531: RAISE fnd_api.g_exc_error;
8532: END IF;
8533:
8534: /*---------------- Added by nimisra for bug6268983 ----------------
8535: This check is done in Order to Ensure that No custom code can Populate Demand_source_name for

Line 8542: RAISE fnd_api.g_exc_error;

8538: IF (p_rsv_rec.demand_source_type_id=2 or p_rsv_rec.demand_source_type_id=8)
8539: and (p_rsv_rec.demand_source_name is NOT NULL) THEN
8540: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
8541: fnd_msg_pub.ADD; debug_print('For Sales Orders and Internal Orders DEMAND_SOURCE_NAME Should Be Null');
8542: RAISE fnd_api.g_exc_error;
8543: END IF;
8544:
8545: /* ------------------Added by nimisra for bug6268983--------------- */
8546:

Line 8549: OR l_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN

8545: /* ------------------Added by nimisra for bug6268983--------------- */
8546:
8547: -- handle specially for detailed_quantity
8548: IF l_rsv_rec.detailed_quantity IS NULL
8549: OR l_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN
8550: l_rsv_rec.detailed_quantity := 0;
8551: END IF;
8552:
8553: -- INVCONV - KYH Check this

Line 8554: IF l_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN

8550: l_rsv_rec.detailed_quantity := 0;
8551: END IF;
8552:
8553: -- INVCONV - KYH Check this
8554: IF l_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN
8555: l_rsv_rec.secondary_detailed_quantity := NULL;
8556: END IF;
8557:
8558:

Line 8569: RAISE fnd_api.g_exc_error;

8565: -- must be some value or null.
8566: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
8567: fnd_message.set_token('FIELD_NAME', l_what_field);
8568: fnd_msg_pub.ADD;
8569: RAISE fnd_api.g_exc_error;
8570: END IF;
8571:
8572:
8573: IF (l_debug = 1) THEN

Line 8600: IF l_return_status = fnd_api.g_ret_sts_error THEN

8596: -- END IF;
8597:
8598: -- BUG 2737887. Inclding error handling for the above call to
8599: -- convert quantity.
8600: IF l_return_status = fnd_api.g_ret_sts_error THEN
8601: RAISE fnd_api.g_exc_error;
8602: END IF;
8603:
8604: --

Line 8601: RAISE fnd_api.g_exc_error;

8597:
8598: -- BUG 2737887. Inclding error handling for the above call to
8599: -- convert quantity.
8600: IF l_return_status = fnd_api.g_ret_sts_error THEN
8601: RAISE fnd_api.g_exc_error;
8602: END IF;
8603:
8604: --
8605: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8605: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8601: RAISE fnd_api.g_exc_error;
8602: END IF;
8603:
8604: --
8605: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8606: RAISE fnd_api.g_exc_unexpected_error;
8607: END IF;
8608:
8609: End comment *******/

Line 8606: RAISE fnd_api.g_exc_unexpected_error;

8602: END IF;
8603:
8604: --
8605: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8606: RAISE fnd_api.g_exc_unexpected_error;
8607: END IF;
8608:
8609: End comment *******/
8610: /*** End R12 ***/

Line 8632: , p_init_msg_lst => fnd_api.g_false

8628: -- user should use update instead.
8629: query_reservation
8630: (
8631: p_api_version_number => 1.0
8632: , p_init_msg_lst => fnd_api.g_false
8633: , x_return_status => l_return_status
8634: , x_msg_count => x_msg_count
8635: , x_msg_data => x_msg_data
8636: , p_query_input => l_rsv_rec

Line 8637: , p_lock_records => fnd_api.g_true

8633: , x_return_status => l_return_status
8634: , x_msg_count => x_msg_count
8635: , x_msg_data => x_msg_data
8636: , p_query_input => l_rsv_rec
8637: , p_lock_records => fnd_api.g_true
8638: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
8639: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
8640: , x_error_code => l_error_code
8641: );

Line 8647: IF l_return_status = fnd_api.g_ret_sts_error THEN

8643: IF (l_debug = 1) THEN
8644: debug_print('After query_reservations ' || l_return_status);
8645: END IF;
8646: --
8647: IF l_return_status = fnd_api.g_ret_sts_error THEN
8648: RAISE fnd_api.g_exc_error;
8649: END IF;
8650:
8651: --

Line 8648: RAISE fnd_api.g_exc_error;

8644: debug_print('After query_reservations ' || l_return_status);
8645: END IF;
8646: --
8647: IF l_return_status = fnd_api.g_ret_sts_error THEN
8648: RAISE fnd_api.g_exc_error;
8649: END IF;
8650:
8651: --
8652: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8652: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8648: RAISE fnd_api.g_exc_error;
8649: END IF;
8650:
8651: --
8652: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8653: RAISE fnd_api.g_exc_unexpected_error;
8654: END IF;
8655:
8656: --

Line 8653: RAISE fnd_api.g_exc_unexpected_error;

8649: END IF;
8650:
8651: --
8652: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8653: RAISE fnd_api.g_exc_unexpected_error;
8654: END IF;
8655:
8656: --
8657: IF l_tmp_rsv_tbl_count > 0 THEN

Line 8660: RAISE fnd_api.g_exc_error;

8656: --
8657: IF l_tmp_rsv_tbl_count > 0 THEN
8658: fnd_message.set_name('INV', 'INV-RESERVATION-EXIST');
8659: fnd_msg_pub.ADD;
8660: RAISE fnd_api.g_exc_error;
8661: END IF;
8662:
8663: *** End comment *******/
8664: -- Get the project and task for demands in OE, INT-ORD and RMA

Line 8678: RAISE fnd_api.g_exc_unexpected_error;

8674: THEN
8675: IF (l_debug = 1) THEN
8676: debug_print('Error caching the org record');
8677: END IF;
8678: RAISE fnd_api.g_exc_unexpected_error;
8679: END IF;
8680: -- Set the PJM enabled flag.
8681: l_pjm_enabled := INV_CACHE.org_rec.project_reference_enabled;
8682: ELSE

Line 8703: (l_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)

8699: inv_reservation_global.g_source_type_rma)) AND
8700: (l_pjm_enabled = 1) THEN
8701:
8702: IF (l_rsv_rec.demand_source_line_id IS NOT NULL) AND
8703: (l_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
8704: AND ((l_rsv_rec.project_id IS NULL) OR
8705: (l_rsv_rec.task_id IS NULL)) THEN
8706: BEGIN
8707: SELECT project_id, task_id INTO l_project_id, l_task_id

Line 8756: AND (l_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)

8752: l_wip_job_type := null; -- AHL
8753: END IF;
8754:
8755: IF (l_wip_job_type = 'CMRO' AND l_rsv_rec.demand_source_line_detail IS NOT NULL)
8756: AND (l_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)
8757: AND ((l_rsv_rec.project_id IS NULL) OR (l_rsv_rec.task_id IS NULL)) THEN
8758: BEGIN
8759: SELECT wdj.project_id, WDJ.TASK_ID
8760: INTO l_project_id, l_task_id

Line 8810: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN

8806: /*** End R12 ***/
8807:
8808: -- call validation api if the validate_flag is set to true
8809: -- Bug 2354735: Proceed with Validation if p_validation_flag = 'T' or 'V'
8810: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN
8811: inv_reservation_validate_pvt.validate_input_parameters
8812: (
8813: x_return_status => l_return_status
8814: , p_orig_rsv_rec => l_rsv_rec

Line 8836: IF l_return_status = fnd_api.g_ret_sts_error THEN

8832: IF (l_debug = 1) THEN
8833: debug_print('After validate_input_parameters ' || l_return_status);
8834: END IF;
8835: --
8836: IF l_return_status = fnd_api.g_ret_sts_error THEN
8837: RAISE fnd_api.g_exc_error;
8838: END IF;
8839:
8840: --

Line 8837: RAISE fnd_api.g_exc_error;

8833: debug_print('After validate_input_parameters ' || l_return_status);
8834: END IF;
8835: --
8836: IF l_return_status = fnd_api.g_ret_sts_error THEN
8837: RAISE fnd_api.g_exc_error;
8838: END IF;
8839:
8840: --
8841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8837: RAISE fnd_api.g_exc_error;
8838: END IF;
8839:
8840: --
8841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8842: RAISE fnd_api.g_exc_unexpected_error;
8843: END IF;
8844:
8845: -- INVCONV BEGIN

Line 8842: RAISE fnd_api.g_exc_unexpected_error;

8838: END IF;
8839:
8840: --
8841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8842: RAISE fnd_api.g_exc_unexpected_error;
8843: END IF;
8844:
8845: -- INVCONV BEGIN
8846: IF NOT is_lot_divisible(l_orig_item_cache_index) THEN

Line 8862: IF l_return_status = fnd_api.g_ret_sts_error THEN

8858: IF (l_debug = 1) THEN
8859: debug_print('After CTO validation ' || l_return_status);
8860: END IF;
8861: --
8862: IF l_return_status = fnd_api.g_ret_sts_error THEN
8863: RAISE fnd_api.g_exc_error;
8864: END IF;
8865:
8866: --

Line 8863: RAISE fnd_api.g_exc_error;

8859: debug_print('After CTO validation ' || l_return_status);
8860: END IF;
8861: --
8862: IF l_return_status = fnd_api.g_ret_sts_error THEN
8863: RAISE fnd_api.g_exc_error;
8864: END IF;
8865:
8866: --
8867: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8867: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8863: RAISE fnd_api.g_exc_error;
8864: END IF;
8865:
8866: --
8867: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8868: RAISE fnd_api.g_exc_unexpected_error;
8869: END IF;
8870: --
8871: END IF;

Line 8868: RAISE fnd_api.g_exc_unexpected_error;

8864: END IF;
8865:
8866: --
8867: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8868: RAISE fnd_api.g_exc_unexpected_error;
8869: END IF;
8870: --
8871: END IF;
8872:

Line 8874: IF l_return_status = fnd_api.g_ret_sts_error THEN

8870: --
8871: END IF;
8872:
8873:
8874: IF l_return_status = fnd_api.g_ret_sts_error THEN
8875: RAISE fnd_api.g_exc_error;
8876: END IF;
8877:
8878: --

Line 8875: RAISE fnd_api.g_exc_error;

8871: END IF;
8872:
8873:
8874: IF l_return_status = fnd_api.g_ret_sts_error THEN
8875: RAISE fnd_api.g_exc_error;
8876: END IF;
8877:
8878: --
8879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8875: RAISE fnd_api.g_exc_error;
8876: END IF;
8877:
8878: --
8879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8880: RAISE fnd_api.g_exc_unexpected_error;
8881: END IF;
8882:
8883: -- Expired lots custom hook

Line 8880: RAISE fnd_api.g_exc_unexpected_error;

8876: END IF;
8877:
8878: --
8879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8880: RAISE fnd_api.g_exc_unexpected_error;
8881: END IF;
8882:
8883: -- Expired lots custom hook
8884: IF inv_pick_release_pub.g_pick_expired_lots THEN

Line 8893: IF p_force_reservation_flag <> fnd_api.g_true

8889:
8890: -- call modify tree procedure to change the tree if supply is inv
8891: -- will call quantity validation for other supply sources in the future
8892: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
8893: IF p_force_reservation_flag <> fnd_api.g_true
8894: AND p_validation_flag = fnd_api.g_true
8895: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8896: inv_quantity_tree_pvt.create_tree
8897: (

Line 8894: AND p_validation_flag = fnd_api.g_true

8890: -- call modify tree procedure to change the tree if supply is inv
8891: -- will call quantity validation for other supply sources in the future
8892: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
8893: IF p_force_reservation_flag <> fnd_api.g_true
8894: AND p_validation_flag = fnd_api.g_true
8895: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8896: inv_quantity_tree_pvt.create_tree
8897: (
8898: p_api_version_number => 1.0

Line 8899: , p_init_msg_lst => fnd_api.g_true

8895: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8896: inv_quantity_tree_pvt.create_tree
8897: (
8898: p_api_version_number => 1.0
8899: , p_init_msg_lst => fnd_api.g_true
8900: , x_return_status => l_return_status
8901: , x_msg_count => x_msg_count
8902: , x_msg_data => x_msg_data
8903: , p_organization_id => l_rsv_rec.organization_id

Line 8924: IF l_return_status = fnd_api.g_ret_sts_error THEN

8920: IF (l_debug = 1) THEN
8921: debug_print('After create tree ' || l_return_status);
8922: END IF;
8923:
8924: IF l_return_status = fnd_api.g_ret_sts_error THEN
8925: RAISE fnd_api.g_exc_error;
8926: END IF;
8927:
8928: --

Line 8925: RAISE fnd_api.g_exc_error;

8921: debug_print('After create tree ' || l_return_status);
8922: END IF;
8923:
8924: IF l_return_status = fnd_api.g_ret_sts_error THEN
8925: RAISE fnd_api.g_exc_error;
8926: END IF;
8927:
8928: --
8929: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8929: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8925: RAISE fnd_api.g_exc_error;
8926: END IF;
8927:
8928: --
8929: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8930: RAISE fnd_api.g_exc_unexpected_error;
8931: END IF;
8932:
8933: IF (l_debug = 1) THEN

Line 8930: RAISE fnd_api.g_exc_unexpected_error;

8926: END IF;
8927:
8928: --
8929: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8930: RAISE fnd_api.g_exc_unexpected_error;
8931: END IF;
8932:
8933: IF (l_debug = 1) THEN
8934: debug_print('calling modify_tree_crt_del_rel');

Line 8972: IF l_return_status = fnd_api.g_ret_sts_error THEN

8968: debug_print('l_secondary_qty_changed: ' || l_secondary_qty_changed); -- INVCONV
8969: END IF;
8970:
8971: --
8972: IF l_return_status = fnd_api.g_ret_sts_error THEN
8973: RAISE fnd_api.g_exc_error;
8974: END IF;
8975:
8976: --

Line 8973: RAISE fnd_api.g_exc_error;

8969: END IF;
8970:
8971: --
8972: IF l_return_status = fnd_api.g_ret_sts_error THEN
8973: RAISE fnd_api.g_exc_error;
8974: END IF;
8975:
8976: --
8977: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8977: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8973: RAISE fnd_api.g_exc_error;
8974: END IF;
8975:
8976: --
8977: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8978: RAISE fnd_api.g_exc_unexpected_error;
8979: END IF;
8980:
8981: /**** {{ R12 Enhanced reservations code changes }}****/

Line 8978: RAISE fnd_api.g_exc_unexpected_error;

8974: END IF;
8975:
8976: --
8977: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8978: RAISE fnd_api.g_exc_unexpected_error;
8979: END IF;
8980:
8981: /**** {{ R12 Enhanced reservations code changes }}****/
8982: --IF (l_debug = 1) THEN

Line 9015: IF l_return_status = fnd_api.g_ret_sts_error THEN

9011: IF (l_debug = 1) THEN
9012: debug_print('After convert qty ' || l_return_status);
9013: END IF;
9014:
9015: IF l_return_status = fnd_api.g_ret_sts_error THEN
9016: RAISE fnd_api.g_exc_error;
9017: END IF;
9018:
9019: --

Line 9016: RAISE fnd_api.g_exc_error;

9012: debug_print('After convert qty ' || l_return_status);
9013: END IF;
9014:
9015: IF l_return_status = fnd_api.g_ret_sts_error THEN
9016: RAISE fnd_api.g_exc_error;
9017: END IF;
9018:
9019: --
9020: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9020: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9016: RAISE fnd_api.g_exc_error;
9017: END IF;
9018:
9019: --
9020: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9021: RAISE fnd_api.g_exc_unexpected_error;
9022: END IF;
9023: END IF;
9024:

Line 9021: RAISE fnd_api.g_exc_unexpected_error;

9017: END IF;
9018:
9019: --
9020: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9021: RAISE fnd_api.g_exc_unexpected_error;
9022: END IF;
9023: END IF;
9024:
9025: --MUOM Fulfillment Project

Line 9056: RAISE fnd_api.g_exc_error;

9052: l_rsv_rec.serial_reservation_quantity := l_serial_number.COUNT;
9053: IF (l_rsv_rec.serial_reservation_quantity > l_rsv_rec.primary_reservation_quantity) THEN
9054: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
9055: fnd_msg_pub.ADD;
9056: RAISE fnd_api.g_exc_error;
9057: END IF;
9058:
9059: END IF;
9060: ********************/

Line 9094: , p_supply_source_line_detail => Nvl(l_rsv_rec.supply_source_line_detail,fnd_api.g_miss_num)

9090: , p_locator_id => l_rsv_rec.locator_id
9091: , p_supply_source_type_id => l_rsv_rec.supply_source_type_id
9092: , p_supply_source_header_id => l_rsv_rec.supply_source_header_id
9093: , p_supply_source_line_id => l_rsv_rec.supply_source_line_id
9094: , p_supply_source_line_detail => Nvl(l_rsv_rec.supply_source_line_detail,fnd_api.g_miss_num)
9095: , p_lpn_id => l_rsv_rec.lpn_id
9096: , p_project_id => l_rsv_rec.project_id
9097: , p_task_id => l_rsv_rec.task_id
9098: , p_api_version_number => 1.0

Line 9099: , p_init_msg_lst => fnd_api.g_false

9095: , p_lpn_id => l_rsv_rec.lpn_id
9096: , p_project_id => l_rsv_rec.project_id
9097: , p_task_id => l_rsv_rec.task_id
9098: , p_api_version_number => 1.0
9099: , p_init_msg_lst => fnd_api.g_false
9100: );
9101:
9102: IF (l_debug = 1) THEN
9103: debug_print('After calling available supply to reserve ' || l_return_status);

Line 9109: IF l_return_status = fnd_api.g_ret_sts_error THEN

9105: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
9106: END IF;
9107:
9108: --
9109: IF l_return_status = fnd_api.g_ret_sts_error THEN
9110: RAISE fnd_api.g_exc_error;
9111: END IF;
9112:
9113: --

Line 9110: RAISE fnd_api.g_exc_error;

9106: END IF;
9107:
9108: --
9109: IF l_return_status = fnd_api.g_ret_sts_error THEN
9110: RAISE fnd_api.g_exc_error;
9111: END IF;
9112:
9113: --
9114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9110: RAISE fnd_api.g_exc_error;
9111: END IF;
9112:
9113: --
9114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9115: RAISE fnd_api.g_exc_unexpected_error;
9116: END IF;
9117:
9118: -- bug #5454715. Error out if the available supply to reserve is zero.

Line 9115: RAISE fnd_api.g_exc_unexpected_error;

9111: END IF;
9112:
9113: --
9114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9115: RAISE fnd_api.g_exc_unexpected_error;
9116: END IF;
9117:
9118: -- bug #5454715. Error out if the available supply to reserve is zero.
9119: IF l_qty_changed = 0 THEN

Line 9122: RAISE fnd_api.g_exc_error;

9118: -- bug #5454715. Error out if the available supply to reserve is zero.
9119: IF l_qty_changed = 0 THEN
9120: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
9121: fnd_msg_pub.ADD;
9122: RAISE fnd_api.g_exc_error;
9123: END IF;
9124:
9125:
9126: -- Bug 5199672: Removed the condition l_qty_changed > 0

Line 9129: IF (p_partial_reservation_flag = fnd_api.g_false) THEN

9125:
9126: -- Bug 5199672: Removed the condition l_qty_changed > 0
9127: IF ((l_rsv_rec.primary_reservation_quantity - l_qty_changed) > 0.000005) THEN
9128:
9129: IF (p_partial_reservation_flag = fnd_api.g_false) THEN
9130: IF (l_debug = 1) THEN
9131: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
9132: END IF;
9133: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');

Line 9135: RAISE fnd_api.g_exc_error;

9131: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
9132: END IF;
9133: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
9134: fnd_msg_pub.ADD;
9135: RAISE fnd_api.g_exc_error;
9136: ELSE
9137: l_rsv_rec.primary_reservation_quantity := l_qty_changed + NVL(l_rsv_rec.detailed_quantity, 0);
9138: l_rsv_rec.reservation_quantity := NULL;
9139: IF (l_debug = 1) THEN

Line 9149: IF l_return_status = fnd_api.g_ret_sts_error THEN

9145: IF (l_debug = 1) THEN
9146: debug_print('After convert qty ' || l_return_status);
9147: END IF;
9148:
9149: IF l_return_status = fnd_api.g_ret_sts_error THEN
9150: RAISE fnd_api.g_exc_error;
9151: END IF;
9152:
9153: --

Line 9150: RAISE fnd_api.g_exc_error;

9146: debug_print('After convert qty ' || l_return_status);
9147: END IF;
9148:
9149: IF l_return_status = fnd_api.g_ret_sts_error THEN
9150: RAISE fnd_api.g_exc_error;
9151: END IF;
9152:
9153: --
9154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9150: RAISE fnd_api.g_exc_error;
9151: END IF;
9152:
9153: --
9154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9155: RAISE fnd_api.g_exc_unexpected_error;
9156: END IF;
9157:
9158: END IF;

Line 9155: RAISE fnd_api.g_exc_unexpected_error;

9151: END IF;
9152:
9153: --
9154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9155: RAISE fnd_api.g_exc_unexpected_error;
9156: END IF;
9157:
9158: END IF;
9159: END IF;

Line 9189: , p_demand_source_line_detail => Nvl(l_rsv_rec.demand_source_line_detail,fnd_api.g_miss_num)

9185: , p_primary_uom_code => l_rsv_rec.primary_uom_code
9186: , p_demand_source_type_id => l_rsv_rec.demand_source_type_id
9187: , p_demand_source_header_id => l_rsv_rec.demand_source_header_id
9188: , p_demand_source_line_id => l_rsv_rec.demand_source_line_id
9189: , p_demand_source_line_detail => Nvl(l_rsv_rec.demand_source_line_detail,fnd_api.g_miss_num)
9190: , p_project_id => l_rsv_rec.project_id
9191: , p_task_id => l_rsv_rec.task_id
9192: , p_api_version_number => 1.0
9193: , p_init_msg_lst => fnd_api.g_false

Line 9193: , p_init_msg_lst => fnd_api.g_false

9189: , p_demand_source_line_detail => Nvl(l_rsv_rec.demand_source_line_detail,fnd_api.g_miss_num)
9190: , p_project_id => l_rsv_rec.project_id
9191: , p_task_id => l_rsv_rec.task_id
9192: , p_api_version_number => 1.0
9193: , p_init_msg_lst => fnd_api.g_false
9194: );
9195:
9196:
9197: IF (l_debug = 1) THEN

Line 9207: IF l_return_status = fnd_api.g_ret_sts_error THEN

9203:
9204: END IF;
9205:
9206: --
9207: IF l_return_status = fnd_api.g_ret_sts_error THEN
9208: RAISE fnd_api.g_exc_error;
9209: END IF;
9210:
9211: --

Line 9208: RAISE fnd_api.g_exc_error;

9204: END IF;
9205:
9206: --
9207: IF l_return_status = fnd_api.g_ret_sts_error THEN
9208: RAISE fnd_api.g_exc_error;
9209: END IF;
9210:
9211: --
9212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9208: RAISE fnd_api.g_exc_error;
9209: END IF;
9210:
9211: --
9212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9213: RAISE fnd_api.g_exc_unexpected_error;
9214: END IF;
9215:
9216:

Line 9213: RAISE fnd_api.g_exc_unexpected_error;

9209: END IF;
9210:
9211: --
9212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9213: RAISE fnd_api.g_exc_unexpected_error;
9214: END IF;
9215:
9216:
9217: IF (l_rsv_rec.demand_source_type_id in (inv_reservation_global.g_source_type_oe,

Line 9228: , p_init_msg_lst => fnd_api.g_false

9224: p_organization_id => l_rsv_rec.organization_id)) THEN
9225: get_ship_qty_tolerance
9226: (
9227: p_api_version_number => 1.0
9228: , p_init_msg_lst => fnd_api.g_false
9229: , x_return_status => x_return_status
9230: , x_msg_count => x_msg_count
9231: , x_msg_data => x_msg_data
9232: , p_demand_type_id => l_rsv_rec.demand_source_type_id

Line 9247: IF x_return_status = fnd_api.g_ret_sts_error THEN

9243: debug_print('Reservation margin above ' || l_reservation_margin_above);
9244: END IF;
9245:
9246: --
9247: IF x_return_status = fnd_api.g_ret_sts_error THEN
9248: RAISE fnd_api.g_exc_error;
9249: END IF;
9250:
9251: --

Line 9248: RAISE fnd_api.g_exc_error;

9244: END IF;
9245:
9246: --
9247: IF x_return_status = fnd_api.g_ret_sts_error THEN
9248: RAISE fnd_api.g_exc_error;
9249: END IF;
9250:
9251: --
9252: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9252: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

9248: RAISE fnd_api.g_exc_error;
9249: END IF;
9250:
9251: --
9252: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
9253: RAISE fnd_api.g_exc_unexpected_error;
9254: END IF;
9255: --MUOM Fulfillment Project
9256:

Line 9253: RAISE fnd_api.g_exc_unexpected_error;

9249: END IF;
9250:
9251: --
9252: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
9253: RAISE fnd_api.g_exc_unexpected_error;
9254: END IF;
9255: --MUOM Fulfillment Project
9256:
9257: If l_fulfill_base <> 'S' Then

Line 9294: raise fnd_api.g_exc_error;

9290: debug_print('The demand document doesnt have enough quantity to be reserved against. error out. for fulfilment base=S');
9291: END IF;
9292: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
9293: fnd_msg_pub.add;
9294: raise fnd_api.g_exc_error;
9295: END IF;
9296: ELSE
9297: IF ((l_reservation_qty_lot - l_qty_changed) > 0.000005) THEN
9298: IF (l_debug = 1) THEN

Line 9303: raise fnd_api.g_exc_error;

9299: debug_print('The demand document doesnt have enough quantity to be reserved against. error out. ');
9300: END IF;
9301: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
9302: fnd_msg_pub.add;
9303: raise fnd_api.g_exc_error;
9304: END IF;
9305: END IF; -- MUOM fulfillment Project ends
9306:
9307: END IF;

Line 9327: RAISE fnd_api.g_exc_error;

9323: IF ( (NVL(l_rsv_rec.reservation_quantity,0) < 0) OR
9324: (NVL(l_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
9325: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
9326: fnd_msg_pub.ADD;
9327: RAISE fnd_api.g_exc_error;
9328: END IF;
9329:
9330: --Bug 5535030 Selecting the sequence value has been moved to the table handler in
9331: -- INVRSV6B.pls

Line 9378: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

9374: ,p_organization_id => l_rsv_rec.organization_id
9375: ,x_index => l_orig_item_cache_index
9376: );
9377:
9378: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9379: RAISE fnd_api.g_exc_error;
9380: End If;
9381:
9382: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 9379: RAISE fnd_api.g_exc_error;

9375: ,x_index => l_orig_item_cache_index
9376: );
9377:
9378: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9379: RAISE fnd_api.g_exc_error;
9380: End If;
9381:
9382: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9383: RAISE fnd_api.g_exc_unexpected_error;

Line 9382: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

9378: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9379: RAISE fnd_api.g_exc_error;
9380: End If;
9381:
9382: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9383: RAISE fnd_api.g_exc_unexpected_error;
9384: END IF;
9385:
9386: IF (l_orig_item_cache_index IS NULL) THEN

Line 9383: RAISE fnd_api.g_exc_unexpected_error;

9379: RAISE fnd_api.g_exc_error;
9380: End If;
9381:
9382: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9383: RAISE fnd_api.g_exc_unexpected_error;
9384: END IF;
9385:
9386: IF (l_orig_item_cache_index IS NULL) THEN
9387: OPEN c_item(l_rsv_rec.inventory_item_id,l_rsv_rec.organization_id);

Line 9398: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

9394: ,p_item_record => l_item_rec
9395: ,x_index => l_orig_item_cache_index
9396: );
9397:
9398: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9399: RAISE fnd_api.g_exc_error;
9400: END IF;
9401:
9402: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 9399: RAISE fnd_api.g_exc_error;

9395: ,x_index => l_orig_item_cache_index
9396: );
9397:
9398: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9399: RAISE fnd_api.g_exc_error;
9400: END IF;
9401:
9402: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9403: RAISE fnd_api.g_exc_unexpected_error;

Line 9402: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

9398: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
9399: RAISE fnd_api.g_exc_error;
9400: END IF;
9401:
9402: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9403: RAISE fnd_api.g_exc_unexpected_error;
9404: END IF;
9405: END IF;
9406: END IF;

Line 9403: RAISE fnd_api.g_exc_unexpected_error;

9399: RAISE fnd_api.g_exc_error;
9400: END IF;
9401:
9402: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
9403: RAISE fnd_api.g_exc_unexpected_error;
9404: END IF;
9405: END IF;
9406: END IF;
9407:

Line 9419: RAISE fnd_api.g_exc_error;

9415: l_rsv_rec.serial_reservation_quantity := l_serial_number.COUNT;
9416: IF (l_rsv_rec.serial_reservation_quantity > l_rsv_rec.primary_reservation_quantity) THEN
9417: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
9418: fnd_msg_pub.ADD;
9419: RAISE fnd_api.g_exc_error;
9420: END IF;
9421: END IF;
9422:
9423: -- Added for bug 8851133 -Start

Line 9547: IF l_return_status = fnd_api.g_ret_sts_error THEN

9543: IF (l_debug = 1) THEN
9544: debug_print('After sync ' || l_return_status);
9545: END IF;
9546:
9547: IF l_return_status = fnd_api.g_ret_sts_error THEN
9548: RAISE fnd_api.g_exc_error;
9549: END IF;
9550:
9551: --

Line 9548: RAISE fnd_api.g_exc_error;

9544: debug_print('After sync ' || l_return_status);
9545: END IF;
9546:
9547: IF l_return_status = fnd_api.g_ret_sts_error THEN
9548: RAISE fnd_api.g_exc_error;
9549: END IF;
9550:
9551: --
9552: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9552: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9548: RAISE fnd_api.g_exc_error;
9549: END IF;
9550:
9551: --
9552: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9553: RAISE fnd_api.g_exc_unexpected_error;
9554: END IF;
9555:
9556: /**** {{ R12 Enhanced reservations code changes. Serial number

Line 9553: RAISE fnd_api.g_exc_unexpected_error;

9549: END IF;
9550:
9551: --
9552: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9553: RAISE fnd_api.g_exc_unexpected_error;
9554: END IF;
9555:
9556: /**** {{ R12 Enhanced reservations code changes. Serial number
9557: -- changes for creating new reservations }}****/

Line 9598: RAISE fnd_api.g_exc_error;

9594: debug_print('Errow while selecting the serial number. serial Number ' || l_serial_number(l_serial_index).serial_number);
9595: END IF;
9596: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9597: fnd_msg_pub.ADD;
9598: RAISE fnd_api.g_exc_error;
9599: END;
9600:
9601: IF (l_group_mark_id IS NOT NULL) AND (l_group_mark_id <> -1)THEN
9602: IF (l_debug = 1) THEN

Line 9607: RAISE fnd_api.g_exc_error;

9603: debug_print('Group Mark Id is not null for serial ' || l_serial_number(l_serial_index).serial_number);
9604: END IF;
9605: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9606: fnd_msg_pub.ADD;
9607: RAISE fnd_api.g_exc_error;
9608: END IF;
9609:
9610: BEGIN
9611: UPDATE mtl_serial_numbers SET reservation_id =

Line 9626: RAISE fnd_api.g_exc_error;

9622: debug_print('Errow while updating the serial number. serial Number ' || l_serial_number(l_serial_index).serial_number || ' Reservation Id : ' || l_rsv_rec.reservation_id);
9623: END IF;
9624: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9625: fnd_msg_pub.ADD;
9626: RAISE fnd_api.g_exc_error;
9627: END;
9628: END LOOP;
9629:
9630: END IF;

Line 9643: IF l_return_status = fnd_api.g_ret_sts_error THEN

9639: IF (l_debug = 1) THEN
9640: debug_print('After post CTO validation ' || l_return_status);
9641: END IF;
9642: --
9643: IF l_return_status = fnd_api.g_ret_sts_error THEN
9644: RAISE fnd_api.g_exc_error;
9645: END IF;
9646:
9647: --

Line 9644: RAISE fnd_api.g_exc_error;

9640: debug_print('After post CTO validation ' || l_return_status);
9641: END IF;
9642: --
9643: IF l_return_status = fnd_api.g_ret_sts_error THEN
9644: RAISE fnd_api.g_exc_error;
9645: END IF;
9646:
9647: --
9648: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9648: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9644: RAISE fnd_api.g_exc_error;
9645: END IF;
9646:
9647: --
9648: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9649: RAISE fnd_api.g_exc_unexpected_error;
9650: END IF;
9651: END IF;
9652:

Line 9649: RAISE fnd_api.g_exc_unexpected_error;

9645: END IF;
9646:
9647: --
9648: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9649: RAISE fnd_api.g_exc_unexpected_error;
9650: END IF;
9651: END IF;
9652:
9653: insert_rsv_temp

Line 9670: IF l_return_status = fnd_api.g_ret_sts_error THEN

9666: IF (l_debug = 1) THEN
9667: debug_print('After insert into rsv temp ' || l_return_status);
9668: END IF;
9669:
9670: IF l_return_status = fnd_api.g_ret_sts_error THEN
9671: RAISE fnd_api.g_exc_error;
9672: END IF;
9673:
9674: --

Line 9671: RAISE fnd_api.g_exc_error;

9667: debug_print('After insert into rsv temp ' || l_return_status);
9668: END IF;
9669:
9670: IF l_return_status = fnd_api.g_ret_sts_error THEN
9671: RAISE fnd_api.g_exc_error;
9672: END IF;
9673:
9674: --
9675: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9675: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9671: RAISE fnd_api.g_exc_error;
9672: END IF;
9673:
9674: --
9675: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9676: RAISE fnd_api.g_exc_unexpected_error;
9677: END IF;
9678:
9679: --

Line 9676: RAISE fnd_api.g_exc_unexpected_error;

9672: END IF;
9673:
9674: --
9675: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9676: RAISE fnd_api.g_exc_unexpected_error;
9677: END IF;
9678:
9679: --
9680: IF (l_debug = 1) THEN

Line 9725: WHEN fnd_api.g_exc_error THEN

9721: -- would have updated the record.
9722: /*** End R12 ***/
9723:
9724: EXCEPTION
9725: WHEN fnd_api.g_exc_error THEN
9726: ROLLBACK TO create_reservation_sa;
9727: x_return_status := fnd_api.g_ret_sts_error;
9728: /**** {{ R12 Enhanced reservations code changes. Should be
9729: -- releasing the locks. }} *****/

Line 9727: x_return_status := fnd_api.g_ret_sts_error;

9723:
9724: EXCEPTION
9725: WHEN fnd_api.g_exc_error THEN
9726: ROLLBACK TO create_reservation_sa;
9727: x_return_status := fnd_api.g_ret_sts_error;
9728: /**** {{ R12 Enhanced reservations code changes. Should be
9729: -- releasing the locks. }} *****/
9730: IF l_lock_obtained THEN
9731: inv_reservation_lock_pvt.release_lock

Line 9739: WHEN fnd_api.g_exc_unexpected_error THEN

9735: END IF;
9736: /*** End R12 ***/
9737: -- Get message count and data
9738: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9739: WHEN fnd_api.g_exc_unexpected_error THEN
9740: ROLLBACK TO create_reservation_sa;
9741: x_return_status := fnd_api.g_ret_sts_unexp_error;
9742: /**** {{ R12 Enhanced reservations code changes. Should be
9743: -- releasing the locks. }} *****/

Line 9741: x_return_status := fnd_api.g_ret_sts_unexp_error;

9737: -- Get message count and data
9738: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9739: WHEN fnd_api.g_exc_unexpected_error THEN
9740: ROLLBACK TO create_reservation_sa;
9741: x_return_status := fnd_api.g_ret_sts_unexp_error;
9742: /**** {{ R12 Enhanced reservations code changes. Should be
9743: -- releasing the locks. }} *****/
9744: IF l_lock_obtained THEN
9745: inv_reservation_lock_pvt.release_lock

Line 9755: x_return_status := fnd_api.g_ret_sts_unexp_error;

9751: -- Get message count and data
9752: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9753: WHEN OTHERS THEN
9754: ROLLBACK TO create_reservation_sa;
9755: x_return_status := fnd_api.g_ret_sts_unexp_error;
9756: /**** {{ R12 Enhanced reservations code changes. Should be
9757: -- releasing the locks. }} *****/
9758: IF l_lock_obtained THEN
9759: inv_reservation_lock_pvt.release_lock

Line 9777: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

9773:
9774: PROCEDURE update_reservation
9775: (
9776: p_api_version_number IN NUMBER
9777: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
9778: , x_return_status OUT NOCOPY VARCHAR2
9779: , x_msg_count OUT NOCOPY NUMBER
9780: , x_msg_data OUT NOCOPY VARCHAR2
9781: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 9785: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

9781: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9782: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9783: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9784: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9785: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9786: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9787: , p_over_reservation_flag IN NUMBER DEFAULT 0
9788: ) IS
9789:

Line 9786: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

9782: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9783: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9784: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9785: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9786: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9787: , p_over_reservation_flag IN NUMBER DEFAULT 0
9788: ) IS
9789:
9790:

Line 9793: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

9789:
9790:
9791: l_api_version_number CONSTANT NUMBER := 1.0;
9792: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9793: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9794: l_quantity_reserved NUMBER;
9795: l_secondary_quantity_reserved NUMBER; -- INVCONV
9796: l_debug NUMBER;
9797:

Line 9802: IF NOT fnd_api.compatible_api_call

9798: l_reservation_qty_lot NUMBER := 0; --Bug 12978409
9799:
9800: BEGIN
9801: -- Standard call to check for call compatibility
9802: IF NOT fnd_api.compatible_api_call
9803: (l_api_version_number
9804: , p_api_version_number
9805: , l_api_name
9806: , G_PKG_NAME

Line 9808: RAISE fnd_api.g_exc_unexpected_error;

9804: , p_api_version_number
9805: , l_api_name
9806: , G_PKG_NAME
9807: ) THEN
9808: RAISE fnd_api.g_exc_unexpected_error;
9809: END IF;
9810:
9811: -- Initialize message list.
9812: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 9812: IF fnd_api.to_boolean(p_init_msg_lst) THEN

9808: RAISE fnd_api.g_exc_unexpected_error;
9809: END IF;
9810:
9811: -- Initialize message list.
9812: IF fnd_api.to_boolean(p_init_msg_lst) THEN
9813: fnd_msg_pub.initialize;
9814: END IF;
9815:
9816: -- Use cache to get value for l_debug

Line 9836: p_init_msg_lst => fnd_api.g_false,

9832:
9833: -- INVCONV Upgrade call to incorporate secondary_quantity_reserved
9834: inv_reservation_pvt.update_reservation
9835: (p_api_version_number => 1.0,
9836: p_init_msg_lst => fnd_api.g_false,
9837: x_return_status => l_return_status,
9838: x_msg_count => x_msg_count,
9839: x_msg_data => x_msg_data,
9840: x_quantity_reserved => l_quantity_reserved,

Line 9847: p_partial_reservation_flag => fnd_api.g_false,

9843: p_to_rsv_rec => p_to_rsv_rec,
9844: p_original_serial_number => p_original_serial_number ,
9845: p_to_serial_number => p_to_serial_number,
9846: p_validation_flag => p_validation_flag,
9847: p_partial_reservation_flag => fnd_api.g_false,
9848: p_check_availability => p_check_availability,
9849: p_over_reservation_flag => p_over_reservation_flag
9850: );
9851:

Line 9857: IF l_return_status = fnd_api.g_ret_sts_error THEN

9853: IF (l_debug=1) THEN
9854: debug_print ('Return Status after updating reservations '||l_return_status);
9855: END IF;
9856:
9857: IF l_return_status = fnd_api.g_ret_sts_error THEN
9858:
9859: IF l_debug=1 THEN
9860: debug_print('Raising expected error'||l_return_status);
9861: END IF;

Line 9863: RAISE fnd_api.g_exc_error;

9859: IF l_debug=1 THEN
9860: debug_print('Raising expected error'||l_return_status);
9861: END IF;
9862:
9863: RAISE fnd_api.g_exc_error;
9864:
9865: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9866:
9867: IF l_debug=1 THEN

Line 9865: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9861: END IF;
9862:
9863: RAISE fnd_api.g_exc_error;
9864:
9865: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9866:
9867: IF l_debug=1 THEN
9868: debug_print('Raising Unexpected error'||l_return_status);
9869: END IF;

Line 9871: RAISE fnd_api.g_exc_unexpected_error;

9867: IF l_debug=1 THEN
9868: debug_print('Raising Unexpected error'||l_return_status);
9869: END IF;
9870:
9871: RAISE fnd_api.g_exc_unexpected_error;
9872: END IF;
9873:
9874:
9875: x_return_status := l_return_status;

Line 9879: WHEN fnd_api.g_exc_error THEN

9875: x_return_status := l_return_status;
9876:
9877: EXCEPTION
9878:
9879: WHEN fnd_api.g_exc_error THEN
9880: x_return_status := fnd_api.g_ret_sts_error;
9881: -- Get message count and data
9882: fnd_msg_pub.count_and_get
9883: ( p_count => x_msg_count

Line 9880: x_return_status := fnd_api.g_ret_sts_error;

9876:
9877: EXCEPTION
9878:
9879: WHEN fnd_api.g_exc_error THEN
9880: x_return_status := fnd_api.g_ret_sts_error;
9881: -- Get message count and data
9882: fnd_msg_pub.count_and_get
9883: ( p_count => x_msg_count
9884: , p_data => x_msg_data

Line 9887: WHEN fnd_api.g_exc_unexpected_error THEN

9883: ( p_count => x_msg_count
9884: , p_data => x_msg_data
9885: );
9886:
9887: WHEN fnd_api.g_exc_unexpected_error THEN
9888: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9889:
9890: -- Get message count and data
9891: fnd_msg_pub.count_and_get

Line 9888: x_return_status := fnd_api.g_ret_sts_unexp_error ;

9884: , p_data => x_msg_data
9885: );
9886:
9887: WHEN fnd_api.g_exc_unexpected_error THEN
9888: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9889:
9890: -- Get message count and data
9891: fnd_msg_pub.count_and_get
9892: ( p_count => x_msg_count

Line 9897: x_return_status := fnd_api.g_ret_sts_unexp_error ;

9893: , p_data => x_msg_data
9894: );
9895:
9896: WHEN OTHERS THEN
9897: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9898:
9899: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
9900: THEN
9901: fnd_msg_pub.add_exc_msg

Line 9921: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

9917: -- INVCONV incorporate parameter x_secondary_quantity_reserved
9918: PROCEDURE update_reservation
9919: (
9920: p_api_version_number IN NUMBER
9921: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
9922: , x_return_status OUT NOCOPY VARCHAR2
9923: , x_msg_count OUT NOCOPY NUMBER
9924: , x_msg_data OUT NOCOPY VARCHAR2
9925: , x_quantity_reserved OUT NOCOPY NUMBER

Line 9931: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

9927: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9928: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9929: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9930: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9931: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9932: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9933: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9934: , p_over_reservation_flag IN NUMBER DEFAULT 0
9935: ) IS

Line 9932: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

9928: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9929: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9930: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9931: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9932: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9933: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9934: , p_over_reservation_flag IN NUMBER DEFAULT 0
9935: ) IS
9936: l_api_version_number CONSTANT NUMBER := 1.0;

Line 9933: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

9929: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9930: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9931: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9932: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9933: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9934: , p_over_reservation_flag IN NUMBER DEFAULT 0
9935: ) IS
9936: l_api_version_number CONSTANT NUMBER := 1.0;
9937: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';

Line 9938: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

9934: , p_over_reservation_flag IN NUMBER DEFAULT 0
9935: ) IS
9936: l_api_version_number CONSTANT NUMBER := 1.0;
9937: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9938: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9939: l_miss_num NUMBER := fnd_api.g_miss_num;
9940: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9941: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9942: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

Line 9939: l_miss_num NUMBER := fnd_api.g_miss_num;

9935: ) IS
9936: l_api_version_number CONSTANT NUMBER := 1.0;
9937: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9938: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9939: l_miss_num NUMBER := fnd_api.g_miss_num;
9940: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9941: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9942: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9943: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;

Line 9940: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;

9936: l_api_version_number CONSTANT NUMBER := 1.0;
9937: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9938: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9939: l_miss_num NUMBER := fnd_api.g_miss_num;
9940: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9941: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9942: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9943: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
9944: l_orig_rsv_tbl_count NUMBER;

Line 10049: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

10045: END IF;
10046:
10047:
10048: -- Standard call to check for call compatibility
10049: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
10050: RAISE fnd_api.g_exc_unexpected_error;
10051: END IF;
10052:
10053: IF (l_debug = 1) THEN

Line 10050: RAISE fnd_api.g_exc_unexpected_error;

10046:
10047:
10048: -- Standard call to check for call compatibility
10049: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
10050: RAISE fnd_api.g_exc_unexpected_error;
10051: END IF;
10052:
10053: IF (l_debug = 1) THEN
10054: debug_print('The original reservation record: ');

Line 10081: RAISE fnd_api.g_exc_error;

10077: IF ((NVL(p_to_rsv_rec.reservation_quantity,0) < 0) OR
10078: (NVL(p_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
10079: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
10080: fnd_msg_pub.ADD;
10081: RAISE fnd_api.g_exc_error;
10082: END IF;
10083:
10084: -- INVCONV BEGIN
10085: /*Bug#13045525 Changing the condition as the validation makes sense when the primary quantity is greater than zero */

Line 10089: RAISE fnd_api.g_exc_error;

10085: /*Bug#13045525 Changing the condition as the validation makes sense when the primary quantity is greater than zero */
10086: IF (NVL(p_to_rsv_rec.primary_reservation_quantity,0) > 0) AND (NVL(p_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
10087: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY QTY'); -- INVCONV NEW MESSAGE
10088: fnd_msg_pub.ADD;
10089: RAISE fnd_api.g_exc_error;
10090: END IF;
10091: -- INVCONV END
10092:
10093: /**** {{ R12 Enhanced reservations code changes. Initializing orig parameters }}****/

Line 10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

10095: -- Set the original columns to g_miss_xxx as the user should not be
10096: -- setting these values. Do not query by them
10097: l_original_rsv_rec := p_original_rsv_rec;
10098:
10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

10096: -- setting these values. Do not query by them
10097: l_original_rsv_rec := p_original_rsv_rec;
10098:
10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

10097: l_original_rsv_rec := p_original_rsv_rec;
10098:
10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

10098:
10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

10099: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10107:

Line 10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

10100: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10107:
10108: /*** End R12 ***/

Line 10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

10101: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10107:
10108: /*** End R12 ***/
10109:

Line 10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

10102: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10103: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10104: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10105: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10106: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10107:
10108: /*** End R12 ***/
10109:
10110: --

Line 10114: (p_to_rsv_rec.primary_reservation_quantity IS NULL OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num))

10110: --
10111: -- if the update to quantity is 0, call delete instead
10112: IF p_to_rsv_rec.primary_reservation_quantity = 0 OR
10113: (p_to_rsv_rec.reservation_quantity = 0 AND
10114: (p_to_rsv_rec.primary_reservation_quantity IS NULL OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num))
10115: THEN
10116:
10117: delete_reservation
10118: (

Line 10129: IF l_return_status = fnd_api.g_ret_sts_error THEN

10125: , p_original_serial_number => p_original_serial_number
10126: , p_validation_flag => p_validation_flag
10127: );
10128:
10129: IF l_return_status = fnd_api.g_ret_sts_error THEN
10130: RAISE fnd_api.g_exc_error;
10131: END IF;
10132:
10133: --

Line 10130: RAISE fnd_api.g_exc_error;

10126: , p_validation_flag => p_validation_flag
10127: );
10128:
10129: IF l_return_status = fnd_api.g_ret_sts_error THEN
10130: RAISE fnd_api.g_exc_error;
10131: END IF;
10132:
10133: --
10134: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10134: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10130: RAISE fnd_api.g_exc_error;
10131: END IF;
10132:
10133: --
10134: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10135: RAISE fnd_api.g_exc_unexpected_error;
10136: END IF;
10137:
10138: --

Line 10135: RAISE fnd_api.g_exc_unexpected_error;

10131: END IF;
10132:
10133: --
10134: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10135: RAISE fnd_api.g_exc_unexpected_error;
10136: END IF;
10137:
10138: --
10139: x_return_status := l_return_status;

Line 10145: IF fnd_api.to_boolean(p_init_msg_lst) THEN

10141: END IF;
10142:
10143: --
10144: -- Initialize message list.
10145: IF fnd_api.to_boolean(p_init_msg_lst) THEN
10146: fnd_msg_pub.initialize;
10147: END IF;
10148:
10149: --

Line 10159: , p_init_msg_lst => fnd_api.g_false

10155: /**** {{ R12 Enhanced reservations code changes }}****/
10156: query_reservation
10157: (
10158: p_api_version_number => 1.0
10159: , p_init_msg_lst => fnd_api.g_false
10160: , x_return_status => l_return_status
10161: , x_msg_count => x_msg_count
10162: , x_msg_data => x_msg_data
10163: , p_query_input => l_original_rsv_rec

Line 10164: , p_lock_records => fnd_api.g_true

10160: , x_return_status => l_return_status
10161: , x_msg_count => x_msg_count
10162: , x_msg_data => x_msg_data
10163: , p_query_input => l_original_rsv_rec
10164: , p_lock_records => fnd_api.g_true
10165: , x_mtl_reservation_tbl => l_orig_rsv_tbl
10166: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
10167: , x_error_code => l_error_code
10168: );

Line 10170: IF l_return_status = fnd_api.g_ret_sts_error THEN

10166: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
10167: , x_error_code => l_error_code
10168: );
10169: /*** End R12 ***/
10170: IF l_return_status = fnd_api.g_ret_sts_error THEN
10171: IF (l_debug = 1) THEN
10172: debug_print('Query Reservation returned error');
10173: END IF;
10174: RAISE fnd_api.g_exc_error;

Line 10174: RAISE fnd_api.g_exc_error;

10170: IF l_return_status = fnd_api.g_ret_sts_error THEN
10171: IF (l_debug = 1) THEN
10172: debug_print('Query Reservation returned error');
10173: END IF;
10174: RAISE fnd_api.g_exc_error;
10175: END IF;
10176:
10177: --
10178: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10178: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10174: RAISE fnd_api.g_exc_error;
10175: END IF;
10176:
10177: --
10178: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10179: IF (l_debug = 1) THEN
10180: debug_print('Query Reservation returned unexpected error');
10181: END IF;
10182: RAISE fnd_api.g_exc_unexpected_error;

Line 10182: RAISE fnd_api.g_exc_unexpected_error;

10178: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10179: IF (l_debug = 1) THEN
10180: debug_print('Query Reservation returned unexpected error');
10181: END IF;
10182: RAISE fnd_api.g_exc_unexpected_error;
10183: END IF;
10184:
10185: --
10186: IF l_orig_rsv_tbl_count = 0 THEN

Line 10192: RAISE fnd_api.g_exc_error;

10188: debug_print('Query Reservation returned no row');
10189: END IF;
10190: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
10191: fnd_msg_pub.ADD;
10192: RAISE fnd_api.g_exc_error;
10193: END IF;
10194:
10195: --
10196: IF l_orig_rsv_tbl_count > 1 THEN

Line 10202: RAISE fnd_api.g_exc_error;

10198: debug_print('Query Reservation returned more than one row');
10199: END IF;
10200: fnd_message.set_name('INV', 'INV-UPATE MORE THAN ONE RSV');
10201: fnd_msg_pub.ADD;
10202: RAISE fnd_api.g_exc_error;
10203: END IF;
10204:
10205: IF (l_debug = 1) THEN
10206: debug_print('Constructing to reservation row');

Line 10244: RAISE fnd_api.g_exc_error;

10240:
10241: IF l_lock_status = 0 THEN
10242: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
10243: fnd_msg_pub.ADD;
10244: RAISE fnd_api.g_exc_error;
10245: END if;
10246:
10247: inv_reservation_lock_pvt.lock_supply_demand_record
10248: (p_organization_id => l_to_rsv_rec.organization_id

Line 10260: RAISE fnd_api.g_exc_error;

10256:
10257: IF l_lock_status = 0 THEN
10258: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
10259: fnd_msg_pub.ADD;
10260: RAISE fnd_api.g_exc_error;
10261: END if;
10262:
10263: l_lock_obtained := TRUE;
10264: END IF;

Line 10275: RAISE fnd_api.g_exc_error;

10271: debug_print('Cannot update reservation ID');
10272: END IF;
10273: fnd_message.set_name('INV', 'CANNOT_UPDATE_RESERVATION_ID');
10274: fnd_msg_pub.ADD;
10275: RAISE fnd_api.g_exc_error;
10276: END IF;
10277:
10278: --
10279: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN

Line 10285: RAISE fnd_api.g_exc_error;

10281: debug_print('Cannot update organization ID');
10282: END IF;
10283: fnd_message.set_name('INV', 'CANNOT_UPDATE_ORGANIZATION_ID');
10284: fnd_msg_pub.ADD;
10285: RAISE fnd_api.g_exc_error;
10286: END IF;
10287:
10288: --
10289: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN

Line 10295: RAISE fnd_api.g_exc_error;

10291: debug_print('Cannot update Inventory Item ID');
10292: END IF;
10293: fnd_message.set_name('INV', 'CANNOT_UPDATE_INVENTORY_ITEM');
10294: fnd_msg_pub.ADD;
10295: RAISE fnd_api.g_exc_error;
10296: END IF;
10297:
10298: --
10299: -- convert quantity between primary uom and reservation uom

Line 10302: IF l_return_status = fnd_api.g_ret_sts_error THEN

10298: --
10299: -- convert quantity between primary uom and reservation uom
10300: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
10301:
10302: IF l_return_status = fnd_api.g_ret_sts_error THEN
10303: RAISE fnd_api.g_exc_error;
10304: END IF;
10305: --
10306: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10303: RAISE fnd_api.g_exc_error;

10299: -- convert quantity between primary uom and reservation uom
10300: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
10301:
10302: IF l_return_status = fnd_api.g_ret_sts_error THEN
10303: RAISE fnd_api.g_exc_error;
10304: END IF;
10305: --
10306: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10307: RAISE fnd_api.g_exc_unexpected_error;

Line 10306: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10302: IF l_return_status = fnd_api.g_ret_sts_error THEN
10303: RAISE fnd_api.g_exc_error;
10304: END IF;
10305: --
10306: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10307: RAISE fnd_api.g_exc_unexpected_error;
10308: END IF;
10309:
10310: --

Line 10307: RAISE fnd_api.g_exc_unexpected_error;

10303: RAISE fnd_api.g_exc_error;
10304: END IF;
10305: --
10306: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10307: RAISE fnd_api.g_exc_unexpected_error;
10308: END IF;
10309:
10310: --
10311: -- if the caller does not specified reservation_id, l_to_rsv_rec will

Line 10318: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;

10314: -- but we should set it to g_miss_num again
10315: -- otherwise query_reservation will use only the
10316: -- reservation_id to do the search.
10317: IF l_to_rsv_rec.reservation_id = l_orig_rsv_tbl(1).reservation_id THEN
10318: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;
10319: END IF;
10320:
10321: /**** {{ R12 Enhanced reservations code changes }}****/
10322:

Line 10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

10321: /**** {{ R12 Enhanced reservations code changes }}****/
10322:
10323: -- Set the original columns to g_miss_xxx as the user should not be
10324: -- setting these values. Do not query by them
10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

10322:
10323: -- Set the original columns to g_miss_xxx as the user should not be
10324: -- setting these values. Do not query by them
10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

10323: -- Set the original columns to g_miss_xxx as the user should not be
10324: -- setting these values. Do not query by them
10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

10324: -- setting these values. Do not query by them
10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

10325: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10333:

Line 10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

10326: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10333:
10334: IF (l_to_rsv_rec.project_id IS NULL) THEN

Line 10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

10327: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10333:
10334: IF (l_to_rsv_rec.project_id IS NULL) THEN
10335: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

Line 10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

10328: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
10329: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
10330: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10333:
10334: IF (l_to_rsv_rec.project_id IS NULL) THEN
10335: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
10336: END IF;

Line 10335: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

10331: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
10332: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
10333:
10334: IF (l_to_rsv_rec.project_id IS NULL) THEN
10335: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
10336: END IF;
10337: IF (l_to_rsv_rec.task_id IS NULL) THEN
10338: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
10339: END IF;

Line 10338: l_to_rsv_rec.task_id := fnd_api.g_miss_num;

10334: IF (l_to_rsv_rec.project_id IS NULL) THEN
10335: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
10336: END IF;
10337: IF (l_to_rsv_rec.task_id IS NULL) THEN
10338: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
10339: END IF;
10340: /*** End R12 ***/
10341:
10342: IF (l_debug = 1) THEN

Line 10349: , p_init_msg_lst => fnd_api.g_false

10345:
10346: query_reservation
10347: (
10348: p_api_version_number => 1.0
10349: , p_init_msg_lst => fnd_api.g_false
10350: , x_return_status => l_return_status
10351: , x_msg_count => x_msg_count
10352: , x_msg_data => x_msg_data
10353: , p_query_input => l_to_rsv_rec

Line 10354: , p_lock_records => fnd_api.g_true

10350: , x_return_status => l_return_status
10351: , x_msg_count => x_msg_count
10352: , x_msg_data => x_msg_data
10353: , p_query_input => l_to_rsv_rec
10354: , p_lock_records => fnd_api.g_true
10355: , x_mtl_reservation_tbl => l_to_rsv_tbl
10356: , x_mtl_reservation_tbl_count => l_to_rsv_tbl_count
10357: , x_error_code => l_error_code
10358: );

Line 10364: IF l_return_status = fnd_api.g_ret_sts_error THEN

10360: debug_print('Queried reservation');
10361: END IF;
10362:
10363: --
10364: IF l_return_status = fnd_api.g_ret_sts_error THEN
10365: IF (l_debug = 1) THEN
10366: debug_print('Query Reservation returned error');
10367: END IF;
10368: RAISE fnd_api.g_exc_error;

Line 10368: RAISE fnd_api.g_exc_error;

10364: IF l_return_status = fnd_api.g_ret_sts_error THEN
10365: IF (l_debug = 1) THEN
10366: debug_print('Query Reservation returned error');
10367: END IF;
10368: RAISE fnd_api.g_exc_error;
10369: END IF;
10370:
10371: --
10372: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10372: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10368: RAISE fnd_api.g_exc_error;
10369: END IF;
10370:
10371: --
10372: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10373: IF (l_debug = 1) THEN
10374: debug_print('Query Reservation returned unexpected error');
10375: END IF;
10376: RAISE fnd_api.g_exc_unexpected_error;

Line 10376: RAISE fnd_api.g_exc_unexpected_error;

10372: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10373: IF (l_debug = 1) THEN
10374: debug_print('Query Reservation returned unexpected error');
10375: END IF;
10376: RAISE fnd_api.g_exc_unexpected_error;
10377: END IF;
10378:
10379: --
10380: IF l_to_rsv_tbl_count > 1

Line 10388: RAISE fnd_api.g_exc_error;

10384: debug_print('Reservation target row exists');
10385: END IF;
10386: fnd_message.set_name('INV', 'INV-RSV TARGET ROW EXISTS');
10387: fnd_msg_pub.ADD;
10388: RAISE fnd_api.g_exc_error;
10389: END IF;
10390:
10391: /**** {{ R12 Enhanced reservations code changes }}****/
10392:

Line 10418: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)

10414: inv_reservation_global.g_source_type_rma)) AND
10415: (l_pjm_enabled = 1) THEN
10416:
10417: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
10418: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
10419: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
10420: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
10421: BEGIN
10422: SELECT project_id, task_id INTO l_project_id, l_task_id

Line 10419: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR

10415: (l_pjm_enabled = 1) THEN
10416:
10417: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
10418: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
10419: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
10420: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
10421: BEGIN
10422: SELECT project_id, task_id INTO l_project_id, l_task_id
10423: FROM oe_order_lines_all WHERE

Line 10420: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

10416:
10417: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
10418: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
10419: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
10420: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
10421: BEGIN
10422: SELECT project_id, task_id INTO l_project_id, l_task_id
10423: FROM oe_order_lines_all WHERE
10424: line_id = l_to_rsv_rec.demand_source_line_id;

Line 10432: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

10428: debug_print('Cannot find the project and task information');
10429: END IF;
10430: END;
10431:
10432: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
10433: IF (l_project_id IS NOT NULL) THEN
10434: l_to_rsv_rec.project_id := l_project_id;
10435: ELSE
10436: l_to_rsv_rec.project_id := NULL;

Line 10440: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

10436: l_to_rsv_rec.project_id := NULL;
10437: END IF;
10438: END IF;
10439:
10440: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
10441: IF (l_task_id IS NOT NULL) THEN
10442: l_to_rsv_rec.task_id := l_task_id;
10443: ELSE
10444: l_to_rsv_rec.task_id := NULL;

Line 10473: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)

10469: l_wip_job_type := null; -- AHL
10470: END IF;
10471:
10472: IF ( l_wip_job_type = 'CMRO' AND l_to_rsv_rec.demand_source_line_detail IS NOT NULL)
10473: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)
10474: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
10475:
10476: BEGIN
10477: SELECT wdj.project_id, WDJ.TASK_ID

Line 10474: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

10470: END IF;
10471:
10472: IF ( l_wip_job_type = 'CMRO' AND l_to_rsv_rec.demand_source_line_detail IS NOT NULL)
10473: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)
10474: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
10475:
10476: BEGIN
10477: SELECT wdj.project_id, WDJ.TASK_ID
10478: INTO l_project_id, l_task_id

Line 10495: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

10491: END IF;
10492: END;
10493:
10494:
10495: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
10496: IF (l_project_id IS NOT NULL ) THEN
10497: l_to_rsv_rec.project_id := l_project_id;
10498: ELSE
10499: l_to_rsv_rec.project_id := NULL;

Line 10503: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

10499: l_to_rsv_rec.project_id := NULL;
10500: END IF;
10501: END IF;
10502:
10503: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
10504: IF (l_task_id IS NOT NULL) THEN
10505: l_to_rsv_rec.task_id := l_task_id;
10506: ELSE
10507: l_to_rsv_rec.task_id := NULL;

Line 10534: IF (p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V') THEN

10530: END IF;
10531: /*** End R12 ***/
10532: --
10533: --Bug 2354735: Validate if p_validation_flag is either 'T' or 'V'
10534: IF (p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V') THEN
10535: IF (l_debug = 1) THEN
10536: debug_print('Validation flag is true');
10537: debug_print('from dmd src type:'|| l_orig_rsv_tbl(1).demand_source_type_id);
10538: debug_print('to dmd src type:'|| l_to_rsv_rec.demand_source_type_id);

Line 10580: IF l_return_status = fnd_api.g_ret_sts_error THEN

10576: END IF;
10577: END IF;
10578: -- End Bug 16434922
10579: --
10580: IF l_return_status = fnd_api.g_ret_sts_error THEN
10581: IF (l_debug = 1) THEN
10582: debug_print('Validate input parameters returned error');
10583: END IF;
10584: RAISE fnd_api.g_exc_error;

Line 10584: RAISE fnd_api.g_exc_error;

10580: IF l_return_status = fnd_api.g_ret_sts_error THEN
10581: IF (l_debug = 1) THEN
10582: debug_print('Validate input parameters returned error');
10583: END IF;
10584: RAISE fnd_api.g_exc_error;
10585: END IF;
10586:
10587: --
10588: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10588: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10584: RAISE fnd_api.g_exc_error;
10585: END IF;
10586:
10587: --
10588: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10589: IF (l_debug = 1) THEN
10590: debug_print('Validate input parameters returned unexpected error');
10591: END IF;
10592: RAISE fnd_api.g_exc_unexpected_error;

Line 10592: RAISE fnd_api.g_exc_unexpected_error;

10588: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10589: IF (l_debug = 1) THEN
10590: debug_print('Validate input parameters returned unexpected error');
10591: END IF;
10592: RAISE fnd_api.g_exc_unexpected_error;
10593: END IF;
10594: END IF;
10595:
10596: -- INVCONV B4498579 BEGIN

Line 10619: IF (((p_validation_flag = fnd_api.g_true) OR (p_validation_flag = 'T') OR

10615:
10616: -- Pick Releaser Performance - Added validation_flag = 'Q' to distinguish
10617: -- between validation above and the qty tree processing below.
10618: /**** {{ R12 Enhanced reservations code changes }}****/
10619: IF (((p_validation_flag = fnd_api.g_true) OR (p_validation_flag = 'T') OR
10620: (p_validation_flag = 'Q')) AND l_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv)
10621: THEN
10622: /*** End R12 ***/
10623:

Line 10634: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

10630: ,p_organization_id => l_orig_rsv_tbl(1).organization_id
10631: ,x_index => l_orig_item_cache_index
10632: );
10633:
10634: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10635: RAISE fnd_api.g_exc_error;
10636: End If;
10637:
10638: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 10635: RAISE fnd_api.g_exc_error;

10631: ,x_index => l_orig_item_cache_index
10632: );
10633:
10634: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10635: RAISE fnd_api.g_exc_error;
10636: End If;
10637:
10638: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10639: RAISE fnd_api.g_exc_unexpected_error;

Line 10638: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

10634: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10635: RAISE fnd_api.g_exc_error;
10636: End If;
10637:
10638: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10639: RAISE fnd_api.g_exc_unexpected_error;
10640: END IF;
10641:
10642: IF (l_orig_item_cache_index IS NULL) THEN

Line 10639: RAISE fnd_api.g_exc_unexpected_error;

10635: RAISE fnd_api.g_exc_error;
10636: End If;
10637:
10638: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10639: RAISE fnd_api.g_exc_unexpected_error;
10640: END IF;
10641:
10642: IF (l_orig_item_cache_index IS NULL) THEN
10643: OPEN c_item(l_orig_rsv_tbl(1).inventory_item_id,l_orig_rsv_tbl(1).organization_id);

Line 10654: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

10650: ,p_item_record => l_item_rec
10651: ,x_index => l_orig_item_cache_index
10652: );
10653:
10654: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10655: RAISE fnd_api.g_exc_error;
10656: END IF;
10657:
10658: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 10655: RAISE fnd_api.g_exc_error;

10651: ,x_index => l_orig_item_cache_index
10652: );
10653:
10654: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10655: RAISE fnd_api.g_exc_error;
10656: END IF;
10657:
10658: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10659: RAISE fnd_api.g_exc_unexpected_error;

Line 10658: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

10654: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
10655: RAISE fnd_api.g_exc_error;
10656: END IF;
10657:
10658: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10659: RAISE fnd_api.g_exc_unexpected_error;
10660: END IF;
10661: END IF;
10662: END IF;

Line 10659: RAISE fnd_api.g_exc_unexpected_error;

10655: RAISE fnd_api.g_exc_error;
10656: END IF;
10657:
10658: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
10659: RAISE fnd_api.g_exc_unexpected_error;
10660: END IF;
10661: END IF;
10662: END IF;
10663:

Line 10672: , p_init_msg_lst => fnd_api.g_true

10668:
10669: inv_quantity_tree_pvt.create_tree
10670: (
10671: p_api_version_number => 1.0
10672: , p_init_msg_lst => fnd_api.g_true
10673: , x_return_status => l_return_status
10674: , x_msg_count => x_msg_count
10675: , x_msg_data => x_msg_data
10676: , p_organization_id => l_orig_rsv_tbl(1).organization_id

Line 10694: IF l_return_status = fnd_api.g_ret_sts_error THEN

10690: , x_tree_id => l_tree_id1
10691: );
10692:
10693: --
10694: IF l_return_status = fnd_api.g_ret_sts_error THEN
10695: IF (l_debug = 1) THEN
10696: debug_print('Create Tree returned error');
10697: END IF;
10698: RAISE fnd_api.g_exc_error;

Line 10698: RAISE fnd_api.g_exc_error;

10694: IF l_return_status = fnd_api.g_ret_sts_error THEN
10695: IF (l_debug = 1) THEN
10696: debug_print('Create Tree returned error');
10697: END IF;
10698: RAISE fnd_api.g_exc_error;
10699: END IF;
10700:
10701: --
10702: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10702: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10698: RAISE fnd_api.g_exc_error;
10699: END IF;
10700:
10701: --
10702: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10703: IF (l_debug = 1) THEN
10704: debug_print('Create Tree returned unexpected error');
10705: END IF;
10706: RAISE fnd_api.g_exc_unexpected_error;

Line 10706: RAISE fnd_api.g_exc_unexpected_error;

10702: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10703: IF (l_debug = 1) THEN
10704: debug_print('Create Tree returned unexpected error');
10705: END IF;
10706: RAISE fnd_api.g_exc_unexpected_error;
10707: END IF;
10708:
10709: --
10710: /* Bug 1575930

Line 10720: * , p_init_msg_lst => fnd_api.g_true

10716: * Instead, pass NULL to the modify_tree procedure.
10717: *inv_quantity_tree_pvt.create_tree
10718: * (
10719: * p_api_version_number => 1.0
10720: * , p_init_msg_lst => fnd_api.g_true
10721: * , x_return_status => l_return_status
10722: * , x_msg_count => x_msg_count
10723: * , x_msg_data => x_msg_data
10724: * , p_organization_id => l_to_rsv_rec.organization_id

Line 10741: *IF l_return_status = fnd_api.g_ret_sts_error THEN

10737: * , p_lot_expiration_date => NULL
10738: * , x_tree_id => l_tree_id2
10739: *);
10740: --
10741: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10742: * RAISE fnd_api.g_exc_error;
10743: *END IF ;
10744: --
10745: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10742: * RAISE fnd_api.g_exc_error;

10738: * , x_tree_id => l_tree_id2
10739: *);
10740: --
10741: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10742: * RAISE fnd_api.g_exc_error;
10743: *END IF ;
10744: --
10745: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10746: * RAISE fnd_api.g_exc_unexpected_error;

Line 10745: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10741: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10742: * RAISE fnd_api.g_exc_error;
10743: *END IF ;
10744: --
10745: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10746: * RAISE fnd_api.g_exc_unexpected_error;
10747: *END IF;
10748: */
10749: --

Line 10746: * RAISE fnd_api.g_exc_unexpected_error;

10742: * RAISE fnd_api.g_exc_error;
10743: *END IF ;
10744: --
10745: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10746: * RAISE fnd_api.g_exc_unexpected_error;
10747: *END IF;
10748: */
10749: --
10750: l_tree_id2 := NULL;

Line 10786: IF l_return_status = fnd_api.g_ret_sts_error THEN

10782: , p_partial_reservation_flag => p_partial_reservation_flag
10783: , p_check_availability => p_check_availability
10784: );
10785:
10786: IF l_return_status = fnd_api.g_ret_sts_error THEN
10787: IF (l_debug = 1) THEN
10788: debug_print('modify_tree_for_update_xfer returned error');
10789: END IF;
10790: RAISE fnd_api.g_exc_error;

Line 10790: RAISE fnd_api.g_exc_error;

10786: IF l_return_status = fnd_api.g_ret_sts_error THEN
10787: IF (l_debug = 1) THEN
10788: debug_print('modify_tree_for_update_xfer returned error');
10789: END IF;
10790: RAISE fnd_api.g_exc_error;
10791: END IF;
10792:
10793: --
10794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10790: RAISE fnd_api.g_exc_error;
10791: END IF;
10792:
10793: --
10794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10795: IF (l_debug = 1) THEN
10796: debug_print('modify_tree_for_update_xfer returned unexpected error');
10797: END IF;
10798: RAISE fnd_api.g_exc_unexpected_error;

Line 10798: RAISE fnd_api.g_exc_unexpected_error;

10794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10795: IF (l_debug = 1) THEN
10796: debug_print('modify_tree_for_update_xfer returned unexpected error');
10797: END IF;
10798: RAISE fnd_api.g_exc_unexpected_error;
10799: END IF;
10800:
10801:
10802: IF (l_debug = 1) THEN

Line 10835: IF l_return_status = fnd_api.g_ret_sts_error THEN

10831: IF (l_debug = 1) THEN
10832: debug_print('After convert qty ' || l_return_status);
10833: END IF;
10834:
10835: IF l_return_status = fnd_api.g_ret_sts_error THEN
10836: IF (l_debug = 1) THEN
10837: debug_print('The convert_quantity returned a expected error');
10838: END IF;
10839: RAISE fnd_api.g_exc_error;

Line 10839: RAISE fnd_api.g_exc_error;

10835: IF l_return_status = fnd_api.g_ret_sts_error THEN
10836: IF (l_debug = 1) THEN
10837: debug_print('The convert_quantity returned a expected error');
10838: END IF;
10839: RAISE fnd_api.g_exc_error;
10840: END IF;
10841:
10842: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10843: IF (l_debug = 1) THEN

Line 10842: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10838: END IF;
10839: RAISE fnd_api.g_exc_error;
10840: END IF;
10841:
10842: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10843: IF (l_debug = 1) THEN
10844: debug_print('The convert_quantity returned a unexpected error');
10845: END IF;
10846: RAISE fnd_api.g_exc_unexpected_error;

Line 10846: RAISE fnd_api.g_exc_unexpected_error;

10842: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10843: IF (l_debug = 1) THEN
10844: debug_print('The convert_quantity returned a unexpected error');
10845: END IF;
10846: RAISE fnd_api.g_exc_unexpected_error;
10847: END IF;
10848:
10849: END IF;--partial reservation case
10850:

Line 10898: IF l_return_status = fnd_api.g_ret_sts_error THEN

10894: debug_print('Available quantity to reserve: ' || l_quantity_reserved);
10895: END IF;
10896:
10897: --
10898: IF l_return_status = fnd_api.g_ret_sts_error THEN
10899: RAISE fnd_api.g_exc_error;
10900: END IF;
10901:
10902: --

Line 10899: RAISE fnd_api.g_exc_error;

10895: END IF;
10896:
10897: --
10898: IF l_return_status = fnd_api.g_ret_sts_error THEN
10899: RAISE fnd_api.g_exc_error;
10900: END IF;
10901:
10902: --
10903: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10903: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10899: RAISE fnd_api.g_exc_error;
10900: END IF;
10901:
10902: --
10903: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10904: RAISE fnd_api.g_exc_unexpected_error;
10905: END IF;
10906:
10907:

Line 10904: RAISE fnd_api.g_exc_unexpected_error;

10900: END IF;
10901:
10902: --
10903: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10904: RAISE fnd_api.g_exc_unexpected_error;
10905: END IF;
10906:
10907:
10908: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)

Line 10911: IF (p_partial_reservation_flag = fnd_api.g_false) THEN

10907:
10908: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)
10909: > 0.000005) THEN
10910:
10911: IF (p_partial_reservation_flag = fnd_api.g_false) THEN
10912: IF (l_debug = 1) THEN
10913: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
10914: END IF;
10915: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');

Line 10917: RAISE fnd_api.g_exc_error;

10913: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
10914: END IF;
10915: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
10916: fnd_msg_pub.ADD;
10917: RAISE fnd_api.g_exc_error;
10918: ELSE
10919: l_to_rsv_rec.primary_reservation_quantity := l_quantity_reserved;
10920: l_to_rsv_rec.reservation_quantity := NULL;
10921: IF (l_debug = 1) THEN

Line 10930: IF l_return_status = fnd_api.g_ret_sts_error THEN

10926: IF (l_debug = 1) THEN
10927: debug_print('After convert qty ' || l_return_status);
10928: END IF;
10929:
10930: IF l_return_status = fnd_api.g_ret_sts_error THEN
10931: RAISE fnd_api.g_exc_error;
10932: END IF;
10933:
10934: --

Line 10931: RAISE fnd_api.g_exc_error;

10927: debug_print('After convert qty ' || l_return_status);
10928: END IF;
10929:
10930: IF l_return_status = fnd_api.g_ret_sts_error THEN
10931: RAISE fnd_api.g_exc_error;
10932: END IF;
10933:
10934: --
10935: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10935: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10931: RAISE fnd_api.g_exc_error;
10932: END IF;
10933:
10934: --
10935: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10936: RAISE fnd_api.g_exc_unexpected_error;
10937: END IF;
10938:
10939: END IF;

Line 10936: RAISE fnd_api.g_exc_unexpected_error;

10932: END IF;
10933:
10934: --
10935: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10936: RAISE fnd_api.g_exc_unexpected_error;
10937: END IF;
10938:
10939: END IF;
10940:

Line 10970: RAISE fnd_api.g_exc_error;

10966: WHERE line_id = l_to_rsv_rec.demand_source_line_id;
10967: EXCEPTION WHEN no_data_found THEN
10968: fnd_message.set_name('INV', 'INV_INVALID_SALES_ORDER');
10969: fnd_msg_pub.ADD;
10970: RAISE fnd_api.g_exc_error;
10971: END;
10972: END IF;
10973:
10974: IF (l_debug = 1) THEN

Line 11056: IF l_return_status = fnd_api.g_ret_sts_error THEN

11052: debug_print('Available quantity to reserve. l_reservable_qty2: ' || l_reservable_qty2);
11053: END IF;
11054:
11055: --
11056: IF l_return_status = fnd_api.g_ret_sts_error THEN
11057: RAISE fnd_api.g_exc_error;
11058: END IF;
11059:
11060: --

Line 11057: RAISE fnd_api.g_exc_error;

11053: END IF;
11054:
11055: --
11056: IF l_return_status = fnd_api.g_ret_sts_error THEN
11057: RAISE fnd_api.g_exc_error;
11058: END IF;
11059:
11060: --
11061: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11061: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11057: RAISE fnd_api.g_exc_error;
11058: END IF;
11059:
11060: --
11061: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11062: RAISE fnd_api.g_exc_unexpected_error;
11063: END IF;
11064:
11065: /*Fixed for bug#8402349

Line 11062: RAISE fnd_api.g_exc_unexpected_error;

11058: END IF;
11059:
11060: --
11061: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11062: RAISE fnd_api.g_exc_unexpected_error;
11063: END IF;
11064:
11065: /*Fixed for bug#8402349
11066: Variable l_reservable_qty is used rather than variable l_quantity_reserved because

Line 11093: raise fnd_api.g_exc_error;

11089: debug_print('l_reservation_qty_lot:= '||l_reservation_qty_lot);
11090: END IF;
11091: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
11092: fnd_msg_pub.add;
11093: raise fnd_api.g_exc_error;
11094: END IF;
11095: ELSE
11096: IF ((l_reservation_qty_lot - l_reservable_qty) > 0.000005) THEN
11097: IF (l_debug = 1) THEN

Line 11103: raise fnd_api.g_exc_error;

11099: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
11100: END IF;
11101: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
11102: fnd_msg_pub.add;
11103: raise fnd_api.g_exc_error;
11104: END IF;
11105: END IF;
11106: -- MUOM fulfillment Project ends
11107: END IF;

Line 11139: IF l_return_status = fnd_api.g_ret_sts_error THEN

11135: ,x_msg_data => x_msg_data
11136: );
11137: END IF;
11138: --
11139: IF l_return_status = fnd_api.g_ret_sts_error THEN
11140: debug_print('Pre Update CTO validation returned error');
11141: RAISE fnd_api.g_exc_error;
11142: END IF;
11143:

Line 11141: RAISE fnd_api.g_exc_error;

11137: END IF;
11138: --
11139: IF l_return_status = fnd_api.g_ret_sts_error THEN
11140: debug_print('Pre Update CTO validation returned error');
11141: RAISE fnd_api.g_exc_error;
11142: END IF;
11143:
11144: --
11145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11141: RAISE fnd_api.g_exc_error;
11142: END IF;
11143:
11144: --
11145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11146: debug_print('Pre Update CTO validation returned unexpected error');
11147: RAISE fnd_api.g_exc_unexpected_error;
11148: END IF;
11149: --

Line 11147: RAISE fnd_api.g_exc_unexpected_error;

11143:
11144: --
11145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11146: debug_print('Pre Update CTO validation returned unexpected error');
11147: RAISE fnd_api.g_exc_unexpected_error;
11148: END IF;
11149: --
11150: END IF;
11151:

Line 11187: RAISE fnd_api.g_exc_error;

11183: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
11184: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
11185: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
11186: fnd_msg_pub.ADD;
11187: RAISE fnd_api.g_exc_error;
11188: END IF;
11189:
11190: -- INVCONV BEGIN
11191: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 11194: RAISE fnd_api.g_exc_error;

11190: -- INVCONV BEGIN
11191: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
11192: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
11193: fnd_msg_pub.ADD;
11194: RAISE fnd_api.g_exc_error;
11195: END IF;
11196: -- INVCONV END
11197:
11198: /**** {{ R12 Enhanced reservations code changes }}****/

Line 11246: IF l_return_status = fnd_api.g_ret_sts_error THEN

11242: debug_print('After calling validate serials ' || l_return_status);
11243: END IF;
11244:
11245: --
11246: IF l_return_status = fnd_api.g_ret_sts_error THEN
11247: RAISE fnd_api.g_exc_error;
11248: END IF;
11249:
11250:

Line 11247: RAISE fnd_api.g_exc_error;

11243: END IF;
11244:
11245: --
11246: IF l_return_status = fnd_api.g_ret_sts_error THEN
11247: RAISE fnd_api.g_exc_error;
11248: END IF;
11249:
11250:
11251: --

Line 11252: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11248: END IF;
11249:
11250:
11251: --
11252: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11253: RAISE fnd_api.g_exc_unexpected_error;
11254: END IF;
11255:
11256: -- there are some serial reserved. Check if the number of serials

Line 11253: RAISE fnd_api.g_exc_unexpected_error;

11249:
11250:
11251: --
11252: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11253: RAISE fnd_api.g_exc_unexpected_error;
11254: END IF;
11255:
11256: -- there are some serial reserved. Check if the number of serials
11257: -- exceed the reservation quantity.

Line 11283: RAISE fnd_api.g_exc_error;

11279: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
11280: END IF;
11281: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11282: fnd_msg_pub.ADD;
11283: RAISE fnd_api.g_exc_error;
11284: END;
11285: IF l_debug=1 THEN
11286: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);
11287: END IF;

Line 11326: RAISE fnd_api.g_exc_error;

11322: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
11323: END IF;
11324: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11325: fnd_msg_pub.ADD;
11326: RAISE fnd_api.g_exc_error;
11327: END;
11328: IF l_debug=1 THEN
11329: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);
11330: END IF;

Line 11364: RAISE fnd_api.g_exc_error;

11360: p_to_serial_number(i).serial_number);
11361: END IF;
11362: fnd_message.set_name('INV', 'INV_INVALID_TO_SERIAL');
11363: fnd_msg_pub.ADD;
11364: RAISE fnd_api.g_exc_error;
11365: END;
11366:
11367: IF (l_reservation_id IS NOT NULL AND l_reservation_id <>
11368: l_orig_rsv_tbl(1).reservation_id) THEN

Line 11371: RAISE fnd_api.g_exc_error;

11367: IF (l_reservation_id IS NOT NULL AND l_reservation_id <>
11368: l_orig_rsv_tbl(1).reservation_id) THEN
11369: fnd_message.set_name('INV', 'INV_INVALID_TO_SERIAL');
11370: fnd_msg_pub.ADD;
11371: RAISE fnd_api.g_exc_error;
11372: END IF;
11373:
11374: -- If the serial is not reserved then it should not have the
11375: -- group mark id stamped. It means it is being used by

Line 11384: RAISE fnd_api.g_exc_error;

11380: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
11381: END IF;
11382: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11383: fnd_msg_pub.ADD;
11384: RAISE fnd_api.g_exc_error;
11385: END IF;
11386:
11387: END LOOP;
11388:

Line 11411: RAISE fnd_api.g_exc_error;

11407: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
11408: END IF;
11409: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11410: fnd_msg_pub.ADD;
11411: RAISE fnd_api.g_exc_error;
11412: END;
11413: END LOOP;
11414: END IF;
11415:

Line 11442: RAISE fnd_api.g_exc_error;

11438: record. serial number: ' || p_to_serial_number(i).serial_number);
11439: END IF;
11440: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11441: fnd_msg_pub.ADD;
11442: RAISE fnd_api.g_exc_error;
11443: END;
11444: END LOOP;
11445: END IF;
11446:

Line 11512: RAISE fnd_api.g_exc_error;

11508: debug_print('Inside relieve serials.No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
11509: END IF;
11510: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
11511: fnd_msg_pub.ADD;
11512: RAISE fnd_api.g_exc_error;
11513: END;
11514: END LOOP;
11515: -- update the serial reservation quantity to be the primary
11516: -- reservation quantity, as it is in excess.

Line 11666: IF l_return_status = fnd_api.g_ret_sts_error THEN

11662: debug_print('Calling inv_rsv_synch.for_update');
11663: END IF;
11664: inv_rsv_synch.for_update(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11665:
11666: IF l_return_status = fnd_api.g_ret_sts_error THEN
11667: RAISE fnd_api.g_exc_error;
11668: END IF;
11669:
11670: --

Line 11667: RAISE fnd_api.g_exc_error;

11663: END IF;
11664: inv_rsv_synch.for_update(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
11665:
11666: IF l_return_status = fnd_api.g_ret_sts_error THEN
11667: RAISE fnd_api.g_exc_error;
11668: END IF;
11669:
11670: --
11671: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11671: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11667: RAISE fnd_api.g_exc_error;
11668: END IF;
11669:
11670: --
11671: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11672: RAISE fnd_api.g_exc_unexpected_error;
11673: END IF;
11674:
11675: --

Line 11672: RAISE fnd_api.g_exc_unexpected_error;

11668: END IF;
11669:
11670: --
11671: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11672: RAISE fnd_api.g_exc_unexpected_error;
11673: END IF;
11674:
11675: --
11676: -- Post Update CTO Validation

Line 11703: IF l_return_status = fnd_api.g_ret_sts_error THEN

11699: ,x_msg_data => x_msg_data
11700: );
11701: END IF;
11702: --
11703: IF l_return_status = fnd_api.g_ret_sts_error THEN
11704: RAISE fnd_api.g_exc_error;
11705: END IF;
11706:
11707: --

Line 11704: RAISE fnd_api.g_exc_error;

11700: );
11701: END IF;
11702: --
11703: IF l_return_status = fnd_api.g_ret_sts_error THEN
11704: RAISE fnd_api.g_exc_error;
11705: END IF;
11706:
11707: --
11708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11704: RAISE fnd_api.g_exc_error;
11705: END IF;
11706:
11707: --
11708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11709: RAISE fnd_api.g_exc_unexpected_error;
11710: END IF;
11711: --
11712: END IF;

Line 11709: RAISE fnd_api.g_exc_unexpected_error;

11705: END IF;
11706:
11707: --
11708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11709: RAISE fnd_api.g_exc_unexpected_error;
11710: END IF;
11711: --
11712: END IF;
11713:

Line 11732: WHEN fnd_api.g_exc_error THEN

11728: x_secondary_quantity_reserved:=l_secondary_quantity_reserved;
11729: END IF;
11730: -- INVCONV END
11731: EXCEPTION
11732: WHEN fnd_api.g_exc_error THEN
11733: IF (l_debug = 1) THEN
11734: debug_print('Exception');
11735: END IF;
11736: ROLLBACK TO update_reservation_sa;

Line 11737: x_return_status := fnd_api.g_ret_sts_error;

11733: IF (l_debug = 1) THEN
11734: debug_print('Exception');
11735: END IF;
11736: ROLLBACK TO update_reservation_sa;
11737: x_return_status := fnd_api.g_ret_sts_error;
11738: /**** {{ R12 Enhanced reservations code changes. Should be
11739: -- releasing the locks. }} *****/
11740: IF l_lock_obtained THEN
11741: inv_reservation_lock_pvt.release_lock

Line 11749: WHEN fnd_api.g_exc_unexpected_error THEN

11745: END IF;
11746: /*** End R12 ***/
11747: -- Get message count and data
11748: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11749: WHEN fnd_api.g_exc_unexpected_error THEN
11750: IF (l_debug = 1) THEN
11751: debug_print('Exception Unexpected');
11752: END IF;
11753: ROLLBACK TO update_reservation_sa;

Line 11754: x_return_status := fnd_api.g_ret_sts_unexp_error;

11750: IF (l_debug = 1) THEN
11751: debug_print('Exception Unexpected');
11752: END IF;
11753: ROLLBACK TO update_reservation_sa;
11754: x_return_status := fnd_api.g_ret_sts_unexp_error;
11755: /**** {{ R12 Enhanced reservations code changes. Should be
11756: -- releasing the locks. }} *****/
11757: IF l_lock_obtained THEN
11758: inv_reservation_lock_pvt.release_lock

Line 11771: x_return_status := fnd_api.g_ret_sts_unexp_error;

11767: IF (l_debug = 1) THEN
11768: debug_print('Exception Others'|| SQLERRM);
11769: END IF;
11770: ROLLBACK TO update_reservation_sa;
11771: x_return_status := fnd_api.g_ret_sts_unexp_error;
11772: /**** {{ R12 Enhanced reservations code changes. Should be
11773: -- releasing the locks. }} *****/
11774: IF l_lock_obtained THEN
11775: inv_reservation_lock_pvt.release_lock

Line 11792: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

11788:
11789: --
11790: PROCEDURE relieve_reservation(
11791: p_api_version_number IN NUMBER
11792: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
11793: , x_return_status OUT NOCOPY VARCHAR2
11794: , x_msg_count OUT NOCOPY NUMBER
11795: , x_msg_data OUT NOCOPY VARCHAR2
11796: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 11799: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true

11795: , x_msg_data OUT NOCOPY VARCHAR2
11796: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
11797: , p_primary_relieved_quantity IN NUMBER
11798: , p_secondary_relieved_quantity IN NUMBER -- INVCONV
11799: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true
11800: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
11801: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11802: , x_primary_relieved_quantity OUT NOCOPY NUMBER
11803: , x_secondary_relieved_quantity OUT NOCOPY NUMBER -- INVCONV

Line 11801: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

11797: , p_primary_relieved_quantity IN NUMBER
11798: , p_secondary_relieved_quantity IN NUMBER -- INVCONV
11799: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true
11800: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
11801: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11802: , x_primary_relieved_quantity OUT NOCOPY NUMBER
11803: , x_secondary_relieved_quantity OUT NOCOPY NUMBER -- INVCONV
11804: , x_primary_remain_quantity OUT NOCOPY NUMBER
11805: , x_secondary_remain_quantity OUT NOCOPY NUMBER -- INVCONV

Line 11809: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

11805: , x_secondary_remain_quantity OUT NOCOPY NUMBER -- INVCONV
11806: ) IS
11807: l_api_version_number CONSTANT NUMBER := 1.0;
11808: l_api_name CONSTANT VARCHAR2(30) := 'Relieve_Reservation';
11809: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
11810: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
11811: l_tmp_rsv_tbl_count NUMBER;
11812: l_reservation_id NUMBER;
11813: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

Line 11851: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

11847: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
11848: /*** End R12 }} ***/
11849: BEGIN
11850: -- Standard call to check for call compatibility
11851: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11852: RAISE fnd_api.g_exc_unexpected_error;
11853: END IF;
11854:
11855: --

Line 11852: RAISE fnd_api.g_exc_unexpected_error;

11848: /*** End R12 }} ***/
11849: BEGIN
11850: -- Standard call to check for call compatibility
11851: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11852: RAISE fnd_api.g_exc_unexpected_error;
11853: END IF;
11854:
11855: --
11856: -- Initialize message list.

Line 11857: IF fnd_api.to_boolean(p_init_msg_lst) THEN

11853: END IF;
11854:
11855: --
11856: -- Initialize message list.
11857: IF fnd_api.to_boolean(p_init_msg_lst) THEN
11858: fnd_msg_pub.initialize;
11859: END IF;
11860:
11861: --

Line 11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

11878: -- Set the original columns to g_miss_xxx as the user should not be
11879: -- setting these values. Do not query by them
11880: l_rsv_rec := p_rsv_rec;
11881:
11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

11879: -- setting these values. Do not query by them
11880: l_rsv_rec := p_rsv_rec;
11881:
11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

11880: l_rsv_rec := p_rsv_rec;
11881:
11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

11881:
11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

11882: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11890:

Line 11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

11883: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11890:
11891: /*** End R12 }} ***/

Line 11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

11884: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11890:
11891: /*** End R12 }} ***/
11892:

Line 11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

11885: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11886: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11887: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11888: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11889: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11890:
11891: /*** End R12 }} ***/
11892:
11893: IF (l_debug = 1) THEN

Line 11898: , p_init_msg_lst => fnd_api.g_false

11894: debug_print('calling query_reservation');
11895: END IF;
11896: query_reservation(
11897: p_api_version_number => 1.0
11898: , p_init_msg_lst => fnd_api.g_false
11899: , x_return_status => l_return_status
11900: , x_msg_count => x_msg_count
11901: , x_msg_data => x_msg_data
11902: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/

Line 11903: , p_lock_records => fnd_api.g_true

11899: , x_return_status => l_return_status
11900: , x_msg_count => x_msg_count
11901: , x_msg_data => x_msg_data
11902: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/
11903: , p_lock_records => fnd_api.g_true
11904: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
11905: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
11906: , x_error_code => l_error_code
11907: );

Line 11910: IF l_return_status = fnd_api.g_ret_sts_error THEN

11906: , x_error_code => l_error_code
11907: );
11908:
11909: --
11910: IF l_return_status = fnd_api.g_ret_sts_error THEN
11911: IF (l_debug = 1) THEN
11912: debug_print( 'error from query reservation');
11913: END IF;
11914: RAISE fnd_api.g_exc_error;

Line 11914: RAISE fnd_api.g_exc_error;

11910: IF l_return_status = fnd_api.g_ret_sts_error THEN
11911: IF (l_debug = 1) THEN
11912: debug_print( 'error from query reservation');
11913: END IF;
11914: RAISE fnd_api.g_exc_error;
11915: END IF;
11916:
11917: --
11918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11914: RAISE fnd_api.g_exc_error;
11915: END IF;
11916:
11917: --
11918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11919: IF (l_debug = 1) THEN
11920: debug_print('error from query reservation');
11921: END IF;
11922: RAISE fnd_api.g_exc_unexpected_error;

Line 11922: RAISE fnd_api.g_exc_unexpected_error;

11918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11919: IF (l_debug = 1) THEN
11920: debug_print('error from query reservation');
11921: END IF;
11922: RAISE fnd_api.g_exc_unexpected_error;
11923: END IF;
11924:
11925: --
11926: IF l_tmp_rsv_tbl_count = 0 THEN

Line 11932: RAISE fnd_api.g_exc_error;

11928: debug_print('reservation not found ');
11929: END IF;
11930: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
11931: fnd_msg_pub.ADD;
11932: RAISE fnd_api.g_exc_error;
11933: END IF;
11934:
11935: --
11936: IF l_tmp_rsv_tbl_count > 1 THEN

Line 11942: RAISE fnd_api.g_exc_error;

11938: debug_print('found more than one row reservation');
11939: END IF;
11940: fnd_message.set_name('INV', 'INV-RELIEVE MORE THAN ONE ROW');
11941: fnd_msg_pub.ADD;
11942: RAISE fnd_api.g_exc_error;
11943: END IF;
11944:
11945: --
11946: l_reservation_id := l_tmp_rsv_tbl(1).reservation_id;

Line 11951: IF p_validation_flag = fnd_api.g_true THEN

11947: IF (l_debug = 1) THEN
11948: debug_print('reservation id is ' || l_reservation_id);
11949: END IF;
11950:
11951: IF p_validation_flag = fnd_api.g_true THEN
11952: -- validation is needed to get revision, lot,
11953: --serial control information
11954: -- for creating the quantity tree
11955:

Line 11960: (l_tmp_rsv_tbl(1).crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

11956: -- added for crossdock reservation, pass the to reservation record
11957: -- with values instead of dummy record with the remain quantity
11958: -- populated to the record.
11959: IF ((l_tmp_rsv_tbl(1).crossdock_criteria_id is not null) and
11960: (l_tmp_rsv_tbl(1).crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
11961: IF (l_debug = 1) THEN
11962: debug_print('assigning cross dock to record');
11963: END IF;
11964:

Line 11965: IF (p_relieve_all = fnd_api.g_false) THEN

11961: IF (l_debug = 1) THEN
11962: debug_print('assigning cross dock to record');
11963: END IF;
11964:
11965: IF (p_relieve_all = fnd_api.g_false) THEN
11966: IF (l_debug = 1) THEN
11967: debug_print('relieve all is false');
11968: END IF;
11969: l_primary_remain_quantity :=

Line 12013: IF l_return_status = fnd_api.g_ret_sts_error THEN

12009: , x_to_sub_cache_index => l_to_sub_cache_index
12010: );
12011:
12012: --
12013: IF l_return_status = fnd_api.g_ret_sts_error THEN
12014: IF (l_debug = 1) THEN
12015: debug_print('Error in validate_input_parameters');
12016: END IF;
12017: RAISE fnd_api.g_exc_error;

Line 12017: RAISE fnd_api.g_exc_error;

12013: IF l_return_status = fnd_api.g_ret_sts_error THEN
12014: IF (l_debug = 1) THEN
12015: debug_print('Error in validate_input_parameters');
12016: END IF;
12017: RAISE fnd_api.g_exc_error;
12018: END IF;
12019:
12020: --
12021: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12021: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12017: RAISE fnd_api.g_exc_error;
12018: END IF;
12019:
12020: --
12021: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12022: IF (l_debug = 1) THEN
12023: debug_print('Unexpected error in validate_input_parameters');
12024: END IF;
12025: RAISE fnd_api.g_exc_unexpected_error;

Line 12025: RAISE fnd_api.g_exc_unexpected_error;

12021: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12022: IF (l_debug = 1) THEN
12023: debug_print('Unexpected error in validate_input_parameters');
12024: END IF;
12025: RAISE fnd_api.g_exc_unexpected_error;
12026: END IF;
12027:
12028: --
12029: -- INVCONV BEGIN

Line 12037: AND p_relieve_all <> fnd_api.g_true THEN

12033: -- INVCONV END
12034: --
12035: -- check quantity
12036: IF p_primary_relieved_quantity IS NULL
12037: AND p_relieve_all <> fnd_api.g_true THEN
12038: IF (l_debug = 1) THEN
12039: debug_print('relieve_quantity_not_specified');
12040: END IF;
12041: fnd_message.set_name('INV', 'RELIEVE_QUANTITY_NOT_SPECIFIED');

Line 12043: RAISE fnd_api.g_exc_error;

12039: debug_print('relieve_quantity_not_specified');
12040: END IF;
12041: fnd_message.set_name('INV', 'RELIEVE_QUANTITY_NOT_SPECIFIED');
12042: fnd_msg_pub.ADD;
12043: RAISE fnd_api.g_exc_error;
12044: END IF;
12045:
12046: IF p_primary_relieved_quantity > l_tmp_rsv_tbl(1).primary_reservation_quantity THEN
12047: IF (l_debug = 1) THEN

Line 12052: RAISE fnd_api.g_exc_unexpected_error;

12048: debug_print('relieve_more_than_reserved');
12049: END IF;
12050: fnd_message.set_name('INV', 'RELIEVE_MORE_THAN_RESERVED');
12051: fnd_msg_pub.ADD;
12052: RAISE fnd_api.g_exc_unexpected_error;
12053: END IF;
12054:
12055: IF is_dual_control(l_orig_item_cache_index) THEN
12056: l_dual_control_flag := 'Y';

Line 12059: IF p_relieve_all = fnd_api.g_true THEN

12055: IF is_dual_control(l_orig_item_cache_index) THEN
12056: l_dual_control_flag := 'Y';
12057: END IF;
12058:
12059: IF p_relieve_all = fnd_api.g_true THEN
12060: l_primary_relieved_quantity := l_tmp_rsv_tbl(1).primary_reservation_quantity;
12061: l_primary_remain_quantity := 0;
12062: -- INVCONV BEGIN
12063: IF l_dual_control_flag = 'Y' THEN

Line 12088: , p_init_msg_lst => fnd_api.g_true

12084: debug_print('calling inv_quantity_tree_pvt.create_tree');
12085: END IF;
12086: inv_quantity_tree_pvt.create_tree(
12087: p_api_version_number => 1.0
12088: , p_init_msg_lst => fnd_api.g_true
12089: , x_return_status => l_return_status
12090: , x_msg_count => x_msg_count
12091: , x_msg_data => x_msg_data
12092: , p_organization_id => l_tmp_rsv_tbl(1).organization_id

Line 12109: IF l_return_status = fnd_api.g_ret_sts_error THEN

12105: , p_lot_expiration_date => NULL
12106: , x_tree_id => l_tree_id
12107: );
12108:
12109: IF l_return_status = fnd_api.g_ret_sts_error THEN
12110: IF (l_debug = 1) THEN
12111: debug_print('error calling inv_quantity_tree_pvt.create_tree');
12112: END IF;
12113: RAISE fnd_api.g_exc_error;

Line 12113: RAISE fnd_api.g_exc_error;

12109: IF l_return_status = fnd_api.g_ret_sts_error THEN
12110: IF (l_debug = 1) THEN
12111: debug_print('error calling inv_quantity_tree_pvt.create_tree');
12112: END IF;
12113: RAISE fnd_api.g_exc_error;
12114: END IF;
12115:
12116: --
12117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12113: RAISE fnd_api.g_exc_error;
12114: END IF;
12115:
12116: --
12117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12118: IF (l_debug = 1) THEN
12119: debug_print('unexpected error calling inv_quantity_tree_pvt.create_tree');
12120: END IF;
12121: RAISE fnd_api.g_exc_unexpected_error;

Line 12121: RAISE fnd_api.g_exc_unexpected_error;

12117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12118: IF (l_debug = 1) THEN
12119: debug_print('unexpected error calling inv_quantity_tree_pvt.create_tree');
12120: END IF;
12121: RAISE fnd_api.g_exc_unexpected_error;
12122: END IF;
12123:
12124: IF (l_debug = 1) THEN
12125: debug_print('calling modify_tree_crt_del_rel');

Line 12142: , p_partial_reservation_flag => fnd_api.g_false

12138: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
12139: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12140: , p_relieve_quantity => l_primary_relieved_quantity
12141: , p_secondary_relieve_quantity => l_secondary_relieved_quantity
12142: , p_partial_reservation_flag => fnd_api.g_false
12143: , p_force_reservation_flag => fnd_api.g_false
12144: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12145: , p_action => 'RELIEVE'
12146: , x_qty_changed => l_qty_changed

Line 12143: , p_force_reservation_flag => fnd_api.g_false

12139: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12140: , p_relieve_quantity => l_primary_relieved_quantity
12141: , p_secondary_relieve_quantity => l_secondary_relieved_quantity
12142: , p_partial_reservation_flag => fnd_api.g_false
12143: , p_force_reservation_flag => fnd_api.g_false
12144: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12145: , p_action => 'RELIEVE'
12146: , x_qty_changed => l_qty_changed
12147: , x_secondary_qty_changed => l_secondary_qty_changed

Line 12154: IF l_return_status = fnd_api.g_ret_sts_error THEN

12150: , p_demand_source_type_id => l_tmp_rsv_tbl(1).demand_source_type_id
12151: );
12152:
12153: --
12154: IF l_return_status = fnd_api.g_ret_sts_error THEN
12155: IF (l_debug = 1) THEN
12156: debug_print('error calling modify_tree_crt_del_rel');
12157: END IF;
12158: RAISE fnd_api.g_exc_error;

Line 12158: RAISE fnd_api.g_exc_error;

12154: IF l_return_status = fnd_api.g_ret_sts_error THEN
12155: IF (l_debug = 1) THEN
12156: debug_print('error calling modify_tree_crt_del_rel');
12157: END IF;
12158: RAISE fnd_api.g_exc_error;
12159: END IF;
12160:
12161: --
12162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12158: RAISE fnd_api.g_exc_error;
12159: END IF;
12160:
12161: --
12162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12163: IF (l_debug = 1) THEN
12164: debug_print('unexpected error calling modify_tree_crt_del_rel');
12165: END IF;
12166: RAISE fnd_api.g_exc_unexpected_error;

Line 12166: RAISE fnd_api.g_exc_unexpected_error;

12162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12163: IF (l_debug = 1) THEN
12164: debug_print('unexpected error calling modify_tree_crt_del_rel');
12165: END IF;
12166: RAISE fnd_api.g_exc_unexpected_error;
12167: END IF;
12168: --
12169: END IF;
12170: END IF;

Line 12190: IF l_return_status = fnd_api.g_ret_sts_error THEN

12186: , x_msg_count => x_msg_count
12187: , x_msg_data => x_msg_data
12188: );
12189:
12190: IF l_return_status = fnd_api.g_ret_sts_error THEN
12191: IF (l_debug = 1) THEN
12192: debug_print('error calling inv_rsv_synch.for_delete');
12193: END IF;
12194: RAISE fnd_api.g_exc_error;

Line 12194: RAISE fnd_api.g_exc_error;

12190: IF l_return_status = fnd_api.g_ret_sts_error THEN
12191: IF (l_debug = 1) THEN
12192: debug_print('error calling inv_rsv_synch.for_delete');
12193: END IF;
12194: RAISE fnd_api.g_exc_error;
12195: END IF;
12196:
12197: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12198: IF (l_debug = 1) THEN

Line 12197: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12193: END IF;
12194: RAISE fnd_api.g_exc_error;
12195: END IF;
12196:
12197: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12198: IF (l_debug = 1) THEN
12199: debug_print('unexpected error calling inv_rsv_synch.for_delete');
12200: END IF;
12201: RAISE fnd_api.g_exc_unexpected_error;

Line 12201: RAISE fnd_api.g_exc_unexpected_error;

12197: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12198: IF (l_debug = 1) THEN
12199: debug_print('unexpected error calling inv_rsv_synch.for_delete');
12200: END IF;
12201: RAISE fnd_api.g_exc_unexpected_error;
12202: END IF;
12203: -- End changes for bug 3827307
12204:
12205: /*** {{ R12 Enhanced reservations code changes ***/

Line 12249: IF l_return_status = fnd_api.g_ret_sts_error THEN

12245: , x_msg_count => x_msg_count
12246: , x_msg_data => x_msg_data
12247: );
12248:
12249: IF l_return_status = fnd_api.g_ret_sts_error THEN
12250: IF (l_debug = 1) THEN
12251: debug_print('error calling inv_rsv_synch.for_relieve');
12252: END IF;
12253: RAISE fnd_api.g_exc_error;

Line 12253: RAISE fnd_api.g_exc_error;

12249: IF l_return_status = fnd_api.g_ret_sts_error THEN
12250: IF (l_debug = 1) THEN
12251: debug_print('error calling inv_rsv_synch.for_relieve');
12252: END IF;
12253: RAISE fnd_api.g_exc_error;
12254: END IF;
12255:
12256: --
12257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12253: RAISE fnd_api.g_exc_error;
12254: END IF;
12255:
12256: --
12257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12258: IF (l_debug = 1) THEN
12259: debug_print('unexpected error calling inv_rsv_synch.for_relieve');
12260: END IF;
12261: RAISE fnd_api.g_exc_unexpected_error;

Line 12261: RAISE fnd_api.g_exc_unexpected_error;

12257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12258: IF (l_debug = 1) THEN
12259: debug_print('unexpected error calling inv_rsv_synch.for_relieve');
12260: END IF;
12261: RAISE fnd_api.g_exc_unexpected_error;
12262: END IF;
12263:
12264: -- End changes Bug3830160.
12265:

Line 12284: IF l_return_status = fnd_api.g_ret_sts_error THEN

12280: END IF;
12281: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_tmp_rsv_tbl(1));
12282:
12283: --
12284: IF l_return_status = fnd_api.g_ret_sts_error THEN
12285: RAISE fnd_api.g_exc_error;
12286: END IF;
12287:
12288: --

Line 12285: RAISE fnd_api.g_exc_error;

12281: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_tmp_rsv_tbl(1));
12282:
12283: --
12284: IF l_return_status = fnd_api.g_ret_sts_error THEN
12285: RAISE fnd_api.g_exc_error;
12286: END IF;
12287:
12288: --
12289: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12289: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12285: RAISE fnd_api.g_exc_error;
12286: END IF;
12287:
12288: --
12289: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12290: RAISE fnd_api.g_exc_unexpected_error;
12291: END IF;
12292:
12293: -- obtain program and user info

Line 12290: RAISE fnd_api.g_exc_unexpected_error;

12286: END IF;
12287:
12288: --
12289: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12290: RAISE fnd_api.g_exc_unexpected_error;
12291: END IF;
12292:
12293: -- obtain program and user info
12294: l_date := SYSDATE;

Line 12323: RAISE fnd_api.g_exc_error;

12319: IF ( (NVL(l_tmp_rsv_tbl(1).reservation_quantity,0) < 0) OR
12320: (NVL(l_tmp_rsv_tbl(1).primary_reservation_quantity,0) < 0) ) THEN
12321: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
12322: fnd_msg_pub.ADD;
12323: RAISE fnd_api.g_exc_error;
12324: END IF;
12325:
12326: -- INVCONV BEGIN
12327: IF (NVL(l_tmp_rsv_tbl(1).secondary_reservation_quantity,0) < 0) THEN

Line 12330: RAISE fnd_api.g_exc_error;

12326: -- INVCONV BEGIN
12327: IF (NVL(l_tmp_rsv_tbl(1).secondary_reservation_quantity,0) < 0) THEN
12328: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY');
12329: fnd_msg_pub.ADD;
12330: RAISE fnd_api.g_exc_error;
12331: END IF;
12332: -- INVCONV END
12333:
12334: /*** {{ R12 Enhanced reservations code changes ***/

Line 12413: RAISE fnd_api.g_exc_error;

12409: debug_print('No serials found for reservation record. id = ' || l_reservation_id);
12410: END IF;
12411: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
12412: fnd_msg_pub.add;
12413: RAISE fnd_api.g_exc_error;
12414: END;
12415:
12416: IF (l_debug = 1) THEN
12417: debug_print('After query serials');

Line 12429: RAISE fnd_api.g_exc_error;

12425: debug_print('Not enough serials to unreserved for reservation record. id = ' || l_reservation_id);
12426: END IF;
12427: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
12428: fnd_msg_pub.add;
12429: RAISE fnd_api.g_exc_error;
12430: END IF;
12431:
12432: FOR i in 1..l_count_to_unrsv_serials LOOP
12433: BEGIN

Line 12493: RAISE fnd_api.g_exc_error;

12489: debug_print('No serial found for reservation record. id = ' || l_reservation_id);
12490: END IF;
12491: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
12492: fnd_msg_pub.add;
12493: RAISE fnd_api.g_exc_error;
12494: END;
12495:
12496: IF (l_serial_number_table.COUNT < l_count_to_unrsv_serials) THEN
12497: IF (l_debug = 1) THEN

Line 12502: RAISE fnd_api.g_exc_error;

12498: debug_print('Not enough serials to unreserved for reservation record. id = ' || l_reservation_id);
12499: END IF;
12500: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
12501: fnd_msg_pub.add;
12502: RAISE fnd_api.g_exc_error;
12503: END IF;
12504:
12505: FOR i in 1..l_count_to_unrsv_serials LOOP
12506: BEGIN

Line 12563: WHEN fnd_api.g_exc_error THEN

12559: -- INVCONV END
12560: x_return_status := l_return_status;
12561: --
12562: EXCEPTION
12563: WHEN fnd_api.g_exc_error THEN
12564: ROLLBACK TO relieve_reservation_sa;
12565: x_return_status := fnd_api.g_ret_sts_error;
12566: -- Get message count and data
12567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 12565: x_return_status := fnd_api.g_ret_sts_error;

12561: --
12562: EXCEPTION
12563: WHEN fnd_api.g_exc_error THEN
12564: ROLLBACK TO relieve_reservation_sa;
12565: x_return_status := fnd_api.g_ret_sts_error;
12566: -- Get message count and data
12567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12568: WHEN fnd_api.g_exc_unexpected_error THEN
12569: ROLLBACK TO relieve_reservation_sa;

Line 12568: WHEN fnd_api.g_exc_unexpected_error THEN

12564: ROLLBACK TO relieve_reservation_sa;
12565: x_return_status := fnd_api.g_ret_sts_error;
12566: -- Get message count and data
12567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12568: WHEN fnd_api.g_exc_unexpected_error THEN
12569: ROLLBACK TO relieve_reservation_sa;
12570: x_return_status := fnd_api.g_ret_sts_unexp_error;
12571: -- Get message count and data
12572: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 12570: x_return_status := fnd_api.g_ret_sts_unexp_error;

12566: -- Get message count and data
12567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12568: WHEN fnd_api.g_exc_unexpected_error THEN
12569: ROLLBACK TO relieve_reservation_sa;
12570: x_return_status := fnd_api.g_ret_sts_unexp_error;
12571: -- Get message count and data
12572: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12573: WHEN OTHERS THEN
12574: ROLLBACK TO relieve_reservation_sa;

Line 12575: x_return_status := fnd_api.g_ret_sts_unexp_error;

12571: -- Get message count and data
12572: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12573: WHEN OTHERS THEN
12574: ROLLBACK TO relieve_reservation_sa;
12575: x_return_status := fnd_api.g_ret_sts_unexp_error;
12576:
12577: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12578: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12579: END IF;

Line 12588: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

12584:
12585: --
12586: PROCEDURE delete_reservation(
12587: p_api_version_number IN NUMBER
12588: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
12589: , x_return_status OUT NOCOPY VARCHAR2
12590: , x_msg_count OUT NOCOPY NUMBER
12591: , x_msg_data OUT NOCOPY VARCHAR2
12592: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 12594: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

12590: , x_msg_count OUT NOCOPY NUMBER
12591: , x_msg_data OUT NOCOPY VARCHAR2
12592: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
12593: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
12594: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
12595: ) IS
12596: l_api_version_number CONSTANT NUMBER := 1.0;
12597: l_api_name CONSTANT VARCHAR2(30) := 'Delete_Reservation';
12598: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 12598: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

12594: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
12595: ) IS
12596: l_api_version_number CONSTANT NUMBER := 1.0;
12597: l_api_name CONSTANT VARCHAR2(30) := 'Delete_Reservation';
12598: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
12599: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
12600: l_tmp_rsv_tbl_count NUMBER;
12601: l_reservation_id NUMBER;
12602: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

Line 12642: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

12638: IF (l_debug = 1) THEN
12639: debug_print('Inside delete reservation...');
12640: END IF;
12641: -- Standard call to check for call compatibility
12642: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
12643: RAISE fnd_api.g_exc_unexpected_error;
12644: END IF;
12645:
12646: --

Line 12643: RAISE fnd_api.g_exc_unexpected_error;

12639: debug_print('Inside delete reservation...');
12640: END IF;
12641: -- Standard call to check for call compatibility
12642: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
12643: RAISE fnd_api.g_exc_unexpected_error;
12644: END IF;
12645:
12646: --
12647: -- Initialize message list.

Line 12648: IF fnd_api.to_boolean(p_init_msg_lst) THEN

12644: END IF;
12645:
12646: --
12647: -- Initialize message list.
12648: IF fnd_api.to_boolean(p_init_msg_lst) THEN
12649: fnd_msg_pub.initialize;
12650: END IF;
12651:
12652: /**** {{ R12 Enhanced reservations code changes ****/

Line 12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

12653: -- Set the original columns to g_miss_xxx as the user should not be
12654: -- setting these values. Do not query by them
12655: l_rsv_rec := p_rsv_rec;
12656:
12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

12654: -- setting these values. Do not query by them
12655: l_rsv_rec := p_rsv_rec;
12656:
12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

12655: l_rsv_rec := p_rsv_rec;
12656:
12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

12656:
12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

12657: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12665:

Line 12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

12658: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12665:
12666: /*** End R12 }} ***/

Line 12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

12659: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12665:
12666: /*** End R12 }} ***/
12667:

Line 12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

12660: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12661: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12662: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12663: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12664: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12665:
12666: /*** End R12 }} ***/
12667:
12668: IF (l_debug = 1) THEN

Line 12674: , p_init_msg_lst => fnd_api.g_false

12670: END IF;
12671: --
12672: query_reservation(
12673: p_api_version_number => 1.0
12674: , p_init_msg_lst => fnd_api.g_false
12675: , x_return_status => l_return_status
12676: , x_msg_count => x_msg_count
12677: , x_msg_data => x_msg_data
12678: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/

Line 12679: , p_lock_records => fnd_api.g_true

12675: , x_return_status => l_return_status
12676: , x_msg_count => x_msg_count
12677: , x_msg_data => x_msg_data
12678: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/
12679: , p_lock_records => fnd_api.g_true
12680: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
12681: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
12682: , x_error_code => l_error_code
12683: );

Line 12686: IF l_return_status = fnd_api.g_ret_sts_error THEN

12682: , x_error_code => l_error_code
12683: );
12684:
12685: --
12686: IF l_return_status = fnd_api.g_ret_sts_error THEN
12687: RAISE fnd_api.g_exc_error;
12688: END IF;
12689:
12690: --

Line 12687: RAISE fnd_api.g_exc_error;

12683: );
12684:
12685: --
12686: IF l_return_status = fnd_api.g_ret_sts_error THEN
12687: RAISE fnd_api.g_exc_error;
12688: END IF;
12689:
12690: --
12691: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12691: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12687: RAISE fnd_api.g_exc_error;
12688: END IF;
12689:
12690: --
12691: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12692: RAISE fnd_api.g_exc_unexpected_error;
12693: END IF;
12694:
12695: --

Line 12692: RAISE fnd_api.g_exc_unexpected_error;

12688: END IF;
12689:
12690: --
12691: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12692: RAISE fnd_api.g_exc_unexpected_error;
12693: END IF;
12694:
12695: --
12696: IF l_tmp_rsv_tbl_count = 0 THEN

Line 12699: RAISE fnd_api.g_exc_error;

12695: --
12696: IF l_tmp_rsv_tbl_count = 0 THEN
12697: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
12698: fnd_msg_pub.ADD;
12699: RAISE fnd_api.g_exc_error;
12700: END IF;
12701:
12702: IF (l_debug = 1) THEN
12703: debug_print('After calling query reservation... ' || l_return_status);

Line 12710: RAISE fnd_api.g_exc_error;

12706: --
12707: IF l_tmp_rsv_tbl_count > 1 THEN
12708: fnd_message.set_name('INV', 'INV-DELETE MORE THAN ONE ROW');
12709: fnd_msg_pub.ADD;
12710: RAISE fnd_api.g_exc_error;
12711: END IF;
12712:
12713: --
12714: l_reservation_id := l_tmp_rsv_tbl(1).reservation_id;

Line 12721: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN

12717: IF (l_debug = 1) THEN
12718: debug_print('Before calling validate...');
12719: END IF;
12720: -- Bug 2354735: Proceed with Validation if p_validation_flag = 'T' or 'V'
12721: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN
12722: -- validation is needed to get revision, lot,
12723: --serial control information
12724: -- for creating the quantity tree
12725: inv_reservation_validate_pvt.validate_input_parameters(

Line 12745: IF l_return_status = fnd_api.g_ret_sts_error THEN

12741: , x_to_sub_cache_index => l_to_sub_cache_index
12742: );
12743:
12744: --
12745: IF l_return_status = fnd_api.g_ret_sts_error THEN
12746: RAISE fnd_api.g_exc_error;
12747: END IF;
12748:
12749: --

Line 12746: RAISE fnd_api.g_exc_error;

12742: );
12743:
12744: --
12745: IF l_return_status = fnd_api.g_ret_sts_error THEN
12746: RAISE fnd_api.g_exc_error;
12747: END IF;
12748:
12749: --
12750: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12750: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12746: RAISE fnd_api.g_exc_error;
12747: END IF;
12748:
12749: --
12750: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12751: RAISE fnd_api.g_exc_unexpected_error;
12752: END IF;
12753:
12754: --

Line 12751: RAISE fnd_api.g_exc_unexpected_error;

12747: END IF;
12748:
12749: --
12750: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12751: RAISE fnd_api.g_exc_unexpected_error;
12752: END IF;
12753:
12754: --
12755: -- INVCONV BEGIN

Line 12763: AND p_validation_flag = fnd_api.g_true THEN

12759: -- INVCONV END
12760:
12761: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
12762: IF l_tmp_rsv_tbl(1).supply_source_type_id = inv_reservation_global.g_source_type_inv
12763: AND p_validation_flag = fnd_api.g_true THEN
12764: -- call quantity processor to
12765: -- modify the tree so that the quantity tree
12766: -- reflect the deletion
12767: inv_quantity_tree_pvt.create_tree(

Line 12769: , p_init_msg_lst => fnd_api.g_true

12765: -- modify the tree so that the quantity tree
12766: -- reflect the deletion
12767: inv_quantity_tree_pvt.create_tree(
12768: p_api_version_number => 1.0
12769: , p_init_msg_lst => fnd_api.g_true
12770: , x_return_status => l_return_status
12771: , x_msg_count => x_msg_count
12772: , x_msg_data => x_msg_data
12773: , p_organization_id => l_tmp_rsv_tbl(1).organization_id

Line 12790: IF l_return_status = fnd_api.g_ret_sts_error THEN

12786: , p_lot_expiration_date => NULL
12787: , x_tree_id => l_tree_id
12788: );
12789:
12790: IF l_return_status = fnd_api.g_ret_sts_error THEN
12791: RAISE fnd_api.g_exc_error;
12792: END IF;
12793:
12794: --

Line 12791: RAISE fnd_api.g_exc_error;

12787: , x_tree_id => l_tree_id
12788: );
12789:
12790: IF l_return_status = fnd_api.g_ret_sts_error THEN
12791: RAISE fnd_api.g_exc_error;
12792: END IF;
12793:
12794: --
12795: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12795: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12791: RAISE fnd_api.g_exc_error;
12792: END IF;
12793:
12794: --
12795: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12796: RAISE fnd_api.g_exc_unexpected_error;
12797: END IF;
12798:
12799: IF (l_debug = 1) THEN

Line 12796: RAISE fnd_api.g_exc_unexpected_error;

12792: END IF;
12793:
12794: --
12795: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12796: RAISE fnd_api.g_exc_unexpected_error;
12797: END IF;
12798:
12799: IF (l_debug = 1) THEN
12800: debug_print('After calling validate...' || l_return_status);

Line 12816: , p_partial_reservation_flag => fnd_api.g_false

12812: , p_primary_reservation_quantity=> l_tmp_rsv_tbl(1).primary_reservation_quantity
12813: , p_second_reservation_quantity=> l_tmp_rsv_tbl(1).secondary_reservation_quantity
12814: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
12815: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12816: , p_partial_reservation_flag => fnd_api.g_false
12817: , p_force_reservation_flag => fnd_api.g_false
12818: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12819: , p_action => 'DELETE'
12820: , x_qty_changed => l_qty_changed

Line 12817: , p_force_reservation_flag => fnd_api.g_false

12813: , p_second_reservation_quantity=> l_tmp_rsv_tbl(1).secondary_reservation_quantity
12814: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
12815: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12816: , p_partial_reservation_flag => fnd_api.g_false
12817: , p_force_reservation_flag => fnd_api.g_false
12818: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12819: , p_action => 'DELETE'
12820: , x_qty_changed => l_qty_changed
12821: , x_secondary_qty_changed => l_secondary_qty_changed

Line 12828: IF l_return_status = fnd_api.g_ret_sts_error THEN

12824: , p_demand_source_type_id => l_tmp_rsv_tbl(1).demand_source_type_id
12825: );
12826:
12827: --
12828: IF l_return_status = fnd_api.g_ret_sts_error THEN
12829: RAISE fnd_api.g_exc_error;
12830: END IF;
12831:
12832: --

Line 12829: RAISE fnd_api.g_exc_error;

12825: );
12826:
12827: --
12828: IF l_return_status = fnd_api.g_ret_sts_error THEN
12829: RAISE fnd_api.g_exc_error;
12830: END IF;
12831:
12832: --
12833: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12833: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12829: RAISE fnd_api.g_exc_error;
12830: END IF;
12831:
12832: --
12833: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12834: RAISE fnd_api.g_exc_unexpected_error;
12835: END IF;
12836: IF (l_debug = 1) THEN
12837: debug_print('Return Status...' || l_return_status);

Line 12834: RAISE fnd_api.g_exc_unexpected_error;

12830: END IF;
12831:
12832: --
12833: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12834: RAISE fnd_api.g_exc_unexpected_error;
12835: END IF;
12836: IF (l_debug = 1) THEN
12837: debug_print('Return Status...' || l_return_status);
12838: END IF;

Line 12856: IF l_return_status = fnd_api.g_ret_sts_error THEN

12852: , x_msg_data => x_msg_data
12853: );
12854:
12855: --
12856: IF l_return_status = fnd_api.g_ret_sts_error THEN
12857: RAISE fnd_api.g_exc_error;
12858: END IF;
12859:
12860: --

Line 12857: RAISE fnd_api.g_exc_error;

12853: );
12854:
12855: --
12856: IF l_return_status = fnd_api.g_ret_sts_error THEN
12857: RAISE fnd_api.g_exc_error;
12858: END IF;
12859:
12860: --
12861: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12861: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12857: RAISE fnd_api.g_exc_error;
12858: END IF;
12859:
12860: --
12861: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12862: RAISE fnd_api.g_exc_unexpected_error;
12863: END IF;
12864: --
12865: END IF;

Line 12862: RAISE fnd_api.g_exc_unexpected_error;

12858: END IF;
12859:
12860: --
12861: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12862: RAISE fnd_api.g_exc_unexpected_error;
12863: END IF;
12864: --
12865: END IF;
12866: IF (l_debug = 1) THEN

Line 12874: IF l_return_status = fnd_api.g_ret_sts_error THEN

12870: --
12871: -- for data sync b/w mtl_demand and mtl_reservations
12872: inv_rsv_synch.for_delete(p_reservation_id => l_reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
12873:
12874: IF l_return_status = fnd_api.g_ret_sts_error THEN
12875: RAISE fnd_api.g_exc_error;
12876: END IF;
12877:
12878: --

Line 12875: RAISE fnd_api.g_exc_error;

12871: -- for data sync b/w mtl_demand and mtl_reservations
12872: inv_rsv_synch.for_delete(p_reservation_id => l_reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
12873:
12874: IF l_return_status = fnd_api.g_ret_sts_error THEN
12875: RAISE fnd_api.g_exc_error;
12876: END IF;
12877:
12878: --
12879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12875: RAISE fnd_api.g_exc_error;
12876: END IF;
12877:
12878: --
12879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12880: RAISE fnd_api.g_exc_unexpected_error;
12881: END IF;
12882:
12883: /*** {{ R12 Enhanced reservations code changes ***/

Line 12880: RAISE fnd_api.g_exc_unexpected_error;

12876: END IF;
12877:
12878: --
12879: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12880: RAISE fnd_api.g_exc_unexpected_error;
12881: END IF;
12882:
12883: /*** {{ R12 Enhanced reservations code changes ***/
12884: -- update the mtl_serial_numbers, null out the reservation_id

Line 12918: IF l_return_status = fnd_api.g_ret_sts_error THEN

12914: , x_msg_data => x_msg_data
12915: );
12916:
12917: --
12918: IF l_return_status = fnd_api.g_ret_sts_error THEN
12919: RAISE fnd_api.g_exc_error;
12920: END IF;
12921:
12922: --

Line 12919: RAISE fnd_api.g_exc_error;

12915: );
12916:
12917: --
12918: IF l_return_status = fnd_api.g_ret_sts_error THEN
12919: RAISE fnd_api.g_exc_error;
12920: END IF;
12921:
12922: --
12923: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12923: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12919: RAISE fnd_api.g_exc_error;
12920: END IF;
12921:
12922: --
12923: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12924: RAISE fnd_api.g_exc_unexpected_error;
12925: END IF;
12926: --
12927: IF (l_debug = 1) THEN

Line 12924: RAISE fnd_api.g_exc_unexpected_error;

12920: END IF;
12921:
12922: --
12923: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12924: RAISE fnd_api.g_exc_unexpected_error;
12925: END IF;
12926: --
12927: IF (l_debug = 1) THEN
12928: debug_print('After calling wf_update_after_inv_unreserv...' || l_return_status);

Line 12935: WHEN fnd_api.g_exc_error THEN

12931:
12932: x_return_status := l_return_status;
12933: --
12934: EXCEPTION
12935: WHEN fnd_api.g_exc_error THEN
12936: x_return_status := fnd_api.g_ret_sts_error;
12937: -- Get message count and data
12938: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12939: WHEN fnd_api.g_exc_unexpected_error THEN

Line 12936: x_return_status := fnd_api.g_ret_sts_error;

12932: x_return_status := l_return_status;
12933: --
12934: EXCEPTION
12935: WHEN fnd_api.g_exc_error THEN
12936: x_return_status := fnd_api.g_ret_sts_error;
12937: -- Get message count and data
12938: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12939: WHEN fnd_api.g_exc_unexpected_error THEN
12940: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 12939: WHEN fnd_api.g_exc_unexpected_error THEN

12935: WHEN fnd_api.g_exc_error THEN
12936: x_return_status := fnd_api.g_ret_sts_error;
12937: -- Get message count and data
12938: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12939: WHEN fnd_api.g_exc_unexpected_error THEN
12940: x_return_status := fnd_api.g_ret_sts_unexp_error;
12941: -- Get message count and data
12942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12943: WHEN OTHERS THEN

Line 12940: x_return_status := fnd_api.g_ret_sts_unexp_error;

12936: x_return_status := fnd_api.g_ret_sts_error;
12937: -- Get message count and data
12938: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12939: WHEN fnd_api.g_exc_unexpected_error THEN
12940: x_return_status := fnd_api.g_ret_sts_unexp_error;
12941: -- Get message count and data
12942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12943: WHEN OTHERS THEN
12944: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 12944: x_return_status := fnd_api.g_ret_sts_unexp_error;

12940: x_return_status := fnd_api.g_ret_sts_unexp_error;
12941: -- Get message count and data
12942: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12943: WHEN OTHERS THEN
12944: x_return_status := fnd_api.g_ret_sts_unexp_error;
12945:
12946: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12947: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12948: END IF;

Line 12963: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

12959: -- exist (will be add upon)
12960: PROCEDURE transfer_reservation
12961: (
12962: p_api_version_number IN NUMBER
12963: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
12964: , x_return_status OUT NOCOPY VARCHAR2
12965: , x_msg_count OUT NOCOPY NUMBER
12966: , x_msg_data OUT NOCOPY VARCHAR2
12967: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 12970: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

12966: , x_msg_data OUT NOCOPY VARCHAR2
12967: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
12968: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
12969: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
12970: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
12971: , p_over_reservation_flag IN NUMBER DEFAULT 0
12972: , x_reservation_id OUT NOCOPY NUMBER
12973: ) IS
12974:

Line 12977: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

12973: ) IS
12974:
12975: l_api_version_number CONSTANT NUMBER := 1.0;
12976: l_api_name CONSTANT VARCHAR2(30) := 'Transfrer_Reservation';
12977: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
12978: l_quantity_reserved NUMBER;
12979: l_secondary_quantity_reserved NUMBER; -- INVCONV
12980: l_debug NUMBER;
12981: l_dummy_serial_number inv_reservation_global.serial_number_tbl_type;

Line 12987: IF NOT fnd_api.compatible_api_call

12983: l_reservation_qty_lot NUMBER := 0; --Bug 12978409
12984:
12985: BEGIN
12986: -- Standard call to check for call compatibility
12987: IF NOT fnd_api.compatible_api_call
12988: (l_api_version_number
12989: , p_api_version_number
12990: , l_api_name
12991: , G_PKG_NAME

Line 12993: RAISE fnd_api.g_exc_unexpected_error;

12989: , p_api_version_number
12990: , l_api_name
12991: , G_PKG_NAME
12992: ) THEN
12993: RAISE fnd_api.g_exc_unexpected_error;
12994: END IF;
12995:
12996: -- Initialize message list.
12997: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 12997: IF fnd_api.to_boolean(p_init_msg_lst) THEN

12993: RAISE fnd_api.g_exc_unexpected_error;
12994: END IF;
12995:
12996: -- Initialize message list.
12997: IF fnd_api.to_boolean(p_init_msg_lst) THEN
12998: fnd_msg_pub.initialize;
12999: END IF;
13000:
13001: -- Use cache to get value for l_debug

Line 13037: IF l_return_status = fnd_api.g_ret_sts_error THEN

13033: IF (l_debug=1) THEN
13034: debug_print ('Return Status after transfer reservations '||l_return_status);
13035: END IF;
13036:
13037: IF l_return_status = fnd_api.g_ret_sts_error THEN
13038:
13039: IF l_debug=1 THEN
13040: debug_print('Raising expected error'||l_return_status);
13041: END IF;

Line 13043: RAISE fnd_api.g_exc_error;

13039: IF l_debug=1 THEN
13040: debug_print('Raising expected error'||l_return_status);
13041: END IF;
13042:
13043: RAISE fnd_api.g_exc_error;
13044:
13045: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13046:
13047: IF l_debug=1 THEN

Line 13045: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13041: END IF;
13042:
13043: RAISE fnd_api.g_exc_error;
13044:
13045: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13046:
13047: IF l_debug=1 THEN
13048: debug_print('Raising Unexpected error'||l_return_status);
13049: END IF;

Line 13051: RAISE fnd_api.g_exc_unexpected_error;

13047: IF l_debug=1 THEN
13048: debug_print('Raising Unexpected error'||l_return_status);
13049: END IF;
13050:
13051: RAISE fnd_api.g_exc_unexpected_error;
13052: END IF;
13053:
13054:
13055: x_return_status := l_return_status;

Line 13060: WHEN fnd_api.g_exc_error THEN

13056: x_reservation_id := l_reservation_id;
13057:
13058: EXCEPTION
13059:
13060: WHEN fnd_api.g_exc_error THEN
13061: x_return_status := fnd_api.g_ret_sts_error;
13062: -- Get message count and data
13063: fnd_msg_pub.count_and_get
13064: ( p_count => x_msg_count

Line 13061: x_return_status := fnd_api.g_ret_sts_error;

13057:
13058: EXCEPTION
13059:
13060: WHEN fnd_api.g_exc_error THEN
13061: x_return_status := fnd_api.g_ret_sts_error;
13062: -- Get message count and data
13063: fnd_msg_pub.count_and_get
13064: ( p_count => x_msg_count
13065: , p_data => x_msg_data

Line 13068: WHEN fnd_api.g_exc_unexpected_error THEN

13064: ( p_count => x_msg_count
13065: , p_data => x_msg_data
13066: );
13067:
13068: WHEN fnd_api.g_exc_unexpected_error THEN
13069: x_return_status := fnd_api.g_ret_sts_unexp_error ;
13070:
13071: -- Get message count and data
13072: fnd_msg_pub.count_and_get

Line 13069: x_return_status := fnd_api.g_ret_sts_unexp_error ;

13065: , p_data => x_msg_data
13066: );
13067:
13068: WHEN fnd_api.g_exc_unexpected_error THEN
13069: x_return_status := fnd_api.g_ret_sts_unexp_error ;
13070:
13071: -- Get message count and data
13072: fnd_msg_pub.count_and_get
13073: ( p_count => x_msg_count

Line 13078: x_return_status := fnd_api.g_ret_sts_unexp_error ;

13074: , p_data => x_msg_data
13075: );
13076:
13077: WHEN OTHERS THEN
13078: x_return_status := fnd_api.g_ret_sts_unexp_error ;
13079:
13080: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
13081: THEN
13082: fnd_msg_pub.add_exc_msg

Line 13105: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

13101: -- exist (will be add upon)
13102: PROCEDURE transfer_reservation
13103: (
13104: p_api_version_number IN NUMBER
13105: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
13106: , x_return_status OUT NOCOPY VARCHAR2
13107: , x_msg_count OUT NOCOPY NUMBER
13108: , x_msg_data OUT NOCOPY VARCHAR2
13109: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 13115: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

13111: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
13112: /**** {{ R12 Enhanced reservations code changes }}****/
13113: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
13114: /*** End R12 ***/
13115: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
13116: , p_over_reservation_flag IN NUMBER DEFAULT 0
13117: , x_reservation_id OUT NOCOPY NUMBER
13118: ) IS
13119: l_api_version_number CONSTANT NUMBER := 1.0;

Line 13121: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

13117: , x_reservation_id OUT NOCOPY NUMBER
13118: ) IS
13119: l_api_version_number CONSTANT NUMBER := 1.0;
13120: l_api_name CONSTANT VARCHAR2(30) := 'Transfer_Reservation';
13121: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
13122: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
13123: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
13124: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
13125: l_orig_rsv_tbl_count NUMBER;

Line 13249: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

13245: debug_print('Inside transfer reservation...');
13246: END IF;
13247:
13248: -- Standard call to check for call compatibility
13249: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
13250: RAISE fnd_api.g_exc_unexpected_error;
13251: END IF;
13252:
13253: IF (l_debug = 1) THEN

Line 13250: RAISE fnd_api.g_exc_unexpected_error;

13246: END IF;
13247:
13248: -- Standard call to check for call compatibility
13249: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
13250: RAISE fnd_api.g_exc_unexpected_error;
13251: END IF;
13252:
13253: IF (l_debug = 1) THEN
13254: debug_print('The original reservation record: ');

Line 13268: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num

13264: -- if the transfer quantity is 0, call delete instead
13265: IF p_to_rsv_rec.primary_reservation_quantity = 0
13266: OR (p_to_rsv_rec.reservation_quantity = 0
13267: AND (p_to_rsv_rec.primary_reservation_quantity IS NULL
13268: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
13269: )
13270: ) THEN
13271: x_return_status := fnd_api.g_ret_sts_success;
13272: RETURN;

Line 13271: x_return_status := fnd_api.g_ret_sts_success;

13267: AND (p_to_rsv_rec.primary_reservation_quantity IS NULL
13268: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
13269: )
13270: ) THEN
13271: x_return_status := fnd_api.g_ret_sts_success;
13272: RETURN;
13273: END IF;
13274:
13275: -- Initialize message list.

Line 13276: IF fnd_api.to_boolean(p_init_msg_lst) THEN

13272: RETURN;
13273: END IF;
13274:
13275: -- Initialize message list.
13276: IF fnd_api.to_boolean(p_init_msg_lst) THEN
13277: fnd_msg_pub.initialize;
13278: END IF;
13279:
13280: /**** {{ R12 Enhanced reservations code changes }}****/

Line 13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

13282: -- Set the original columns to g_miss_xxx as the user should not be
13283: -- setting these values. Do not query by them
13284: l_original_rsv_rec := p_original_rsv_rec;
13285:
13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

13283: -- setting these values. Do not query by them
13284: l_original_rsv_rec := p_original_rsv_rec;
13285:
13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

13284: l_original_rsv_rec := p_original_rsv_rec;
13285:
13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

13285:
13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

13286: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13294:

Line 13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

13287: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13294:
13295: /*** End R12 ***/

Line 13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

13288: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13294:
13295: /*** End R12 ***/
13296:

Line 13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

13289: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13290: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13291: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13292: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13293: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13294:
13295: /*** End R12 ***/
13296:
13297: SAVEPOINT transfer_reservation_sa;

Line 13305: , p_init_msg_lst => fnd_api.g_false

13301:
13302: -- search for the from row
13303: query_reservation(
13304: p_api_version_number => 1.0
13305: , p_init_msg_lst => fnd_api.g_false
13306: , x_return_status => l_return_status
13307: , x_msg_count => x_msg_count
13308: , x_msg_data => x_msg_data
13309: , p_query_input => l_original_rsv_rec

Line 13310: , p_lock_records => fnd_api.g_true

13306: , x_return_status => l_return_status
13307: , x_msg_count => x_msg_count
13308: , x_msg_data => x_msg_data
13309: , p_query_input => l_original_rsv_rec
13310: , p_lock_records => fnd_api.g_true
13311: , x_mtl_reservation_tbl => l_orig_rsv_tbl
13312: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
13313: , x_error_code => l_error_code
13314: );

Line 13317: IF l_return_status = fnd_api.g_ret_sts_error THEN

13313: , x_error_code => l_error_code
13314: );
13315:
13316: --
13317: IF l_return_status = fnd_api.g_ret_sts_error THEN
13318: RAISE fnd_api.g_exc_error;
13319: END IF;
13320:
13321: --

Line 13318: RAISE fnd_api.g_exc_error;

13314: );
13315:
13316: --
13317: IF l_return_status = fnd_api.g_ret_sts_error THEN
13318: RAISE fnd_api.g_exc_error;
13319: END IF;
13320:
13321: --
13322: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13322: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13318: RAISE fnd_api.g_exc_error;
13319: END IF;
13320:
13321: --
13322: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13323: RAISE fnd_api.g_exc_unexpected_error;
13324: END IF;
13325:
13326: --

Line 13323: RAISE fnd_api.g_exc_unexpected_error;

13319: END IF;
13320:
13321: --
13322: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13323: RAISE fnd_api.g_exc_unexpected_error;
13324: END IF;
13325:
13326: --
13327: IF l_orig_rsv_tbl_count = 0 THEN

Line 13330: RAISE fnd_api.g_exc_error;

13326: --
13327: IF l_orig_rsv_tbl_count = 0 THEN
13328: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
13329: fnd_msg_pub.ADD;
13330: RAISE fnd_api.g_exc_error;
13331: END IF;
13332:
13333: --
13334: IF l_orig_rsv_tbl_count > 1 THEN

Line 13337: RAISE fnd_api.g_exc_error;

13333: --
13334: IF l_orig_rsv_tbl_count > 1 THEN
13335: fnd_message.set_name('INV', 'TRANSFER MORE THAN ONE ROW');
13336: fnd_msg_pub.ADD;
13337: RAISE fnd_api.g_exc_error;
13338: END IF;
13339:
13340: IF (l_debug = 1) THEN
13341: debug_print('After calling query rsv from record: ' || l_return_status);

Line 13355: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;

13351: -- but we should set it to g_miss_num again
13352: -- otherwise query_reservation will use only the
13353: -- reservation_id to do the search.
13354: IF l_to_rsv_rec.reservation_id = l_orig_rsv_tbl(1).reservation_id THEN
13355: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;
13356: END IF;
13357:
13358: --
13359: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN

Line 13362: RAISE fnd_api.g_exc_error;

13358: --
13359: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN
13360: fnd_message.set_name('INV', 'CANNOT_CHANGE_ORGANIZATION_ID');
13361: fnd_msg_pub.ADD;
13362: RAISE fnd_api.g_exc_error;
13363: END IF;
13364:
13365: --
13366: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN

Line 13369: RAISE fnd_api.g_exc_error;

13365: --
13366: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN
13367: fnd_message.set_name('INV', 'CANNOT_CHANGE_INVENTORY_ITEM');
13368: fnd_msg_pub.ADD;
13369: RAISE fnd_api.g_exc_error;
13370: END IF;
13371:
13372: -- convert quantity between primary uom and reservation uom
13373: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);

Line 13376: IF l_return_status = fnd_api.g_ret_sts_error THEN

13372: -- convert quantity between primary uom and reservation uom
13373: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
13374:
13375: --
13376: IF l_return_status = fnd_api.g_ret_sts_error THEN
13377: RAISE fnd_api.g_exc_error;
13378: END IF;
13379:
13380: --

Line 13377: RAISE fnd_api.g_exc_error;

13373: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
13374:
13375: --
13376: IF l_return_status = fnd_api.g_ret_sts_error THEN
13377: RAISE fnd_api.g_exc_error;
13378: END IF;
13379:
13380: --
13381: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13381: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13377: RAISE fnd_api.g_exc_error;
13378: END IF;
13379:
13380: --
13381: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13382: RAISE fnd_api.g_exc_unexpected_error;
13383: END IF;
13384:
13385: /**** {{ R12 Enhanced reservations code changes }}****/

Line 13382: RAISE fnd_api.g_exc_unexpected_error;

13378: END IF;
13379:
13380: --
13381: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13382: RAISE fnd_api.g_exc_unexpected_error;
13383: END IF;
13384:
13385: /**** {{ R12 Enhanced reservations code changes }}****/
13386:

Line 13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

13385: /**** {{ R12 Enhanced reservations code changes }}****/
13386:
13387: -- Set the original columns to g_miss_xxx as the user should not be
13388: -- setting these values. Do not query by them
13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

13386:
13387: -- Set the original columns to g_miss_xxx as the user should not be
13388: -- setting these values. Do not query by them
13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

13387: -- Set the original columns to g_miss_xxx as the user should not be
13388: -- setting these values. Do not query by them
13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

13388: -- setting these values. Do not query by them
13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

13389: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13397:

Line 13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

13390: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13397:
13398: IF (l_to_rsv_rec.project_id IS NULL) THEN

Line 13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

13391: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13397:
13398: IF (l_to_rsv_rec.project_id IS NULL) THEN
13399: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

Line 13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

13392: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
13393: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
13394: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13397:
13398: IF (l_to_rsv_rec.project_id IS NULL) THEN
13399: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
13400: END IF;

Line 13399: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

13395: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
13396: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
13397:
13398: IF (l_to_rsv_rec.project_id IS NULL) THEN
13399: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
13400: END IF;
13401: IF (l_to_rsv_rec.task_id IS NULL) THEN
13402: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
13403: END IF;

Line 13402: l_to_rsv_rec.task_id := fnd_api.g_miss_num;

13398: IF (l_to_rsv_rec.project_id IS NULL) THEN
13399: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
13400: END IF;
13401: IF (l_to_rsv_rec.task_id IS NULL) THEN
13402: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
13403: END IF;
13404: /*** End R12 ***/
13405:
13406: IF (l_debug = 1) THEN

Line 13413: , p_init_msg_lst => fnd_api.g_false

13409: --
13410: -- search for the to row
13411: query_reservation(
13412: p_api_version_number => 1.0
13413: , p_init_msg_lst => fnd_api.g_false
13414: , x_return_status => l_return_status
13415: , x_msg_count => x_msg_count
13416: , x_msg_data => x_msg_data
13417: , p_query_input => l_to_rsv_rec

Line 13418: , p_lock_records => fnd_api.g_true

13414: , x_return_status => l_return_status
13415: , x_msg_count => x_msg_count
13416: , x_msg_data => x_msg_data
13417: , p_query_input => l_to_rsv_rec
13418: , p_lock_records => fnd_api.g_true
13419: , x_mtl_reservation_tbl => l_to_rsv_tbl
13420: , x_mtl_reservation_tbl_count => l_to_rsv_tbl_count
13421: , x_error_code => l_error_code
13422: );

Line 13425: IF l_return_status = fnd_api.g_ret_sts_error THEN

13421: , x_error_code => l_error_code
13422: );
13423:
13424: --
13425: IF l_return_status = fnd_api.g_ret_sts_error THEN
13426: RAISE fnd_api.g_exc_error;
13427: END IF;
13428:
13429: --

Line 13426: RAISE fnd_api.g_exc_error;

13422: );
13423:
13424: --
13425: IF l_return_status = fnd_api.g_ret_sts_error THEN
13426: RAISE fnd_api.g_exc_error;
13427: END IF;
13428:
13429: --
13430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13426: RAISE fnd_api.g_exc_error;
13427: END IF;
13428:
13429: --
13430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13431: RAISE fnd_api.g_exc_unexpected_error;
13432: END IF;
13433:
13434: --

Line 13431: RAISE fnd_api.g_exc_unexpected_error;

13427: END IF;
13428:
13429: --
13430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13431: RAISE fnd_api.g_exc_unexpected_error;
13432: END IF;
13433:
13434: --
13435: IF l_to_rsv_tbl_count > 1 THEN

Line 13440: RAISE fnd_api.g_exc_error;

13436: -- if there more than one target row, the reservation table
13437: -- must be damaged. We can not do anything but failed
13438: fnd_message.set_name('INV', 'INV-RSV-TOO-MANY-TARGET');
13439: fnd_msg_pub.ADD;
13440: RAISE fnd_api.g_exc_error;
13441: END IF;
13442:
13443: IF (l_debug = 1) THEN
13444: debug_print('After query reservation to rec...' || l_return_status);

Line 13459: RAISE fnd_api.g_exc_error;

13455: -- as the original reservation.
13456: -- we might want to move that to the validation api soon
13457: fnd_message.set_name('INV', 'MISS_USE_TRANSFER');
13458: fnd_msg_pub.ADD;
13459: RAISE fnd_api.g_exc_error;
13460: END IF;
13461:
13462: l_to_row_exist := (l_to_rsv_tbl_count > 0);
13463:

Line 13474: RAISE fnd_api.g_exc_error;

13470: --
13471: IF l_orig_rsv_tbl(1).primary_reservation_quantity < l_to_rsv_rec.primary_reservation_quantity THEN
13472: fnd_message.set_name('INV', 'TRANSFER MORE THAN RESERVE');
13473: fnd_msg_pub.ADD;
13474: RAISE fnd_api.g_exc_error;
13475: END IF;
13476:
13477: /**** {{ R12 Enhanced reservations code changes.Calling the reservation
13478: -- lock API to create a user-defined lock for non-inventory supplies }} *****/

Line 13506: RAISE fnd_api.g_exc_error;

13502:
13503: IF l_lock_status = 0 THEN
13504: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
13505: fnd_msg_pub.ADD;
13506: RAISE fnd_api.g_exc_error;
13507: END if;
13508:
13509: inv_reservation_lock_pvt.lock_supply_demand_record
13510: (p_organization_id => l_to_rsv_rec.organization_id

Line 13522: RAISE fnd_api.g_exc_error;

13518:
13519: IF l_lock_status = 0 THEN
13520: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
13521: fnd_msg_pub.ADD;
13522: RAISE fnd_api.g_exc_error;
13523: END if;
13524:
13525: l_lock_obtained := TRUE;
13526: END IF;

Line 13543: RAISE fnd_api.g_exc_unexpected_error;

13539: THEN
13540: IF (l_debug = 1) THEN
13541: debug_print('Error caching the org record');
13542: END IF;
13543: RAISE fnd_api.g_exc_unexpected_error;
13544: END IF;
13545: -- Set the PJM enabled flag.
13546: l_pjm_enabled := INV_CACHE.org_rec.project_reference_enabled;
13547: ELSE

Line 13568: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)

13564: inv_reservation_global.g_source_type_rma)) AND
13565: (l_pjm_enabled = 1) THEN
13566:
13567: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
13568: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
13569: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
13570: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
13571: -- Added the below IF condition for Bug Fix 5264987
13572: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN

Line 13569: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR

13565: (l_pjm_enabled = 1) THEN
13566:
13567: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
13568: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
13569: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
13570: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
13571: -- Added the below IF condition for Bug Fix 5264987
13572: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN
13573: l_project_id := g_project_id;

Line 13570: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

13566:
13567: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
13568: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
13569: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
13570: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
13571: -- Added the below IF condition for Bug Fix 5264987
13572: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN
13573: l_project_id := g_project_id;
13574: l_task_id := g_task_id;

Line 13588: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

13584: END IF;
13585: END;
13586: END IF;
13587:
13588: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
13589: IF (l_project_id IS NOT NULL) THEN
13590: l_to_rsv_rec.project_id := l_project_id;
13591: ELSE
13592: l_to_rsv_rec.project_id := NULL;

Line 13596: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

13592: l_to_rsv_rec.project_id := NULL;
13593: END IF;
13594: END IF;
13595:
13596: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
13597: IF (l_task_id IS NOT NULL) THEN
13598: l_to_rsv_rec.task_id := l_task_id;
13599: ELSE
13600: l_to_rsv_rec.task_id := NULL;

Line 13629: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)

13625: l_wip_job_type := null; -- AHL
13626: END IF;
13627:
13628: IF ( l_wip_job_type = 'CMRO' AND l_to_rsv_rec.demand_source_line_detail IS NOT NULL)
13629: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)
13630: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
13631:
13632: IF l_to_rsv_rec.demand_source_line_detail = g_sch_mat_id THEN
13633: l_project_id := g_project_id;

Line 13630: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

13626: END IF;
13627:
13628: IF ( l_wip_job_type = 'CMRO' AND l_to_rsv_rec.demand_source_line_detail IS NOT NULL)
13629: AND (l_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num)
13630: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
13631:
13632: IF l_to_rsv_rec.demand_source_line_detail = g_sch_mat_id THEN
13633: l_project_id := g_project_id;
13634: l_task_id := g_task_id;

Line 13653: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

13649: debug_print('Cannot find the project and task information from CMRO WO: '||sqlerrm);
13650: END IF;
13651: END;
13652: END IF;
13653: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
13654: IF (l_project_id IS NOT NULL ) THEN
13655: l_to_rsv_rec.project_id := l_project_id;
13656: ELSE
13657: l_to_rsv_rec.project_id := NULL;

Line 13661: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

13657: l_to_rsv_rec.project_id := NULL;
13658: END IF;
13659: END IF;
13660:
13661: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
13662: IF (l_task_id IS NOT NULL) THEN
13663: l_to_rsv_rec.task_id := l_task_id;
13664: ELSE
13665: l_to_rsv_rec.task_id := NULL;

Line 13723: RAISE fnd_api.g_exc_error;

13719: debug_print('Cannot determine what is being passed to the serial tables');
13720: END IF;
13721: fnd_message.set_name('INV', 'INV_INVALID_SERIAL_TABLES');
13722: fnd_msg_pub.ADD;
13723: RAISE fnd_api.g_exc_error;
13724: END IF;
13725:
13726: IF (l_debug = 1) THEN
13727: debug_print('Serial Param' || l_serial_param);

Line 13744: IF p_validation_flag = fnd_api.g_true THEN

13740: IF (l_debug = 1) THEN
13741: debug_print('Before calling validate');
13742: END IF;
13743:
13744: IF p_validation_flag = fnd_api.g_true THEN
13745: -- we do validation after the query because
13746: -- for transfer, we might have many input value set to
13747: -- missing. We need to use the actual value to do
13748: -- validation

Line 13772: IF l_return_status = fnd_api.g_ret_sts_error THEN

13768: , x_to_sub_cache_index => l_to_sub_cache_index
13769: );
13770:
13771: --
13772: IF l_return_status = fnd_api.g_ret_sts_error THEN
13773: RAISE fnd_api.g_exc_error;
13774: END IF;
13775:
13776: --

Line 13773: RAISE fnd_api.g_exc_error;

13769: );
13770:
13771: --
13772: IF l_return_status = fnd_api.g_ret_sts_error THEN
13773: RAISE fnd_api.g_exc_error;
13774: END IF;
13775:
13776: --
13777: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13777: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13773: RAISE fnd_api.g_exc_error;
13774: END IF;
13775:
13776: --
13777: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13778: RAISE fnd_api.g_exc_unexpected_error;
13779: END IF;
13780:
13781: IF (l_debug = 1) THEN

Line 13778: RAISE fnd_api.g_exc_unexpected_error;

13774: END IF;
13775:
13776: --
13777: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13778: RAISE fnd_api.g_exc_unexpected_error;
13779: END IF;
13780:
13781: IF (l_debug = 1) THEN
13782: debug_print('After calling validate' || l_return_status);

Line 13788: IF p_validation_flag = fnd_api.g_true AND

13784:
13785: /**** {{ R12 Enhanced reservations code changes }}****/
13786: END IF;
13787:
13788: IF p_validation_flag = fnd_api.g_true AND
13789: (l_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv) THEN
13790:
13791: /*** End R12 ***/
13792: -- INVCONV BEGIN

Line 13804: , p_init_msg_lst => fnd_api.g_true

13800:
13801: inv_quantity_tree_pvt.create_tree
13802: (
13803: p_api_version_number => 1.0
13804: , p_init_msg_lst => fnd_api.g_true
13805: , x_return_status => l_return_status
13806: , x_msg_count => x_msg_count
13807: , x_msg_data => x_msg_data
13808: , p_organization_id => l_orig_rsv_tbl(1).organization_id

Line 13826: IF l_return_status = fnd_api.g_ret_sts_error THEN

13822: , x_tree_id => l_tree_id1
13823: );
13824:
13825: --
13826: IF l_return_status = fnd_api.g_ret_sts_error THEN
13827: RAISE fnd_api.g_exc_error;
13828: END IF;
13829:
13830: --

Line 13827: RAISE fnd_api.g_exc_error;

13823: );
13824:
13825: --
13826: IF l_return_status = fnd_api.g_ret_sts_error THEN
13827: RAISE fnd_api.g_exc_error;
13828: END IF;
13829:
13830: --
13831: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13831: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13827: RAISE fnd_api.g_exc_error;
13828: END IF;
13829:
13830: --
13831: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13832: RAISE fnd_api.g_exc_unexpected_error;
13833: END IF;
13834:
13835: --

Line 13832: RAISE fnd_api.g_exc_unexpected_error;

13828: END IF;
13829:
13830: --
13831: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13832: RAISE fnd_api.g_exc_unexpected_error;
13833: END IF;
13834:
13835: --
13836: inv_quantity_tree_pvt.create_tree

Line 13839: , p_init_msg_lst => fnd_api.g_true

13835: --
13836: inv_quantity_tree_pvt.create_tree
13837: (
13838: p_api_version_number => 1.0
13839: , p_init_msg_lst => fnd_api.g_true
13840: , x_return_status => l_return_status
13841: , x_msg_count => x_msg_count
13842: , x_msg_data => x_msg_data
13843: , p_organization_id => l_to_rsv_rec.organization_id

Line 13861: IF l_return_status = fnd_api.g_ret_sts_error THEN

13857: , x_tree_id => l_tree_id2
13858: );
13859:
13860: --
13861: IF l_return_status = fnd_api.g_ret_sts_error THEN
13862: RAISE fnd_api.g_exc_error;
13863: END IF;
13864:
13865: --

Line 13862: RAISE fnd_api.g_exc_error;

13858: );
13859:
13860: --
13861: IF l_return_status = fnd_api.g_ret_sts_error THEN
13862: RAISE fnd_api.g_exc_error;
13863: END IF;
13864:
13865: --
13866: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13866: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13862: RAISE fnd_api.g_exc_error;
13863: END IF;
13864:
13865: --
13866: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13867: RAISE fnd_api.g_exc_unexpected_error;
13868: END IF;
13869:
13870: -- MUOM Fulfillment project

Line 13867: RAISE fnd_api.g_exc_unexpected_error;

13863: END IF;
13864:
13865: --
13866: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13867: RAISE fnd_api.g_exc_unexpected_error;
13868: END IF;
13869:
13870: -- MUOM Fulfillment project
13871: IF l_orig_rsv_tbl(1).supply_source_type_id = inv_reservation_global.g_source_type_po

Line 13877: , p_init_msg_lst => fnd_api.g_true

13873: AND l_fulfill_base = 'S' AND l_transfer_all THEN
13874:
13875: inv_quantity_tree_pvt.query_tree(
13876: p_api_version_number => 1.0
13877: , p_init_msg_lst => fnd_api.g_true
13878: , x_return_status => l_return_status
13879: , x_msg_count => x_msg_count
13880: , x_msg_data => x_msg_data
13881: , p_tree_id => l_tree_id2

Line 13938: , p_partial_reservation_flag => fnd_api.g_false

13934: , p_to_revision_control => is_revision_control(l_to_item_cache_index)
13935: , p_to_lot_control => is_lot_control(l_to_item_cache_index)
13936: , p_action => 'TRANSFER'
13937: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
13938: , p_partial_reservation_flag => fnd_api.g_false
13939: , p_check_availability => fnd_api.g_false
13940: );
13941:
13942:

Line 13939: , p_check_availability => fnd_api.g_false

13935: , p_to_lot_control => is_lot_control(l_to_item_cache_index)
13936: , p_action => 'TRANSFER'
13937: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
13938: , p_partial_reservation_flag => fnd_api.g_false
13939: , p_check_availability => fnd_api.g_false
13940: );
13941:
13942:
13943: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 13943: IF l_return_status = fnd_api.g_ret_sts_error THEN

13939: , p_check_availability => fnd_api.g_false
13940: );
13941:
13942:
13943: IF l_return_status = fnd_api.g_ret_sts_error THEN
13944: RAISE fnd_api.g_exc_error;
13945: END IF;
13946:
13947: --

Line 13944: RAISE fnd_api.g_exc_error;

13940: );
13941:
13942:
13943: IF l_return_status = fnd_api.g_ret_sts_error THEN
13944: RAISE fnd_api.g_exc_error;
13945: END IF;
13946:
13947: --
13948: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13948: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13944: RAISE fnd_api.g_exc_error;
13945: END IF;
13946:
13947: --
13948: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13949: RAISE fnd_api.g_exc_unexpected_error;
13950: END IF;
13951:
13952: /**** {{ R12 Enhanced reservations code changes }}****/

Line 13949: RAISE fnd_api.g_exc_unexpected_error;

13945: END IF;
13946:
13947: --
13948: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13949: RAISE fnd_api.g_exc_unexpected_error;
13950: END IF;
13951:
13952: /**** {{ R12 Enhanced reservations code changes }}****/
13953: ELSIF (l_to_rsv_rec.supply_source_type_id IN

Line 14011: IF l_return_status = fnd_api.g_ret_sts_error THEN

14007: debug_print('Available quantity to reserve. l_quantity_reserved: ' || l_quantity_reserved);
14008: END IF;
14009:
14010: --
14011: IF l_return_status = fnd_api.g_ret_sts_error THEN
14012: RAISE fnd_api.g_exc_error;
14013: END IF;
14014:
14015: --

Line 14012: RAISE fnd_api.g_exc_error;

14008: END IF;
14009:
14010: --
14011: IF l_return_status = fnd_api.g_ret_sts_error THEN
14012: RAISE fnd_api.g_exc_error;
14013: END IF;
14014:
14015: --
14016: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14016: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14012: RAISE fnd_api.g_exc_error;
14013: END IF;
14014:
14015: --
14016: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14017: RAISE fnd_api.g_exc_unexpected_error;
14018: END IF;
14019: --MUOM Fulfillment Project
14020: inv_utilities.get_inv_fulfillment_base(

Line 14017: RAISE fnd_api.g_exc_unexpected_error;

14013: END IF;
14014:
14015: --
14016: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14017: RAISE fnd_api.g_exc_unexpected_error;
14018: END IF;
14019: --MUOM Fulfillment Project
14020: inv_utilities.get_inv_fulfillment_base(
14021: p_source_line_id => l_orig_rsv_tbl(1).demand_source_line_id,

Line 14051: RAISE fnd_api.g_exc_error;

14047: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
14048: END IF;
14049: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
14050: fnd_msg_pub.ADD;
14051: RAISE fnd_api.g_exc_error;
14052:
14053: END IF;
14054: END IF; --xdock split - Bug 9879753 End
14055: END IF;

Line 14125: IF l_return_status = fnd_api.g_ret_sts_error THEN

14121: debug_print('Available quantity to reserve. l_quantity_reserved2: ' || l_quantity_reserved2);
14122: END IF;
14123:
14124: --
14125: IF l_return_status = fnd_api.g_ret_sts_error THEN
14126: RAISE fnd_api.g_exc_error;
14127: END IF;
14128:
14129: --

Line 14126: RAISE fnd_api.g_exc_error;

14122: END IF;
14123:
14124: --
14125: IF l_return_status = fnd_api.g_ret_sts_error THEN
14126: RAISE fnd_api.g_exc_error;
14127: END IF;
14128:
14129: --
14130: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14130: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14126: RAISE fnd_api.g_exc_error;
14127: END IF;
14128:
14129: --
14130: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14131: RAISE fnd_api.g_exc_unexpected_error;
14132: END IF;
14133:
14134: --Bug 12978409 : start

Line 14131: RAISE fnd_api.g_exc_unexpected_error;

14127: END IF;
14128:
14129: --
14130: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14131: RAISE fnd_api.g_exc_unexpected_error;
14132: END IF;
14133:
14134: --Bug 12978409 : start
14135: -- Bug 5199672: Removed the condition l_qty_changed > 0

Line 14153: raise fnd_api.g_exc_error;

14149: debug_print('l_reservation_qty_lot : ' || l_reservation_qty_lot);
14150: END IF;
14151: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
14152: fnd_msg_pub.add;
14153: raise fnd_api.g_exc_error;
14154: END IF;
14155: ELSE
14156: IF ((l_reservation_qty_lot - l_quantity_reserved) > 0.000005) THEN
14157: IF (l_debug = 1) THEN

Line 14163: raise fnd_api.g_exc_error;

14159: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
14160: END IF;
14161: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
14162: fnd_msg_pub.add;
14163: raise fnd_api.g_exc_error;
14164: END IF;
14165: END IF;
14166: -- MUOM fulfillment Project
14167: END IF;

Line 14217: IF l_return_status = fnd_api.g_ret_sts_error THEN

14213: , x_msg_data => x_msg_data
14214: );
14215:
14216: --
14217: IF l_return_status = fnd_api.g_ret_sts_error THEN
14218: RAISE fnd_api.g_exc_error;
14219: END IF;
14220:
14221: --

Line 14218: RAISE fnd_api.g_exc_error;

14214: );
14215:
14216: --
14217: IF l_return_status = fnd_api.g_ret_sts_error THEN
14218: RAISE fnd_api.g_exc_error;
14219: END IF;
14220:
14221: --
14222: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14222: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14218: RAISE fnd_api.g_exc_error;
14219: END IF;
14220:
14221: --
14222: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14223: RAISE fnd_api.g_exc_unexpected_error;
14224: END IF;
14225: --
14226: IF (l_debug = 1) THEN

Line 14223: RAISE fnd_api.g_exc_unexpected_error;

14219: END IF;
14220:
14221: --
14222: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14223: RAISE fnd_api.g_exc_unexpected_error;
14224: END IF;
14225: --
14226: IF (l_debug = 1) THEN
14227: debug_print('After calling cto work flow unresv check');

Line 14293: RAISE fnd_api.g_exc_error;

14289: fnd_message.set_name('INV', 'INV_INVALID_UOM_CONV');
14290: fnd_message.set_token('VALUE1', l_orig_rsv_tbl(1).secondary_uom_code);
14291: fnd_message.set_token('VALUE2', l_primary_uom_code);
14292: fnd_msg_pub.ADD;
14293: RAISE fnd_api.g_exc_error;
14294: END IF;
14295: /* End 13604458 */
14296: END IF;
14297: ELSE

Line 14362: RAISE fnd_api.g_exc_error;

14358: IF l_new_orig_rsv_qty = -99999 THEN
14359: -- conversion failed
14360: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-PRIMARY-UOM');
14361: fnd_msg_pub.ADD;
14362: RAISE fnd_api.g_exc_error;
14363: END IF;
14364: -- MUOM Fulfillment project
14365: ELSIF l_orig_rsv_tbl(1).reservation_uom_code = l_orig_rsv_tbl(1).secondary_uom_code AND l_fulfill_base = 'S' THEN
14366: l_new_orig_rsv_qty := l_orig_rsv_tbl(1).secondary_reservation_quantity - NVL(l_to_rsv_rec.secondary_reservation_quantity,0);

Line 14428: RAISE fnd_api.g_exc_error;

14424: fnd_message.set_name('INV', 'INV_INVALID_UOM_CONV');
14425: fnd_message.set_token('VALUE1', l_orig_rsv_tbl(1).secondary_uom_code);
14426: fnd_message.set_token('VALUE2', l_primary_uom_code);
14427: fnd_msg_pub.ADD;
14428: RAISE fnd_api.g_exc_error;
14429: END IF;
14430: /* End 13604458 */
14431: END IF;
14432: END IF;

Line 14457: RAISE fnd_api.g_exc_error;

14453: IF ( (NVL(l_new_orig_rsv_qty,0) < 0) OR
14454: (NVL(l_new_orig_prim_qty,0) < 0) ) THEN
14455: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
14456: fnd_msg_pub.ADD;
14457: RAISE fnd_api.g_exc_error;
14458: END IF;
14459:
14460: -- INVCONV BEGIN
14461: IF (NVL(l_orig_second_rsv_qty,0) < 0) THEN

Line 14464: RAISE fnd_api.g_exc_error;

14460: -- INVCONV BEGIN
14461: IF (NVL(l_orig_second_rsv_qty,0) < 0) THEN
14462: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
14463: fnd_msg_pub.ADD;
14464: RAISE fnd_api.g_exc_error;
14465: END IF;
14466: -- INVCONV END
14467: -- Bug 3461990: Reservations API should not update reservations with more
14468: -- than 5 decimal places, since the transaction quantity is being

Line 14514: IF l_return_status = fnd_api.g_ret_sts_error THEN

14510:
14511: -- for data sync b/w mtl_demand and mtl_reservations
14512: inv_rsv_synch.for_update(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14513:
14514: IF l_return_status = fnd_api.g_ret_sts_error THEN
14515: RAISE fnd_api.g_exc_error;
14516: END IF;
14517:
14518: --

Line 14515: RAISE fnd_api.g_exc_error;

14511: -- for data sync b/w mtl_demand and mtl_reservations
14512: inv_rsv_synch.for_update(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14513:
14514: IF l_return_status = fnd_api.g_ret_sts_error THEN
14515: RAISE fnd_api.g_exc_error;
14516: END IF;
14517:
14518: --
14519: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14519: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14515: RAISE fnd_api.g_exc_error;
14516: END IF;
14517:
14518: --
14519: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14520: RAISE fnd_api.g_exc_unexpected_error;
14521: END IF;
14522: --
14523: /** Commented out by request of CTO. This was causing an extra

Line 14520: RAISE fnd_api.g_exc_unexpected_error;

14516: END IF;
14517:
14518: --
14519: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14520: RAISE fnd_api.g_exc_unexpected_error;
14521: END IF;
14522: --
14523: /** Commented out by request of CTO. This was causing an extra
14524: * update to the workflow that was causing problems.

Line 14542: * IF l_return_status = fnd_api.g_ret_sts_error THEN

14538: * , x_msg_count => x_msg_count
14539: * , x_msg_data => x_msg_data
14540: * );
14541: * --
14542: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14543: * RAISE fnd_api.g_exc_error;
14544: * END IF ;
14545: * --
14546: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14543: * RAISE fnd_api.g_exc_error;

14539: * , x_msg_data => x_msg_data
14540: * );
14541: * --
14542: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14543: * RAISE fnd_api.g_exc_error;
14544: * END IF ;
14545: * --
14546: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14547: * RAISE fnd_api.g_exc_unexpected_error;

Line 14546: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14542: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14543: * RAISE fnd_api.g_exc_error;
14544: * END IF ;
14545: * --
14546: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14547: * RAISE fnd_api.g_exc_unexpected_error;
14548: * END IF;
14549: * --
14550: * END IF;

Line 14547: * RAISE fnd_api.g_exc_unexpected_error;

14543: * RAISE fnd_api.g_exc_error;
14544: * END IF ;
14545: * --
14546: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14547: * RAISE fnd_api.g_exc_unexpected_error;
14548: * END IF;
14549: * --
14550: * END IF;
14551: */

Line 14568: IF l_return_status = fnd_api.g_ret_sts_error THEN

14564: , x_msg_data => x_msg_data
14565: );
14566:
14567: --
14568: IF l_return_status = fnd_api.g_ret_sts_error THEN
14569: RAISE fnd_api.g_exc_error;
14570: END IF;
14571:
14572: --

Line 14569: RAISE fnd_api.g_exc_error;

14565: );
14566:
14567: --
14568: IF l_return_status = fnd_api.g_ret_sts_error THEN
14569: RAISE fnd_api.g_exc_error;
14570: END IF;
14571:
14572: --
14573: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14573: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14569: RAISE fnd_api.g_exc_error;
14570: END IF;
14571:
14572: --
14573: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14574: RAISE fnd_api.g_exc_unexpected_error;
14575: END IF;
14576: --
14577: END IF;

Line 14574: RAISE fnd_api.g_exc_unexpected_error;

14570: END IF;
14571:
14572: --
14573: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14574: RAISE fnd_api.g_exc_unexpected_error;
14575: END IF;
14576: --
14577: END IF;
14578:

Line 14582: IF l_return_status = fnd_api.g_ret_sts_error THEN

14578:
14579: -- for data sync b/w mtl_demand and mtl_reservations
14580: inv_rsv_synch.for_delete(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14581:
14582: IF l_return_status = fnd_api.g_ret_sts_error THEN
14583: RAISE fnd_api.g_exc_error;
14584: END IF;
14585:
14586: --

Line 14583: RAISE fnd_api.g_exc_error;

14579: -- for data sync b/w mtl_demand and mtl_reservations
14580: inv_rsv_synch.for_delete(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14581:
14582: IF l_return_status = fnd_api.g_ret_sts_error THEN
14583: RAISE fnd_api.g_exc_error;
14584: END IF;
14585:
14586: --
14587: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14587: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14583: RAISE fnd_api.g_exc_error;
14584: END IF;
14585:
14586: --
14587: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14588: RAISE fnd_api.g_exc_unexpected_error;
14589: END IF;
14590:
14591: -- 2884492

Line 14588: RAISE fnd_api.g_exc_unexpected_error;

14584: END IF;
14585:
14586: --
14587: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14588: RAISE fnd_api.g_exc_unexpected_error;
14589: END IF;
14590:
14591: -- 2884492
14592: mtl_reservations_pkg.delete_row

Line 14614: * IF l_return_status = fnd_api.g_ret_sts_error THEN

14610: * , x_msg_count => x_msg_count
14611: * , x_msg_data => x_msg_data
14612: * );
14613: * --
14614: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14615: * RAISE fnd_api.g_exc_error;
14616: * END IF ;
14617: * --
14618: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14615: * RAISE fnd_api.g_exc_error;

14611: * , x_msg_data => x_msg_data
14612: * );
14613: * --
14614: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14615: * RAISE fnd_api.g_exc_error;
14616: * END IF ;
14617: * --
14618: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14619: * RAISE fnd_api.g_exc_unexpected_error;

Line 14618: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14614: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14615: * RAISE fnd_api.g_exc_error;
14616: * END IF ;
14617: * --
14618: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14619: * RAISE fnd_api.g_exc_unexpected_error;
14620: * END IF;
14621: * --
14622: * END IF;

Line 14619: * RAISE fnd_api.g_exc_unexpected_error;

14615: * RAISE fnd_api.g_exc_error;
14616: * END IF ;
14617: * --
14618: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14619: * RAISE fnd_api.g_exc_unexpected_error;
14620: * END IF;
14621: * --
14622: * END IF;
14623: */

Line 14640: IF l_return_status = fnd_api.g_ret_sts_error THEN

14636: , x_msg_data => x_msg_data
14637: );
14638:
14639: --
14640: IF l_return_status = fnd_api.g_ret_sts_error THEN
14641: RAISE fnd_api.g_exc_error;
14642: END IF;
14643:
14644: --

Line 14641: RAISE fnd_api.g_exc_error;

14637: );
14638:
14639: --
14640: IF l_return_status = fnd_api.g_ret_sts_error THEN
14641: RAISE fnd_api.g_exc_error;
14642: END IF;
14643:
14644: --
14645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14641: RAISE fnd_api.g_exc_error;
14642: END IF;
14643:
14644: --
14645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14646: RAISE fnd_api.g_exc_unexpected_error;
14647: END IF;
14648: --
14649: END IF;

Line 14646: RAISE fnd_api.g_exc_unexpected_error;

14642: END IF;
14643:
14644: --
14645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14646: RAISE fnd_api.g_exc_unexpected_error;
14647: END IF;
14648: --
14649: END IF;
14650:

Line 14667: IF l_return_status = fnd_api.g_ret_sts_error THEN

14663: , x_msg_data => x_msg_data
14664: );
14665:
14666: --
14667: IF l_return_status = fnd_api.g_ret_sts_error THEN
14668: RAISE fnd_api.g_exc_error;
14669: END IF;
14670:
14671: --

Line 14668: RAISE fnd_api.g_exc_error;

14664: );
14665:
14666: --
14667: IF l_return_status = fnd_api.g_ret_sts_error THEN
14668: RAISE fnd_api.g_exc_error;
14669: END IF;
14670:
14671: --
14672: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14672: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14668: RAISE fnd_api.g_exc_error;
14669: END IF;
14670:
14671: --
14672: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14673: RAISE fnd_api.g_exc_unexpected_error;
14674: END IF;
14675: --
14676: END IF;

Line 14673: RAISE fnd_api.g_exc_unexpected_error;

14669: END IF;
14670:
14671: --
14672: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14673: RAISE fnd_api.g_exc_unexpected_error;
14674: END IF;
14675: --
14676: END IF;
14677:

Line 14694: RAISE fnd_api.g_exc_error;

14690: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
14691: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
14692: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
14693: fnd_msg_pub.ADD;
14694: RAISE fnd_api.g_exc_error;
14695: END IF;
14696:
14697: -- INVCONV BEGIN
14698: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 14701: RAISE fnd_api.g_exc_error;

14697: -- INVCONV BEGIN
14698: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
14699: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
14700: fnd_msg_pub.ADD;
14701: RAISE fnd_api.g_exc_error;
14702: END IF;
14703: -- INVCONV END
14704:
14705: -- Bug 3461990: Reservations API should not update reservations with more

Line 14818: IF l_return_status = fnd_api.g_ret_sts_error THEN

14814: inv_rsv_synch.for_update(p_reservation_id => l_orig_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
14815:
14816: debug_print(' return status after updating row' || l_return_status);
14817:
14818: IF l_return_status = fnd_api.g_ret_sts_error THEN
14819: RAISE fnd_api.g_exc_error;
14820: END IF;
14821:
14822: --

Line 14819: RAISE fnd_api.g_exc_error;

14815:
14816: debug_print(' return status after updating row' || l_return_status);
14817:
14818: IF l_return_status = fnd_api.g_ret_sts_error THEN
14819: RAISE fnd_api.g_exc_error;
14820: END IF;
14821:
14822: --
14823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14819: RAISE fnd_api.g_exc_error;
14820: END IF;
14821:
14822: --
14823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14824: RAISE fnd_api.g_exc_unexpected_error;
14825: END IF;
14826:
14827: --

Line 14824: RAISE fnd_api.g_exc_unexpected_error;

14820: END IF;
14821:
14822: --
14823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14824: RAISE fnd_api.g_exc_unexpected_error;
14825: END IF;
14826:
14827: --
14828: -- since to row not exists, transfer all

Line 14861: * IF l_return_status = fnd_api.g_ret_sts_error THEN

14857: * , x_msg_count => x_msg_count
14858: * , x_msg_data => x_msg_data
14859: * );
14860: * --
14861: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14862: * RAISE fnd_api.g_exc_error;
14863: * END IF ;
14864: * --
14865: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14862: * RAISE fnd_api.g_exc_error;

14858: * , x_msg_data => x_msg_data
14859: * );
14860: * --
14861: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14862: * RAISE fnd_api.g_exc_error;
14863: * END IF ;
14864: * --
14865: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14866: * RAISE fnd_api.g_exc_unexpected_error;

Line 14865: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14861: * IF l_return_status = fnd_api.g_ret_sts_error THEN
14862: * RAISE fnd_api.g_exc_error;
14863: * END IF ;
14864: * --
14865: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14866: * RAISE fnd_api.g_exc_unexpected_error;
14867: * END IF;
14868: * --
14869: * END IF;

Line 14866: * RAISE fnd_api.g_exc_unexpected_error;

14862: * RAISE fnd_api.g_exc_error;
14863: * END IF ;
14864: * --
14865: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14866: * RAISE fnd_api.g_exc_unexpected_error;
14867: * END IF;
14868: * --
14869: * END IF;
14870: */

Line 14894: IF l_return_status = fnd_api.g_ret_sts_error THEN

14890: , x_msg_data => x_msg_data
14891: );
14892:
14893: --
14894: IF l_return_status = fnd_api.g_ret_sts_error THEN
14895: RAISE fnd_api.g_exc_error;
14896: END IF;
14897:
14898: --

Line 14895: RAISE fnd_api.g_exc_error;

14891: );
14892:
14893: --
14894: IF l_return_status = fnd_api.g_ret_sts_error THEN
14895: RAISE fnd_api.g_exc_error;
14896: END IF;
14897:
14898: --
14899: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14899: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14895: RAISE fnd_api.g_exc_error;
14896: END IF;
14897:
14898: --
14899: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14900: RAISE fnd_api.g_exc_unexpected_error;
14901: END IF;
14902: --
14903: END IF;

Line 14900: RAISE fnd_api.g_exc_unexpected_error;

14896: END IF;
14897:
14898: --
14899: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14900: RAISE fnd_api.g_exc_unexpected_error;
14901: END IF;
14902: --
14903: END IF;
14904: */

Line 14922: IF l_return_status = fnd_api.g_ret_sts_error THEN

14918: , x_msg_data => x_msg_data
14919: );
14920:
14921: --
14922: IF l_return_status = fnd_api.g_ret_sts_error THEN
14923: RAISE fnd_api.g_exc_error;
14924: END IF;
14925:
14926: --

Line 14923: RAISE fnd_api.g_exc_error;

14919: );
14920:
14921: --
14922: IF l_return_status = fnd_api.g_ret_sts_error THEN
14923: RAISE fnd_api.g_exc_error;
14924: END IF;
14925:
14926: --
14927: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14927: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14923: RAISE fnd_api.g_exc_error;
14924: END IF;
14925:
14926: --
14927: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14928: RAISE fnd_api.g_exc_unexpected_error;
14929: END IF;
14930: --
14931: END IF;

Line 14928: RAISE fnd_api.g_exc_unexpected_error;

14924: END IF;
14925:
14926: --
14927: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14928: RAISE fnd_api.g_exc_unexpected_error;
14929: END IF;
14930: --
14931: END IF;
14932:

Line 14965: RAISE fnd_api.g_exc_error;

14961: IF ( (NVL(l_primary_rsv_quantity,0) < 0) OR
14962: (NVL(l_rsv_quantity,0)< 0) ) THEN
14963: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
14964: fnd_msg_pub.ADD;
14965: RAISE fnd_api.g_exc_error;
14966: END IF;
14967:
14968: -- INVCONV BEGIN
14969: IF (NVL(l_secondary_rsv_quantity,0) < 0) THEN

Line 14972: RAISE fnd_api.g_exc_error;

14968: -- INVCONV BEGIN
14969: IF (NVL(l_secondary_rsv_quantity,0) < 0) THEN
14970: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
14971: fnd_msg_pub.ADD;
14972: RAISE fnd_api.g_exc_error;
14973: END IF;
14974: -- INVCONV END
14975:
14976: -- Bug 3461990: Reservations API should not be updated with more

Line 15005: IF l_return_status = fnd_api.g_ret_sts_error THEN

15001:
15002: -- for data sync b/w mtl_demand and mtl_reservations
15003: inv_rsv_synch.for_update(p_reservation_id => l_to_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
15004:
15005: IF l_return_status = fnd_api.g_ret_sts_error THEN
15006: RAISE fnd_api.g_exc_error;
15007: END IF;
15008:
15009: --

Line 15006: RAISE fnd_api.g_exc_error;

15002: -- for data sync b/w mtl_demand and mtl_reservations
15003: inv_rsv_synch.for_update(p_reservation_id => l_to_rsv_tbl(1).reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
15004:
15005: IF l_return_status = fnd_api.g_ret_sts_error THEN
15006: RAISE fnd_api.g_exc_error;
15007: END IF;
15008:
15009: --
15010: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15010: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15006: RAISE fnd_api.g_exc_error;
15007: END IF;
15008:
15009: --
15010: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15011: RAISE fnd_api.g_exc_unexpected_error;
15012: END IF;
15013:
15014: --

Line 15011: RAISE fnd_api.g_exc_unexpected_error;

15007: END IF;
15008:
15009: --
15010: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15011: RAISE fnd_api.g_exc_unexpected_error;
15012: END IF;
15013:
15014: --
15015: x_reservation_id := l_to_rsv_tbl(1).reservation_id;

Line 15035: * IF l_return_status = fnd_api.g_ret_sts_error THEN

15031: * , x_msg_count => x_msg_count
15032: * , x_msg_data => x_msg_data
15033: * );
15034: * --
15035: * IF l_return_status = fnd_api.g_ret_sts_error THEN
15036: * RAISE fnd_api.g_exc_error;
15037: * END IF ;
15038: * --
15039: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15036: * RAISE fnd_api.g_exc_error;

15032: * , x_msg_data => x_msg_data
15033: * );
15034: * --
15035: * IF l_return_status = fnd_api.g_ret_sts_error THEN
15036: * RAISE fnd_api.g_exc_error;
15037: * END IF ;
15038: * --
15039: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15040: * RAISE fnd_api.g_exc_unexpected_error;

Line 15039: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15035: * IF l_return_status = fnd_api.g_ret_sts_error THEN
15036: * RAISE fnd_api.g_exc_error;
15037: * END IF ;
15038: * --
15039: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15040: * RAISE fnd_api.g_exc_unexpected_error;
15041: * END IF;
15042: * --
15043: *END IF;

Line 15040: * RAISE fnd_api.g_exc_unexpected_error;

15036: * RAISE fnd_api.g_exc_error;
15037: * END IF ;
15038: * --
15039: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15040: * RAISE fnd_api.g_exc_unexpected_error;
15041: * END IF;
15042: * --
15043: *END IF;
15044: */

Line 15060: IF l_return_status = fnd_api.g_ret_sts_error THEN

15056: , x_msg_data => x_msg_data
15057: );
15058:
15059: --
15060: IF l_return_status = fnd_api.g_ret_sts_error THEN
15061: RAISE fnd_api.g_exc_error;
15062: END IF;
15063:
15064: --

Line 15061: RAISE fnd_api.g_exc_error;

15057: );
15058:
15059: --
15060: IF l_return_status = fnd_api.g_ret_sts_error THEN
15061: RAISE fnd_api.g_exc_error;
15062: END IF;
15063:
15064: --
15065: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15065: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15061: RAISE fnd_api.g_exc_error;
15062: END IF;
15063:
15064: --
15065: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15066: RAISE fnd_api.g_exc_unexpected_error;
15067: END IF;
15068: --
15069: END IF;

Line 15066: RAISE fnd_api.g_exc_unexpected_error;

15062: END IF;
15063:
15064: --
15065: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15066: RAISE fnd_api.g_exc_unexpected_error;
15067: END IF;
15068: --
15069: END IF;
15070:

Line 15087: RAISE fnd_api.g_exc_error;

15083: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
15084: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
15085: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
15086: fnd_msg_pub.ADD;
15087: RAISE fnd_api.g_exc_error;
15088: END IF;
15089:
15090: -- INVCONV BEGIN
15091: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 15094: RAISE fnd_api.g_exc_error;

15090: -- INVCONV BEGIN
15091: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
15092: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
15093: fnd_msg_pub.ADD;
15094: RAISE fnd_api.g_exc_error;
15095: END IF;
15096: -- INVCONV END
15097:
15098:

Line 15269: IF l_return_status = fnd_api.g_ret_sts_error THEN

15265:
15266: -- for data sync b/w mtl_demand and mtl_reservations
15267: inv_rsv_synch.for_insert(p_reservation_id => l_reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
15268:
15269: IF l_return_status = fnd_api.g_ret_sts_error THEN
15270: RAISE fnd_api.g_exc_error;
15271: END IF;
15272:
15273: --

Line 15270: RAISE fnd_api.g_exc_error;

15266: -- for data sync b/w mtl_demand and mtl_reservations
15267: inv_rsv_synch.for_insert(p_reservation_id => l_reservation_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
15268:
15269: IF l_return_status = fnd_api.g_ret_sts_error THEN
15270: RAISE fnd_api.g_exc_error;
15271: END IF;
15272:
15273: --
15274: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15274: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15270: RAISE fnd_api.g_exc_error;
15271: END IF;
15272:
15273: --
15274: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15275: RAISE fnd_api.g_exc_unexpected_error;
15276: END IF;
15277: --
15278: END IF;

Line 15275: RAISE fnd_api.g_exc_unexpected_error;

15271: END IF;
15272:
15273: --
15274: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15275: RAISE fnd_api.g_exc_unexpected_error;
15276: END IF;
15277: --
15278: END IF;
15279:

Line 15294: IF l_return_status = fnd_api.g_ret_sts_error THEN

15290: cto_workflow_api_pk.wf_update_after_inv_reserv(p_order_line_id => l_to_rsv_rec.demand_source_line_id, x_return_status => l_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data);
15291:
15292: debug_print(' After CTO API' || l_return_status);
15293: --
15294: IF l_return_status = fnd_api.g_ret_sts_error THEN
15295: RAISE fnd_api.g_exc_error;
15296: END IF;
15297:
15298: --

Line 15295: RAISE fnd_api.g_exc_error;

15291:
15292: debug_print(' After CTO API' || l_return_status);
15293: --
15294: IF l_return_status = fnd_api.g_ret_sts_error THEN
15295: RAISE fnd_api.g_exc_error;
15296: END IF;
15297:
15298: --
15299: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15299: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15295: RAISE fnd_api.g_exc_error;
15296: END IF;
15297:
15298: --
15299: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15300: RAISE fnd_api.g_exc_unexpected_error;
15301: END IF;
15302: --
15303: END IF;

Line 15300: RAISE fnd_api.g_exc_unexpected_error;

15296: END IF;
15297:
15298: --
15299: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15300: RAISE fnd_api.g_exc_unexpected_error;
15301: END IF;
15302: --
15303: END IF;
15304:

Line 15417: IF l_return_status = fnd_api.g_ret_sts_error THEN

15413: debug_print('After calling validate serials ' || l_return_status);
15414: END IF;
15415:
15416: --
15417: IF l_return_status = fnd_api.g_ret_sts_error THEN
15418: RAISE fnd_api.g_exc_error;
15419: END IF;
15420:
15421: --

Line 15418: RAISE fnd_api.g_exc_error;

15414: END IF;
15415:
15416: --
15417: IF l_return_status = fnd_api.g_ret_sts_error THEN
15418: RAISE fnd_api.g_exc_error;
15419: END IF;
15420:
15421: --
15422: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15422: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15418: RAISE fnd_api.g_exc_error;
15419: END IF;
15420:
15421: --
15422: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15423: RAISE fnd_api.g_exc_unexpected_error;
15424: END IF;
15425: END IF;
15426:

Line 15423: RAISE fnd_api.g_exc_unexpected_error;

15419: END IF;
15420:
15421: --
15422: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15423: RAISE fnd_api.g_exc_unexpected_error;
15424: END IF;
15425: END IF;
15426:
15427: IF (l_total_serials_reserved > 0) THEN

Line 15444: RAISE fnd_api.g_exc_error;

15440:
15441: IF (l_total_serials_reserved > l_to_primary_reservation_qty) THEN
15442: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15443: fnd_msg_pub.ADD;
15444: RAISE fnd_api.g_exc_error;
15445: END IF;
15446: -- we will have to migrate the serials to the new reservation
15447: -- Just make sure that the group_mark_id and the
15448: -- reservation id are populated.

Line 15464: RAISE fnd_api.g_exc_error;

15460: debug_print('No serials found for serial number. : ' || l_serial_number_table(l_serial_index).serial_number);
15461: END IF;
15462: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15463: fnd_msg_pub.ADD;
15464: RAISE fnd_api.g_exc_error;
15465: END;
15466: IF l_debug=1 THEN
15467: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);
15468: END IF;

Line 15484: IF l_return_status = fnd_api.g_ret_sts_error THEN

15480: IF (l_debug = 1) THEN
15481: debug_print('After calling update serial reservations ' || l_return_status);
15482: END IF;
15483:
15484: IF l_return_status = fnd_api.g_ret_sts_error THEN
15485: RAISE fnd_api.g_exc_error;
15486: END IF;
15487:
15488: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15485: RAISE fnd_api.g_exc_error;

15481: debug_print('After calling update serial reservations ' || l_return_status);
15482: END IF;
15483:
15484: IF l_return_status = fnd_api.g_ret_sts_error THEN
15485: RAISE fnd_api.g_exc_error;
15486: END IF;
15487:
15488: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15489: RAISE fnd_api.g_exc_unexpected_error;

Line 15488: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15484: IF l_return_status = fnd_api.g_ret_sts_error THEN
15485: RAISE fnd_api.g_exc_error;
15486: END IF;
15487:
15488: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15489: RAISE fnd_api.g_exc_unexpected_error;
15490: END IF;
15491:
15492: ELSIF (NOT l_transfer_all) THEN

Line 15489: RAISE fnd_api.g_exc_unexpected_error;

15485: RAISE fnd_api.g_exc_error;
15486: END IF;
15487:
15488: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15489: RAISE fnd_api.g_exc_unexpected_error;
15490: END IF;
15491:
15492: ELSIF (NOT l_transfer_all) THEN
15493: -- transfer the excess to the to record there are some serial reserved. Check if the

Line 15523: RAISE fnd_api.g_exc_error;

15519: debug_print('No serials found for Serial Number: ' || l_serial_number_table(i).serial_number);
15520: END IF;
15521: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15522: fnd_msg_pub.ADD;
15523: RAISE fnd_api.g_exc_error;
15524: END;
15525:
15526: IF l_debug=1 THEN
15527: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 15546: IF l_return_status = fnd_api.g_ret_sts_error THEN

15542: IF (l_debug = 1) THEN
15543: debug_print('After calling update serial reservations ' || l_return_status);
15544: END IF;
15545:
15546: IF l_return_status = fnd_api.g_ret_sts_error THEN
15547: RAISE fnd_api.g_exc_error;
15548: END IF;
15549:
15550: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15547: RAISE fnd_api.g_exc_error;

15543: debug_print('After calling update serial reservations ' || l_return_status);
15544: END IF;
15545:
15546: IF l_return_status = fnd_api.g_ret_sts_error THEN
15547: RAISE fnd_api.g_exc_error;
15548: END IF;
15549:
15550: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15551: RAISE fnd_api.g_exc_unexpected_error;

Line 15550: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15546: IF l_return_status = fnd_api.g_ret_sts_error THEN
15547: RAISE fnd_api.g_exc_error;
15548: END IF;
15549:
15550: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15551: RAISE fnd_api.g_exc_unexpected_error;
15552: END IF;
15553:
15554: update_serial_rsv_quantity

Line 15551: RAISE fnd_api.g_exc_unexpected_error;

15547: RAISE fnd_api.g_exc_error;
15548: END IF;
15549:
15550: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15551: RAISE fnd_api.g_exc_unexpected_error;
15552: END IF;
15553:
15554: update_serial_rsv_quantity
15555: (x_return_status => l_return_status

Line 15566: IF l_return_status = fnd_api.g_ret_sts_error THEN

15562: IF (l_debug = 1) THEN
15563: debug_print('After calling update serial reservations ' || l_return_status);
15564: END IF;
15565:
15566: IF l_return_status = fnd_api.g_ret_sts_error THEN
15567: RAISE fnd_api.g_exc_error;
15568: END IF;
15569:
15570: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15567: RAISE fnd_api.g_exc_error;

15563: debug_print('After calling update serial reservations ' || l_return_status);
15564: END IF;
15565:
15566: IF l_return_status = fnd_api.g_ret_sts_error THEN
15567: RAISE fnd_api.g_exc_error;
15568: END IF;
15569:
15570: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15571: RAISE fnd_api.g_exc_unexpected_error;

Line 15570: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15566: IF l_return_status = fnd_api.g_ret_sts_error THEN
15567: RAISE fnd_api.g_exc_error;
15568: END IF;
15569:
15570: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15571: RAISE fnd_api.g_exc_unexpected_error;
15572: END IF;
15573:
15574: -- check to see if we are transferring more than the

Line 15571: RAISE fnd_api.g_exc_unexpected_error;

15567: RAISE fnd_api.g_exc_error;
15568: END IF;
15569:
15570: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15571: RAISE fnd_api.g_exc_unexpected_error;
15572: END IF;
15573:
15574: -- check to see if we are transferring more than the
15575: -- reserved qty

Line 15590: RAISE fnd_api.g_exc_error;

15586: END;
15587: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15588: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15589: fnd_msg_pub.ADD;
15590: RAISE fnd_api.g_exc_error;
15591: END IF;
15592:
15593: END IF; -- total serials more than orig reservation qty
15594:

Line 15602: RAISE fnd_api.g_exc_error;

15598: -- are validated.
15599: IF (l_total_serials_reserved > l_to_primary_reservation_qty) THEN
15600: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15601: fnd_msg_pub.ADD;
15602: RAISE fnd_api.g_exc_error;
15603: END IF;
15604: END IF; -- transfer all and to row exists
15605:
15606: END IF; -- serials reserved

Line 15642: RAISE fnd_api.g_exc_error;

15638: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
15639: l_orig_rsv_tbl(1).reservation_id) OR (l_from_reservation_id IS NULL) THEN
15640: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
15641: fnd_msg_pub.ADD;
15642: RAISE fnd_api.g_exc_error;
15643: END IF;
15644:
15645: IF (l_total_serials_reserved > 0) THEN
15646: -- unreserve the passed serials.

Line 15710: IF l_return_status = fnd_api.g_ret_sts_error THEN

15706: debug_print('After calling validate serials ' || l_return_status);
15707: END IF;
15708:
15709: --
15710: IF l_return_status = fnd_api.g_ret_sts_error THEN
15711: RAISE fnd_api.g_exc_error;
15712: END IF;
15713:
15714: --

Line 15711: RAISE fnd_api.g_exc_error;

15707: END IF;
15708:
15709: --
15710: IF l_return_status = fnd_api.g_ret_sts_error THEN
15711: RAISE fnd_api.g_exc_error;
15712: END IF;
15713:
15714: --
15715: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15715: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15711: RAISE fnd_api.g_exc_error;
15712: END IF;
15713:
15714: --
15715: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15716: RAISE fnd_api.g_exc_unexpected_error;
15717: END IF;
15718: END IF;
15719:

Line 15716: RAISE fnd_api.g_exc_unexpected_error;

15712: END IF;
15713:
15714: --
15715: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15716: RAISE fnd_api.g_exc_unexpected_error;
15717: END IF;
15718: END IF;
15719:
15720: BEGIN

Line 15733: RAISE fnd_api.g_exc_error;

15729: debug_print('No serials found for this data. rsv id: ' || l_orig_rsv_tbl(1).reservation_id);
15730: END IF;
15731: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15732: fnd_msg_pub.ADD;
15733: RAISE fnd_api.g_exc_error;
15734: END;
15735:
15736: -- check to see if we have reserved more than the to_record
15737: BEGIN

Line 15752: RAISE fnd_api.g_exc_error;

15748:
15749: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15750: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15751: fnd_msg_pub.ADD;
15752: RAISE fnd_api.g_exc_error;
15753: END IF;
15754:
15755: -- update with whatever is being moved to the to record
15756: update_serial_rsv_quantity

Line 15768: IF l_return_status = fnd_api.g_ret_sts_error THEN

15764: IF (l_debug = 1) THEN
15765: debug_print('After calling update serial reservations ' || l_return_status);
15766: END IF;
15767:
15768: IF l_return_status = fnd_api.g_ret_sts_error THEN
15769: RAISE fnd_api.g_exc_error;
15770: END IF;
15771:
15772: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15769: RAISE fnd_api.g_exc_error;

15765: debug_print('After calling update serial reservations ' || l_return_status);
15766: END IF;
15767:
15768: IF l_return_status = fnd_api.g_ret_sts_error THEN
15769: RAISE fnd_api.g_exc_error;
15770: END IF;
15771:
15772: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15773: RAISE fnd_api.g_exc_unexpected_error;

Line 15772: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15768: IF l_return_status = fnd_api.g_ret_sts_error THEN
15769: RAISE fnd_api.g_exc_error;
15770: END IF;
15771:
15772: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15773: RAISE fnd_api.g_exc_unexpected_error;
15774: END IF;
15775:
15776: ELSIF (NOT l_transfer_all) THEN

Line 15773: RAISE fnd_api.g_exc_unexpected_error;

15769: RAISE fnd_api.g_exc_error;
15770: END IF;
15771:
15772: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15773: RAISE fnd_api.g_exc_unexpected_error;
15774: END IF;
15775:
15776: ELSIF (NOT l_transfer_all) THEN
15777: --the from serials are already unreserved. If there are

Line 15818: IF l_return_status = fnd_api.g_ret_sts_error THEN

15814: debug_print('After calling validate serials ' || l_return_status);
15815: END IF;
15816:
15817: --
15818: IF l_return_status = fnd_api.g_ret_sts_error THEN
15819: RAISE fnd_api.g_exc_error;
15820: END IF;
15821:
15822: --

Line 15819: RAISE fnd_api.g_exc_error;

15815: END IF;
15816:
15817: --
15818: IF l_return_status = fnd_api.g_ret_sts_error THEN
15819: RAISE fnd_api.g_exc_error;
15820: END IF;
15821:
15822: --
15823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15819: RAISE fnd_api.g_exc_error;
15820: END IF;
15821:
15822: --
15823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15824: RAISE fnd_api.g_exc_unexpected_error;
15825: END IF;
15826:
15827: -- we have to unreserve some of the serials

Line 15824: RAISE fnd_api.g_exc_unexpected_error;

15820: END IF;
15821:
15822: --
15823: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15824: RAISE fnd_api.g_exc_unexpected_error;
15825: END IF;
15826:
15827: -- we have to unreserve some of the serials
15828: -- unreserve the extra serials that are more than the primary_reservation_quantity

Line 15850: RAISE fnd_api.g_exc_error;

15846: debug_print('No serials found for serial number: ' || l_validate_serial_number_table(i).serial_number);
15847: END IF;
15848: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15849: fnd_msg_pub.ADD;
15850: RAISE fnd_api.g_exc_error;
15851: END;
15852:
15853: IF l_debug=1 THEN
15854: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 15874: RAISE fnd_api.g_exc_error;

15870:
15871: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15872: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15873: fnd_msg_pub.ADD;
15874: RAISE fnd_api.g_exc_error;
15875: END IF;
15876:
15877: update_serial_rsv_quantity
15878: (x_return_status => l_return_status

Line 15889: IF l_return_status = fnd_api.g_ret_sts_error THEN

15885: IF (l_debug = 1) THEN
15886: debug_print('After calling update serial reservations ' || l_return_status);
15887: END IF;
15888:
15889: IF l_return_status = fnd_api.g_ret_sts_error THEN
15890: RAISE fnd_api.g_exc_error;
15891: END IF;
15892:
15893: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15890: RAISE fnd_api.g_exc_error;

15886: debug_print('After calling update serial reservations ' || l_return_status);
15887: END IF;
15888:
15889: IF l_return_status = fnd_api.g_ret_sts_error THEN
15890: RAISE fnd_api.g_exc_error;
15891: END IF;
15892:
15893: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15894: RAISE fnd_api.g_exc_unexpected_error;

Line 15893: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15889: IF l_return_status = fnd_api.g_ret_sts_error THEN
15890: RAISE fnd_api.g_exc_error;
15891: END IF;
15892:
15893: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15894: RAISE fnd_api.g_exc_unexpected_error;
15895: END IF;
15896: END IF; -- total serials more than orig reservation qty
15897: -- now update the from reservation record as we have to

Line 15894: RAISE fnd_api.g_exc_unexpected_error;

15890: RAISE fnd_api.g_exc_error;
15891: END IF;
15892:
15893: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15894: RAISE fnd_api.g_exc_unexpected_error;
15895: END IF;
15896: END IF; -- total serials more than orig reservation qty
15897: -- now update the from reservation record as we have to
15898: -- update the unreserved serial and the transferred serial

Line 15918: IF l_return_status = fnd_api.g_ret_sts_error THEN

15914: IF (l_debug = 1) THEN
15915: debug_print('After calling update serial reservation qty ' || l_return_status);
15916: END IF;
15917:
15918: IF l_return_status = fnd_api.g_ret_sts_error THEN
15919: RAISE fnd_api.g_exc_error;
15920: END IF;
15921:
15922: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15919: RAISE fnd_api.g_exc_error;

15915: debug_print('After calling update serial reservation qty ' || l_return_status);
15916: END IF;
15917:
15918: IF l_return_status = fnd_api.g_ret_sts_error THEN
15919: RAISE fnd_api.g_exc_error;
15920: END IF;
15921:
15922: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15923: RAISE fnd_api.g_exc_unexpected_error;

Line 15922: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15918: IF l_return_status = fnd_api.g_ret_sts_error THEN
15919: RAISE fnd_api.g_exc_error;
15920: END IF;
15921:
15922: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15923: RAISE fnd_api.g_exc_unexpected_error;
15924: END IF;
15925:
15926: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN

Line 15923: RAISE fnd_api.g_exc_unexpected_error;

15919: RAISE fnd_api.g_exc_error;
15920: END IF;
15921:
15922: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15923: RAISE fnd_api.g_exc_unexpected_error;
15924: END IF;
15925:
15926: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
15927: -- we have already unreserved the serials. Since we are

Line 15956: RAISE fnd_api.g_exc_error;

15952:
15953: IF (l_validate_serials_reserved > l_to_primary_reservation_qty) THEN
15954: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15955: fnd_msg_pub.ADD;
15956: RAISE fnd_api.g_exc_error;
15957: END IF;
15958:
15959: IF (l_validate_serials_reserved > 0) THEN
15960: inv_reservation_validate_pvt.validate_serials

Line 15975: IF l_return_status = fnd_api.g_ret_sts_error THEN

15971: debug_print('After calling validate serials ' || l_return_status);
15972: END IF;
15973:
15974: --
15975: IF l_return_status = fnd_api.g_ret_sts_error THEN
15976: RAISE fnd_api.g_exc_error;
15977: END IF;
15978:
15979: --

Line 15976: RAISE fnd_api.g_exc_error;

15972: END IF;
15973:
15974: --
15975: IF l_return_status = fnd_api.g_ret_sts_error THEN
15976: RAISE fnd_api.g_exc_error;
15977: END IF;
15978:
15979: --
15980: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15980: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15976: RAISE fnd_api.g_exc_error;
15977: END IF;
15978:
15979: --
15980: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15981: RAISE fnd_api.g_exc_unexpected_error;
15982: END IF;
15983:
15984: -- we have to unreserve some of the serials

Line 15981: RAISE fnd_api.g_exc_unexpected_error;

15977: END IF;
15978:
15979: --
15980: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15981: RAISE fnd_api.g_exc_unexpected_error;
15982: END IF;
15983:
15984: -- we have to unreserve some of the serials
15985: -- unreserve the extra serials that are more than the primary_reservation_quantity

Line 16003: IF l_return_status = fnd_api.g_ret_sts_error THEN

15999: IF (l_debug = 1) THEN
16000: debug_print('After calling update serial reservation qty ' || l_return_status);
16001: END IF;
16002:
16003: IF l_return_status = fnd_api.g_ret_sts_error THEN
16004: RAISE fnd_api.g_exc_error;
16005: END IF;
16006:
16007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16004: RAISE fnd_api.g_exc_error;

16000: debug_print('After calling update serial reservation qty ' || l_return_status);
16001: END IF;
16002:
16003: IF l_return_status = fnd_api.g_ret_sts_error THEN
16004: RAISE fnd_api.g_exc_error;
16005: END IF;
16006:
16007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16008: RAISE fnd_api.g_exc_unexpected_error;

Line 16007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16003: IF l_return_status = fnd_api.g_ret_sts_error THEN
16004: RAISE fnd_api.g_exc_error;
16005: END IF;
16006:
16007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16008: RAISE fnd_api.g_exc_unexpected_error;
16009: END IF;
16010:
16011: END IF;-- transfer all and to row exists

Line 16008: RAISE fnd_api.g_exc_unexpected_error;

16004: RAISE fnd_api.g_exc_error;
16005: END IF;
16006:
16007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16008: RAISE fnd_api.g_exc_unexpected_error;
16009: END IF;
16010:
16011: END IF;-- transfer all and to row exists
16012: END IF ; -- total serials reserved > 0

Line 16048: RAISE fnd_api.g_exc_error;

16044: p_to_serial_number(i).serial_number);
16045: END IF;
16046: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
16047: fnd_msg_pub.ADD;
16048: RAISE fnd_api.g_exc_error;
16049: END;
16050:
16051: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
16052: l_orig_rsv_tbl(1).reservation_id) THEN

Line 16055: RAISE fnd_api.g_exc_error;

16051: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
16052: l_orig_rsv_tbl(1).reservation_id) THEN
16053: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
16054: fnd_msg_pub.ADD;
16055: RAISE fnd_api.g_exc_error;
16056: END IF;
16057:
16058: -- If reservation id is null, then we are reserving a new
16059: -- serial. we should check to see if the group mark id is null or

Line 16068: RAISE fnd_api.g_exc_error;

16064: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
16065: END IF;
16066: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16067: fnd_msg_pub.ADD;
16068: RAISE fnd_api.g_exc_error;
16069: END IF;
16070:
16071: BEGIN
16072: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 16113: IF l_return_status = fnd_api.g_ret_sts_error THEN

16109: debug_print('After calling validate serials ' || l_return_status);
16110: END IF;
16111:
16112: --
16113: IF l_return_status = fnd_api.g_ret_sts_error THEN
16114: RAISE fnd_api.g_exc_error;
16115: END IF;
16116:
16117: --

Line 16114: RAISE fnd_api.g_exc_error;

16110: END IF;
16111:
16112: --
16113: IF l_return_status = fnd_api.g_ret_sts_error THEN
16114: RAISE fnd_api.g_exc_error;
16115: END IF;
16116:
16117: --
16118: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16118: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16114: RAISE fnd_api.g_exc_error;
16115: END IF;
16116:
16117: --
16118: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16119: RAISE fnd_api.g_exc_unexpected_error;
16120: END IF;
16121:
16122: END IF;

Line 16119: RAISE fnd_api.g_exc_unexpected_error;

16115: END IF;
16116:
16117: --
16118: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16119: RAISE fnd_api.g_exc_unexpected_error;
16120: END IF;
16121:
16122: END IF;
16123:

Line 16142: RAISE fnd_api.g_exc_error;

16138: debug_print('No serials found for the serial number: ' || l_serial_number_table(l_serial_index).serial_number);
16139: END IF;
16140: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16141: fnd_msg_pub.ADD;
16142: RAISE fnd_api.g_exc_error;
16143: END;
16144:
16145: IF l_debug=1 THEN
16146: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);

Line 16166: RAISE fnd_api.g_exc_error;

16162:
16163: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16164: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16165: fnd_msg_pub.ADD;
16166: RAISE fnd_api.g_exc_error;
16167: END IF;
16168:
16169: -- update the to serial reservation quantity. dont have
16170: -- to update from as the from record is deleted.

Line 16184: RAISE fnd_api.g_exc_error;

16180: debug_print('Update failed for from reservation record. id: ' || l_to_reservation_id);
16181: END IF;
16182: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16183: fnd_msg_pub.ADD;
16184: RAISE fnd_api.g_exc_error;
16185: END;
16186:
16187: IF (l_debug = 1) THEN
16188: debug_print('After updating serial count of the to_record.');

Line 16191: IF l_return_status = fnd_api.g_ret_sts_error THEN

16187: IF (l_debug = 1) THEN
16188: debug_print('After updating serial count of the to_record.');
16189: END IF;
16190:
16191: IF l_return_status = fnd_api.g_ret_sts_error THEN
16192: RAISE fnd_api.g_exc_error;
16193: END IF;
16194:
16195: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16192: RAISE fnd_api.g_exc_error;

16188: debug_print('After updating serial count of the to_record.');
16189: END IF;
16190:
16191: IF l_return_status = fnd_api.g_ret_sts_error THEN
16192: RAISE fnd_api.g_exc_error;
16193: END IF;
16194:
16195: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16196: RAISE fnd_api.g_exc_unexpected_error;

Line 16195: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16191: IF l_return_status = fnd_api.g_ret_sts_error THEN
16192: RAISE fnd_api.g_exc_error;
16193: END IF;
16194:
16195: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16196: RAISE fnd_api.g_exc_unexpected_error;
16197: END IF;
16198:
16199: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN

Line 16196: RAISE fnd_api.g_exc_unexpected_error;

16192: RAISE fnd_api.g_exc_error;
16193: END IF;
16194:
16195: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16196: RAISE fnd_api.g_exc_unexpected_error;
16197: END IF;
16198:
16199: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
16200: -- validate the from serial with the to record.

Line 16225: IF l_return_status = fnd_api.g_ret_sts_error THEN

16221: debug_print('After calling validate serials ' || l_return_status);
16222: END IF;
16223:
16224: --
16225: IF l_return_status = fnd_api.g_ret_sts_error THEN
16226: RAISE fnd_api.g_exc_error;
16227: END IF;
16228:
16229: --

Line 16226: RAISE fnd_api.g_exc_error;

16222: END IF;
16223:
16224: --
16225: IF l_return_status = fnd_api.g_ret_sts_error THEN
16226: RAISE fnd_api.g_exc_error;
16227: END IF;
16228:
16229: --
16230: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16230: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16226: RAISE fnd_api.g_exc_error;
16227: END IF;
16228:
16229: --
16230: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16231: RAISE fnd_api.g_exc_unexpected_error;
16232: END IF;
16233:
16234: END IF;

Line 16231: RAISE fnd_api.g_exc_unexpected_error;

16227: END IF;
16228:
16229: --
16230: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16231: RAISE fnd_api.g_exc_unexpected_error;
16232: END IF;
16233:
16234: END IF;
16235:

Line 16254: RAISE fnd_api.g_exc_error;

16250:
16251: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16252: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16253: fnd_msg_pub.ADD;
16254: RAISE fnd_api.g_exc_error;
16255: END IF;
16256:
16257: BEGIN
16258: UPDATE mtl_reservations SET serial_reservation_quantity

Line 16269: RAISE fnd_api.g_exc_error;

16265: debug_print('Update failed for from reservation record. id: ' || l_to_reservation_id);
16266: END IF;
16267: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16268: fnd_msg_pub.ADD;
16269: RAISE fnd_api.g_exc_error;
16270: END;
16271:
16272: IF (l_debug = 1) THEN
16273: debug_print('After calling update serial reservation qty ' || l_return_status);

Line 16276: IF l_return_status = fnd_api.g_ret_sts_error THEN

16272: IF (l_debug = 1) THEN
16273: debug_print('After calling update serial reservation qty ' || l_return_status);
16274: END IF;
16275:
16276: IF l_return_status = fnd_api.g_ret_sts_error THEN
16277: RAISE fnd_api.g_exc_error;
16278: END IF;
16279:
16280: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16277: RAISE fnd_api.g_exc_error;

16273: debug_print('After calling update serial reservation qty ' || l_return_status);
16274: END IF;
16275:
16276: IF l_return_status = fnd_api.g_ret_sts_error THEN
16277: RAISE fnd_api.g_exc_error;
16278: END IF;
16279:
16280: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16281: RAISE fnd_api.g_exc_unexpected_error;

Line 16280: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16276: IF l_return_status = fnd_api.g_ret_sts_error THEN
16277: RAISE fnd_api.g_exc_error;
16278: END IF;
16279:
16280: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16281: RAISE fnd_api.g_exc_unexpected_error;
16282: END IF;
16283:
16284: ELSIF (NOT l_transfer_all) THEN

Line 16281: RAISE fnd_api.g_exc_unexpected_error;

16277: RAISE fnd_api.g_exc_error;
16278: END IF;
16279:
16280: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16281: RAISE fnd_api.g_exc_unexpected_error;
16282: END IF;
16283:
16284: ELSIF (NOT l_transfer_all) THEN
16285: -- serials passed have already been reserved. make sure the

Line 16336: IF l_return_status = fnd_api.g_ret_sts_error THEN

16332: debug_print('After calling validate serials ' || l_return_status);
16333: END IF;
16334:
16335: --
16336: IF l_return_status = fnd_api.g_ret_sts_error THEN
16337: RAISE fnd_api.g_exc_error;
16338: END IF;
16339:
16340: --

Line 16337: RAISE fnd_api.g_exc_error;

16333: END IF;
16334:
16335: --
16336: IF l_return_status = fnd_api.g_ret_sts_error THEN
16337: RAISE fnd_api.g_exc_error;
16338: END IF;
16339:
16340: --
16341: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16341: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16337: RAISE fnd_api.g_exc_error;
16338: END IF;
16339:
16340: --
16341: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16342: RAISE fnd_api.g_exc_unexpected_error;
16343: END IF;
16344:
16345:

Line 16342: RAISE fnd_api.g_exc_unexpected_error;

16338: END IF;
16339:
16340: --
16341: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16342: RAISE fnd_api.g_exc_unexpected_error;
16343: END IF;
16344:
16345:
16346: l_serials_tobe_unreserved := l_total_from_serials_reserved - l_from_primary_reservation_qty;

Line 16364: RAISE fnd_api.g_exc_error;

16360: debug_print('No serials found for Serial Number: ' || l_serial_number_table(i).serial_number);
16361: END IF;
16362: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16363: fnd_msg_pub.ADD;
16364: RAISE fnd_api.g_exc_error;
16365: END;
16366:
16367: IF l_debug=1 THEN
16368: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 16390: RAISE fnd_api.g_exc_error;

16386:
16387: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16388: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16389: fnd_msg_pub.ADD;
16390: RAISE fnd_api.g_exc_error;
16391: END IF;
16392:
16393: BEGIN
16394: UPDATE mtl_reservations SET serial_reservation_quantity

Line 16405: RAISE fnd_api.g_exc_error;

16401: debug_print('Update failed for to reservation record. id: ' || l_to_reservation_id);
16402: END IF;
16403: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16404: fnd_msg_pub.ADD;
16405: RAISE fnd_api.g_exc_error;
16406: END;
16407:
16408: BEGIN
16409: SELECT COUNT(1) INTO l_total_from_serials_reserved FROM

Line 16432: RAISE fnd_api.g_exc_error;

16428: debug_print('Update failed for from reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
16429: END IF;
16430: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16431: fnd_msg_pub.ADD;
16432: RAISE fnd_api.g_exc_error;
16433: END;
16434:
16435:
16436: END if; -- transfer all and to row exist

Line 16473: RAISE fnd_api.g_exc_error;

16469: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
16470: l_orig_rsv_tbl(1).reservation_id) OR (l_from_reservation_id IS NULL) THEN
16471: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
16472: fnd_msg_pub.ADD;
16473: RAISE fnd_api.g_exc_error;
16474: END IF;
16475:
16476: -- unreserve the passed serials.
16477: BEGIN

Line 16513: RAISE fnd_api.g_exc_error;

16509: debug_print('No serials found for this data : ' || p_to_serial_number(i).serial_number);
16510: END IF;
16511: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
16512: fnd_msg_pub.ADD;
16513: RAISE fnd_api.g_exc_error;
16514: END;
16515:
16516: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
16517: l_orig_rsv_tbl(1).reservation_id) THEN

Line 16520: RAISE fnd_api.g_exc_error;

16516: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
16517: l_orig_rsv_tbl(1).reservation_id) THEN
16518: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
16519: fnd_msg_pub.ADD;
16520: RAISE fnd_api.g_exc_error;
16521: END IF;
16522:
16523: IF (l_from_reservation_id IS NULL) AND (l_group_mark_id IS NOT NULL) AND (l_group_mark_id <> -1)THEN
16524: IF (l_debug = 1) THEN

Line 16529: RAISE fnd_api.g_exc_error;

16525: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
16526: END IF;
16527: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16528: fnd_msg_pub.ADD;
16529: RAISE fnd_api.g_exc_error;
16530: END IF;
16531:
16532: BEGIN
16533: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 16590: IF l_return_status = fnd_api.g_ret_sts_error THEN

16586: debug_print('After calling validate serials ' || l_return_status);
16587: END IF;
16588:
16589: --
16590: IF l_return_status = fnd_api.g_ret_sts_error THEN
16591: RAISE fnd_api.g_exc_error;
16592: END IF;
16593:
16594: --

Line 16591: RAISE fnd_api.g_exc_error;

16587: END IF;
16588:
16589: --
16590: IF l_return_status = fnd_api.g_ret_sts_error THEN
16591: RAISE fnd_api.g_exc_error;
16592: END IF;
16593:
16594: --
16595: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16595: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16591: RAISE fnd_api.g_exc_error;
16592: END IF;
16593:
16594: --
16595: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16596: RAISE fnd_api.g_exc_unexpected_error;
16597: END IF;
16598:
16599: BEGIN

Line 16596: RAISE fnd_api.g_exc_unexpected_error;

16592: END IF;
16593:
16594: --
16595: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16596: RAISE fnd_api.g_exc_unexpected_error;
16597: END IF;
16598:
16599: BEGIN
16600: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 16612: RAISE fnd_api.g_exc_error;

16608: debug_print('No serials found for this data. rsv id: ' || l_orig_rsv_tbl(1).reservation_id);
16609: END IF;
16610: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16611: fnd_msg_pub.ADD;
16612: RAISE fnd_api.g_exc_error;
16613: END;
16614: END IF;
16615: END IF;
16616:

Line 16632: RAISE fnd_api.g_exc_error;

16628:
16629: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16630: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16631: fnd_msg_pub.ADD;
16632: RAISE fnd_api.g_exc_error;
16633: END IF;
16634:
16635: BEGIN
16636: UPDATE mtl_reservations SET serial_reservation_quantity

Line 16647: RAISE fnd_api.g_exc_error;

16643: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
16644: END IF;
16645: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16646: fnd_msg_pub.ADD;
16647: RAISE fnd_api.g_exc_error;
16648: END;
16649:
16650: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
16651:

Line 16695: IF l_return_status = fnd_api.g_ret_sts_error THEN

16691: debug_print('After calling validate serials ' || l_return_status);
16692: END IF;
16693:
16694: --
16695: IF l_return_status = fnd_api.g_ret_sts_error THEN
16696: RAISE fnd_api.g_exc_error;
16697: END IF;
16698:
16699: --

Line 16696: RAISE fnd_api.g_exc_error;

16692: END IF;
16693:
16694: --
16695: IF l_return_status = fnd_api.g_ret_sts_error THEN
16696: RAISE fnd_api.g_exc_error;
16697: END IF;
16698:
16699: --
16700: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16700: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16696: RAISE fnd_api.g_exc_error;
16697: END IF;
16698:
16699: --
16700: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16701: RAISE fnd_api.g_exc_unexpected_error;
16702: END IF;
16703: END IF;
16704: END IF;

Line 16701: RAISE fnd_api.g_exc_unexpected_error;

16697: END IF;
16698:
16699: --
16700: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16701: RAISE fnd_api.g_exc_unexpected_error;
16702: END IF;
16703: END IF;
16704: END IF;
16705:

Line 16720: RAISE fnd_api.g_exc_error;

16716: END;
16717: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16718: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16719: fnd_msg_pub.ADD;
16720: RAISE fnd_api.g_exc_error;
16721: END IF;
16722:
16723: BEGIN
16724: UPDATE mtl_reservations SET serial_reservation_quantity

Line 16735: RAISE fnd_api.g_exc_error;

16731: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
16732: END IF;
16733: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16734: fnd_msg_pub.ADD;
16735: RAISE fnd_api.g_exc_error;
16736: END;
16737:
16738: ELSIF (NOT l_transfer_all) THEN
16739: -- check to see if there are excess serials in from

Line 16789: IF l_return_status = fnd_api.g_ret_sts_error THEN

16785: debug_print('After calling validate serials ' || l_return_status);
16786: END IF;
16787:
16788: --
16789: IF l_return_status = fnd_api.g_ret_sts_error THEN
16790: RAISE fnd_api.g_exc_error;
16791: END IF;
16792:
16793: --

Line 16790: RAISE fnd_api.g_exc_error;

16786: END IF;
16787:
16788: --
16789: IF l_return_status = fnd_api.g_ret_sts_error THEN
16790: RAISE fnd_api.g_exc_error;
16791: END IF;
16792:
16793: --
16794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 16794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

16790: RAISE fnd_api.g_exc_error;
16791: END IF;
16792:
16793: --
16794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16795: RAISE fnd_api.g_exc_unexpected_error;
16796: END IF;
16797:
16798: l_serials_tobe_unreserved := l_validate_serials_reserved - l_from_primary_reservation_qty;

Line 16795: RAISE fnd_api.g_exc_unexpected_error;

16791: END IF;
16792:
16793: --
16794: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
16795: RAISE fnd_api.g_exc_unexpected_error;
16796: END IF;
16797:
16798: l_serials_tobe_unreserved := l_validate_serials_reserved - l_from_primary_reservation_qty;
16799:

Line 16815: RAISE fnd_api.g_exc_error;

16811: debug_print('No serials found for serial number: ' || l_validate_serial_number_table(i).serial_number);
16812: END IF;
16813: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
16814: fnd_msg_pub.ADD;
16815: RAISE fnd_api.g_exc_error;
16816: END;
16817:
16818: IF l_debug=1 THEN
16819: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 16841: RAISE fnd_api.g_exc_error;

16837: END;
16838: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
16839: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
16840: fnd_msg_pub.ADD;
16841: RAISE fnd_api.g_exc_error;
16842: END IF;
16843:
16844: BEGIN
16845: UPDATE mtl_reservations SET serial_reservation_quantity

Line 16856: RAISE fnd_api.g_exc_error;

16852: debug_print('No serials found for reservation record. id: ' || l_to_reservation_id);
16853: END IF;
16854: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16855: fnd_msg_pub.ADD;
16856: RAISE fnd_api.g_exc_error;
16857: END;
16858:
16859: BEGIN
16860: SELECT COUNT(1) INTO l_total_from_serials_reserved FROM

Line 16883: RAISE fnd_api.g_exc_error;

16879: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
16880: END IF;
16881: fnd_message.set_name('INV', 'INV_INVALID_ROW');
16882: fnd_msg_pub.ADD;
16883: RAISE fnd_api.g_exc_error;
16884: END;
16885:
16886: END IF;-- transfer all and to row exist
16887:

Line 16904: WHEN fnd_api.g_exc_error THEN

16900: /*** End R12 ***/
16901:
16902: x_return_status := l_return_status;
16903: EXCEPTION
16904: WHEN fnd_api.g_exc_error THEN
16905: ROLLBACK TO transfer_reservation_sa;
16906: x_return_status := fnd_api.g_ret_sts_error;
16907: /**** {{ R12 Enhanced reservations code changes. Should be
16908: -- releasing the locks. }} *****/

Line 16906: x_return_status := fnd_api.g_ret_sts_error;

16902: x_return_status := l_return_status;
16903: EXCEPTION
16904: WHEN fnd_api.g_exc_error THEN
16905: ROLLBACK TO transfer_reservation_sa;
16906: x_return_status := fnd_api.g_ret_sts_error;
16907: /**** {{ R12 Enhanced reservations code changes. Should be
16908: -- releasing the locks. }} *****/
16909: IF l_lock_obtained THEN
16910: inv_reservation_lock_pvt.release_lock

Line 16918: WHEN fnd_api.g_exc_unexpected_error THEN

16914: END IF;
16915: /*** End R12 ***/
16916: -- Get message count and data
16917: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16918: WHEN fnd_api.g_exc_unexpected_error THEN
16919: ROLLBACK TO transfer_reservation_sa;
16920: x_return_status := fnd_api.g_ret_sts_unexp_error;
16921: /**** {{ R12 Enhanced reservations code changes. Should be
16922: -- releasing the locks. }} *****/

Line 16920: x_return_status := fnd_api.g_ret_sts_unexp_error;

16916: -- Get message count and data
16917: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16918: WHEN fnd_api.g_exc_unexpected_error THEN
16919: ROLLBACK TO transfer_reservation_sa;
16920: x_return_status := fnd_api.g_ret_sts_unexp_error;
16921: /**** {{ R12 Enhanced reservations code changes. Should be
16922: -- releasing the locks. }} *****/
16923: IF l_lock_obtained THEN
16924: inv_reservation_lock_pvt.release_lock

Line 16934: x_return_status := fnd_api.g_ret_sts_unexp_error;

16930: -- Get message count and data
16931: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16932: WHEN OTHERS THEN
16933: ROLLBACK TO transfer_reservation_sa;
16934: x_return_status := fnd_api.g_ret_sts_unexp_error;
16935: /**** {{ R12 Enhanced reservations code changes. Should be
16936: -- releasing the locks. }} *****/
16937: IF l_lock_obtained THEN
16938: inv_reservation_lock_pvt.release_lock

Line 16979: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

16975: ** new cursors.Did not use Dynamic SQL for parsing performance issue.
16976: */
16977: PROCEDURE query_reservation_om_hdr_line(
16978: p_api_version_number IN NUMBER
16979: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
16980: , x_return_status OUT NOCOPY VARCHAR2
16981: , x_msg_count OUT NOCOPY NUMBER
16982: , x_msg_data OUT NOCOPY VARCHAR2
16983: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 16984: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

16980: , x_return_status OUT NOCOPY VARCHAR2
16981: , x_msg_count OUT NOCOPY NUMBER
16982: , x_msg_data OUT NOCOPY VARCHAR2
16983: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
16984: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
16985: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
16986: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
16987: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type
16988: , x_mtl_reservation_tbl_count OUT NOCOPY NUMBER

Line 16993: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

16989: , x_error_code OUT NOCOPY NUMBER
16990: ) IS
16991: l_api_version_number CONSTANT NUMBER := 1.0;
16992: l_api_name CONSTANT VARCHAR2(30) := 'Query_Reservation_OM_Hdr_Line';
16993: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
16994: l_counter INTEGER;
16995: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
16996:
16997: -- Cursor to fetch MTL_RESERVATION record based on passed

Line 17279: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN

17275: x_error_code := inv_reservation_global.g_err_unexpected;
17276:
17277: --
17278: -- Standard call to check for call compatibility
17279: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
17280: RAISE fnd_api.g_exc_unexpected_error;
17281: END IF;
17282:
17283: --

Line 17280: RAISE fnd_api.g_exc_unexpected_error;

17276:
17277: --
17278: -- Standard call to check for call compatibility
17279: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
17280: RAISE fnd_api.g_exc_unexpected_error;
17281: END IF;
17282:
17283: --
17284: -- Initialize message list.

Line 17285: IF fnd_api.to_boolean(p_init_msg_lst) THEN

17281: END IF;
17282:
17283: --
17284: -- Initialize message list.
17285: IF fnd_api.to_boolean(p_init_msg_lst) THEN
17286: fnd_msg_pub.initialize;
17287: END IF;
17288:
17289: --

Line 17293: IF (p_query_input.demand_source_header_id = fnd_api.g_miss_num

17289: --
17290: /*
17291: ** Make sure the required parameters are passed
17292: */
17293: IF (p_query_input.demand_source_header_id = fnd_api.g_miss_num
17294: OR p_query_input.demand_source_header_id IS NULL
17295: ) THEN
17296: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
17297: fnd_message.set_token('FIELD_NAME', 'demand_source_header_id');

Line 17299: RAISE fnd_api.g_exc_error;

17295: ) THEN
17296: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
17297: fnd_message.set_token('FIELD_NAME', 'demand_source_header_id');
17298: fnd_msg_pub.ADD;
17299: RAISE fnd_api.g_exc_error;
17300: END IF;
17301:
17302: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num
17303: OR p_query_input.demand_source_line_id IS NULL

Line 17302: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num

17298: fnd_msg_pub.ADD;
17299: RAISE fnd_api.g_exc_error;
17300: END IF;
17301:
17302: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num
17303: OR p_query_input.demand_source_line_id IS NULL
17304: ) THEN
17305: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
17306: fnd_message.set_token('FIELD_NAME', 'demand_source_line_id');

Line 17308: RAISE fnd_api.g_exc_error;

17304: ) THEN
17305: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
17306: fnd_message.set_token('FIELD_NAME', 'demand_source_line_id');
17307: fnd_msg_pub.ADD;
17308: RAISE fnd_api.g_exc_error;
17309: END IF;
17310:
17311: --Bug#2872822/2914726 OM call to this API passes null. This was changed
17312: -- handle null also.

Line 17358: WHEN fnd_api.g_exc_error THEN

17354: x_return_status := l_return_status;
17355: x_error_code := inv_reservation_global.g_err_no_error;
17356: --
17357: EXCEPTION
17358: WHEN fnd_api.g_exc_error THEN
17359: x_return_status := fnd_api.g_ret_sts_error;
17360: -- Get message count and data
17361: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17362: WHEN fnd_api.g_exc_unexpected_error THEN

Line 17359: x_return_status := fnd_api.g_ret_sts_error;

17355: x_error_code := inv_reservation_global.g_err_no_error;
17356: --
17357: EXCEPTION
17358: WHEN fnd_api.g_exc_error THEN
17359: x_return_status := fnd_api.g_ret_sts_error;
17360: -- Get message count and data
17361: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17362: WHEN fnd_api.g_exc_unexpected_error THEN
17363: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 17362: WHEN fnd_api.g_exc_unexpected_error THEN

17358: WHEN fnd_api.g_exc_error THEN
17359: x_return_status := fnd_api.g_ret_sts_error;
17360: -- Get message count and data
17361: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17362: WHEN fnd_api.g_exc_unexpected_error THEN
17363: x_return_status := fnd_api.g_ret_sts_unexp_error;
17364: -- Get message count and data
17365: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17366: WHEN OTHERS THEN

Line 17363: x_return_status := fnd_api.g_ret_sts_unexp_error;

17359: x_return_status := fnd_api.g_ret_sts_error;
17360: -- Get message count and data
17361: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17362: WHEN fnd_api.g_exc_unexpected_error THEN
17363: x_return_status := fnd_api.g_ret_sts_unexp_error;
17364: -- Get message count and data
17365: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17366: WHEN OTHERS THEN
17367: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 17367: x_return_status := fnd_api.g_ret_sts_unexp_error;

17363: x_return_status := fnd_api.g_ret_sts_unexp_error;
17364: -- Get message count and data
17365: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17366: WHEN OTHERS THEN
17367: x_return_status := fnd_api.g_ret_sts_unexp_error;
17368:
17369: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
17370: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
17371: END IF;

Line 17384: , p_commit IN VARCHAR2 := fnd_api.g_false

17380: PROCEDURE Upd_Reservation_Pup_New(
17381: x_return_status OUT NOCOPY VARCHAR2
17382: , x_msg_count OUT NOCOPY NUMBER
17383: , x_msg_data OUT NOCOPY VARCHAR2
17384: , p_commit IN VARCHAR2 := fnd_api.g_false
17385: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17386: , p_organization_id IN NUMBER
17387: , p_demand_source_header_id IN NUMBER
17388: , p_demand_source_line_id IN NUMBER

Line 17385: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

17381: x_return_status OUT NOCOPY VARCHAR2
17382: , x_msg_count OUT NOCOPY NUMBER
17383: , x_msg_data OUT NOCOPY VARCHAR2
17384: , p_commit IN VARCHAR2 := fnd_api.g_false
17385: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17386: , p_organization_id IN NUMBER
17387: , p_demand_source_header_id IN NUMBER
17388: , p_demand_source_line_id IN NUMBER
17389: , p_from_subinventory_code IN VARCHAR2

Line 17399: , p_validation_flag IN VARCHAR2 := fnd_api.g_false

17395: , p_lot_number IN VARCHAR2
17396: , p_quantity IN NUMBER
17397: , p_uom IN VARCHAR2
17398: , p_lpn_id IN NUMBER := NULL
17399: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
17400: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
17401: , p_requirement_date IN DATE DEFAULT NULL -- bug 2879208
17402: , p_source_lpn_id IN NUMBER := NULL -- Bug 4016953/3871066
17403: , p_demand_source_name IN VARCHAR2 DEFAULT NULL -- RTV Project

Line 17400: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false

17396: , p_quantity IN NUMBER
17397: , p_uom IN VARCHAR2
17398: , p_lpn_id IN NUMBER := NULL
17399: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
17400: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
17401: , p_requirement_date IN DATE DEFAULT NULL -- bug 2879208
17402: , p_source_lpn_id IN NUMBER := NULL -- Bug 4016953/3871066
17403: , p_demand_source_name IN VARCHAR2 DEFAULT NULL -- RTV Project
17404: ) IS

Line 17521: x_return_status := fnd_api.g_ret_sts_success;

17517: ORDER BY lpn_id asc, abs(primary_reservation_quantity-v_quantity); -- for bug 14011079 add the last order
17518:
17519: BEGIN
17520: -- Initialize return status to success
17521: x_return_status := fnd_api.g_ret_sts_success;
17522:
17523: -- Initialize message list.
17524: IF fnd_api.to_boolean(p_init_msg_list) THEN
17525: fnd_msg_pub.initialize;

Line 17524: IF fnd_api.to_boolean(p_init_msg_list) THEN

17520: -- Initialize return status to success
17521: x_return_status := fnd_api.g_ret_sts_success;
17522:
17523: -- Initialize message list.
17524: IF fnd_api.to_boolean(p_init_msg_list) THEN
17525: fnd_msg_pub.initialize;
17526: END IF;
17527:
17528: SAVEPOINT upd_reservation_pup_new;

Line 17626: RAISE fnd_api.g_exc_error;

17622: debug_print('Conversion to RSV UOM Failed');
17623: END IF;
17624: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-RSV-UOM');
17625: fnd_msg_pub.ADD;
17626: RAISE fnd_api.g_exc_error;
17627: END IF;
17628:
17629: -- Remember UOM of current remaining quantity
17630: l_remaining_qty_uom := l_src_rsv.primary_uom_code;

Line 17664: RAISE fnd_api.g_exc_error;

17660: debug_print('Conversion to SECONDARY UOM Failed');
17661: END IF;
17662: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM');
17663: fnd_msg_pub.ADD;
17664: RAISE fnd_api.g_exc_error;
17665: END IF;
17666: IF (l_debug = 1) THEN
17667: debug_print('After conversion secondary_qty= '||l_src_rsv.secondary_reservation_quantity); -- KYH
17668: END IF;

Line 17712: , p_init_msg_lst => fnd_api.g_false

17708:
17709: l_progress := 'Call to Transfer_Reservation';
17710: INV_RESERVATION_PVT.Transfer_Reservation (
17711: p_api_version_number => 1.0
17712: , p_init_msg_lst => fnd_api.g_false
17713: , x_return_status => x_return_status
17714: , x_msg_count => x_msg_count
17715: , x_msg_data => x_msg_data
17716: , p_original_rsv_rec => l_src_rsv

Line 17722: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

17718: , p_original_serial_number => l_serial_number
17719: , p_validation_flag => p_validation_flag
17720: , x_reservation_id => l_reservation_id );
17721:
17722: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
17723: RAISE FND_API.G_EXC_ERROR;
17724: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
17725: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
17726: END IF;

Line 17723: RAISE FND_API.G_EXC_ERROR;

17719: , p_validation_flag => p_validation_flag
17720: , x_reservation_id => l_reservation_id );
17721:
17722: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
17723: RAISE FND_API.G_EXC_ERROR;
17724: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
17725: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
17726: END IF;
17727:

Line 17724: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

17720: , x_reservation_id => l_reservation_id );
17721:
17722: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
17723: RAISE FND_API.G_EXC_ERROR;
17724: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
17725: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
17726: END IF;
17727:
17728: l_call_xfr_rsv := FALSE;

Line 17725: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

17721:
17722: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
17723: RAISE FND_API.G_EXC_ERROR;
17724: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
17725: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
17726: END IF;
17727:
17728: l_call_xfr_rsv := FALSE;
17729: l_progress := 'Done with reservation loop';

Line 17746: RAISE FND_API.G_EXC_ERROR;

17742: debug_print('Not enough reserved quantity l_remaining_qty='||l_remaining_qty);
17743: END IF;
17744: fnd_message.set_name('INV', 'INV_UPDATE_RSV_FAILED');
17745: fnd_msg_pub.ADD;
17746: RAISE FND_API.G_EXC_ERROR;
17747: END IF;
17748:
17749: -- Standard check of p_commit.
17750: IF fnd_api.to_boolean(p_commit) THEN

Line 17750: IF fnd_api.to_boolean(p_commit) THEN

17746: RAISE FND_API.G_EXC_ERROR;
17747: END IF;
17748:
17749: -- Standard check of p_commit.
17750: IF fnd_api.to_boolean(p_commit) THEN
17751: COMMIT WORK;
17752: END IF;
17753: EXCEPTION
17754: WHEN FND_API.G_EXC_ERROR THEN

Line 17754: WHEN FND_API.G_EXC_ERROR THEN

17750: IF fnd_api.to_boolean(p_commit) THEN
17751: COMMIT WORK;
17752: END IF;
17753: EXCEPTION
17754: WHEN FND_API.G_EXC_ERROR THEN
17755: ROLLBACK TO upd_reservation_pup_new;
17756: x_return_status := fnd_api.g_ret_sts_error;
17757: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
17758: IF (l_debug = 1) THEN

Line 17756: x_return_status := fnd_api.g_ret_sts_error;

17752: END IF;
17753: EXCEPTION
17754: WHEN FND_API.G_EXC_ERROR THEN
17755: ROLLBACK TO upd_reservation_pup_new;
17756: x_return_status := fnd_api.g_ret_sts_error;
17757: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
17758: IF (l_debug = 1) THEN
17759: debug_print(l_api_name ||' Exec Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
17760: END IF;

Line 17763: x_return_status := fnd_api.g_ret_sts_unexp_error;

17759: debug_print(l_api_name ||' Exec Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
17760: END IF;
17761: WHEN OTHERS THEN
17762: ROLLBACK TO upd_reservation_pup_new;
17763: x_return_status := fnd_api.g_ret_sts_unexp_error;
17764: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
17765: IF (l_debug = 1) THEN
17766: debug_print(l_api_name ||' Unexp Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
17767: END IF;

Line 17776: , p_commit IN VARCHAR2 := fnd_api.g_false

17772: PROCEDURE upd_reservation_pup(
17773: x_return_status OUT NOCOPY VARCHAR2
17774: , x_msg_count OUT NOCOPY NUMBER
17775: , x_msg_data OUT NOCOPY VARCHAR2
17776: , p_commit IN VARCHAR2 := fnd_api.g_false
17777: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17778: , p_organization_id IN NUMBER
17779: , p_demand_source_header_id IN NUMBER
17780: , p_demand_source_line_id IN NUMBER

Line 17777: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

17773: x_return_status OUT NOCOPY VARCHAR2
17774: , x_msg_count OUT NOCOPY NUMBER
17775: , x_msg_data OUT NOCOPY VARCHAR2
17776: , p_commit IN VARCHAR2 := fnd_api.g_false
17777: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17778: , p_organization_id IN NUMBER
17779: , p_demand_source_header_id IN NUMBER
17780: , p_demand_source_line_id IN NUMBER
17781: , p_from_subinventory_code IN VARCHAR2

Line 17790: , p_validation_flag IN VARCHAR2 := fnd_api.g_false

17786: , p_revision IN VARCHAR2
17787: , p_lot_number IN VARCHAR2
17788: , p_quantity IN NUMBER
17789: , p_uom IN VARCHAR2
17790: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
17791: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
17792: )
17793: IS
17794:

Line 17791: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false

17787: , p_lot_number IN VARCHAR2
17788: , p_quantity IN NUMBER
17789: , p_uom IN VARCHAR2
17790: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
17791: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
17792: )
17793: IS
17794:
17795: BEGIN

Line 17825: , p_commit IN VARCHAR2 := fnd_api.g_false

17821: PROCEDURE transfer_lpn_trx_reservation(
17822: x_return_status OUT NOCOPY VARCHAR2
17823: , x_msg_count OUT NOCOPY NUMBER
17824: , x_msg_data OUT NOCOPY VARCHAR2
17825: , p_commit IN VARCHAR2 := fnd_api.g_false
17826: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17827: , p_transaction_temp_id IN NUMBER := 0
17828: , p_organization_id IN NUMBER
17829: , p_lpn_id IN NUMBER

Line 17826: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

17822: x_return_status OUT NOCOPY VARCHAR2
17823: , x_msg_count OUT NOCOPY NUMBER
17824: , x_msg_data OUT NOCOPY VARCHAR2
17825: , p_commit IN VARCHAR2 := fnd_api.g_false
17826: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
17827: , p_transaction_temp_id IN NUMBER := 0
17828: , p_organization_id IN NUMBER
17829: , p_lpn_id IN NUMBER
17830: , p_from_subinventory_code IN VARCHAR2

Line 17970: , p_force_reservation_flag => fnd_api.g_true

17966: , p_revision => lpn_del_rec.revision
17967: , p_lot_number => lpn_del_rec.lot_number
17968: , p_quantity => NVL(lpn_del_rec.picked_quantity,lpn_del_rec.requested_quantity) --9699014
17969: , p_uom => lpn_del_rec.requested_quantity_uom
17970: , p_force_reservation_flag => fnd_api.g_true
17971: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600)) -- bug 2879208
17972: , p_source_lpn_id => lpn_del_rec.lpn_id --bug12722739
17973: );
17974:

Line 17975: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

17971: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600)) -- bug 2879208
17972: , p_source_lpn_id => lpn_del_rec.lpn_id --bug12722739
17973: );
17974:
17975: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
17976: IF (l_debug = 1) THEN
17977: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
17978: END IF;
17979: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 17981: RAISE fnd_api.g_exc_unexpected_error;

17977: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
17978: END IF;
17979: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
17980: fnd_msg_pub.ADD;
17981: RAISE fnd_api.g_exc_unexpected_error;
17982: END IF;
17983: END LOOP;
17984:
17985: -- Workaround for performance issue 3631133

Line 18026: , p_force_reservation_flag => fnd_api.g_true

18022: , p_revision => p_revision
18023: , p_lot_number => v_lottmp.lot_number
18024: , p_quantity => v_lottmp.transaction_quantity
18025: , p_uom => p_trx_uom
18026: , p_force_reservation_flag => fnd_api.g_true
18027: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
18028: );
18029:
18030: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 18030: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

18026: , p_force_reservation_flag => fnd_api.g_true
18027: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
18028: );
18029:
18030: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
18031: IF (l_debug = 1) THEN
18032: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
18033: END IF;
18034: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 18036: RAISE fnd_api.g_exc_unexpected_error;

18032: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
18033: END IF;
18034: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
18035: fnd_msg_pub.ADD;
18036: RAISE fnd_api.g_exc_unexpected_error;
18037: END IF;
18038:
18039: l_count := l_count + 1;
18040: ELSE

Line 18046: RAISE fnd_api.g_exc_error;

18042: debug_print('**Split disallowed for lpns with multiple delivery lines for the same item', 1);
18043: END IF;
18044: fnd_message.set_name('INV', 'INV_MULTI_DEL_SPLIT_ERROR');
18045: fnd_msg_pub.ADD;
18046: RAISE fnd_api.g_exc_error;
18047: END IF;
18048: END LOOP;
18049: END LOOP;
18050:

Line 18081: , p_force_reservation_flag => fnd_api.g_true

18077: , p_revision => p_revision
18078: , p_lot_number => p_lot_number
18079: , p_quantity => p_trx_quantity
18080: , p_uom => p_trx_uom
18081: , p_force_reservation_flag => fnd_api.g_true
18082: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
18083: );
18084:
18085: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 18085: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

18081: , p_force_reservation_flag => fnd_api.g_true
18082: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
18083: );
18084:
18085: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
18086: IF (l_debug = 1) THEN
18087: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
18088: END IF;
18089: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 18091: RAISE fnd_api.g_exc_unexpected_error;

18087: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
18088: END IF;
18089: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
18090: fnd_msg_pub.ADD;
18091: RAISE fnd_api.g_exc_unexpected_error;
18092: END IF;
18093:
18094: l_count := l_count + 1;
18095: ELSE

Line 18101: RAISE fnd_api.g_exc_error;

18097: debug_print('**Split disallowed for lpns with multiple delivery lines for the same item', 1);
18098: END IF;
18099: fnd_message.set_name('INV', 'INV_MULTI_DEL_SPLIT_ERROR');
18100: fnd_msg_pub.ADD;
18101: RAISE fnd_api.g_exc_error;
18102: END IF;
18103: END LOOP;
18104: END IF;
18105: END IF;

Line 18107: WHEN fnd_api.g_exc_error THEN

18103: END LOOP;
18104: END IF;
18105: END IF;
18106: EXCEPTION
18107: WHEN fnd_api.g_exc_error THEN
18108: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18109: fnd_msg_pub.ADD;
18110: ROLLBACK TO transfer_lpn_trx_reservation;
18111: x_return_status := fnd_api.g_ret_sts_error;

Line 18111: x_return_status := fnd_api.g_ret_sts_error;

18107: WHEN fnd_api.g_exc_error THEN
18108: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18109: fnd_msg_pub.ADD;
18110: ROLLBACK TO transfer_lpn_trx_reservation;
18111: x_return_status := fnd_api.g_ret_sts_error;
18112: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18113: WHEN fnd_api.g_exc_unexpected_error THEN
18114: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18115: fnd_msg_pub.ADD;

Line 18113: WHEN fnd_api.g_exc_unexpected_error THEN

18109: fnd_msg_pub.ADD;
18110: ROLLBACK TO transfer_lpn_trx_reservation;
18111: x_return_status := fnd_api.g_ret_sts_error;
18112: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18113: WHEN fnd_api.g_exc_unexpected_error THEN
18114: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18115: fnd_msg_pub.ADD;
18116: ROLLBACK TO transfer_lpn_trx_reservation;
18117: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 18117: x_return_status := fnd_api.g_ret_sts_unexp_error;

18113: WHEN fnd_api.g_exc_unexpected_error THEN
18114: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18115: fnd_msg_pub.ADD;
18116: ROLLBACK TO transfer_lpn_trx_reservation;
18117: x_return_status := fnd_api.g_ret_sts_unexp_error;
18118: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18119: WHEN OTHERS THEN
18120: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18121: fnd_msg_pub.ADD;

Line 18123: x_return_status := fnd_api.g_ret_sts_unexp_error;

18119: WHEN OTHERS THEN
18120: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
18121: fnd_msg_pub.ADD;
18122: ROLLBACK TO transfer_lpn_trx_reservation;
18123: x_return_status := fnd_api.g_ret_sts_unexp_error;
18124:
18125: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
18126: fnd_msg_pub.add_exc_msg('wms_upd_res_pvt', 'TRANSFER_LPN_TRX_RESERVATION');
18127: END IF;

Line 18146: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

18142: ) IS
18143: l_api_name VARCHAR2(100) := 'Insert_rsv_temp';
18144: x_msg_count NUMBER;
18145: x_msg_data VARCHAR2(1000);
18146: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
18147: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
18148: BEGIN
18149: INSERT INTO rsv_temp
18150: (

Line 18178: x_return_status := fnd_api.g_ret_sts_unexp_error;

18174:
18175: x_return_status := l_return_status;
18176: EXCEPTION
18177: WHEN OTHERS THEN
18178: x_return_status := fnd_api.g_ret_sts_unexp_error;
18179:
18180: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
18181: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
18182: END IF;

Line 18195: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

18191: --to ensure that bad trees are not in place.
18192:
18193: PROCEDURE do_check_for_commit(
18194: p_api_version_number IN NUMBER
18195: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
18196: , x_return_status OUT NOCOPY VARCHAR2
18197: , x_msg_count OUT NOCOPY NUMBER
18198: , x_msg_data OUT NOCOPY VARCHAR2
18199: , x_failed_rsv_temp_tbl OUT NOCOPY inv_reservation_global.mtl_failed_rsv_tbl_type

Line 18203: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

18199: , x_failed_rsv_temp_tbl OUT NOCOPY inv_reservation_global.mtl_failed_rsv_tbl_type
18200: ) IS
18201: l_api_version_number CONSTANT NUMBER := 1.0;
18202: l_api_name CONSTANT VARCHAR2(30) := 'Do_check_for_commit';
18203: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
18204: l_no_violation BOOLEAN;
18205: l_root_id INTEGER;
18206: l_failed_rsv_temp_tbl inv_reservation_global.mtl_failed_rsv_tbl_type;
18207: l_failed_rsv_temp_rec inv_reservation_global.mtl_failed_rsv_rec_type;

Line 18246: IF l_return_status = fnd_api.g_ret_sts_error THEN

18242: END IF;
18243:
18244: inv_quantity_tree_pvt.do_check(p_api_version_number, p_init_msg_lst, l_return_status, x_msg_count, x_msg_data, tree_rec.p_tree_id, l_no_violation);
18245:
18246: IF l_return_status = fnd_api.g_ret_sts_error THEN
18247: RAISE fnd_api.g_exc_error;
18248: END IF;
18249:
18250: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 18247: RAISE fnd_api.g_exc_error;

18243:
18244: inv_quantity_tree_pvt.do_check(p_api_version_number, p_init_msg_lst, l_return_status, x_msg_count, x_msg_data, tree_rec.p_tree_id, l_no_violation);
18245:
18246: IF l_return_status = fnd_api.g_ret_sts_error THEN
18247: RAISE fnd_api.g_exc_error;
18248: END IF;
18249:
18250: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18251: RAISE fnd_api.g_exc_unexpected_error;

Line 18250: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

18246: IF l_return_status = fnd_api.g_ret_sts_error THEN
18247: RAISE fnd_api.g_exc_error;
18248: END IF;
18249:
18250: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18251: RAISE fnd_api.g_exc_unexpected_error;
18252: END IF;
18253:
18254: IF NOT (l_no_violation) THEN

Line 18251: RAISE fnd_api.g_exc_unexpected_error;

18247: RAISE fnd_api.g_exc_error;
18248: END IF;
18249:
18250: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18251: RAISE fnd_api.g_exc_unexpected_error;
18252: END IF;
18253:
18254: IF NOT (l_no_violation) THEN
18255: OPEN rsv_csr(tree_rec.p_tree_id);

Line 18274: , p_validation_flag => fnd_api.g_false

18270: , x_msg_count => x_msg_count
18271: , x_msg_data => x_msg_data
18272: , p_rsv_rec => l_rsv_rec
18273: , p_original_serial_number => p_original_serial_number
18274: , p_validation_flag => fnd_api.g_false
18275: );
18276:
18277: IF l_return_status = fnd_api.g_ret_sts_error THEN
18278: RAISE fnd_api.g_exc_error;

Line 18277: IF l_return_status = fnd_api.g_ret_sts_error THEN

18273: , p_original_serial_number => p_original_serial_number
18274: , p_validation_flag => fnd_api.g_false
18275: );
18276:
18277: IF l_return_status = fnd_api.g_ret_sts_error THEN
18278: RAISE fnd_api.g_exc_error;
18279: END IF;
18280:
18281: --

Line 18278: RAISE fnd_api.g_exc_error;

18274: , p_validation_flag => fnd_api.g_false
18275: );
18276:
18277: IF l_return_status = fnd_api.g_ret_sts_error THEN
18278: RAISE fnd_api.g_exc_error;
18279: END IF;
18280:
18281: --
18282: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 18282: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

18278: RAISE fnd_api.g_exc_error;
18279: END IF;
18280:
18281: --
18282: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18283: RAISE fnd_api.g_exc_unexpected_error;
18284: -- END IF;
18285: END IF;
18286:

Line 18283: RAISE fnd_api.g_exc_unexpected_error;

18279: END IF;
18280:
18281: --
18282: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18283: RAISE fnd_api.g_exc_unexpected_error;
18284: -- END IF;
18285: END IF;
18286:
18287: l_failed_rsv_temp_tbl_count := l_failed_rsv_temp_tbl_count + 1;

Line 18307: WHEN fnd_api.g_exc_error THEN

18303: x_failed_rsv_temp_tbl := l_failed_rsv_temp_tbl;
18304: x_return_status := l_return_status;
18305: inv_quantity_tree_pub.clear_quantity_cache;
18306: EXCEPTION
18307: WHEN fnd_api.g_exc_error THEN
18308: x_return_status := fnd_api.g_ret_sts_error;
18309: -- Get message count and data
18310: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18311: WHEN fnd_api.g_exc_unexpected_error THEN

Line 18308: x_return_status := fnd_api.g_ret_sts_error;

18304: x_return_status := l_return_status;
18305: inv_quantity_tree_pub.clear_quantity_cache;
18306: EXCEPTION
18307: WHEN fnd_api.g_exc_error THEN
18308: x_return_status := fnd_api.g_ret_sts_error;
18309: -- Get message count and data
18310: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18311: WHEN fnd_api.g_exc_unexpected_error THEN
18312: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 18311: WHEN fnd_api.g_exc_unexpected_error THEN

18307: WHEN fnd_api.g_exc_error THEN
18308: x_return_status := fnd_api.g_ret_sts_error;
18309: -- Get message count and data
18310: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18311: WHEN fnd_api.g_exc_unexpected_error THEN
18312: x_return_status := fnd_api.g_ret_sts_unexp_error;
18313: -- Get message count and data
18314: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18315: WHEN OTHERS THEN

Line 18312: x_return_status := fnd_api.g_ret_sts_unexp_error;

18308: x_return_status := fnd_api.g_ret_sts_error;
18309: -- Get message count and data
18310: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18311: WHEN fnd_api.g_exc_unexpected_error THEN
18312: x_return_status := fnd_api.g_ret_sts_unexp_error;
18313: -- Get message count and data
18314: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18315: WHEN OTHERS THEN
18316: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 18316: x_return_status := fnd_api.g_ret_sts_unexp_error;

18312: x_return_status := fnd_api.g_ret_sts_unexp_error;
18313: -- Get message count and data
18314: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18315: WHEN OTHERS THEN
18316: x_return_status := fnd_api.g_ret_sts_unexp_error;
18317:
18318: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
18319: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
18320: END IF;

Line 18329: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

18325:
18326: /**** {{ R12 Enhanced reservations code changes }}****/
18327: PROCEDURE Transfer_Reservation_SubXfer
18328: ( p_api_version_number IN NUMBER DEFAULT 1.0
18329: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
18330: , x_return_status OUT NOCOPY VARCHAR2
18331: , x_msg_count OUT NOCOPY NUMBER
18332: , x_msg_data OUT NOCOPY VARCHAR2
18333: , p_Inventory_Item_Id IN Number

Line 18352: l_return_status VARCHAR2(1):= fnd_api.g_ret_sts_success;

18348: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type ;
18349: l_original_serial_number_Tab inv_reservation_global.serial_number_tbl_type ;
18350: l_to_serial_number_Tab inv_reservation_global.serial_number_tbl_type ;
18351: l_Reservation_Id Number;
18352: l_return_status VARCHAR2(1):= fnd_api.g_ret_sts_success;
18353: l_debug number;
18354:
18355: --Define a cursor that gets ReservationId information for a given org_id,
18356: --item_id and serial number information

Line 18400: RAISE fnd_api.g_exc_unexpected_error;

18396: END IF;
18397: l_Reservation_Id := p_original_Reservation_Id ;
18398: End If;
18399: If l_Reservation_Id IS NULL Then
18400: RAISE fnd_api.g_exc_unexpected_error;
18401: End If;
18402:
18403: l_original_rsv_rec.Reservation_id := l_Reservation_Id ;
18404: l_To_Rsv_Rec.subinventory_code := p_to_SubInventory ;

Line 18430: IF l_return_status = fnd_api.g_ret_sts_error THEN

18426: IF (l_debug = 1) THEN
18427: debug_print('After calling transfer reservation. Return status: ' || l_return_status);
18428: END IF;
18429:
18430: IF l_return_status = fnd_api.g_ret_sts_error THEN
18431: RAISE fnd_api.g_exc_error;
18432: END IF ;
18433:
18434: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 18431: RAISE fnd_api.g_exc_error;

18427: debug_print('After calling transfer reservation. Return status: ' || l_return_status);
18428: END IF;
18429:
18430: IF l_return_status = fnd_api.g_ret_sts_error THEN
18431: RAISE fnd_api.g_exc_error;
18432: END IF ;
18433:
18434: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18435: RAISE fnd_api.g_exc_unexpected_error;

Line 18434: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

18430: IF l_return_status = fnd_api.g_ret_sts_error THEN
18431: RAISE fnd_api.g_exc_error;
18432: END IF ;
18433:
18434: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18435: RAISE fnd_api.g_exc_unexpected_error;
18436: END IF;
18437:
18438: x_return_status := l_return_status;

Line 18435: RAISE fnd_api.g_exc_unexpected_error;

18431: RAISE fnd_api.g_exc_error;
18432: END IF ;
18433:
18434: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
18435: RAISE fnd_api.g_exc_unexpected_error;
18436: END IF;
18437:
18438: x_return_status := l_return_status;
18439:

Line 18442: WHEN fnd_api.g_exc_error THEN

18438: x_return_status := l_return_status;
18439:
18440: EXCEPTION
18441:
18442: WHEN fnd_api.g_exc_error THEN
18443: x_return_status := fnd_api.g_ret_sts_error;
18444:
18445: -- Get message count and data
18446: fnd_msg_pub.count_and_get

Line 18443: x_return_status := fnd_api.g_ret_sts_error;

18439:
18440: EXCEPTION
18441:
18442: WHEN fnd_api.g_exc_error THEN
18443: x_return_status := fnd_api.g_ret_sts_error;
18444:
18445: -- Get message count and data
18446: fnd_msg_pub.count_and_get
18447: ( p_count => x_msg_count

Line 18451: WHEN fnd_api.g_exc_unexpected_error THEN

18447: ( p_count => x_msg_count
18448: , p_data => x_msg_data
18449: );
18450:
18451: WHEN fnd_api.g_exc_unexpected_error THEN
18452: x_return_status := fnd_api.g_ret_sts_unexp_error ;
18453:
18454: -- Get message count and data
18455: fnd_msg_pub.count_and_get

Line 18452: x_return_status := fnd_api.g_ret_sts_unexp_error ;

18448: , p_data => x_msg_data
18449: );
18450:
18451: WHEN fnd_api.g_exc_unexpected_error THEN
18452: x_return_status := fnd_api.g_ret_sts_unexp_error ;
18453:
18454: -- Get message count and data
18455: fnd_msg_pub.count_and_get
18456: ( p_count => x_msg_count

Line 18461: x_return_status := fnd_api.g_ret_sts_unexp_error ;

18457: , p_data => x_msg_data
18458: );
18459:
18460: WHEN OTHERS THEN
18461: x_return_status := fnd_api.g_ret_sts_unexp_error ;
18462:
18463: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
18464: THEN
18465: fnd_msg_pub.add_exc_msg

Line 18491: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

18487: , p_to_subinventory_code IN VARCHAR2
18488: , p_to_locator_id IN NUMBER)
18489: IS
18490: l_api_name CONSTANT VARCHAR2(30) := 'transfer_serial_rsv_in_LPN';
18491: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
18492: l_msg_count NUMBER;
18493: l_msg_data VARCHAR2(1000);
18494: l_debug NUMBER;
18495:

Line 18675: , p_init_msg_lst => fnd_api.g_false

18671: END IF;
18672:
18673: inv_reservation_pvt.transfer_reservation(
18674: p_api_version_number => 1.0
18675: , p_init_msg_lst => fnd_api.g_false
18676: , x_return_status => l_return_status
18677: , x_msg_count => l_msg_count
18678: , x_msg_data => l_msg_data
18679: , p_original_rsv_rec => l_original_rsv_rec

Line 18683: , p_validation_flag => fnd_api.g_true

18679: , p_original_rsv_rec => l_original_rsv_rec
18680: , p_to_rsv_rec => l_to_rsv_rec
18681: , p_original_serial_number => l_serial_number_tbl
18682: , p_to_serial_number => l_serial_number_tbl
18683: , p_validation_flag => fnd_api.g_true
18684: , x_reservation_id => l_reservation_id
18685: );
18686:
18687: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 18687: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

18683: , p_validation_flag => fnd_api.g_true
18684: , x_reservation_id => l_reservation_id
18685: );
18686:
18687: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
18688: IF (l_debug = 1) THEN
18689: debug_print('Error return status from transfer_reservation');
18690: END IF;
18691:

Line 18692: RAISE fnd_api.g_exc_error;

18688: IF (l_debug = 1) THEN
18689: debug_print('Error return status from transfer_reservation');
18690: END IF;
18691:
18692: RAISE fnd_api.g_exc_error;
18693: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
18694: IF (l_debug = 1) THEN
18695: debug_print('Unexpected return status from transfer_reservation');
18696: END IF;

Line 18693: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

18689: debug_print('Error return status from transfer_reservation');
18690: END IF;
18691:
18692: RAISE fnd_api.g_exc_error;
18693: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
18694: IF (l_debug = 1) THEN
18695: debug_print('Unexpected return status from transfer_reservation');
18696: END IF;
18697:

Line 18698: RAISE fnd_api.g_exc_unexpected_error;

18694: IF (l_debug = 1) THEN
18695: debug_print('Unexpected return status from transfer_reservation');
18696: END IF;
18697:
18698: RAISE fnd_api.g_exc_unexpected_error;
18699: END IF;
18700:
18701: -- delete the content of l_serial_number_tbl and reset the index
18702: l_serial_number_tbl.DELETE;

Line 18713: WHEN fnd_api.g_exc_error THEN

18709: x_msg_count := l_msg_count;
18710: x_msg_data := l_msg_data;
18711:
18712: EXCEPTION
18713: WHEN fnd_api.g_exc_error THEN
18714: x_return_status := fnd_api.g_ret_sts_error;
18715: -- Get message count and data
18716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18717: WHEN fnd_api.g_exc_unexpected_error THEN

Line 18714: x_return_status := fnd_api.g_ret_sts_error;

18710: x_msg_data := l_msg_data;
18711:
18712: EXCEPTION
18713: WHEN fnd_api.g_exc_error THEN
18714: x_return_status := fnd_api.g_ret_sts_error;
18715: -- Get message count and data
18716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18717: WHEN fnd_api.g_exc_unexpected_error THEN
18718: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 18717: WHEN fnd_api.g_exc_unexpected_error THEN

18713: WHEN fnd_api.g_exc_error THEN
18714: x_return_status := fnd_api.g_ret_sts_error;
18715: -- Get message count and data
18716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18717: WHEN fnd_api.g_exc_unexpected_error THEN
18718: x_return_status := fnd_api.g_ret_sts_unexp_error;
18719:
18720: IF (l_debug = 1) THEN
18721: debug_print('unexpected error: ' || SQLERRM);

Line 18718: x_return_status := fnd_api.g_ret_sts_unexp_error;

18714: x_return_status := fnd_api.g_ret_sts_error;
18715: -- Get message count and data
18716: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18717: WHEN fnd_api.g_exc_unexpected_error THEN
18718: x_return_status := fnd_api.g_ret_sts_unexp_error;
18719:
18720: IF (l_debug = 1) THEN
18721: debug_print('unexpected error: ' || SQLERRM);
18722: END IF;

Line 18727: x_return_status := fnd_api.g_ret_sts_unexp_error;

18723:
18724: -- Get message count and data
18725: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
18726: WHEN OTHERS THEN
18727: x_return_status := fnd_api.g_ret_sts_unexp_error;
18728:
18729: IF (l_debug = 1) THEN
18730: debug_print('others error: ' || SQLERRM);
18731: END IF;