DBA Data[Home] [Help]

APPS.INV_RESERVATION_PVT dependencies on FND_API

Line 165: WHEN fnd_api.g_exc_error THEN

161:
162: x_requested_qty := l_requested_qty;
163:
164: EXCEPTION
165: WHEN fnd_api.g_exc_error THEN
166: IF (l_debug = 1) THEN
167: debug_print('excepted error');
168: END IF;
169: x_requested_qty := 0;

Line 171: WHEN fnd_api.g_exc_unexpected_error THEN

167: debug_print('excepted error');
168: END IF;
169: x_requested_qty := 0;
170: --
171: WHEN fnd_api.g_exc_unexpected_error THEN
172: IF (l_debug = 1) THEN
173: debug_print('unexpected error');
174: END IF;
175: x_requested_qty := 0;

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

255: , p_fm_supply_source_type_id => p_fm_supply_source_type_id
256: , p_supply_source_type_id => p_to_supply_source_type_id
257: , p_supply_source_header_id => p_to_supply_source_header_id
258: , p_supply_source_line_id => p_to_supply_source_line_id
259: , p_supply_source_line_detail => Nvl(p_to_supply_source_line_detail,fnd_api.g_miss_num)
260: , p_project_id => p_to_project_id
261: , p_task_id => p_to_task_id
262: , p_api_version_number => 1.0
263: , p_init_msg_lst => fnd_api.g_false

Line 263: , p_init_msg_lst => fnd_api.g_false

259: , p_supply_source_line_detail => Nvl(p_to_supply_source_line_detail,fnd_api.g_miss_num)
260: , p_project_id => p_to_project_id
261: , p_task_id => p_to_task_id
262: , p_api_version_number => 1.0
263: , p_init_msg_lst => fnd_api.g_false
264: );
265:
266: IF (l_debug = 1) THEN
267: debug_print('After calling available supply to reserve ' || x_return_status);

Line 273: IF x_return_status = fnd_api.g_ret_sts_error THEN

269: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
270: END IF;
271:
272: --
273: IF x_return_status = fnd_api.g_ret_sts_error THEN
274: RAISE fnd_api.g_exc_error;
275: END IF;
276:
277: --

Line 274: RAISE fnd_api.g_exc_error;

270: END IF;
271:
272: --
273: IF x_return_status = fnd_api.g_ret_sts_error THEN
274: RAISE fnd_api.g_exc_error;
275: END IF;
276:
277: --
278: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 278: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

274: RAISE fnd_api.g_exc_error;
275: END IF;
276:
277: --
278: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
279: RAISE fnd_api.g_exc_unexpected_error;
280: END IF;
281:
282: IF (p_fm_supply_source_type_id = p_to_supply_source_type_id AND

Line 279: RAISE fnd_api.g_exc_unexpected_error;

275: END IF;
276:
277: --
278: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
279: RAISE fnd_api.g_exc_unexpected_error;
280: END IF;
281:
282: IF (p_fm_supply_source_type_id = p_to_supply_source_type_id AND
283: p_fm_supply_source_header_id = p_to_supply_source_header_id AND

Line 306: WHEN fnd_api.g_exc_error THEN

302: x_reservable_qty := l_reservable_qty;
303: x_qty_available := l_qty_available;
304:
305: EXCEPTION
306: WHEN fnd_api.g_exc_error THEN
307: x_return_status := fnd_api.g_ret_sts_error;
308: x_reservable_qty := 0;
309: x_qty_available := 0;
310: --

Line 307: x_return_status := fnd_api.g_ret_sts_error;

303: x_qty_available := l_qty_available;
304:
305: EXCEPTION
306: WHEN fnd_api.g_exc_error THEN
307: x_return_status := fnd_api.g_ret_sts_error;
308: x_reservable_qty := 0;
309: x_qty_available := 0;
310: --
311: WHEN fnd_api.g_exc_unexpected_error THEN

Line 311: WHEN fnd_api.g_exc_unexpected_error THEN

307: x_return_status := fnd_api.g_ret_sts_error;
308: x_reservable_qty := 0;
309: x_qty_available := 0;
310: --
311: WHEN fnd_api.g_exc_unexpected_error THEN
312: x_return_status := fnd_api.g_ret_sts_unexp_error;
313: x_reservable_qty := 0;
314: x_qty_available := 0;
315: --

Line 312: x_return_status := fnd_api.g_ret_sts_unexp_error;

308: x_reservable_qty := 0;
309: x_qty_available := 0;
310: --
311: WHEN fnd_api.g_exc_unexpected_error THEN
312: x_return_status := fnd_api.g_ret_sts_unexp_error;
313: x_reservable_qty := 0;
314: x_qty_available := 0;
315: --
316: WHEN OTHERS THEN

Line 317: x_return_status := fnd_api.g_ret_sts_unexp_error;

313: x_reservable_qty := 0;
314: x_qty_available := 0;
315: --
316: WHEN OTHERS THEN
317: x_return_status := fnd_api.g_ret_sts_unexp_error;
318: x_reservable_qty := 0;
319: x_qty_available := 0;
320: --
321: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

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

391: , p_primary_uom_code => p_to_primary_uom_code
392: , p_demand_source_type_id => p_to_demand_source_type_id
393: , p_demand_source_header_id => p_to_demand_source_header_id
394: , p_demand_source_line_id => p_to_demand_source_line_id
395: , p_demand_source_line_detail => Nvl(p_to_demand_source_line_detail,fnd_api.g_miss_num)
396: , p_project_id => p_to_project_id
397: , p_task_id => p_to_task_id
398: , p_api_version_number => 1.0
399: , p_init_msg_lst => fnd_api.g_false

Line 399: , p_init_msg_lst => fnd_api.g_false

395: , p_demand_source_line_detail => Nvl(p_to_demand_source_line_detail,fnd_api.g_miss_num)
396: , p_project_id => p_to_project_id
397: , p_task_id => p_to_task_id
398: , p_api_version_number => 1.0
399: , p_init_msg_lst => fnd_api.g_false
400: );
401:
402:
403: IF (l_debug = 1) THEN

Line 410: IF x_return_status = fnd_api.g_ret_sts_error THEN

406: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
407: END IF;
408:
409: --
410: IF x_return_status = fnd_api.g_ret_sts_error THEN
411: RAISE fnd_api.g_exc_error;
412: END IF;
413:
414: --

Line 411: RAISE fnd_api.g_exc_error;

407: END IF;
408:
409: --
410: IF x_return_status = fnd_api.g_ret_sts_error THEN
411: RAISE fnd_api.g_exc_error;
412: END IF;
413:
414: --
415: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 415: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

411: RAISE fnd_api.g_exc_error;
412: END IF;
413:
414: --
415: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
416: RAISE fnd_api.g_exc_unexpected_error;
417: END IF;
418:
419: IF (p_fm_demand_source_type_id = p_to_demand_source_type_id AND

Line 416: RAISE fnd_api.g_exc_unexpected_error;

412: END IF;
413:
414: --
415: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
416: RAISE fnd_api.g_exc_unexpected_error;
417: END IF;
418:
419: IF (p_fm_demand_source_type_id = p_to_demand_source_type_id AND
420: p_fm_demand_source_header_id = p_to_demand_source_header_id AND

Line 479: , p_init_msg_lst => fnd_api.g_false

475: p_organization_id => p_to_organization_id)) THEN
476: get_ship_qty_tolerance
477: (
478: p_api_version_number => 1.0
479: , p_init_msg_lst => fnd_api.g_false
480: , x_return_status => x_return_status
481: , x_msg_count => x_msg_count
482: , x_msg_data => x_msg_data
483: , p_demand_type_id => p_to_demand_source_type_id

Line 498: IF x_return_status = fnd_api.g_ret_sts_error THEN

494: debug_print('Reservation margin above ' || l_reservation_margin_above);
495: END IF;
496:
497: --
498: IF x_return_status = fnd_api.g_ret_sts_error THEN
499: RAISE fnd_api.g_exc_error;
500: END IF;
501:
502: --

Line 499: RAISE fnd_api.g_exc_error;

495: END IF;
496:
497: --
498: IF x_return_status = fnd_api.g_ret_sts_error THEN
499: RAISE fnd_api.g_exc_error;
500: END IF;
501:
502: --
503: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 503: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

499: RAISE fnd_api.g_exc_error;
500: END IF;
501:
502: --
503: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
504: RAISE fnd_api.g_exc_unexpected_error;
505: END IF;
506:
507: l_reservable_qty := l_reservable_qty + l_reservation_margin_above;

Line 504: RAISE fnd_api.g_exc_unexpected_error;

500: END IF;
501:
502: --
503: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
504: RAISE fnd_api.g_exc_unexpected_error;
505: END IF;
506:
507: l_reservable_qty := l_reservable_qty + l_reservation_margin_above;
508: l_qty_available := l_qty_available + l_reservation_margin_above;

Line 516: WHEN fnd_api.g_exc_error THEN

512: x_reservable_qty := l_reservable_qty;
513: x_qty_available := l_qty_available;
514:
515: EXCEPTION
516: WHEN fnd_api.g_exc_error THEN
517: x_return_status := fnd_api.g_ret_sts_error;
518: x_reservable_qty := 0;
519: x_qty_available := 0;
520: --

Line 517: x_return_status := fnd_api.g_ret_sts_error;

513: x_qty_available := l_qty_available;
514:
515: EXCEPTION
516: WHEN fnd_api.g_exc_error THEN
517: x_return_status := fnd_api.g_ret_sts_error;
518: x_reservable_qty := 0;
519: x_qty_available := 0;
520: --
521: WHEN fnd_api.g_exc_unexpected_error THEN

Line 521: WHEN fnd_api.g_exc_unexpected_error THEN

517: x_return_status := fnd_api.g_ret_sts_error;
518: x_reservable_qty := 0;
519: x_qty_available := 0;
520: --
521: WHEN fnd_api.g_exc_unexpected_error THEN
522: x_return_status := fnd_api.g_ret_sts_unexp_error;
523: x_reservable_qty := 0;
524: x_qty_available := 0;
525: --

Line 522: x_return_status := fnd_api.g_ret_sts_unexp_error;

518: x_reservable_qty := 0;
519: x_qty_available := 0;
520: --
521: WHEN fnd_api.g_exc_unexpected_error THEN
522: x_return_status := fnd_api.g_ret_sts_unexp_error;
523: x_reservable_qty := 0;
524: x_qty_available := 0;
525: --
526: WHEN OTHERS THEN

Line 527: x_return_status := fnd_api.g_ret_sts_unexp_error;

523: x_reservable_qty := 0;
524: x_qty_available := 0;
525: --
526: WHEN OTHERS THEN
527: x_return_status := fnd_api.g_ret_sts_unexp_error;
528: x_reservable_qty := 0;
529: x_qty_available := 0;
530: --
531: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 543: , p_init_msg_lst IN VARCHAR2 Default Fnd_API.G_False

539: -- item
540: PROCEDURE get_ship_qty_tolerance
541: (
542: p_api_version_number IN NUMBER
543: , p_init_msg_lst IN VARCHAR2 Default Fnd_API.G_False
544: , x_return_status OUT NOCOPY VARCHAR2
545: , x_msg_count OUT NOCOPY NUMBER
546: , x_msg_data OUT NOCOPY VARCHAR2
547: , p_demand_type_id IN NUMBER

Line 571: x_return_status := fnd_api.g_ret_sts_success;

567:
568: l_debug := g_debug;
569:
570: -- Initialize return status
571: x_return_status := fnd_api.g_ret_sts_success;
572:
573: -- Standard call to check for call compatibility
574: IF NOT fnd_api.compatible_api_call(l_api_version_number
575: , p_api_version_number

Line 574: IF NOT fnd_api.compatible_api_call(l_api_version_number

570: -- Initialize return status
571: x_return_status := fnd_api.g_ret_sts_success;
572:
573: -- Standard call to check for call compatibility
574: IF NOT fnd_api.compatible_api_call(l_api_version_number
575: , p_api_version_number
576: , l_api_name
577: , G_PKG_NAME
578: ) THEN

Line 579: RAISE fnd_api.g_exc_unexpected_error;

575: , p_api_version_number
576: , l_api_name
577: , G_PKG_NAME
578: ) THEN
579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;
581: --
582: -- Initialize message list.
583: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 583: IF fnd_api.to_boolean(p_init_msg_lst) THEN

579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;
581: --
582: -- Initialize message list.
583: IF fnd_api.to_boolean(p_init_msg_lst) THEN
584: fnd_msg_pub.initialize;
585: END IF;
586:
587: IF p_demand_type_id IN (inv_reservation_global.g_source_type_oe,

Line 655: x_return_status := fnd_api.g_ret_sts_success;

651:
652: END IF;
653:
654: END IF;
655: x_return_status := fnd_api.g_ret_sts_success;
656:
657: EXCEPTION
658:
659: WHEN fnd_api.g_exc_error THEN

Line 659: WHEN fnd_api.g_exc_error THEN

655: x_return_status := fnd_api.g_ret_sts_success;
656:
657: EXCEPTION
658:
659: WHEN fnd_api.g_exc_error THEN
660: x_return_status := fnd_api.g_ret_sts_error;
661:
662: -- Get message count and data
663: fnd_msg_pub.count_and_get

Line 660: x_return_status := fnd_api.g_ret_sts_error;

656:
657: EXCEPTION
658:
659: WHEN fnd_api.g_exc_error THEN
660: x_return_status := fnd_api.g_ret_sts_error;
661:
662: -- Get message count and data
663: fnd_msg_pub.count_and_get
664: ( p_count => x_msg_count

Line 669: WHEN fnd_api.g_exc_unexpected_error THEN

665: , p_data => x_msg_data
666: , p_encoded => 'F'
667: );
668:
669: WHEN fnd_api.g_exc_unexpected_error THEN
670: x_return_status := fnd_api.g_ret_sts_unexp_error ;
671:
672: -- Get message count and data
673: fnd_msg_pub.count_and_get

Line 670: x_return_status := fnd_api.g_ret_sts_unexp_error ;

666: , p_encoded => 'F'
667: );
668:
669: WHEN fnd_api.g_exc_unexpected_error THEN
670: x_return_status := fnd_api.g_ret_sts_unexp_error ;
671:
672: -- Get message count and data
673: fnd_msg_pub.count_and_get
674: ( p_count => x_msg_count

Line 680: x_return_status := fnd_api.g_ret_sts_unexp_error ;

676: , p_encoded => 'F'
677: );
678:
679: WHEN OTHERS THEN
680: x_return_status := fnd_api.g_ret_sts_unexp_error ;
681:
682: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
683: THEN
684: fnd_msg_pub.add_exc_msg

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

707: -- In px_rsv_rec, inventory_item_id must be valid;
708: -- either primary_uom_code, primary_reservation_quantity
709: -- or reservation_uom_code, reservation_quantity must be not null and valid
710: PROCEDURE convert_quantity(x_return_status OUT NOCOPY VARCHAR2, px_rsv_rec IN OUT NOCOPY inv_reservation_global.mtl_reservation_rec_type) IS
711: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
712: --l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
713: l_primary_uom_code VARCHAR2(3);
714: l_tmp_secondary_quantity NUMBER := NULL; -- INVCONV
715: l_tmp_quantity NUMBER := NULL;

Line 760: RAISE fnd_api.g_exc_error;

756: IF l_tmp_quantity = -99999 THEN
757: -- conversion failed
758: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-PRIMARY-UOM');
759: fnd_msg_pub.ADD;
760: RAISE fnd_api.g_exc_error;
761: END IF;
762:
763: --
764: px_rsv_rec.primary_reservation_quantity := l_tmp_quantity;

Line 803: RAISE fnd_api.g_exc_error;

799: IF l_tmp_quantity = -99999 THEN
800: -- conversion failed
801: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-RSV-UOM');
802: fnd_msg_pub.ADD;
803: RAISE fnd_api.g_exc_error;
804: END IF;
805: END IF;
806:
807: --

Line 831: RAISE fnd_api.g_exc_error;

827: IF l_tmp_secondary_quantity = -99999 THEN
828: -- conversion failed
829: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM'); -- INVCONV NEW MESSAGE
830: fnd_msg_pub.ADD;
831: RAISE fnd_api.g_exc_error;
832: END IF;
833: px_rsv_rec.secondary_reservation_quantity := l_tmp_secondary_quantity; -- INVCONV
834: END IF;
835:

Line 858: RAISE fnd_api.g_exc_error;

854: IF l_tmp_secondary_quantity = -99999 THEN
855: -- conversion failed
856: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM'); -- INVCONV NEW MESSAGE
857: fnd_msg_pub.ADD;
858: RAISE fnd_api.g_exc_error;
859: END IF;
860: px_rsv_rec.secondary_detailed_quantity := l_tmp_secondary_quantity; -- INVCONV
861: END IF;
862: END IF;

Line 870: WHEN fnd_api.g_exc_error THEN

866: --
867: x_return_status := l_return_status;
868: --
869: EXCEPTION
870: WHEN fnd_api.g_exc_error THEN
871: x_return_status := fnd_api.g_ret_sts_error;
872: --
873: WHEN fnd_api.g_exc_unexpected_error THEN
874: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 871: x_return_status := fnd_api.g_ret_sts_error;

867: x_return_status := l_return_status;
868: --
869: EXCEPTION
870: WHEN fnd_api.g_exc_error THEN
871: x_return_status := fnd_api.g_ret_sts_error;
872: --
873: WHEN fnd_api.g_exc_unexpected_error THEN
874: x_return_status := fnd_api.g_ret_sts_unexp_error;
875: --

Line 873: WHEN fnd_api.g_exc_unexpected_error THEN

869: EXCEPTION
870: WHEN fnd_api.g_exc_error THEN
871: x_return_status := fnd_api.g_ret_sts_error;
872: --
873: WHEN fnd_api.g_exc_unexpected_error THEN
874: x_return_status := fnd_api.g_ret_sts_unexp_error;
875: --
876: WHEN OTHERS THEN
877: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 874: x_return_status := fnd_api.g_ret_sts_unexp_error;

870: WHEN fnd_api.g_exc_error THEN
871: x_return_status := fnd_api.g_ret_sts_error;
872: --
873: WHEN fnd_api.g_exc_unexpected_error THEN
874: x_return_status := fnd_api.g_ret_sts_unexp_error;
875: --
876: WHEN OTHERS THEN
877: x_return_status := fnd_api.g_ret_sts_unexp_error;
878:

Line 877: x_return_status := fnd_api.g_ret_sts_unexp_error;

873: WHEN fnd_api.g_exc_unexpected_error THEN
874: x_return_status := fnd_api.g_ret_sts_unexp_error;
875: --
876: WHEN OTHERS THEN
877: x_return_status := fnd_api.g_ret_sts_unexp_error;
878:
879: --
880: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
881: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Convert_Quantity');

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

889: -- field in the input record is not missing, it
890: -- would be copied to the output record
891: 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
892: BEGIN
893: IF p_rsv_rec.reservation_id <> fnd_api.g_miss_num THEN
894: x_rsv_rec.reservation_id := p_rsv_rec.reservation_id;
895: ELSE
896: x_rsv_rec.reservation_id := NULL;
897: END IF;

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

896: x_rsv_rec.reservation_id := NULL;
897: END IF;
898:
899: --
900: IF p_rsv_rec.requirement_date <> fnd_api.g_miss_date THEN
901: x_rsv_rec.requirement_date := p_rsv_rec.requirement_date;
902: ELSE
903: x_rsv_rec.requirement_date := NULL;
904: END IF;

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

903: x_rsv_rec.requirement_date := NULL;
904: END IF;
905:
906: --
907: IF p_rsv_rec.organization_id <> fnd_api.g_miss_num THEN
908: x_rsv_rec.organization_id := p_rsv_rec.organization_id;
909: ELSE
910: x_rsv_rec.organization_id := NULL;
911: END IF;

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

910: x_rsv_rec.organization_id := NULL;
911: END IF;
912:
913: --
914: IF p_rsv_rec.inventory_item_id <> fnd_api.g_miss_num THEN
915: x_rsv_rec.inventory_item_id := p_rsv_rec.inventory_item_id;
916: ELSE
917: x_rsv_rec.inventory_item_id := NULL;
918: END IF;

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

917: x_rsv_rec.inventory_item_id := NULL;
918: END IF;
919:
920: --
921: IF p_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num THEN
922: x_rsv_rec.demand_source_type_id := p_rsv_rec.demand_source_type_id;
923: ELSE
924: x_rsv_rec.demand_source_type_id := NULL;
925: END IF;

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

924: x_rsv_rec.demand_source_type_id := NULL;
925: END IF;
926:
927: --
928: IF p_rsv_rec.demand_source_name <> fnd_api.g_miss_char THEN
929: x_rsv_rec.demand_source_name := p_rsv_rec.demand_source_name;
930: ELSE
931: x_rsv_rec.demand_source_name := NULL;
932: END IF;

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

931: x_rsv_rec.demand_source_name := NULL;
932: END IF;
933:
934: --
935: IF p_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num THEN
936: x_rsv_rec.demand_source_delivery := p_rsv_rec.demand_source_delivery;
937: ELSE
938: x_rsv_rec.demand_source_delivery := NULL;
939: END IF;

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

938: x_rsv_rec.demand_source_delivery := NULL;
939: END IF;
940:
941: --
942: IF p_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num THEN
943: x_rsv_rec.demand_source_header_id := p_rsv_rec.demand_source_header_id;
944: ELSE
945: x_rsv_rec.demand_source_header_id := NULL;
946: END IF;

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

945: x_rsv_rec.demand_source_header_id := NULL;
946: END IF;
947:
948: --
949: IF p_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num THEN
950: x_rsv_rec.demand_source_line_id := p_rsv_rec.demand_source_line_id;
951: ELSE
952: x_rsv_rec.demand_source_line_id := NULL;
953: END IF;

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

952: x_rsv_rec.demand_source_line_id := NULL;
953: END IF;
954:
955: --
956: IF p_rsv_rec.primary_uom_code <> fnd_api.g_miss_char THEN
957: x_rsv_rec.primary_uom_code := p_rsv_rec.primary_uom_code;
958: ELSE
959: x_rsv_rec.primary_uom_code := NULL;
960: END IF;

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

959: x_rsv_rec.primary_uom_code := NULL;
960: END IF;
961:
962: --
963: IF p_rsv_rec.primary_uom_id <> fnd_api.g_miss_num THEN
964: x_rsv_rec.primary_uom_id := p_rsv_rec.primary_uom_id;
965: ELSE
966: x_rsv_rec.primary_uom_id := NULL;
967: END IF;

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

966: x_rsv_rec.primary_uom_id := NULL;
967: END IF;
968:
969: -- INVCONV BEGIN
970: IF p_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char THEN
971: x_rsv_rec.secondary_uom_code := p_rsv_rec.secondary_uom_code;
972: ELSE
973: x_rsv_rec.secondary_uom_code := NULL;
974: END IF;

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

973: x_rsv_rec.secondary_uom_code := NULL;
974: END IF;
975:
976: --
977: IF p_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num THEN
978: x_rsv_rec.secondary_uom_id := p_rsv_rec.secondary_uom_id;
979: ELSE
980: x_rsv_rec.secondary_uom_id := NULL;
981: END IF;

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

981: END IF;
982: -- INVCONV END
983:
984: --
985: IF p_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char THEN
986: x_rsv_rec.reservation_uom_code := p_rsv_rec.reservation_uom_code;
987: ELSE
988: x_rsv_rec.reservation_uom_code := NULL;
989: END IF;

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

988: x_rsv_rec.reservation_uom_code := NULL;
989: END IF;
990:
991: --
992: IF p_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num THEN
993: x_rsv_rec.reservation_uom_id := p_rsv_rec.reservation_uom_id;
994: ELSE
995: x_rsv_rec.reservation_uom_id := NULL;
996: END IF;

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

995: x_rsv_rec.reservation_uom_id := NULL;
996: END IF;
997:
998: --
999: IF p_rsv_rec.reservation_quantity <> fnd_api.g_miss_num THEN
1000: x_rsv_rec.reservation_quantity := p_rsv_rec.reservation_quantity;
1001: ELSE
1002: x_rsv_rec.reservation_quantity := NULL;
1003: END IF;

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

1002: x_rsv_rec.reservation_quantity := NULL;
1003: END IF;
1004:
1005: --
1006: IF p_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num THEN
1007: x_rsv_rec.primary_reservation_quantity := p_rsv_rec.primary_reservation_quantity;
1008: ELSE
1009: x_rsv_rec.primary_reservation_quantity := NULL;
1010: END IF;

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

1009: x_rsv_rec.primary_reservation_quantity := NULL;
1010: END IF;
1011:
1012: -- INVCONV BEGIN
1013: IF p_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num THEN
1014: x_rsv_rec.secondary_reservation_quantity := p_rsv_rec.secondary_reservation_quantity;
1015: ELSE
1016: x_rsv_rec.secondary_reservation_quantity := NULL;
1017: END IF;

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

1017: END IF;
1018: -- INVCONV END
1019:
1020: --
1021: IF p_rsv_rec.detailed_quantity <> fnd_api.g_miss_num THEN
1022: x_rsv_rec.detailed_quantity := p_rsv_rec.detailed_quantity;
1023: ELSE
1024: x_rsv_rec.detailed_quantity := NULL;
1025: END IF;

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

1025: END IF;
1026:
1027:
1028: -- INVCONV BEGIN
1029: IF p_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num THEN
1030: x_rsv_rec.secondary_detailed_quantity := p_rsv_rec.secondary_detailed_quantity;
1031: ELSE
1032: x_rsv_rec.secondary_detailed_quantity := NULL;
1033: END IF;

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

1032: x_rsv_rec.secondary_detailed_quantity := NULL;
1033: END IF;
1034: -- INVCONV END
1035: --
1036: IF p_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num THEN
1037: x_rsv_rec.autodetail_group_id := p_rsv_rec.autodetail_group_id;
1038: ELSE
1039: x_rsv_rec.autodetail_group_id := NULL;
1040: END IF;

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

1039: x_rsv_rec.autodetail_group_id := NULL;
1040: END IF;
1041:
1042: --
1043: IF p_rsv_rec.external_source_code <> fnd_api.g_miss_char THEN
1044: x_rsv_rec.external_source_code := p_rsv_rec.external_source_code;
1045: ELSE
1046: x_rsv_rec.external_source_code := NULL;
1047: END IF;

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

1046: x_rsv_rec.external_source_code := NULL;
1047: END IF;
1048:
1049: --
1050: IF p_rsv_rec.external_source_line_id <> fnd_api.g_miss_num THEN
1051: x_rsv_rec.external_source_line_id := p_rsv_rec.external_source_line_id;
1052: ELSE
1053: x_rsv_rec.external_source_line_id := NULL;
1054: END IF;

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

1053: x_rsv_rec.external_source_line_id := NULL;
1054: END IF;
1055:
1056: --
1057: IF p_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num THEN
1058: x_rsv_rec.supply_source_type_id := p_rsv_rec.supply_source_type_id;
1059: ELSE
1060: x_rsv_rec.supply_source_type_id := NULL;
1061: END IF;

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

1060: x_rsv_rec.supply_source_type_id := NULL;
1061: END IF;
1062:
1063: --
1064: IF p_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num THEN
1065: x_rsv_rec.supply_source_header_id := p_rsv_rec.supply_source_header_id;
1066: ELSE
1067: x_rsv_rec.supply_source_header_id := NULL;
1068: END IF;

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

1067: x_rsv_rec.supply_source_header_id := NULL;
1068: END IF;
1069:
1070: --
1071: IF p_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num THEN
1072: x_rsv_rec.supply_source_line_id := p_rsv_rec.supply_source_line_id;
1073: ELSE
1074: x_rsv_rec.supply_source_line_id := NULL;
1075: END IF;

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

1074: x_rsv_rec.supply_source_line_id := NULL;
1075: END IF;
1076:
1077: --
1078: IF p_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num THEN
1079: x_rsv_rec.supply_source_line_detail := p_rsv_rec.supply_source_line_detail;
1080: ELSE
1081: x_rsv_rec.supply_source_line_detail := NULL;
1082: END IF;

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

1081: x_rsv_rec.supply_source_line_detail := NULL;
1082: END IF;
1083:
1084: --
1085: IF p_rsv_rec.supply_source_name <> fnd_api.g_miss_char THEN
1086: x_rsv_rec.supply_source_name := p_rsv_rec.supply_source_name;
1087: ELSE
1088: x_rsv_rec.supply_source_name := NULL;
1089: END IF;

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

1088: x_rsv_rec.supply_source_name := NULL;
1089: END IF;
1090:
1091: --
1092: IF p_rsv_rec.revision <> fnd_api.g_miss_char THEN
1093: x_rsv_rec.revision := p_rsv_rec.revision;
1094: ELSE
1095: x_rsv_rec.revision := NULL;
1096: END IF;

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

1095: x_rsv_rec.revision := NULL;
1096: END IF;
1097:
1098: --
1099: IF p_rsv_rec.subinventory_code <> fnd_api.g_miss_char THEN
1100: x_rsv_rec.subinventory_code := p_rsv_rec.subinventory_code;
1101: ELSE
1102: x_rsv_rec.subinventory_code := NULL;
1103: END IF;

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

1102: x_rsv_rec.subinventory_code := NULL;
1103: END IF;
1104:
1105: --
1106: IF p_rsv_rec.subinventory_id <> fnd_api.g_miss_num THEN
1107: x_rsv_rec.subinventory_id := p_rsv_rec.subinventory_id;
1108: ELSE
1109: x_rsv_rec.subinventory_id := NULL;
1110: END IF;

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

1109: x_rsv_rec.subinventory_id := NULL;
1110: END IF;
1111:
1112: --
1113: IF p_rsv_rec.locator_id <> fnd_api.g_miss_num THEN
1114: x_rsv_rec.locator_id := p_rsv_rec.locator_id;
1115: ELSE
1116: x_rsv_rec.locator_id := NULL;
1117: END IF;

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

1116: x_rsv_rec.locator_id := NULL;
1117: END IF;
1118:
1119: --
1120: IF p_rsv_rec.lot_number <> fnd_api.g_miss_char THEN
1121: x_rsv_rec.lot_number := p_rsv_rec.lot_number;
1122: ELSE
1123: x_rsv_rec.lot_number := NULL;
1124: END IF;

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

1123: x_rsv_rec.lot_number := NULL;
1124: END IF;
1125:
1126: --
1127: IF p_rsv_rec.lot_number_id <> fnd_api.g_miss_num THEN
1128: x_rsv_rec.lot_number_id := p_rsv_rec.lot_number_id;
1129: ELSE
1130: x_rsv_rec.lot_number_id := NULL;
1131: END IF;

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

1130: x_rsv_rec.lot_number_id := NULL;
1131: END IF;
1132:
1133: --
1134: IF p_rsv_rec.pick_slip_number <> fnd_api.g_miss_num THEN
1135: x_rsv_rec.pick_slip_number := p_rsv_rec.pick_slip_number;
1136: ELSE
1137: x_rsv_rec.pick_slip_number := NULL;
1138: END IF;

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

1137: x_rsv_rec.pick_slip_number := NULL;
1138: END IF;
1139:
1140: --
1141: IF p_rsv_rec.attribute_category <> fnd_api.g_miss_char THEN
1142: x_rsv_rec.attribute_category := p_rsv_rec.attribute_category;
1143: ELSE
1144: x_rsv_rec.attribute_category := NULL;
1145: END IF;

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

1144: x_rsv_rec.attribute_category := NULL;
1145: END IF;
1146:
1147: --
1148: IF p_rsv_rec.attribute1 <> fnd_api.g_miss_char THEN
1149: x_rsv_rec.attribute1 := p_rsv_rec.attribute1;
1150: ELSE
1151: x_rsv_rec.attribute1 := NULL;
1152: END IF;

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

1150: ELSE
1151: x_rsv_rec.attribute1 := NULL;
1152: END IF;
1153:
1154: IF p_rsv_rec.attribute2 <> fnd_api.g_miss_char THEN
1155: x_rsv_rec.attribute2 := p_rsv_rec.attribute2;
1156: ELSE
1157: x_rsv_rec.attribute2 := NULL;
1158: END IF;

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

1156: ELSE
1157: x_rsv_rec.attribute2 := NULL;
1158: END IF;
1159:
1160: IF p_rsv_rec.attribute3 <> fnd_api.g_miss_char THEN
1161: x_rsv_rec.attribute3 := p_rsv_rec.attribute3;
1162: ELSE
1163: x_rsv_rec.attribute3 := NULL;
1164: END IF;

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

1162: ELSE
1163: x_rsv_rec.attribute3 := NULL;
1164: END IF;
1165:
1166: IF p_rsv_rec.attribute4 <> fnd_api.g_miss_char THEN
1167: x_rsv_rec.attribute4 := p_rsv_rec.attribute4;
1168: ELSE
1169: x_rsv_rec.attribute4 := NULL;
1170: END IF;

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

1168: ELSE
1169: x_rsv_rec.attribute4 := NULL;
1170: END IF;
1171:
1172: IF p_rsv_rec.attribute5 <> fnd_api.g_miss_char THEN
1173: x_rsv_rec.attribute5 := p_rsv_rec.attribute5;
1174: ELSE
1175: x_rsv_rec.attribute5 := NULL;
1176: END IF;

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

1174: ELSE
1175: x_rsv_rec.attribute5 := NULL;
1176: END IF;
1177:
1178: IF p_rsv_rec.attribute6 <> fnd_api.g_miss_char THEN
1179: x_rsv_rec.attribute6 := p_rsv_rec.attribute6;
1180: ELSE
1181: x_rsv_rec.attribute6 := NULL;
1182: END IF;

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

1180: ELSE
1181: x_rsv_rec.attribute6 := NULL;
1182: END IF;
1183:
1184: IF p_rsv_rec.attribute7 <> fnd_api.g_miss_char THEN
1185: x_rsv_rec.attribute7 := p_rsv_rec.attribute7;
1186: ELSE
1187: x_rsv_rec.attribute7 := NULL;
1188: END IF;

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

1186: ELSE
1187: x_rsv_rec.attribute7 := NULL;
1188: END IF;
1189:
1190: IF p_rsv_rec.attribute8 <> fnd_api.g_miss_char THEN
1191: x_rsv_rec.attribute8 := p_rsv_rec.attribute8;
1192: ELSE
1193: x_rsv_rec.attribute8 := NULL;
1194: END IF;

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

1192: ELSE
1193: x_rsv_rec.attribute8 := NULL;
1194: END IF;
1195:
1196: IF p_rsv_rec.attribute9 <> fnd_api.g_miss_char THEN
1197: x_rsv_rec.attribute9 := p_rsv_rec.attribute9;
1198: ELSE
1199: x_rsv_rec.attribute9 := NULL;
1200: END IF;

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

1198: ELSE
1199: x_rsv_rec.attribute9 := NULL;
1200: END IF;
1201:
1202: IF p_rsv_rec.attribute10 <> fnd_api.g_miss_char THEN
1203: x_rsv_rec.attribute10 := p_rsv_rec.attribute10;
1204: ELSE
1205: x_rsv_rec.attribute10 := NULL;
1206: END IF;

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

1204: ELSE
1205: x_rsv_rec.attribute10 := NULL;
1206: END IF;
1207:
1208: IF p_rsv_rec.attribute11 <> fnd_api.g_miss_char THEN
1209: x_rsv_rec.attribute11 := p_rsv_rec.attribute11;
1210: ELSE
1211: x_rsv_rec.attribute11 := NULL;
1212: END IF;

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

1210: ELSE
1211: x_rsv_rec.attribute11 := NULL;
1212: END IF;
1213:
1214: IF p_rsv_rec.attribute12 <> fnd_api.g_miss_char THEN
1215: x_rsv_rec.attribute12 := p_rsv_rec.attribute12;
1216: ELSE
1217: x_rsv_rec.attribute12 := NULL;
1218: END IF;

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

1216: ELSE
1217: x_rsv_rec.attribute12 := NULL;
1218: END IF;
1219:
1220: IF p_rsv_rec.attribute13 <> fnd_api.g_miss_char THEN
1221: x_rsv_rec.attribute13 := p_rsv_rec.attribute13;
1222: ELSE
1223: x_rsv_rec.attribute13 := NULL;
1224: END IF;

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

1222: ELSE
1223: x_rsv_rec.attribute13 := NULL;
1224: END IF;
1225:
1226: IF p_rsv_rec.attribute14 <> fnd_api.g_miss_char THEN
1227: x_rsv_rec.attribute14 := p_rsv_rec.attribute14;
1228: ELSE
1229: x_rsv_rec.attribute14 := NULL;
1230: END IF;

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

1228: ELSE
1229: x_rsv_rec.attribute14 := NULL;
1230: END IF;
1231:
1232: IF p_rsv_rec.attribute15 <> fnd_api.g_miss_char THEN
1233: x_rsv_rec.attribute15 := p_rsv_rec.attribute15;
1234: ELSE
1235: x_rsv_rec.attribute15 := NULL;
1236: END IF;

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

1234: ELSE
1235: x_rsv_rec.attribute15 := NULL;
1236: END IF;
1237:
1238: IF p_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num THEN
1239: x_rsv_rec.ship_ready_flag := p_rsv_rec.ship_ready_flag;
1240: ELSE
1241: x_rsv_rec.ship_ready_flag := NULL;
1242: END IF;

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

1240: ELSE
1241: x_rsv_rec.ship_ready_flag := NULL;
1242: END IF;
1243:
1244: IF p_rsv_rec.staged_flag <> fnd_api.g_miss_char THEN
1245: x_rsv_rec.staged_flag := p_rsv_rec.staged_flag;
1246: ELSE
1247: x_rsv_rec.staged_flag := NULL;
1248: END IF;

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

1246: ELSE
1247: x_rsv_rec.staged_flag := NULL;
1248: END IF;
1249:
1250: IF p_rsv_rec.lpn_id <> fnd_api.g_miss_num THEN
1251: x_rsv_rec.lpn_id := p_rsv_rec.lpn_id;
1252: ELSE
1253: x_rsv_rec.lpn_id := NULL;
1254: END IF;

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

1254: END IF;
1255:
1256: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
1257: -- convert_missing_to_null API}}****/
1258: IF p_rsv_rec.crossdock_flag <> fnd_api.g_miss_char THEN
1259: x_rsv_rec.crossdock_flag := p_rsv_rec.crossdock_flag;
1260: ELSE
1261: x_rsv_rec.crossdock_flag := NULL;
1262: END IF;

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

1260: ELSE
1261: x_rsv_rec.crossdock_flag := NULL;
1262: END IF;
1263:
1264: IF p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num THEN
1265: x_rsv_rec.crossdock_criteria_id := p_rsv_rec.crossdock_criteria_id;
1266: ELSE
1267: x_rsv_rec.crossdock_criteria_id := NULL;
1268: END IF;

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

1266: ELSE
1267: x_rsv_rec.crossdock_criteria_id := NULL;
1268: END IF;
1269:
1270: IF p_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num THEN
1271: x_rsv_rec.demand_source_line_detail := p_rsv_rec.demand_source_line_detail;
1272: ELSE
1273: x_rsv_rec.demand_source_line_detail := NULL;
1274: END IF;

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

1272: ELSE
1273: x_rsv_rec.demand_source_line_detail := NULL;
1274: END IF;
1275:
1276: IF p_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num THEN
1277: x_rsv_rec.serial_reservation_quantity := p_rsv_rec.serial_reservation_quantity;
1278: ELSE
1279: x_rsv_rec.serial_reservation_quantity := NULL;
1280: END IF;

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

1278: ELSE
1279: x_rsv_rec.serial_reservation_quantity := NULL;
1280: END IF;
1281:
1282: IF p_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date THEN
1283: x_rsv_rec.supply_receipt_date := p_rsv_rec.supply_receipt_date;
1284: ELSE
1285: x_rsv_rec.supply_receipt_date := NULL;
1286: END IF;

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

1284: ELSE
1285: x_rsv_rec.supply_receipt_date := NULL;
1286: END IF;
1287:
1288: IF p_rsv_rec.demand_ship_date <> fnd_api.g_miss_date THEN
1289: x_rsv_rec.demand_ship_date := p_rsv_rec.demand_ship_date;
1290: ELSE
1291: x_rsv_rec.demand_ship_date := NULL;
1292: END IF;

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

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

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

1296: ELSE
1297: x_rsv_rec.project_id := NULL;
1298: END IF;
1299:
1300: IF p_rsv_rec.task_id <> fnd_api.g_miss_num THEN
1301: x_rsv_rec.task_id := p_rsv_rec.task_id;
1302: ELSE
1303: x_rsv_rec.task_id := NULL;
1304: END IF;

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

1314: RETURN BOOLEAN IS
1315: BEGIN
1316: x_what_field := NULL;
1317:
1318: IF p_rsv_rec.requirement_date = fnd_api.g_miss_date THEN
1319: x_what_field := 'requirement_date';
1320: END IF;
1321:
1322: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN

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

1318: IF p_rsv_rec.requirement_date = fnd_api.g_miss_date THEN
1319: x_what_field := 'requirement_date';
1320: END IF;
1321:
1322: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN
1323: x_what_field := 'organization_id';
1324: END IF;
1325:
1326: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN

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

1322: IF p_rsv_rec.organization_id = fnd_api.g_miss_num THEN
1323: x_what_field := 'organization_id';
1324: END IF;
1325:
1326: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN
1327: x_what_field := 'inventory_item_id';
1328: END IF;
1329:
1330: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN

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

1326: IF p_rsv_rec.inventory_item_id = fnd_api.g_miss_num THEN
1327: x_what_field := 'inventory_item_id';
1328: END IF;
1329:
1330: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN
1331: x_what_field := 'demand_source_type_id';
1332: END IF;
1333:
1334: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN

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

1330: IF p_rsv_rec.demand_source_type_id = fnd_api.g_miss_num THEN
1331: x_what_field := 'demand_source_type_id';
1332: END IF;
1333:
1334: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN
1335: x_what_field := 'demand_source_name';
1336: END IF;
1337:
1338: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN

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

1334: IF p_rsv_rec.demand_source_name = fnd_api.g_miss_char THEN
1335: x_what_field := 'demand_source_name';
1336: END IF;
1337:
1338: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN
1339: x_what_field := 'demand_source_delivery';
1340: END IF;
1341:
1342: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN

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

1338: IF p_rsv_rec.demand_source_delivery = fnd_api.g_miss_num THEN
1339: x_what_field := 'demand_source_delivery';
1340: END IF;
1341:
1342: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN
1343: x_what_field := 'demand_source_header_id';
1344: END IF;
1345:
1346: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN

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

1342: IF p_rsv_rec.demand_source_header_id = fnd_api.g_miss_num THEN
1343: x_what_field := 'demand_source_header_id';
1344: END IF;
1345:
1346: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN
1347: x_what_field := 'demand_source_line_id';
1348: END IF;
1349:
1350: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN

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

1346: IF p_rsv_rec.demand_source_line_id = fnd_api.g_miss_num THEN
1347: x_what_field := 'demand_source_line_id';
1348: END IF;
1349:
1350: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN
1351: x_what_field := 'primary_uom_code';
1352: END IF;
1353:
1354: IF p_rsv_rec.primary_uom_id = fnd_api.g_miss_num THEN

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

1350: IF p_rsv_rec.primary_uom_code = fnd_api.g_miss_char THEN
1351: x_what_field := 'primary_uom_code';
1352: END IF;
1353:
1354: IF p_rsv_rec.primary_uom_id = fnd_api.g_miss_num THEN
1355: x_what_field := 'primary_uom_id';
1356: END IF;
1357:
1358: -- INVCONV BEGIN

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

1355: x_what_field := 'primary_uom_id';
1356: END IF;
1357:
1358: -- INVCONV BEGIN
1359: IF p_rsv_rec.secondary_uom_code = fnd_api.g_miss_char THEN
1360: x_what_field := 'secondary_uom_code';
1361: END IF;
1362:
1363: IF p_rsv_rec.secondary_uom_id = fnd_api.g_miss_num THEN

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

1359: IF p_rsv_rec.secondary_uom_code = fnd_api.g_miss_char THEN
1360: x_what_field := 'secondary_uom_code';
1361: END IF;
1362:
1363: IF p_rsv_rec.secondary_uom_id = fnd_api.g_miss_num THEN
1364: x_what_field := 'secondary_uom_id';
1365: END IF;
1366: -- INVCONV END
1367:

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

1364: x_what_field := 'secondary_uom_id';
1365: END IF;
1366: -- INVCONV END
1367:
1368: IF p_rsv_rec.reservation_uom_code = fnd_api.g_miss_char THEN
1369: x_what_field := 'reservation_uom_code';
1370: END IF;
1371:
1372: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN

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

1368: IF p_rsv_rec.reservation_uom_code = fnd_api.g_miss_char THEN
1369: x_what_field := 'reservation_uom_code';
1370: END IF;
1371:
1372: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN
1373: x_what_field := 'reservation_uom_id';
1374: END IF;
1375:
1376: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN

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

1372: IF p_rsv_rec.reservation_uom_id = fnd_api.g_miss_num THEN
1373: x_what_field := 'reservation_uom_id';
1374: END IF;
1375:
1376: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1377: x_what_field := 'reservation_quantity';
1378: END IF;
1379:
1380: IF p_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num THEN

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

1376: IF p_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1377: x_what_field := 'reservation_quantity';
1378: END IF;
1379:
1380: IF p_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num THEN
1381: x_what_field := 'primary_reservation_quantity';
1382: END IF;
1383:
1384: -- INVCONV BEGIN

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

1381: x_what_field := 'primary_reservation_quantity';
1382: END IF;
1383:
1384: -- INVCONV BEGIN
1385: IF p_rsv_rec.secondary_reservation_quantity = fnd_api.g_miss_num THEN
1386: x_what_field := 'secondary_reservation_quantity';
1387: END IF;
1388: -- INVCONV END
1389:

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

1386: x_what_field := 'secondary_reservation_quantity';
1387: END IF;
1388: -- INVCONV END
1389:
1390: IF p_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN
1391: x_what_field := 'detailed_quantity';
1392: END IF;
1393:
1394: -- INVCONV BEGIN

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

1391: x_what_field := 'detailed_quantity';
1392: END IF;
1393:
1394: -- INVCONV BEGIN
1395: IF p_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN
1396: x_what_field := 'secondary_detailed_quantity';
1397: END IF;
1398: -- INVCONV BEGIN
1399:

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

1396: x_what_field := 'secondary_detailed_quantity';
1397: END IF;
1398: -- INVCONV BEGIN
1399:
1400: IF p_rsv_rec.autodetail_group_id = fnd_api.g_miss_num THEN
1401: x_what_field := 'autodetail_group_id';
1402: END IF;
1403:
1404: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN

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

1400: IF p_rsv_rec.autodetail_group_id = fnd_api.g_miss_num THEN
1401: x_what_field := 'autodetail_group_id';
1402: END IF;
1403:
1404: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN
1405: x_what_field := 'external_source_code';
1406: END IF;
1407:
1408: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN

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

1404: IF p_rsv_rec.external_source_code = fnd_api.g_miss_char THEN
1405: x_what_field := 'external_source_code';
1406: END IF;
1407:
1408: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN
1409: x_what_field := 'external_source_line_id';
1410: END IF;
1411:
1412: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN

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

1408: IF p_rsv_rec.external_source_line_id = fnd_api.g_miss_num THEN
1409: x_what_field := 'external_source_line_id';
1410: END IF;
1411:
1412: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN
1413: x_what_field := 'supply_source_type_id';
1414: END IF;
1415:
1416: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN

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

1412: IF p_rsv_rec.supply_source_type_id = fnd_api.g_miss_num THEN
1413: x_what_field := 'supply_source_type_id';
1414: END IF;
1415:
1416: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN
1417: x_what_field := 'supply_source_header_id';
1418: END IF;
1419:
1420: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN

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

1416: IF p_rsv_rec.supply_source_header_id = fnd_api.g_miss_num THEN
1417: x_what_field := 'supply_source_header_id';
1418: END IF;
1419:
1420: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN
1421: x_what_field := 'supply_source_line_id';
1422: END IF;
1423:
1424: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN

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

1420: IF p_rsv_rec.supply_source_line_id = fnd_api.g_miss_num THEN
1421: x_what_field := 'supply_source_line_id';
1422: END IF;
1423:
1424: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN
1425: x_what_field := 'supply_source_name';
1426: END IF;
1427:
1428: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN

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

1424: IF p_rsv_rec.supply_source_name = fnd_api.g_miss_char THEN
1425: x_what_field := 'supply_source_name';
1426: END IF;
1427:
1428: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN
1429: x_what_field := 'supply_source_line_detail';
1430: END IF;
1431:
1432: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN

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

1428: IF p_rsv_rec.supply_source_line_detail = fnd_api.g_miss_num THEN
1429: x_what_field := 'supply_source_line_detail';
1430: END IF;
1431:
1432: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN
1433: x_what_field := 'revision';
1434: END IF;
1435:
1436: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN

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

1432: IF p_rsv_rec.revision = fnd_api.g_miss_char THEN
1433: x_what_field := 'revision';
1434: END IF;
1435:
1436: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN
1437: x_what_field := 'subinventory_code';
1438: END IF;
1439:
1440: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN

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

1436: IF p_rsv_rec.subinventory_code = fnd_api.g_miss_char THEN
1437: x_what_field := 'subinventory_code';
1438: END IF;
1439:
1440: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN
1441: x_what_field := 'subinventory_id';
1442: END IF;
1443:
1444: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN

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

1440: IF p_rsv_rec.subinventory_id = fnd_api.g_miss_num THEN
1441: x_what_field := 'subinventory_id';
1442: END IF;
1443:
1444: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN
1445: x_what_field := 'locator_id';
1446: END IF;
1447:
1448: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN

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

1444: IF p_rsv_rec.locator_id = fnd_api.g_miss_num THEN
1445: x_what_field := 'locator_id';
1446: END IF;
1447:
1448: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN
1449: x_what_field := 'lot_number';
1450: END IF;
1451:
1452: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN

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

1448: IF p_rsv_rec.lot_number = fnd_api.g_miss_char THEN
1449: x_what_field := 'lot_number';
1450: END IF;
1451:
1452: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN
1453: x_what_field := 'lot_number_id';
1454: END IF;
1455:
1456: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN

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

1452: IF p_rsv_rec.lot_number_id = fnd_api.g_miss_num THEN
1453: x_what_field := 'lot_number_id';
1454: END IF;
1455:
1456: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN
1457: x_what_field := 'pick_slip_number';
1458: END IF;
1459:
1460: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN

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

1456: IF p_rsv_rec.pick_slip_number = fnd_api.g_miss_num THEN
1457: x_what_field := 'pick_slip_number';
1458: END IF;
1459:
1460: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN
1461: x_what_field := 'lpn_id';
1462: END IF;
1463:
1464: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN

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

1460: IF p_rsv_rec.lpn_id = fnd_api.g_miss_num THEN
1461: x_what_field := 'lpn_id';
1462: END IF;
1463:
1464: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN
1465: x_what_field := 'attribute_category';
1466: END IF;
1467:
1468: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN

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

1464: IF p_rsv_rec.attribute_category = fnd_api.g_miss_char THEN
1465: x_what_field := 'attribute_category';
1466: END IF;
1467:
1468: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN
1469: x_what_field := 'attribute1';
1470: END IF;
1471:
1472: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN

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

1468: IF p_rsv_rec.attribute1 = fnd_api.g_miss_char THEN
1469: x_what_field := 'attribute1';
1470: END IF;
1471:
1472: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN
1473: x_what_field := 'attribute2';
1474: END IF;
1475:
1476: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN

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

1472: IF p_rsv_rec.attribute2 = fnd_api.g_miss_char THEN
1473: x_what_field := 'attribute2';
1474: END IF;
1475:
1476: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN
1477: x_what_field := 'attribute3';
1478: END IF;
1479:
1480: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN

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

1476: IF p_rsv_rec.attribute3 = fnd_api.g_miss_char THEN
1477: x_what_field := 'attribute3';
1478: END IF;
1479:
1480: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN
1481: x_what_field := 'attribute4';
1482: END IF;
1483:
1484: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN

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

1480: IF p_rsv_rec.attribute4 = fnd_api.g_miss_char THEN
1481: x_what_field := 'attribute4';
1482: END IF;
1483:
1484: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN
1485: x_what_field := 'attribute5';
1486: END IF;
1487:
1488: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN

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

1484: IF p_rsv_rec.attribute5 = fnd_api.g_miss_char THEN
1485: x_what_field := 'attribute5';
1486: END IF;
1487:
1488: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN
1489: x_what_field := 'attribute6';
1490: END IF;
1491:
1492: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN

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

1488: IF p_rsv_rec.attribute6 = fnd_api.g_miss_char THEN
1489: x_what_field := 'attribute6';
1490: END IF;
1491:
1492: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN
1493: x_what_field := 'attribute7';
1494: END IF;
1495:
1496: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN

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

1492: IF p_rsv_rec.attribute7 = fnd_api.g_miss_char THEN
1493: x_what_field := 'attribute7';
1494: END IF;
1495:
1496: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN
1497: x_what_field := 'attribute8';
1498: END IF;
1499:
1500: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN

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

1496: IF p_rsv_rec.attribute8 = fnd_api.g_miss_char THEN
1497: x_what_field := 'attribute8';
1498: END IF;
1499:
1500: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN
1501: x_what_field := 'attribute9';
1502: END IF;
1503:
1504: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN

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

1500: IF p_rsv_rec.attribute9 = fnd_api.g_miss_char THEN
1501: x_what_field := 'attribute9';
1502: END IF;
1503:
1504: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN
1505: x_what_field := 'attribute10';
1506: END IF;
1507:
1508: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN

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

1504: IF p_rsv_rec.attribute10 = fnd_api.g_miss_char THEN
1505: x_what_field := 'attribute10';
1506: END IF;
1507:
1508: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN
1509: x_what_field := 'attribute11';
1510: END IF;
1511:
1512: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN

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

1508: IF p_rsv_rec.attribute11 = fnd_api.g_miss_char THEN
1509: x_what_field := 'attribute11';
1510: END IF;
1511:
1512: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN
1513: x_what_field := 'attribute12';
1514: END IF;
1515:
1516: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN

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

1512: IF p_rsv_rec.attribute12 = fnd_api.g_miss_char THEN
1513: x_what_field := 'attribute12';
1514: END IF;
1515:
1516: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN
1517: x_what_field := 'attribute13';
1518: END IF;
1519:
1520: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN

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

1516: IF p_rsv_rec.attribute13 = fnd_api.g_miss_char THEN
1517: x_what_field := 'attribute13';
1518: END IF;
1519:
1520: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN
1521: x_what_field := 'attribute14';
1522: END IF;
1523:
1524: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

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

1520: IF p_rsv_rec.attribute14 = fnd_api.g_miss_char THEN
1521: x_what_field := 'attribute14';
1522: END IF;
1523:
1524: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1525: x_what_field := 'attribute15';
1526: END IF;
1527:
1528: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN

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

1524: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1525: x_what_field := 'attribute15';
1526: END IF;
1527:
1528: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1529: x_what_field := 'attribute15';
1530: END IF;
1531:
1532: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN

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

1528: IF p_rsv_rec.attribute15 = fnd_api.g_miss_char THEN
1529: x_what_field := 'attribute15';
1530: END IF;
1531:
1532: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN
1533: x_what_field := 'ship_ready_flag';
1534: END IF;
1535:
1536: IF p_rsv_rec.staged_flag = fnd_api.g_miss_char THEN

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

1532: IF p_rsv_rec.ship_ready_flag = fnd_api.g_miss_num THEN
1533: x_what_field := 'ship_ready_flag';
1534: END IF;
1535:
1536: IF p_rsv_rec.staged_flag = fnd_api.g_miss_char THEN
1537: p_rsv_rec.staged_flag := NULL;
1538: END IF;
1539:
1540: /**** {{ R12 Enhanced reservations code changes. Adding new columns to

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

1538: END IF;
1539:
1540: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
1541: -- check_missing API }}****/
1542: IF p_rsv_rec.crossdock_flag = fnd_api.g_miss_char THEN
1543: p_rsv_rec.crossdock_flag := NULL;
1544: END IF;
1545:
1546: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN

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

1542: IF p_rsv_rec.crossdock_flag = fnd_api.g_miss_char THEN
1543: p_rsv_rec.crossdock_flag := NULL;
1544: END IF;
1545:
1546: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN
1547: p_rsv_rec.crossdock_criteria_id := NULL;
1548: END IF;
1549:
1550: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN

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

1546: IF p_rsv_rec.crossdock_criteria_id = fnd_api.g_miss_num THEN
1547: p_rsv_rec.crossdock_criteria_id := NULL;
1548: END IF;
1549:
1550: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN
1551: p_rsv_rec.demand_source_line_detail := NULL;
1552: END IF;
1553:
1554: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN

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

1550: IF p_rsv_rec.demand_source_line_detail = fnd_api.g_miss_num THEN
1551: p_rsv_rec.demand_source_line_detail := NULL;
1552: END IF;
1553:
1554: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN
1555: p_rsv_rec.serial_reservation_quantity := NULL;
1556: END IF;
1557:
1558: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN

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

1554: IF p_rsv_rec.serial_reservation_quantity = fnd_api.g_miss_num THEN
1555: p_rsv_rec.serial_reservation_quantity := NULL;
1556: END IF;
1557:
1558: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN
1559: p_rsv_rec.supply_receipt_date := NULL;
1560: END IF;
1561:
1562: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN

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

1558: IF p_rsv_rec.supply_receipt_date = fnd_api.g_miss_date THEN
1559: p_rsv_rec.supply_receipt_date := NULL;
1560: END IF;
1561:
1562: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN
1563: p_rsv_rec.demand_ship_date := NULL;
1564: END IF;
1565:
1566: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN

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

1562: IF p_rsv_rec.demand_ship_date = fnd_api.g_miss_date THEN
1563: p_rsv_rec.demand_ship_date := NULL;
1564: END IF;
1565:
1566: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN
1567: p_rsv_rec.project_id := NULL;
1568: END IF;
1569:
1570: IF p_rsv_rec.task_id = fnd_api.g_miss_num THEN

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

1566: IF p_rsv_rec.project_id = fnd_api.g_miss_num THEN
1567: p_rsv_rec.project_id := NULL;
1568: END IF;
1569:
1570: IF p_rsv_rec.task_id = fnd_api.g_miss_num THEN
1571: p_rsv_rec.task_id := NULL;
1572: END IF;
1573:
1574: /*** End R12 ***/

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

1595: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
1596: , x_to_rsv_rec OUT NOCOPY inv_reservation_global.mtl_reservation_rec_type
1597: ) IS
1598: BEGIN
1599: IF p_to_rsv_rec.reservation_id <> fnd_api.g_miss_num
1600: OR p_to_rsv_rec.reservation_id IS NULL THEN
1601: x_to_rsv_rec.reservation_id := p_to_rsv_rec.reservation_id;
1602: ELSE
1603: x_to_rsv_rec.reservation_id := p_original_rsv_rec.reservation_id;

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

1603: x_to_rsv_rec.reservation_id := p_original_rsv_rec.reservation_id;
1604: END IF;
1605:
1606: --
1607: IF p_to_rsv_rec.requirement_date <> fnd_api.g_miss_date
1608: OR p_to_rsv_rec.requirement_date IS NULL THEN
1609: x_to_rsv_rec.requirement_date := p_to_rsv_rec.requirement_date;
1610: ELSE
1611: x_to_rsv_rec.requirement_date := p_original_rsv_rec.requirement_date;

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

1611: x_to_rsv_rec.requirement_date := p_original_rsv_rec.requirement_date;
1612: END IF;
1613:
1614: --
1615: IF p_to_rsv_rec.organization_id <> fnd_api.g_miss_num
1616: OR p_to_rsv_rec.organization_id IS NULL THEN
1617: x_to_rsv_rec.organization_id := p_to_rsv_rec.organization_id;
1618: ELSE
1619: x_to_rsv_rec.organization_id := p_original_rsv_rec.organization_id;

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

1619: x_to_rsv_rec.organization_id := p_original_rsv_rec.organization_id;
1620: END IF;
1621:
1622: --
1623: IF p_to_rsv_rec.inventory_item_id <> fnd_api.g_miss_num
1624: OR p_to_rsv_rec.inventory_item_id IS NULL THEN
1625: x_to_rsv_rec.inventory_item_id := p_to_rsv_rec.inventory_item_id;
1626: ELSE
1627: x_to_rsv_rec.inventory_item_id := p_original_rsv_rec.inventory_item_id;

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

1627: x_to_rsv_rec.inventory_item_id := p_original_rsv_rec.inventory_item_id;
1628: END IF;
1629:
1630: --
1631: IF p_to_rsv_rec.demand_source_type_id <> fnd_api.g_miss_num
1632: OR p_to_rsv_rec.demand_source_type_id IS NULL THEN
1633: x_to_rsv_rec.demand_source_type_id := p_to_rsv_rec.demand_source_type_id;
1634: ELSE
1635: x_to_rsv_rec.demand_source_type_id := p_original_rsv_rec.demand_source_type_id;

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

1635: x_to_rsv_rec.demand_source_type_id := p_original_rsv_rec.demand_source_type_id;
1636: END IF;
1637:
1638: --
1639: IF p_to_rsv_rec.demand_source_name <> fnd_api.g_miss_char
1640: OR p_to_rsv_rec.demand_source_name IS NULL THEN
1641: x_to_rsv_rec.demand_source_name := p_to_rsv_rec.demand_source_name;
1642: ELSE
1643: x_to_rsv_rec.demand_source_name := p_original_rsv_rec.demand_source_name;

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

1643: x_to_rsv_rec.demand_source_name := p_original_rsv_rec.demand_source_name;
1644: END IF;
1645:
1646: --
1647: IF p_to_rsv_rec.demand_source_delivery <> fnd_api.g_miss_num
1648: OR p_to_rsv_rec.demand_source_delivery IS NULL THEN
1649: x_to_rsv_rec.demand_source_delivery := p_to_rsv_rec.demand_source_delivery;
1650: ELSE
1651: x_to_rsv_rec.demand_source_delivery := p_original_rsv_rec.demand_source_delivery;

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

1651: x_to_rsv_rec.demand_source_delivery := p_original_rsv_rec.demand_source_delivery;
1652: END IF;
1653:
1654: --
1655: IF p_to_rsv_rec.demand_source_header_id <> fnd_api.g_miss_num
1656: OR p_to_rsv_rec.demand_source_header_id IS NULL THEN
1657: x_to_rsv_rec.demand_source_header_id := p_to_rsv_rec.demand_source_header_id;
1658: ELSE
1659: x_to_rsv_rec.demand_source_header_id := p_original_rsv_rec.demand_source_header_id;

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

1659: x_to_rsv_rec.demand_source_header_id := p_original_rsv_rec.demand_source_header_id;
1660: END IF;
1661:
1662: --
1663: IF p_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num
1664: OR p_to_rsv_rec.demand_source_line_id IS NULL THEN
1665: x_to_rsv_rec.demand_source_line_id := p_to_rsv_rec.demand_source_line_id;
1666: ELSE
1667: x_to_rsv_rec.demand_source_line_id := p_original_rsv_rec.demand_source_line_id;

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

1667: x_to_rsv_rec.demand_source_line_id := p_original_rsv_rec.demand_source_line_id;
1668: END IF;
1669:
1670: --
1671: IF p_to_rsv_rec.primary_uom_code <> fnd_api.g_miss_char
1672: OR p_to_rsv_rec.primary_uom_code IS NULL THEN
1673: x_to_rsv_rec.primary_uom_code := p_to_rsv_rec.primary_uom_code;
1674: ELSE
1675: x_to_rsv_rec.primary_uom_code := p_original_rsv_rec.primary_uom_code;

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

1675: x_to_rsv_rec.primary_uom_code := p_original_rsv_rec.primary_uom_code;
1676: END IF;
1677:
1678: --
1679: IF p_to_rsv_rec.primary_uom_id <> fnd_api.g_miss_num
1680: OR p_to_rsv_rec.primary_uom_id IS NULL THEN
1681: x_to_rsv_rec.primary_uom_id := p_to_rsv_rec.primary_uom_id;
1682: ELSE
1683: x_to_rsv_rec.primary_uom_id := p_original_rsv_rec.primary_uom_id;

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

1683: x_to_rsv_rec.primary_uom_id := p_original_rsv_rec.primary_uom_id;
1684: END IF;
1685:
1686: -- INVCONV BEGIN
1687: IF p_to_rsv_rec.secondary_uom_code <> fnd_api.g_miss_char
1688: OR p_to_rsv_rec.secondary_uom_code IS NULL THEN
1689: x_to_rsv_rec.secondary_uom_code := p_to_rsv_rec.secondary_uom_code;
1690: ELSE
1691: x_to_rsv_rec.secondary_uom_code := p_original_rsv_rec.secondary_uom_code;

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

1691: x_to_rsv_rec.secondary_uom_code := p_original_rsv_rec.secondary_uom_code;
1692: END IF;
1693:
1694: --
1695: IF p_to_rsv_rec.secondary_uom_id <> fnd_api.g_miss_num
1696: OR p_to_rsv_rec.secondary_uom_id IS NULL THEN
1697: x_to_rsv_rec.secondary_uom_id := p_to_rsv_rec.secondary_uom_id;
1698: ELSE
1699: x_to_rsv_rec.secondary_uom_id := p_original_rsv_rec.secondary_uom_id;

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

1699: x_to_rsv_rec.secondary_uom_id := p_original_rsv_rec.secondary_uom_id;
1700: END IF;
1701: -- INVCONV END
1702: --
1703: IF p_to_rsv_rec.reservation_uom_code <> fnd_api.g_miss_char
1704: OR p_to_rsv_rec.reservation_uom_code IS NULL THEN
1705: x_to_rsv_rec.reservation_uom_code := p_to_rsv_rec.reservation_uom_code;
1706: ELSE
1707: x_to_rsv_rec.reservation_uom_code := p_original_rsv_rec.reservation_uom_code;

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

1707: x_to_rsv_rec.reservation_uom_code := p_original_rsv_rec.reservation_uom_code;
1708: END IF;
1709:
1710: --
1711: IF p_to_rsv_rec.reservation_uom_id <> fnd_api.g_miss_num
1712: OR p_to_rsv_rec.reservation_uom_id IS NULL THEN
1713: x_to_rsv_rec.reservation_uom_id := p_to_rsv_rec.reservation_uom_id;
1714: ELSE
1715: x_to_rsv_rec.reservation_uom_id := p_original_rsv_rec.reservation_uom_id;

Line 1719: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num

1715: x_to_rsv_rec.reservation_uom_id := p_original_rsv_rec.reservation_uom_id;
1716: END IF;
1717:
1718: --
1719: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
1720: AND p_to_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1721: -- neither primary quantity or reservaton quantity is
1722: -- specified for the to row
1723: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;

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

1716: END IF;
1717:
1718: --
1719: IF p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
1720: AND p_to_rsv_rec.reservation_quantity = fnd_api.g_miss_num THEN
1721: -- neither primary quantity or reservaton quantity is
1722: -- specified for the to row
1723: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;
1724: x_to_rsv_rec.reservation_quantity := p_original_rsv_rec.reservation_quantity;

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

1721: -- neither primary quantity or reservaton quantity is
1722: -- specified for the to row
1723: x_to_rsv_rec.primary_reservation_quantity := p_original_rsv_rec.primary_reservation_quantity;
1724: x_to_rsv_rec.reservation_quantity := p_original_rsv_rec.reservation_quantity;
1725: ELSIF p_to_rsv_rec.primary_reservation_quantity <> fnd_api.g_miss_num
1726: OR p_to_rsv_rec.primary_reservation_quantity IS NULL THEN
1727: -- primary_reservation_quantity is specified for the to row
1728: -- here null is considered as a value
1729: x_to_rsv_rec.primary_reservation_quantity := p_to_rsv_rec.primary_reservation_quantity;

Line 1732: -- primary_reservation_quantity is fnd_api.g_miss_num

1728: -- here null is considered as a value
1729: x_to_rsv_rec.primary_reservation_quantity := p_to_rsv_rec.primary_reservation_quantity;
1730: x_to_rsv_rec.reservation_quantity := NULL;
1731: ELSE
1732: -- primary_reservation_quantity is fnd_api.g_miss_num
1733: -- but reservation_quantity is null or
1734: -- value other than fnd_api.g_miss_num
1735: -- for the to row
1736: x_to_rsv_rec.primary_reservation_quantity := NULL;

Line 1734: -- value other than fnd_api.g_miss_num

1730: x_to_rsv_rec.reservation_quantity := NULL;
1731: ELSE
1732: -- primary_reservation_quantity is fnd_api.g_miss_num
1733: -- but reservation_quantity is null or
1734: -- value other than fnd_api.g_miss_num
1735: -- for the to row
1736: x_to_rsv_rec.primary_reservation_quantity := NULL;
1737: x_to_rsv_rec.reservation_quantity := p_to_rsv_rec.reservation_quantity;
1738: END IF;

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

1738: END IF;
1739:
1740: --
1741: -- INVCONV BEGIN
1742: IF p_to_rsv_rec.secondary_reservation_quantity <> fnd_api.g_miss_num
1743: OR p_to_rsv_rec.secondary_reservation_quantity IS NULL THEN
1744: x_to_rsv_rec.secondary_reservation_quantity := p_to_rsv_rec.secondary_reservation_quantity;
1745: ELSE
1746: x_to_rsv_rec.secondary_reservation_quantity := p_original_rsv_rec.secondary_reservation_quantity;

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

1746: x_to_rsv_rec.secondary_reservation_quantity := p_original_rsv_rec.secondary_reservation_quantity;
1747: END IF;
1748: -- INVCONV END
1749:
1750: IF p_to_rsv_rec.detailed_quantity <> fnd_api.g_miss_num
1751: OR p_to_rsv_rec.detailed_quantity IS NULL THEN
1752: x_to_rsv_rec.detailed_quantity := p_to_rsv_rec.detailed_quantity;
1753: ELSE
1754: x_to_rsv_rec.detailed_quantity := p_original_rsv_rec.detailed_quantity;

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

1754: x_to_rsv_rec.detailed_quantity := p_original_rsv_rec.detailed_quantity;
1755: END IF;
1756:
1757: -- INVCONV BEGIN
1758: IF p_to_rsv_rec.secondary_detailed_quantity <> fnd_api.g_miss_num
1759: OR p_to_rsv_rec.secondary_detailed_quantity IS NULL THEN
1760: x_to_rsv_rec.secondary_detailed_quantity := p_to_rsv_rec.secondary_detailed_quantity;
1761: ELSE
1762: x_to_rsv_rec.secondary_detailed_quantity := p_original_rsv_rec.secondary_detailed_quantity;

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

1762: x_to_rsv_rec.secondary_detailed_quantity := p_original_rsv_rec.secondary_detailed_quantity;
1763: END IF;
1764: -- INVCONV END
1765:
1766: IF p_to_rsv_rec.autodetail_group_id <> fnd_api.g_miss_num
1767: OR p_to_rsv_rec.autodetail_group_id IS NULL THEN
1768: x_to_rsv_rec.autodetail_group_id := p_to_rsv_rec.autodetail_group_id;
1769: ELSE
1770: x_to_rsv_rec.autodetail_group_id := p_original_rsv_rec.autodetail_group_id;

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

1770: x_to_rsv_rec.autodetail_group_id := p_original_rsv_rec.autodetail_group_id;
1771: END IF;
1772:
1773: --
1774: IF p_to_rsv_rec.external_source_code <> fnd_api.g_miss_char
1775: OR p_to_rsv_rec.external_source_code IS NULL THEN
1776: x_to_rsv_rec.external_source_code := p_to_rsv_rec.external_source_code;
1777: ELSE
1778: x_to_rsv_rec.external_source_code := p_original_rsv_rec.external_source_code;

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

1778: x_to_rsv_rec.external_source_code := p_original_rsv_rec.external_source_code;
1779: END IF;
1780:
1781: --
1782: IF p_to_rsv_rec.external_source_line_id <> fnd_api.g_miss_num
1783: OR p_to_rsv_rec.external_source_line_id IS NULL THEN
1784: x_to_rsv_rec.external_source_line_id := p_to_rsv_rec.external_source_line_id;
1785: ELSE
1786: x_to_rsv_rec.external_source_line_id := p_original_rsv_rec.external_source_line_id;

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

1786: x_to_rsv_rec.external_source_line_id := p_original_rsv_rec.external_source_line_id;
1787: END IF;
1788:
1789: --
1790: IF p_to_rsv_rec.supply_source_type_id <> fnd_api.g_miss_num
1791: OR p_to_rsv_rec.supply_source_type_id IS NULL THEN
1792: x_to_rsv_rec.supply_source_type_id := p_to_rsv_rec.supply_source_type_id;
1793: ELSE
1794: x_to_rsv_rec.supply_source_type_id := p_original_rsv_rec.supply_source_type_id;

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

1794: x_to_rsv_rec.supply_source_type_id := p_original_rsv_rec.supply_source_type_id;
1795: END IF;
1796:
1797: --
1798: IF p_to_rsv_rec.supply_source_header_id <> fnd_api.g_miss_num
1799: OR p_to_rsv_rec.supply_source_header_id IS NULL THEN
1800: x_to_rsv_rec.supply_source_header_id := p_to_rsv_rec.supply_source_header_id;
1801: ELSE
1802: x_to_rsv_rec.supply_source_header_id := p_original_rsv_rec.supply_source_header_id;

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

1802: x_to_rsv_rec.supply_source_header_id := p_original_rsv_rec.supply_source_header_id;
1803: END IF;
1804:
1805: --
1806: IF p_to_rsv_rec.supply_source_line_id <> fnd_api.g_miss_num
1807: OR p_to_rsv_rec.supply_source_line_id IS NULL THEN
1808: x_to_rsv_rec.supply_source_line_id := p_to_rsv_rec.supply_source_line_id;
1809: ELSE
1810: x_to_rsv_rec.supply_source_line_id := p_original_rsv_rec.supply_source_line_id;

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

1810: x_to_rsv_rec.supply_source_line_id := p_original_rsv_rec.supply_source_line_id;
1811: END IF;
1812:
1813: --
1814: IF p_to_rsv_rec.supply_source_line_detail <> fnd_api.g_miss_num
1815: OR p_to_rsv_rec.supply_source_line_detail IS NULL THEN
1816: x_to_rsv_rec.supply_source_line_detail := p_to_rsv_rec.supply_source_line_detail;
1817: ELSE
1818: x_to_rsv_rec.supply_source_line_detail := p_original_rsv_rec.supply_source_line_detail;

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

1818: x_to_rsv_rec.supply_source_line_detail := p_original_rsv_rec.supply_source_line_detail;
1819: END IF;
1820:
1821: --
1822: IF p_to_rsv_rec.supply_source_name <> fnd_api.g_miss_char
1823: OR p_to_rsv_rec.supply_source_name IS NULL THEN
1824: x_to_rsv_rec.supply_source_name := p_to_rsv_rec.supply_source_name;
1825: ELSE
1826: x_to_rsv_rec.supply_source_name := p_original_rsv_rec.supply_source_name;

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

1826: x_to_rsv_rec.supply_source_name := p_original_rsv_rec.supply_source_name;
1827: END IF;
1828:
1829: --
1830: IF p_to_rsv_rec.revision <> fnd_api.g_miss_char
1831: OR p_to_rsv_rec.revision IS NULL THEN
1832: x_to_rsv_rec.revision := p_to_rsv_rec.revision;
1833: ELSE
1834: x_to_rsv_rec.revision := p_original_rsv_rec.revision;

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

1834: x_to_rsv_rec.revision := p_original_rsv_rec.revision;
1835: END IF;
1836:
1837: --
1838: IF p_to_rsv_rec.subinventory_code <> fnd_api.g_miss_char
1839: OR p_to_rsv_rec.subinventory_code IS NULL THEN
1840: x_to_rsv_rec.subinventory_code := p_to_rsv_rec.subinventory_code;
1841: ELSE
1842: x_to_rsv_rec.subinventory_code := p_original_rsv_rec.subinventory_code;

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

1842: x_to_rsv_rec.subinventory_code := p_original_rsv_rec.subinventory_code;
1843: END IF;
1844:
1845: --
1846: IF p_to_rsv_rec.subinventory_id <> fnd_api.g_miss_num
1847: OR p_to_rsv_rec.subinventory_id IS NULL THEN
1848: x_to_rsv_rec.subinventory_id := p_to_rsv_rec.subinventory_id;
1849: ELSE
1850: x_to_rsv_rec.subinventory_id := p_original_rsv_rec.subinventory_id;

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

1850: x_to_rsv_rec.subinventory_id := p_original_rsv_rec.subinventory_id;
1851: END IF;
1852:
1853: --
1854: IF p_to_rsv_rec.locator_id <> fnd_api.g_miss_num
1855: OR p_to_rsv_rec.locator_id IS NULL THEN
1856: x_to_rsv_rec.locator_id := p_to_rsv_rec.locator_id;
1857: ELSE
1858: x_to_rsv_rec.locator_id := p_original_rsv_rec.locator_id;

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

1858: x_to_rsv_rec.locator_id := p_original_rsv_rec.locator_id;
1859: END IF;
1860:
1861: --
1862: IF p_to_rsv_rec.lot_number <> fnd_api.g_miss_char
1863: OR p_to_rsv_rec.lot_number IS NULL THEN
1864: x_to_rsv_rec.lot_number := p_to_rsv_rec.lot_number;
1865: ELSE
1866: x_to_rsv_rec.lot_number := p_original_rsv_rec.lot_number;

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

1866: x_to_rsv_rec.lot_number := p_original_rsv_rec.lot_number;
1867: END IF;
1868:
1869: --
1870: IF p_to_rsv_rec.lot_number_id <> fnd_api.g_miss_num
1871: OR p_to_rsv_rec.lot_number_id IS NULL THEN
1872: x_to_rsv_rec.lot_number_id := p_to_rsv_rec.lot_number_id;
1873: ELSE
1874: x_to_rsv_rec.lot_number_id := p_original_rsv_rec.lot_number_id;

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

1874: x_to_rsv_rec.lot_number_id := p_original_rsv_rec.lot_number_id;
1875: END IF;
1876:
1877: --
1878: IF p_to_rsv_rec.pick_slip_number <> fnd_api.g_miss_num
1879: OR p_to_rsv_rec.pick_slip_number IS NULL THEN
1880: x_to_rsv_rec.pick_slip_number := p_to_rsv_rec.pick_slip_number;
1881: ELSE
1882: x_to_rsv_rec.pick_slip_number := p_original_rsv_rec.pick_slip_number;

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

1882: x_to_rsv_rec.pick_slip_number := p_original_rsv_rec.pick_slip_number;
1883: END IF;
1884:
1885: --
1886: IF p_to_rsv_rec.lpn_id <> fnd_api.g_miss_num
1887: OR p_to_rsv_rec.lpn_id IS NULL THEN
1888: x_to_rsv_rec.lpn_id := p_to_rsv_rec.lpn_id;
1889: ELSE
1890: x_to_rsv_rec.lpn_id := p_original_rsv_rec.lpn_id;

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

1890: x_to_rsv_rec.lpn_id := p_original_rsv_rec.lpn_id;
1891: END IF;
1892:
1893: --
1894: IF p_to_rsv_rec.attribute_category <> fnd_api.g_miss_char
1895: OR p_to_rsv_rec.attribute_category IS NULL THEN
1896: x_to_rsv_rec.attribute_category := p_to_rsv_rec.attribute_category;
1897: ELSE
1898: x_to_rsv_rec.attribute_category := p_original_rsv_rec.attribute_category;

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

1898: x_to_rsv_rec.attribute_category := p_original_rsv_rec.attribute_category;
1899: END IF;
1900:
1901: --
1902: IF p_to_rsv_rec.attribute1 <> fnd_api.g_miss_char
1903: OR p_to_rsv_rec.attribute1 IS NULL THEN
1904: x_to_rsv_rec.attribute1 := p_to_rsv_rec.attribute1;
1905: ELSE
1906: x_to_rsv_rec.attribute1 := p_original_rsv_rec.attribute1;

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

1905: ELSE
1906: x_to_rsv_rec.attribute1 := p_original_rsv_rec.attribute1;
1907: END IF;
1908:
1909: IF p_to_rsv_rec.attribute2 <> fnd_api.g_miss_char
1910: OR p_to_rsv_rec.attribute2 IS NULL THEN
1911: x_to_rsv_rec.attribute2 := p_to_rsv_rec.attribute2;
1912: ELSE
1913: x_to_rsv_rec.attribute2 := p_original_rsv_rec.attribute2;

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

1912: ELSE
1913: x_to_rsv_rec.attribute2 := p_original_rsv_rec.attribute2;
1914: END IF;
1915:
1916: IF p_to_rsv_rec.attribute3 <> fnd_api.g_miss_char
1917: OR p_to_rsv_rec.attribute3 IS NULL THEN
1918: x_to_rsv_rec.attribute3 := p_to_rsv_rec.attribute3;
1919: ELSE
1920: x_to_rsv_rec.attribute3 := p_original_rsv_rec.attribute3;

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

1919: ELSE
1920: x_to_rsv_rec.attribute3 := p_original_rsv_rec.attribute3;
1921: END IF;
1922:
1923: IF p_to_rsv_rec.attribute4 <> fnd_api.g_miss_char
1924: OR p_to_rsv_rec.attribute4 IS NULL THEN
1925: x_to_rsv_rec.attribute4 := p_to_rsv_rec.attribute4;
1926: ELSE
1927: x_to_rsv_rec.attribute4 := p_original_rsv_rec.attribute4;

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

1926: ELSE
1927: x_to_rsv_rec.attribute4 := p_original_rsv_rec.attribute4;
1928: END IF;
1929:
1930: IF p_to_rsv_rec.attribute5 <> fnd_api.g_miss_char
1931: OR p_to_rsv_rec.attribute5 IS NULL THEN
1932: x_to_rsv_rec.attribute5 := p_to_rsv_rec.attribute5;
1933: ELSE
1934: x_to_rsv_rec.attribute5 := p_original_rsv_rec.attribute5;

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

1933: ELSE
1934: x_to_rsv_rec.attribute5 := p_original_rsv_rec.attribute5;
1935: END IF;
1936:
1937: IF p_to_rsv_rec.attribute6 <> fnd_api.g_miss_char
1938: OR p_to_rsv_rec.attribute6 IS NULL THEN
1939: x_to_rsv_rec.attribute6 := p_to_rsv_rec.attribute6;
1940: ELSE
1941: x_to_rsv_rec.attribute6 := p_original_rsv_rec.attribute6;

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

1940: ELSE
1941: x_to_rsv_rec.attribute6 := p_original_rsv_rec.attribute6;
1942: END IF;
1943:
1944: IF p_to_rsv_rec.attribute7 <> fnd_api.g_miss_char
1945: OR p_to_rsv_rec.attribute7 IS NULL THEN
1946: x_to_rsv_rec.attribute7 := p_to_rsv_rec.attribute7;
1947: ELSE
1948: x_to_rsv_rec.attribute7 := p_original_rsv_rec.attribute7;

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

1947: ELSE
1948: x_to_rsv_rec.attribute7 := p_original_rsv_rec.attribute7;
1949: END IF;
1950:
1951: IF p_to_rsv_rec.attribute8 <> fnd_api.g_miss_char
1952: OR p_to_rsv_rec.attribute8 IS NULL THEN
1953: x_to_rsv_rec.attribute8 := p_to_rsv_rec.attribute8;
1954: ELSE
1955: x_to_rsv_rec.attribute8 := p_original_rsv_rec.attribute8;

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

1954: ELSE
1955: x_to_rsv_rec.attribute8 := p_original_rsv_rec.attribute8;
1956: END IF;
1957:
1958: IF p_to_rsv_rec.attribute9 <> fnd_api.g_miss_char
1959: OR p_to_rsv_rec.attribute9 IS NULL THEN
1960: x_to_rsv_rec.attribute9 := p_to_rsv_rec.attribute9;
1961: ELSE
1962: x_to_rsv_rec.attribute9 := p_original_rsv_rec.attribute9;

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

1961: ELSE
1962: x_to_rsv_rec.attribute9 := p_original_rsv_rec.attribute9;
1963: END IF;
1964:
1965: IF p_to_rsv_rec.attribute10 <> fnd_api.g_miss_char
1966: OR p_to_rsv_rec.attribute10 IS NULL THEN
1967: x_to_rsv_rec.attribute10 := p_to_rsv_rec.attribute10;
1968: ELSE
1969: x_to_rsv_rec.attribute10 := p_original_rsv_rec.attribute10;

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

1968: ELSE
1969: x_to_rsv_rec.attribute10 := p_original_rsv_rec.attribute10;
1970: END IF;
1971:
1972: IF p_to_rsv_rec.attribute11 <> fnd_api.g_miss_char
1973: OR p_to_rsv_rec.attribute11 IS NULL THEN
1974: x_to_rsv_rec.attribute11 := p_to_rsv_rec.attribute11;
1975: ELSE
1976: x_to_rsv_rec.attribute11 := p_original_rsv_rec.attribute11;

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

1975: ELSE
1976: x_to_rsv_rec.attribute11 := p_original_rsv_rec.attribute11;
1977: END IF;
1978:
1979: IF p_to_rsv_rec.attribute12 <> fnd_api.g_miss_char
1980: OR p_to_rsv_rec.attribute12 IS NULL THEN
1981: x_to_rsv_rec.attribute12 := p_to_rsv_rec.attribute12;
1982: ELSE
1983: x_to_rsv_rec.attribute12 := p_original_rsv_rec.attribute12;

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

1982: ELSE
1983: x_to_rsv_rec.attribute12 := p_original_rsv_rec.attribute12;
1984: END IF;
1985:
1986: IF p_to_rsv_rec.attribute13 <> fnd_api.g_miss_char
1987: OR p_to_rsv_rec.attribute13 IS NULL THEN
1988: x_to_rsv_rec.attribute13 := p_to_rsv_rec.attribute13;
1989: ELSE
1990: x_to_rsv_rec.attribute13 := p_original_rsv_rec.attribute13;

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

1989: ELSE
1990: x_to_rsv_rec.attribute13 := p_original_rsv_rec.attribute13;
1991: END IF;
1992:
1993: IF p_to_rsv_rec.attribute14 <> fnd_api.g_miss_char
1994: OR p_to_rsv_rec.attribute14 IS NULL THEN
1995: x_to_rsv_rec.attribute14 := p_to_rsv_rec.attribute14;
1996: ELSE
1997: x_to_rsv_rec.attribute14 := p_original_rsv_rec.attribute14;

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

1996: ELSE
1997: x_to_rsv_rec.attribute14 := p_original_rsv_rec.attribute14;
1998: END IF;
1999:
2000: IF p_to_rsv_rec.attribute15 <> fnd_api.g_miss_char
2001: OR p_to_rsv_rec.attribute15 IS NULL THEN
2002: x_to_rsv_rec.attribute15 := p_to_rsv_rec.attribute15;
2003: ELSE
2004: x_to_rsv_rec.attribute15 := p_original_rsv_rec.attribute15;

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

2003: ELSE
2004: x_to_rsv_rec.attribute15 := p_original_rsv_rec.attribute15;
2005: END IF;
2006:
2007: IF p_to_rsv_rec.ship_ready_flag <> fnd_api.g_miss_num
2008: OR p_to_rsv_rec.ship_ready_flag IS NULL THEN
2009: x_to_rsv_rec.ship_ready_flag := p_to_rsv_rec.ship_ready_flag;
2010: ELSE
2011: x_to_rsv_rec.ship_ready_flag := p_original_rsv_rec.ship_ready_flag;

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

2010: ELSE
2011: x_to_rsv_rec.ship_ready_flag := p_original_rsv_rec.ship_ready_flag;
2012: END IF;
2013:
2014: IF p_to_rsv_rec.staged_flag <> fnd_api.g_miss_char
2015: OR p_to_rsv_rec.staged_flag IS NULL THEN
2016: x_to_rsv_rec.staged_flag := p_to_rsv_rec.staged_flag;
2017: ELSE
2018: x_to_rsv_rec.staged_flag := p_original_rsv_rec.staged_flag;

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

2019: END IF;
2020:
2021: /**** {{ R12 Enhanced reservations code changes. Adding new columns to
2022: -- construct_to_reservation_row API }}****/
2023: IF p_to_rsv_rec.crossdock_flag <> fnd_api.g_miss_char
2024: OR p_to_rsv_rec.crossdock_flag IS NULL THEN
2025: x_to_rsv_rec.crossdock_flag := p_to_rsv_rec.crossdock_flag;
2026: ELSE
2027: x_to_rsv_rec.crossdock_flag := p_original_rsv_rec.crossdock_flag;

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

2026: ELSE
2027: x_to_rsv_rec.crossdock_flag := p_original_rsv_rec.crossdock_flag;
2028: END IF;
2029:
2030: IF p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num
2031: OR p_to_rsv_rec.crossdock_criteria_id IS NULL THEN
2032: x_to_rsv_rec.crossdock_criteria_id := p_to_rsv_rec.crossdock_criteria_id;
2033: ELSE
2034: x_to_rsv_rec.crossdock_criteria_id := p_original_rsv_rec.crossdock_criteria_id;

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

2033: ELSE
2034: x_to_rsv_rec.crossdock_criteria_id := p_original_rsv_rec.crossdock_criteria_id;
2035: END IF;
2036:
2037: IF p_to_rsv_rec.demand_source_line_detail <> fnd_api.g_miss_num
2038: OR p_to_rsv_rec.demand_source_line_detail IS NULL THEN
2039: x_to_rsv_rec.demand_source_line_detail := p_to_rsv_rec.demand_source_line_detail;
2040: ELSE
2041: x_to_rsv_rec.demand_source_line_detail := p_original_rsv_rec.demand_source_line_detail;

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

2040: ELSE
2041: x_to_rsv_rec.demand_source_line_detail := p_original_rsv_rec.demand_source_line_detail;
2042: END IF;
2043:
2044: IF p_to_rsv_rec.serial_reservation_quantity <> fnd_api.g_miss_num
2045: OR p_to_rsv_rec.serial_reservation_quantity IS NULL THEN
2046: x_to_rsv_rec.serial_reservation_quantity := p_to_rsv_rec.serial_reservation_quantity;
2047: ELSE
2048: x_to_rsv_rec.serial_reservation_quantity := p_original_rsv_rec.serial_reservation_quantity;

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

2047: ELSE
2048: x_to_rsv_rec.serial_reservation_quantity := p_original_rsv_rec.serial_reservation_quantity;
2049: END IF;
2050:
2051: IF p_to_rsv_rec.supply_receipt_date <> fnd_api.g_miss_date
2052: OR p_to_rsv_rec.supply_receipt_date IS NULL THEN
2053: x_to_rsv_rec.supply_receipt_date := p_to_rsv_rec.supply_receipt_date;
2054: ELSE
2055: x_to_rsv_rec.supply_receipt_date := p_original_rsv_rec.supply_receipt_date;

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

2054: ELSE
2055: x_to_rsv_rec.supply_receipt_date := p_original_rsv_rec.supply_receipt_date;
2056: END IF;
2057:
2058: IF p_to_rsv_rec.demand_ship_date <> fnd_api.g_miss_date
2059: OR p_to_rsv_rec.demand_ship_date IS NULL THEN
2060: x_to_rsv_rec.demand_ship_date := p_to_rsv_rec.demand_ship_date;
2061: ELSE
2062: x_to_rsv_rec.demand_ship_date := p_original_rsv_rec.demand_ship_date;

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

2061: ELSE
2062: x_to_rsv_rec.demand_ship_date := p_original_rsv_rec.demand_ship_date;
2063: END IF;
2064:
2065: IF p_to_rsv_rec.project_id <> fnd_api.g_miss_num
2066: OR p_to_rsv_rec.project_id IS NULL THEN
2067: x_to_rsv_rec.project_id := p_to_rsv_rec.project_id;
2068: ELSE
2069: x_to_rsv_rec.project_id := p_original_rsv_rec.project_id;

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

2068: ELSE
2069: x_to_rsv_rec.project_id := p_original_rsv_rec.project_id;
2070: END IF;
2071:
2072: IF p_to_rsv_rec.task_id <> fnd_api.g_miss_num
2073: OR p_to_rsv_rec.task_id IS NULL THEN
2074: x_to_rsv_rec.task_id := p_to_rsv_rec.task_id;
2075: ELSE
2076: x_to_rsv_rec.task_id := p_original_rsv_rec.task_id;

Line 2224: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2220:
2221: PROCEDURE get_wip_entity_type
2222: (
2223: p_api_version_number IN NUMBER
2224: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2225: , x_return_status OUT NOCOPY VARCHAR2
2226: , x_msg_count OUT NOCOPY NUMBER
2227: , x_msg_data OUT NOCOPY VARCHAR2
2228: , p_organization_id IN NUMBER DEFAULT null

Line 2255: RAISE fnd_api.g_exc_error;

2251:
2252: IF (p_source_type_id <> INV_RESERVATION_GLOBAL.g_source_type_wip) THEN
2253: fnd_message.set_name('INV', 'INV_INVALID_SUPPLY_SOURCE');
2254: fnd_msg_pub.add;
2255: RAISE fnd_api.g_exc_error;
2256: END IF;
2257:
2258: BEGIN
2259: SELECT we.entity_type, wdj.maintenance_object_source INTO

Line 2270: RAISE fnd_api.g_exc_error;

2266: debug_print('No WIP entity record found for the source header passed' );
2267: END IF;
2268: fnd_message.set_name('INV', 'INV_INVALID_WIP_ENTITY_TYPE');
2269: fnd_msg_pub.add;
2270: RAISE fnd_api.g_exc_error;
2271: END ;
2272:
2273: IF l_wip_entity_id = inv_reservation_global.g_wip_source_type_discrete then
2274: l_wip_entity_type := inv_reservation_global.g_wip_source_type_discrete;

Line 2306: WHEN fnd_api.g_exc_error THEN

2302: x_wip_entity_type := l_wip_entity_type;
2303: x_wip_job_type := l_wip_job_type;
2304:
2305: EXCEPTION
2306: WHEN fnd_api.g_exc_error THEN
2307: x_return_status := fnd_api.g_ret_sts_error;
2308: -- Get message count and data
2309: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2310: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2307: x_return_status := fnd_api.g_ret_sts_error;

2303: x_wip_job_type := l_wip_job_type;
2304:
2305: EXCEPTION
2306: WHEN fnd_api.g_exc_error THEN
2307: x_return_status := fnd_api.g_ret_sts_error;
2308: -- Get message count and data
2309: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2310: WHEN fnd_api.g_exc_unexpected_error THEN
2311: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2310: WHEN fnd_api.g_exc_unexpected_error THEN

2306: WHEN fnd_api.g_exc_error THEN
2307: x_return_status := fnd_api.g_ret_sts_error;
2308: -- Get message count and data
2309: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2310: WHEN fnd_api.g_exc_unexpected_error THEN
2311: x_return_status := fnd_api.g_ret_sts_unexp_error;
2312: -- Get message count and data
2313: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2314: WHEN OTHERS THEN

Line 2311: x_return_status := fnd_api.g_ret_sts_unexp_error;

2307: x_return_status := fnd_api.g_ret_sts_error;
2308: -- Get message count and data
2309: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2310: WHEN fnd_api.g_exc_unexpected_error THEN
2311: x_return_status := fnd_api.g_ret_sts_unexp_error;
2312: -- Get message count and data
2313: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2314: WHEN OTHERS THEN
2315: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2315: x_return_status := fnd_api.g_ret_sts_unexp_error;

2311: x_return_status := fnd_api.g_ret_sts_unexp_error;
2312: -- Get message count and data
2313: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2314: WHEN OTHERS THEN
2315: x_return_status := fnd_api.g_ret_sts_unexp_error;
2316:
2317: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2318: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2319: END IF;

Line 2358: x_return_status := fnd_api.g_ret_sts_success;

2354: IF (l_debug = 1) THEN
2355: debug_print('Number of rows update: ' || l_update_count);
2356: END IF;
2357:
2358: x_return_status := fnd_api.g_ret_sts_success;
2359: EXCEPTION
2360: WHEN fnd_api.g_exc_error THEN
2361: x_return_status := fnd_api.g_ret_sts_error;
2362: -- Get message count and data

Line 2360: WHEN fnd_api.g_exc_error THEN

2356: END IF;
2357:
2358: x_return_status := fnd_api.g_ret_sts_success;
2359: EXCEPTION
2360: WHEN fnd_api.g_exc_error THEN
2361: x_return_status := fnd_api.g_ret_sts_error;
2362: -- Get message count and data
2363: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2364: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2361: x_return_status := fnd_api.g_ret_sts_error;

2357:
2358: x_return_status := fnd_api.g_ret_sts_success;
2359: EXCEPTION
2360: WHEN fnd_api.g_exc_error THEN
2361: x_return_status := fnd_api.g_ret_sts_error;
2362: -- Get message count and data
2363: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2364: WHEN fnd_api.g_exc_unexpected_error THEN
2365: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2364: WHEN fnd_api.g_exc_unexpected_error THEN

2360: WHEN fnd_api.g_exc_error THEN
2361: x_return_status := fnd_api.g_ret_sts_error;
2362: -- Get message count and data
2363: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2364: WHEN fnd_api.g_exc_unexpected_error THEN
2365: x_return_status := fnd_api.g_ret_sts_unexp_error;
2366: -- Get message count and data
2367: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2368: WHEN OTHERS THEN

Line 2365: x_return_status := fnd_api.g_ret_sts_unexp_error;

2361: x_return_status := fnd_api.g_ret_sts_error;
2362: -- Get message count and data
2363: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2364: WHEN fnd_api.g_exc_unexpected_error THEN
2365: x_return_status := fnd_api.g_ret_sts_unexp_error;
2366: -- Get message count and data
2367: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2368: WHEN OTHERS THEN
2369: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2369: x_return_status := fnd_api.g_ret_sts_unexp_error;

2365: x_return_status := fnd_api.g_ret_sts_unexp_error;
2366: -- Get message count and data
2367: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2368: WHEN OTHERS THEN
2369: x_return_status := fnd_api.g_ret_sts_unexp_error;
2370:
2371: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2372: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2373: END IF;

Line 2382: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2378: END update_serial_rsv_quantity;
2379:
2380: PROCEDURE is_serial_number_reserved(
2381: p_api_version_number IN NUMBER
2382: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2383: , x_return_status OUT NOCOPY VARCHAR2
2384: , x_msg_count OUT NOCOPY NUMBER
2385: , x_msg_data OUT NOCOPY VARCHAR2
2386: , p_serial_number_tbl IN inv_reservation_global.serial_number_tbl_type

Line 2433: x_return_status := fnd_api.g_ret_sts_success;

2429: ', serial number = ' || x_serial_number_tbl(i).serial_number);
2430: END LOOP;
2431: END IF;
2432:
2433: x_return_status := fnd_api.g_ret_sts_success;
2434: EXCEPTION
2435: WHEN fnd_api.g_exc_error THEN
2436: x_return_status := fnd_api.g_ret_sts_error;
2437: -- Get message count and data

Line 2435: WHEN fnd_api.g_exc_error THEN

2431: END IF;
2432:
2433: x_return_status := fnd_api.g_ret_sts_success;
2434: EXCEPTION
2435: WHEN fnd_api.g_exc_error THEN
2436: x_return_status := fnd_api.g_ret_sts_error;
2437: -- Get message count and data
2438: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2439: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2436: x_return_status := fnd_api.g_ret_sts_error;

2432:
2433: x_return_status := fnd_api.g_ret_sts_success;
2434: EXCEPTION
2435: WHEN fnd_api.g_exc_error THEN
2436: x_return_status := fnd_api.g_ret_sts_error;
2437: -- Get message count and data
2438: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2439: WHEN fnd_api.g_exc_unexpected_error THEN
2440: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2439: WHEN fnd_api.g_exc_unexpected_error THEN

2435: WHEN fnd_api.g_exc_error THEN
2436: x_return_status := fnd_api.g_ret_sts_error;
2437: -- Get message count and data
2438: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2439: WHEN fnd_api.g_exc_unexpected_error THEN
2440: x_return_status := fnd_api.g_ret_sts_unexp_error;
2441: -- Get message count and data
2442: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2443: WHEN OTHERS THEN

Line 2440: x_return_status := fnd_api.g_ret_sts_unexp_error;

2436: x_return_status := fnd_api.g_ret_sts_error;
2437: -- Get message count and data
2438: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2439: WHEN fnd_api.g_exc_unexpected_error THEN
2440: x_return_status := fnd_api.g_ret_sts_unexp_error;
2441: -- Get message count and data
2442: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2443: WHEN OTHERS THEN
2444: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2444: x_return_status := fnd_api.g_ret_sts_unexp_error;

2440: x_return_status := fnd_api.g_ret_sts_unexp_error;
2441: -- Get message count and data
2442: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2443: WHEN OTHERS THEN
2444: x_return_status := fnd_api.g_ret_sts_unexp_error;
2445:
2446: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2447: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2448: END IF;

Line 2456: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

2452: END is_serial_number_reserved;
2453:
2454: PROCEDURE is_serial_reserved(
2455: p_api_version_number IN NUMBER
2456: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
2457: , x_return_status OUT NOCOPY VARCHAR2
2458: , x_msg_count OUT NOCOPY NUMBER
2459: , x_msg_data OUT NOCOPY VARCHAR2
2460: , p_serial_number_tbl IN inv_reservation_global.serial_number_tbl_type

Line 2588: x_return_status := fnd_api.g_ret_sts_success;

2584: ', serial number = ' || x_serial_number_tbl(i).serial_number);
2585: END LOOP;
2586: END IF;
2587:
2588: x_return_status := fnd_api.g_ret_sts_success;
2589: EXCEPTION
2590: WHEN fnd_api.g_exc_error THEN
2591: x_return_status := fnd_api.g_ret_sts_error;
2592: -- Get message count and data

Line 2590: WHEN fnd_api.g_exc_error THEN

2586: END IF;
2587:
2588: x_return_status := fnd_api.g_ret_sts_success;
2589: EXCEPTION
2590: WHEN fnd_api.g_exc_error THEN
2591: x_return_status := fnd_api.g_ret_sts_error;
2592: -- Get message count and data
2593: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2594: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2591: x_return_status := fnd_api.g_ret_sts_error;

2587:
2588: x_return_status := fnd_api.g_ret_sts_success;
2589: EXCEPTION
2590: WHEN fnd_api.g_exc_error THEN
2591: x_return_status := fnd_api.g_ret_sts_error;
2592: -- Get message count and data
2593: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2594: WHEN fnd_api.g_exc_unexpected_error THEN
2595: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2594: WHEN fnd_api.g_exc_unexpected_error THEN

2590: WHEN fnd_api.g_exc_error THEN
2591: x_return_status := fnd_api.g_ret_sts_error;
2592: -- Get message count and data
2593: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2594: WHEN fnd_api.g_exc_unexpected_error THEN
2595: x_return_status := fnd_api.g_ret_sts_unexp_error;
2596: -- Get message count and data
2597: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2598: WHEN OTHERS THEN

Line 2595: x_return_status := fnd_api.g_ret_sts_unexp_error;

2591: x_return_status := fnd_api.g_ret_sts_error;
2592: -- Get message count and data
2593: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2594: WHEN fnd_api.g_exc_unexpected_error THEN
2595: x_return_status := fnd_api.g_ret_sts_unexp_error;
2596: -- Get message count and data
2597: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2598: WHEN OTHERS THEN
2599: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2599: x_return_status := fnd_api.g_ret_sts_unexp_error;

2595: x_return_status := fnd_api.g_ret_sts_unexp_error;
2596: -- Get message count and data
2597: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2598: WHEN OTHERS THEN
2599: x_return_status := fnd_api.g_ret_sts_unexp_error;
2600:
2601: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2602: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2603: END IF;

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

2632: , p_action IN VARCHAR2
2633: , x_qty_changed OUT NOCOPY NUMBER
2634: , x_secondary_qty_changed OUT NOCOPY NUMBER -- INVCONV
2635: ) IS
2636: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2637: l_qoh NUMBER;
2638: l_rqoh NUMBER;
2639: l_qr NUMBER;
2640: l_qs NUMBER;

Line 2681: , p_init_msg_lst => fnd_api.g_true

2677:
2678: -- INVCONV Include secondary parameters below
2679: inv_quantity_tree_pvt.query_tree(
2680: p_api_version_number => 1.0
2681: , p_init_msg_lst => fnd_api.g_true
2682: , x_return_status => l_return_status
2683: , x_msg_count => l_msg_count
2684: , x_msg_data => l_msg_data
2685: , p_tree_id => p_tree_id

Line 2705: IF l_return_status = fnd_api.g_ret_sts_error THEN

2701: , x_satr => l_satr
2702: , p_lpn_id => p_lpn_id
2703: );
2704:
2705: IF l_return_status = fnd_api.g_ret_sts_error THEN
2706: RAISE fnd_api.g_exc_error;
2707: END IF;
2708:
2709: --

Line 2706: RAISE fnd_api.g_exc_error;

2702: , p_lpn_id => p_lpn_id
2703: );
2704:
2705: IF l_return_status = fnd_api.g_ret_sts_error THEN
2706: RAISE fnd_api.g_exc_error;
2707: END IF;
2708:
2709: --
2710: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2710: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2706: RAISE fnd_api.g_exc_error;
2707: END IF;
2708:
2709: --
2710: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2711: RAISE fnd_api.g_exc_unexpected_error;
2712: END IF;
2713:
2714: IF (l_debug = 1) THEN

Line 2711: RAISE fnd_api.g_exc_unexpected_error;

2707: END IF;
2708:
2709: --
2710: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2711: RAISE fnd_api.g_exc_unexpected_error;
2712: END IF;
2713:
2714: IF (l_debug = 1) THEN
2715: debug_print('l_atr ' || l_atr);

Line 2751: RAISE fnd_api.g_exc_error;

2747: IF l_net_qty < l_atr THEN
2748: -- Available to reserve cannot be subdivided
2749: fnd_message.set_name('INV', 'INV_LOT_INDIVISIBLE_VIOLATION'); -- INVCONV New Message
2750: fnd_msg_pub.ADD;
2751: RAISE fnd_api.g_exc_error;
2752: END IF;
2753: END IF;
2754: -- INVCONV END - lot_indivisible quantities cannot be split
2755: ELSIF p_action = 'DELETE' THEN

Line 2775: RAISE fnd_api.g_exc_unexpected_error;

2771: IF l_dual_control THEN -- INVCONV
2772: l_secondary_net_qty := -p_secondary_relieve_quantity;
2773: END IF; -- INVCONV
2774: ELSE
2775: RAISE fnd_api.g_exc_unexpected_error;
2776: END IF;
2777:
2778: IF p_force_reservation_flag <> fnd_api.g_true
2779: AND l_net_qty > 0

Line 2778: IF p_force_reservation_flag <> fnd_api.g_true

2774: ELSE
2775: RAISE fnd_api.g_exc_unexpected_error;
2776: END IF;
2777:
2778: IF p_force_reservation_flag <> fnd_api.g_true
2779: AND l_net_qty > 0
2780: AND (l_net_qty > l_atr
2781: AND p_partial_reservation_flag = fnd_api.g_false
2782: OR l_atr <= 0

Line 2781: AND p_partial_reservation_flag = fnd_api.g_false

2777:
2778: IF p_force_reservation_flag <> fnd_api.g_true
2779: AND l_net_qty > 0
2780: AND (l_net_qty > l_atr
2781: AND p_partial_reservation_flag = fnd_api.g_false
2782: OR l_atr <= 0
2783: AND p_partial_reservation_flag = fnd_api.g_true
2784: ) THEN
2785: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');

Line 2783: AND p_partial_reservation_flag = fnd_api.g_true

2779: AND l_net_qty > 0
2780: AND (l_net_qty > l_atr
2781: AND p_partial_reservation_flag = fnd_api.g_false
2782: OR l_atr <= 0
2783: AND p_partial_reservation_flag = fnd_api.g_true
2784: ) THEN
2785: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
2786: fnd_msg_pub.ADD;
2787: RAISE fnd_api.g_exc_error;

Line 2787: RAISE fnd_api.g_exc_error;

2783: AND p_partial_reservation_flag = fnd_api.g_true
2784: ) THEN
2785: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
2786: fnd_msg_pub.ADD;
2787: RAISE fnd_api.g_exc_error;
2788: END IF;
2789:
2790: IF (l_debug = 1) THEN
2791: debug_print('l_net_qty ' || l_net_qty);

Line 2808: , p_init_msg_lst => fnd_api.g_true

2804: l_quantity_type := inv_quantity_tree_pvt.g_qr_same_demand;
2805: --
2806: inv_quantity_tree_pvt.update_quantities(
2807: p_api_version_number => 1.0
2808: , p_init_msg_lst => fnd_api.g_true
2809: , x_return_status => l_return_status
2810: , x_msg_count => l_msg_count
2811: , x_msg_data => l_msg_data
2812: , p_tree_id => p_tree_id

Line 2836: IF l_return_status = fnd_api.g_ret_sts_error THEN

2832: , p_lpn_id => p_lpn_id
2833: );
2834:
2835: --
2836: IF l_return_status = fnd_api.g_ret_sts_error THEN
2837: RAISE fnd_api.g_exc_error;
2838: END IF;
2839:
2840: --

Line 2837: RAISE fnd_api.g_exc_error;

2833: );
2834:
2835: --
2836: IF l_return_status = fnd_api.g_ret_sts_error THEN
2837: RAISE fnd_api.g_exc_error;
2838: END IF;
2839:
2840: --
2841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2837: RAISE fnd_api.g_exc_error;
2838: END IF;
2839:
2840: --
2841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2842: RAISE fnd_api.g_exc_unexpected_error;
2843: END IF;
2844:
2845: --

Line 2842: RAISE fnd_api.g_exc_unexpected_error;

2838: END IF;
2839:
2840: --
2841: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2842: RAISE fnd_api.g_exc_unexpected_error;
2843: END IF;
2844:
2845: --
2846: x_qty_changed := l_net_qty;

Line 2852: WHEN fnd_api.g_exc_error THEN

2848: x_secondary_qty_changed := l_secondary_net_qty; -- INVCONV
2849: END IF; -- INVCONV
2850: x_return_status := l_return_status;
2851: EXCEPTION
2852: WHEN fnd_api.g_exc_error THEN
2853: x_return_status := fnd_api.g_ret_sts_error;
2854: --
2855: WHEN fnd_api.g_exc_unexpected_error THEN
2856: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2853: x_return_status := fnd_api.g_ret_sts_error;

2849: END IF; -- INVCONV
2850: x_return_status := l_return_status;
2851: EXCEPTION
2852: WHEN fnd_api.g_exc_error THEN
2853: x_return_status := fnd_api.g_ret_sts_error;
2854: --
2855: WHEN fnd_api.g_exc_unexpected_error THEN
2856: x_return_status := fnd_api.g_ret_sts_unexp_error;
2857: --

Line 2855: WHEN fnd_api.g_exc_unexpected_error THEN

2851: EXCEPTION
2852: WHEN fnd_api.g_exc_error THEN
2853: x_return_status := fnd_api.g_ret_sts_error;
2854: --
2855: WHEN fnd_api.g_exc_unexpected_error THEN
2856: x_return_status := fnd_api.g_ret_sts_unexp_error;
2857: --
2858: WHEN OTHERS THEN
2859: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2856: x_return_status := fnd_api.g_ret_sts_unexp_error;

2852: WHEN fnd_api.g_exc_error THEN
2853: x_return_status := fnd_api.g_ret_sts_error;
2854: --
2855: WHEN fnd_api.g_exc_unexpected_error THEN
2856: x_return_status := fnd_api.g_ret_sts_unexp_error;
2857: --
2858: WHEN OTHERS THEN
2859: x_return_status := fnd_api.g_ret_sts_unexp_error;
2860:

Line 2859: x_return_status := fnd_api.g_ret_sts_unexp_error;

2855: WHEN fnd_api.g_exc_unexpected_error THEN
2856: x_return_status := fnd_api.g_ret_sts_unexp_error;
2857: --
2858: WHEN OTHERS THEN
2859: x_return_status := fnd_api.g_ret_sts_unexp_error;
2860:
2861: --
2862: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2863: fnd_msg_pub.add_exc_msg(g_pkg_name, 'modify_tree_crt_del_rel');

Line 2900: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

2896: , p_to_revision_control IN BOOLEAN
2897: , p_to_lot_control IN BOOLEAN
2898: , p_action IN VARCHAR2
2899: , p_lot_divisible_flag IN VARCHAR2 -- INVCONV
2900: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
2901: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
2902: ) IS
2903:
2904: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 2901: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

2897: , p_to_lot_control IN BOOLEAN
2898: , p_action IN VARCHAR2
2899: , p_lot_divisible_flag IN VARCHAR2 -- INVCONV
2900: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
2901: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
2902: ) IS
2903:
2904: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2905: l_tmp_revision VARCHAR2(3);

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

2900: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
2901: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
2902: ) IS
2903:
2904: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2905: l_tmp_revision VARCHAR2(3);
2906: l_tmp_lot_number VARCHAR2(80); -- BUG 4180127
2907: l_net_qty1 NUMBER;
2908: l_secondary_net_qty1 NUMBER; -- INVCONV

Line 2973: , p_init_msg_lst => fnd_api.g_true

2969: IF p_from_supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
2970: -- INVCONV - Incorporate secondaries
2971: inv_quantity_tree_pvt.update_quantities(
2972: p_api_version_number => 1.0
2973: , p_init_msg_lst => fnd_api.g_true
2974: , x_return_status => l_return_status
2975: , x_msg_count => l_msg_count
2976: , x_msg_data => l_msg_data
2977: , p_tree_id => p_from_tree_id

Line 3001: IF l_return_status = fnd_api.g_ret_sts_error THEN

2997: , p_lpn_id => p_from_lpn_id
2998: );
2999:
3000: --
3001: IF l_return_status = fnd_api.g_ret_sts_error THEN
3002: RAISE fnd_api.g_exc_error;
3003: END IF;
3004:
3005: --

Line 3002: RAISE fnd_api.g_exc_error;

2998: );
2999:
3000: --
3001: IF l_return_status = fnd_api.g_ret_sts_error THEN
3002: RAISE fnd_api.g_exc_error;
3003: END IF;
3004:
3005: --
3006: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3006: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3002: RAISE fnd_api.g_exc_error;
3003: END IF;
3004:
3005: --
3006: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3007: RAISE fnd_api.g_exc_unexpected_error;
3008: END IF;
3009:
3010: --

Line 3007: RAISE fnd_api.g_exc_unexpected_error;

3003: END IF;
3004:
3005: --
3006: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3007: RAISE fnd_api.g_exc_unexpected_error;
3008: END IF;
3009:
3010: --
3011: l_modify_tree1 := TRUE;

Line 3045: , p_init_msg_lst => fnd_api.g_true

3041: --
3042: -- INVCONV - Incorporate secondaries into call
3043: inv_quantity_tree_pvt.update_quantities(
3044: p_api_version_number => 1.0
3045: , p_init_msg_lst => fnd_api.g_true
3046: , x_return_status => l_return_status
3047: , x_msg_count => l_msg_count
3048: , x_msg_data => l_msg_data
3049: , p_tree_id => p_to_tree_id

Line 3073: IF l_return_status = fnd_api.g_ret_sts_error THEN

3069: , p_lpn_id => p_from_lpn_id
3070: );
3071:
3072: --
3073: IF l_return_status = fnd_api.g_ret_sts_error THEN
3074: -- fail to modify in tree2
3075: -- undo the modification in tree1
3076: -- INVCONV - Incorporate secondaries into call
3077: inv_quantity_tree_pvt.update_quantities(

Line 3079: , p_init_msg_lst => fnd_api.g_true

3075: -- undo the modification in tree1
3076: -- INVCONV - Incorporate secondaries into call
3077: inv_quantity_tree_pvt.update_quantities(
3078: p_api_version_number => 1.0
3079: , p_init_msg_lst => fnd_api.g_true
3080: , x_return_status => l_return_status
3081: , x_msg_count => l_msg_count
3082: , x_msg_data => l_msg_data
3083: , p_tree_id => p_from_tree_id

Line 3106: IF l_return_status = fnd_api.g_ret_sts_error THEN

3102: , x_satr => l_satr
3103: , p_lpn_id => p_from_lpn_id
3104: );
3105:
3106: IF l_return_status = fnd_api.g_ret_sts_error THEN
3107: -- can not add the reservation back on the tree
3108: -- panic
3109: RAISE fnd_api.g_exc_unexpected_error;
3110: END IF;

Line 3109: RAISE fnd_api.g_exc_unexpected_error;

3105:
3106: IF l_return_status = fnd_api.g_ret_sts_error THEN
3107: -- can not add the reservation back on the tree
3108: -- panic
3109: RAISE fnd_api.g_exc_unexpected_error;
3110: END IF;
3111:
3112: --
3113: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3113: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3109: RAISE fnd_api.g_exc_unexpected_error;
3110: END IF;
3111:
3112: --
3113: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3114: RAISE fnd_api.g_exc_unexpected_error;
3115: END IF;
3116:
3117: --

Line 3114: RAISE fnd_api.g_exc_unexpected_error;

3110: END IF;
3111:
3112: --
3113: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3114: RAISE fnd_api.g_exc_unexpected_error;
3115: END IF;
3116:
3117: --
3118: -- recover the quantity tree1 correctly, but

Line 3120: RAISE fnd_api.g_exc_error;

3116:
3117: --
3118: -- recover the quantity tree1 correctly, but
3119: -- since we failed to modify the tree, raise expected error
3120: RAISE fnd_api.g_exc_error;
3121: END IF;
3122:
3123: --
3124: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3124: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3120: RAISE fnd_api.g_exc_error;
3121: END IF;
3122:
3123: --
3124: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3125: RAISE fnd_api.g_exc_unexpected_error;
3126: END IF;
3127: END IF;
3128: --Start changes for Bug Number#3336837

Line 3125: RAISE fnd_api.g_exc_unexpected_error;

3121: END IF;
3122:
3123: --
3124: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3125: RAISE fnd_api.g_exc_unexpected_error;
3126: END IF;
3127: END IF;
3128: --Start changes for Bug Number#3336837
3129: -- Bug Number 3447373 Removed the qty validation for transfers

Line 3139: , p_init_msg_lst => fnd_api.g_true

3135:
3136: -- INVCONV - Incorporate secondaries into call
3137: inv_quantity_tree_pvt.query_tree(
3138: p_api_version_number => 1.0
3139: , p_init_msg_lst => fnd_api.g_true
3140: , x_return_status => l_return_status
3141: , x_msg_count => l_msg_count
3142: , x_msg_data => l_msg_data
3143: , p_tree_id => p_from_tree_id

Line 3163: IF l_return_status = fnd_api.g_ret_sts_error THEN

3159: , x_satr => l_satr
3160: , p_lpn_id => p_from_lpn_id
3161: );
3162:
3163: IF l_return_status = fnd_api.g_ret_sts_error THEN
3164: RAISE fnd_api.g_exc_unexpected_error;
3165: END IF;
3166:
3167: --

Line 3164: RAISE fnd_api.g_exc_unexpected_error;

3160: , p_lpn_id => p_from_lpn_id
3161: );
3162:
3163: IF l_return_status = fnd_api.g_ret_sts_error THEN
3164: RAISE fnd_api.g_exc_unexpected_error;
3165: END IF;
3166:
3167: --
3168: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3168: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3164: RAISE fnd_api.g_exc_unexpected_error;
3165: END IF;
3166:
3167: --
3168: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3169: RAISE fnd_api.g_exc_unexpected_error;
3170: END IF;
3171:
3172: -- INVCONV BEGIN - lot indivisible quantities must be fully consumed

Line 3169: RAISE fnd_api.g_exc_unexpected_error;

3165: END IF;
3166:
3167: --
3168: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3169: RAISE fnd_api.g_exc_unexpected_error;
3170: END IF;
3171:
3172: -- INVCONV BEGIN - lot indivisible quantities must be fully consumed
3173: IF p_lot_divisible_flag = 'N' THEN

Line 3180: RAISE fnd_api.g_exc_error;

3176: END IF;
3177: IF l_atr > l_net_qty2 THEN
3178: fnd_message.set_name('INV', 'INV_LOT_INDIVISIBLE_VIOLATION');
3179: fnd_msg_pub.ADD;
3180: RAISE fnd_api.g_exc_error;
3181: END IF;
3182: END IF;
3183: -- INVCONV END
3184:

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

3191: END IF;
3192:
3193: -- Bug 6141096: Fail the reservation if available to reserve(ATR) is less than or equal to zero, even if the
3194: -- the partial reservation flag is set to true.
3195: IF ( p_partial_reservation_flag = fnd_api.g_true AND l_net_qty2 > l_atr AND l_atr > 0)THEN -- Bug 6141096
3196: l_net_qty2 := l_atr;
3197: x_quantity_reserved := l_net_qty2;
3198:
3199: IF l_dual_control THEN -- INVCONV

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

3200: l_secondary_net_qty2 := l_satr; -- INVCONV
3201: x_secondary_quantity_reserved := l_secondary_net_qty2; -- INVCONV
3202: END IF; -- INVCONV
3203: ELSIF ( l_net_qty2 > l_atr
3204: AND (p_partial_reservation_flag <> fnd_api.g_true OR l_atr <= 0) -- Bug 6141096
3205: AND p_action='UPDATE'
3206: AND p_check_availability = fnd_api.g_true )THEN
3207: --rollback quantity tree changes .
3208: IF l_modify_tree1 THEN

Line 3206: AND p_check_availability = fnd_api.g_true )THEN

3202: END IF; -- INVCONV
3203: ELSIF ( l_net_qty2 > l_atr
3204: AND (p_partial_reservation_flag <> fnd_api.g_true OR l_atr <= 0) -- Bug 6141096
3205: AND p_action='UPDATE'
3206: AND p_check_availability = fnd_api.g_true )THEN
3207: --rollback quantity tree changes .
3208: IF l_modify_tree1 THEN
3209: -- INVCONV Incorporate secondaries
3210: inv_quantity_tree_pvt.update_quantities(

Line 3212: , p_init_msg_lst => fnd_api.g_true

3208: IF l_modify_tree1 THEN
3209: -- INVCONV Incorporate secondaries
3210: inv_quantity_tree_pvt.update_quantities(
3211: p_api_version_number => 1.0
3212: , p_init_msg_lst => fnd_api.g_true
3213: , x_return_status => l_return_status
3214: , x_msg_count => l_msg_count
3215: , x_msg_data => l_msg_data
3216: , p_tree_id => p_from_tree_id

Line 3242: IF l_return_status = fnd_api.g_ret_sts_error THEN

3238: IF (l_debug = 1) THEN
3239: debug_print('return status from Rollback Tree1 changes '||l_return_status);
3240: END IF;
3241:
3242: IF l_return_status = fnd_api.g_ret_sts_error THEN
3243: -- can not add the reservation back on the tree
3244: -- panic
3245: RAISE fnd_api.g_exc_unexpected_error;
3246: END IF;

Line 3245: RAISE fnd_api.g_exc_unexpected_error;

3241:
3242: IF l_return_status = fnd_api.g_ret_sts_error THEN
3243: -- can not add the reservation back on the tree
3244: -- panic
3245: RAISE fnd_api.g_exc_unexpected_error;
3246: END IF;
3247:
3248: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3249: RAISE fnd_api.g_exc_unexpected_error;

Line 3248: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3244: -- panic
3245: RAISE fnd_api.g_exc_unexpected_error;
3246: END IF;
3247:
3248: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3249: RAISE fnd_api.g_exc_unexpected_error;
3250: END IF;
3251: END IF;
3252:

Line 3249: RAISE fnd_api.g_exc_unexpected_error;

3245: RAISE fnd_api.g_exc_unexpected_error;
3246: END IF;
3247:
3248: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3249: RAISE fnd_api.g_exc_unexpected_error;
3250: END IF;
3251: END IF;
3252:
3253:

Line 3256: RAISE fnd_api.g_exc_error;

3252:
3253:
3254: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
3255: fnd_msg_pub.ADD;
3256: RAISE fnd_api.g_exc_error;
3257: END IF;
3258: --Changed for Qty validation. Bug 3336837
3259:
3260: --

Line 3269: , p_init_msg_lst => fnd_api.g_true

3265:
3266: -- INVCONV Incorporate Secondaries in call
3267: inv_quantity_tree_pvt.update_quantities(
3268: p_api_version_number => 1.0
3269: , p_init_msg_lst => fnd_api.g_true
3270: , x_return_status => l_return_status
3271: , x_msg_count => l_msg_count
3272: , x_msg_data => l_msg_data
3273: , p_tree_id => p_from_tree_id

Line 3296: IF l_return_status = fnd_api.g_ret_sts_success

3292: , x_satr => l_satr
3293: , p_lpn_id => p_from_lpn_id
3294: );
3295:
3296: IF l_return_status = fnd_api.g_ret_sts_success
3297: AND l_modify_tree2 THEN
3298:
3299: -- INVCONV Incorporate Secondaries in call
3300: inv_quantity_tree_pvt.update_quantities(

Line 3302: , p_init_msg_lst => fnd_api.g_true

3298:
3299: -- INVCONV Incorporate Secondaries in call
3300: inv_quantity_tree_pvt.update_quantities(
3301: p_api_version_number => 1.0
3302: , p_init_msg_lst => fnd_api.g_true
3303: , x_return_status => l_return_status
3304: , x_msg_count => l_msg_count
3305: , x_msg_data => l_msg_data
3306: , p_tree_id => p_to_tree_id

Line 3330: IF l_return_status = fnd_api.g_ret_sts_error THEN

3326: , p_lpn_id => p_to_lpn_id
3327: );
3328: END IF;
3329:
3330: IF l_return_status = fnd_api.g_ret_sts_error THEN
3331: -- fail to modify in tree2
3332: -- undo the modification in tree1 if l_modify_tree1 is true
3333: IF l_modify_tree1 THEN
3334: -- INVCONV - Incorporate secondaries

Line 3337: , p_init_msg_lst => fnd_api.g_true

3333: IF l_modify_tree1 THEN
3334: -- INVCONV - Incorporate secondaries
3335: inv_quantity_tree_pvt.update_quantities(
3336: p_api_version_number => 1.0
3337: , p_init_msg_lst => fnd_api.g_true
3338: , x_return_status => l_return_status
3339: , x_msg_count => l_msg_count
3340: , x_msg_data => l_msg_data
3341: , p_tree_id => p_from_tree_id

Line 3364: IF l_return_status = fnd_api.g_ret_sts_error THEN

3360: , x_satr => l_satr
3361: , p_lpn_id => p_from_lpn_id
3362: );
3363:
3364: IF l_return_status = fnd_api.g_ret_sts_error THEN
3365: -- can not add the reservation back on the tree
3366: -- panic
3367: RAISE fnd_api.g_exc_unexpected_error;
3368: END IF;

Line 3367: RAISE fnd_api.g_exc_unexpected_error;

3363:
3364: IF l_return_status = fnd_api.g_ret_sts_error THEN
3365: -- can not add the reservation back on the tree
3366: -- panic
3367: RAISE fnd_api.g_exc_unexpected_error;
3368: END IF;
3369:
3370: --
3371: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3371: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3367: RAISE fnd_api.g_exc_unexpected_error;
3368: END IF;
3369:
3370: --
3371: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3372: RAISE fnd_api.g_exc_unexpected_error;
3373: END IF;
3374:
3375: --

Line 3372: RAISE fnd_api.g_exc_unexpected_error;

3368: END IF;
3369:
3370: --
3371: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3372: RAISE fnd_api.g_exc_unexpected_error;
3373: END IF;
3374:
3375: --
3376: IF l_modify_tree2 THEN

Line 3380: , p_init_msg_lst => fnd_api.g_true

3376: IF l_modify_tree2 THEN
3377: -- INVCONV - Incorporate secondaries
3378: inv_quantity_tree_pvt.update_quantities(
3379: p_api_version_number => 1.0
3380: , p_init_msg_lst => fnd_api.g_true
3381: , x_return_status => l_return_status
3382: , x_msg_count => l_msg_count
3383: , x_msg_data => l_msg_data
3384: , p_tree_id => p_to_tree_id

Line 3407: IF l_return_status = fnd_api.g_ret_sts_error THEN

3403: , x_satr => l_satr
3404: , p_lpn_id => p_from_lpn_id
3405: );
3406:
3407: IF l_return_status = fnd_api.g_ret_sts_error THEN
3408: -- can not add the reservation back on the tree
3409: -- panic
3410: RAISE fnd_api.g_exc_unexpected_error;
3411: END IF;

Line 3410: RAISE fnd_api.g_exc_unexpected_error;

3406:
3407: IF l_return_status = fnd_api.g_ret_sts_error THEN
3408: -- can not add the reservation back on the tree
3409: -- panic
3410: RAISE fnd_api.g_exc_unexpected_error;
3411: END IF;
3412:
3413: --
3414: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3414: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3410: RAISE fnd_api.g_exc_unexpected_error;
3411: END IF;
3412:
3413: --
3414: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3415: RAISE fnd_api.g_exc_unexpected_error;
3416: END IF;
3417: END IF;
3418:

Line 3415: RAISE fnd_api.g_exc_unexpected_error;

3411: END IF;
3412:
3413: --
3414: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3415: RAISE fnd_api.g_exc_unexpected_error;
3416: END IF;
3417: END IF;
3418:
3419: -- recover the quantity tree1 correctly, but

Line 3421: RAISE fnd_api.g_exc_error;

3417: END IF;
3418:
3419: -- recover the quantity tree1 correctly, but
3420: -- since we failed to modify the tree, raise expected error
3421: RAISE fnd_api.g_exc_error;
3422: END IF;
3423:
3424: --
3425: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3425: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3421: RAISE fnd_api.g_exc_error;
3422: END IF;
3423:
3424: --
3425: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3426: RAISE fnd_api.g_exc_unexpected_error;
3427: END IF;
3428: END IF;
3429:

Line 3426: RAISE fnd_api.g_exc_unexpected_error;

3422: END IF;
3423:
3424: --
3425: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3426: RAISE fnd_api.g_exc_unexpected_error;
3427: END IF;
3428: END IF;
3429:
3430: x_return_status := l_return_status;

Line 3439: WHEN fnd_api.g_exc_error THEN

3435: END IF; -- INVCONV
3436:
3437: --
3438: EXCEPTION
3439: WHEN fnd_api.g_exc_error THEN
3440: x_return_status := fnd_api.g_ret_sts_error;
3441: --
3442: WHEN fnd_api.g_exc_unexpected_error THEN
3443: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3440: x_return_status := fnd_api.g_ret_sts_error;

3436:
3437: --
3438: EXCEPTION
3439: WHEN fnd_api.g_exc_error THEN
3440: x_return_status := fnd_api.g_ret_sts_error;
3441: --
3442: WHEN fnd_api.g_exc_unexpected_error THEN
3443: x_return_status := fnd_api.g_ret_sts_unexp_error;
3444: --

Line 3442: WHEN fnd_api.g_exc_unexpected_error THEN

3438: EXCEPTION
3439: WHEN fnd_api.g_exc_error THEN
3440: x_return_status := fnd_api.g_ret_sts_error;
3441: --
3442: WHEN fnd_api.g_exc_unexpected_error THEN
3443: x_return_status := fnd_api.g_ret_sts_unexp_error;
3444: --
3445: WHEN OTHERS THEN
3446: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3443: x_return_status := fnd_api.g_ret_sts_unexp_error;

3439: WHEN fnd_api.g_exc_error THEN
3440: x_return_status := fnd_api.g_ret_sts_error;
3441: --
3442: WHEN fnd_api.g_exc_unexpected_error THEN
3443: x_return_status := fnd_api.g_ret_sts_unexp_error;
3444: --
3445: WHEN OTHERS THEN
3446: x_return_status := fnd_api.g_ret_sts_unexp_error;
3447:

Line 3446: x_return_status := fnd_api.g_ret_sts_unexp_error;

3442: WHEN fnd_api.g_exc_unexpected_error THEN
3443: x_return_status := fnd_api.g_ret_sts_unexp_error;
3444: --
3445: WHEN OTHERS THEN
3446: x_return_status := fnd_api.g_ret_sts_unexp_error;
3447:
3448: --
3449: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3450: fnd_msg_pub.add_exc_msg(g_pkg_name, 'modify_tree_for_update_xfer');

Line 3462: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

3458: -- This procedure returns all reservations that satisfy the user
3459: -- specified criteria.
3460: PROCEDURE query_reservation(
3461: p_api_version_number IN NUMBER
3462: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
3463: , x_return_status OUT NOCOPY VARCHAR2
3464: , x_msg_count OUT NOCOPY NUMBER
3465: , x_msg_data OUT NOCOPY VARCHAR2
3466: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 3467: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

3463: , x_return_status OUT NOCOPY VARCHAR2
3464: , x_msg_count OUT NOCOPY NUMBER
3465: , x_msg_data OUT NOCOPY VARCHAR2
3466: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
3467: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
3468: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
3469: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
3470: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type
3471: , x_mtl_reservation_tbl_count OUT NOCOPY NUMBER

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

3472: , x_error_code OUT NOCOPY NUMBER
3473: ) IS
3474: l_api_version_number CONSTANT NUMBER := 1.0;
3475: l_api_name CONSTANT VARCHAR2(30) := 'Query_Reservation';
3476: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3477: l_counter INTEGER;
3478: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
3479: l_sort_stmt VARCHAR2(2000);
3480: l_lock_stmt VARCHAR2(60);

Line 3484: l_miss_num NUMBER := fnd_api.g_miss_num;

3480: l_lock_stmt VARCHAR2(60);
3481: -- Bug 4881317
3482: l_qry_stmt VARCHAR2(15000);
3483: l_cursor_ref query_cur_ref_type;
3484: l_miss_num NUMBER := fnd_api.g_miss_num;
3485: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3486: l_miss_date DATE := fnd_api.g_miss_date;
3487: l_update BOOLEAN := FALSE;
3488: l_sort_default BOOLEAN := FALSE;

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

3481: -- Bug 4881317
3482: l_qry_stmt VARCHAR2(15000);
3483: l_cursor_ref query_cur_ref_type;
3484: l_miss_num NUMBER := fnd_api.g_miss_num;
3485: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3486: l_miss_date DATE := fnd_api.g_miss_date;
3487: l_update BOOLEAN := FALSE;
3488: l_sort_default BOOLEAN := FALSE;
3489: l_res_cursor BOOLEAN := FALSE;

Line 3486: l_miss_date DATE := fnd_api.g_miss_date;

3482: l_qry_stmt VARCHAR2(15000);
3483: l_cursor_ref query_cur_ref_type;
3484: l_miss_num NUMBER := fnd_api.g_miss_num;
3485: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
3486: l_miss_date DATE := fnd_api.g_miss_date;
3487: l_update BOOLEAN := FALSE;
3488: l_sort_default BOOLEAN := FALSE;
3489: l_res_cursor BOOLEAN := FALSE;
3490: l_demand_cursor BOOLEAN := FALSE;

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

4375: debug_print('Inside Query reservations...');
4376: END IF;
4377:
4378: -- Standard call to check for call compatibility
4379: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
4380: RAISE fnd_api.g_exc_unexpected_error;
4381: END IF;
4382:
4383: --

Line 4380: RAISE fnd_api.g_exc_unexpected_error;

4376: END IF;
4377:
4378: -- Standard call to check for call compatibility
4379: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
4380: RAISE fnd_api.g_exc_unexpected_error;
4381: END IF;
4382:
4383: --
4384: -- Initialize message list.

Line 4385: IF fnd_api.to_boolean(p_init_msg_lst) THEN

4381: END IF;
4382:
4383: --
4384: -- Initialize message list.
4385: IF fnd_api.to_boolean(p_init_msg_lst) THEN
4386: fnd_msg_pub.initialize;
4387: END IF;
4388:
4389: --

Line 4397: IF p_lock_records = fnd_api.g_true THEN

4393: debug_print('p_cancel_order_mode: ' || p_cancel_order_mode);
4394: END IF;
4395:
4396:
4397: IF p_lock_records = fnd_api.g_true THEN
4398: l_lock_stmt := ' FOR UPDATE NOWAIT';
4399: l_update := TRUE;
4400: END IF;
4401:

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

4452: debug_print('l_update is false ');
4453: END IF;
4454: END IF;
4455:
4456: IF p_query_input.reservation_id <> fnd_api.g_miss_num
4457: AND p_query_input.reservation_id IS NOT NULL THEN
4458: IF (l_debug = 1) then
4459: debug_print(' Inside ref cursor for reservation id');
4460: END IF;

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

4559: :reservation_id = reservation_id '
4560: || l_lock_stmt
4561: || l_sort_stmt USING p_query_input.reservation_id;
4562: END IF;
4563: ELSIF p_query_input.demand_source_line_id <> fnd_api.g_miss_num
4564: AND p_query_input.demand_source_line_id IS NOT NULL THEN
4565: IF (l_debug = 1) then
4566: debug_print(' Inside ref cursor for demand');
4567: END IF;

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

5215:
5216: /***** End R12 ***/
5217: ;
5218: END IF;
5219: ELSIF p_query_input.inventory_item_id <> fnd_api.g_miss_num
5220: AND p_query_input.inventory_item_id IS NOT NULL
5221: AND p_query_input.organization_id <> fnd_api.g_miss_num
5222: AND p_query_input.organization_id IS NOT NULL THEN
5223: IF (l_debug = 1) then

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

5217: ;
5218: END IF;
5219: ELSIF p_query_input.inventory_item_id <> fnd_api.g_miss_num
5220: AND p_query_input.inventory_item_id IS NOT NULL
5221: AND p_query_input.organization_id <> fnd_api.g_miss_num
5222: AND p_query_input.organization_id IS NOT NULL THEN
5223: IF (l_debug = 1) then
5224: debug_print (' Inside ref cursor for item/org');
5225: END IF;

Line 5851: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num

5847: /***** End R12 ***/
5848: ;
5849:
5850: -- kkoothan Added the following ELSE IF section as part of Bug Fix:2783806
5851: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num
5852: AND p_query_input.supply_source_header_id IS NOT NULL
5853: -- Bug 4881317 checking these conditions later
5854: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
5855: -- AND p_query_input.supply_source_line_id IS NOT NULL

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

5850: -- kkoothan Added the following ELSE IF section as part of Bug Fix:2783806
5851: ELSIF p_query_input.supply_source_header_id < fnd_api.g_miss_num
5852: AND p_query_input.supply_source_header_id IS NOT NULL
5853: -- Bug 4881317 checking these conditions later
5854: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
5855: -- AND p_query_input.supply_source_line_id IS NOT NULL
5856: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num
5857: AND p_query_input.supply_source_type_id IS NOT NULL THEN
5858: IF (l_debug = 1) then

Line 5856: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num

5852: AND p_query_input.supply_source_header_id IS NOT NULL
5853: -- Bug 4881317 checking these conditions later
5854: -- AND p_query_input.supply_source_line_id < fnd_api.g_miss_num
5855: -- AND p_query_input.supply_source_line_id IS NOT NULL
5856: AND p_query_input.supply_source_type_id < fnd_api.g_miss_num
5857: AND p_query_input.supply_source_type_id IS NOT NULL THEN
5858: IF (l_debug = 1) then
5859: debug_print(' Inside ref cursor for supply');
5860: END IF;

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

6253: ';
6254: /***** End R12 ***/
6255:
6256: --Bug 4881317 If supply_source_line_id is passed, append the condition to the query
6257: If ( p_query_input.supply_source_line_id < fnd_api.g_miss_num
6258: AND p_query_input.supply_source_line_id IS NOT NULL )
6259: THEN
6260: OPEN l_cursor_ref FOR l_qry_stmt
6261: || 'AND supply_source_line_id = :supply_source_line_id

Line 7412: WHEN fnd_api.g_exc_error THEN

7408: x_return_status := l_return_status;
7409: x_error_code := inv_reservation_global.g_err_no_error;
7410: --
7411: EXCEPTION
7412: WHEN fnd_api.g_exc_error THEN
7413: x_return_status := fnd_api.g_ret_sts_error;
7414: -- Get message count and data
7415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7416: WHEN fnd_api.g_exc_unexpected_error THEN

Line 7413: x_return_status := fnd_api.g_ret_sts_error;

7409: x_error_code := inv_reservation_global.g_err_no_error;
7410: --
7411: EXCEPTION
7412: WHEN fnd_api.g_exc_error THEN
7413: x_return_status := fnd_api.g_ret_sts_error;
7414: -- Get message count and data
7415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7416: WHEN fnd_api.g_exc_unexpected_error THEN
7417: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 7416: WHEN fnd_api.g_exc_unexpected_error THEN

7412: WHEN fnd_api.g_exc_error THEN
7413: x_return_status := fnd_api.g_ret_sts_error;
7414: -- Get message count and data
7415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7416: WHEN fnd_api.g_exc_unexpected_error THEN
7417: x_return_status := fnd_api.g_ret_sts_unexp_error;
7418: -- Get message count and data
7419: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7420: WHEN OTHERS THEN

Line 7417: x_return_status := fnd_api.g_ret_sts_unexp_error;

7413: x_return_status := fnd_api.g_ret_sts_error;
7414: -- Get message count and data
7415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7416: WHEN fnd_api.g_exc_unexpected_error THEN
7417: x_return_status := fnd_api.g_ret_sts_unexp_error;
7418: -- Get message count and data
7419: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7420: WHEN OTHERS THEN
7421: IF SQLCODE = -54 THEN -- failed to lock

Line 7422: x_return_status := fnd_api.g_ret_sts_error;

7418: -- Get message count and data
7419: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7420: WHEN OTHERS THEN
7421: IF SQLCODE = -54 THEN -- failed to lock
7422: x_return_status := fnd_api.g_ret_sts_error;
7423: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7424: ELSE
7425: x_return_status := fnd_api.g_ret_sts_unexp_error;
7426:

Line 7425: x_return_status := fnd_api.g_ret_sts_unexp_error;

7421: IF SQLCODE = -54 THEN -- failed to lock
7422: x_return_status := fnd_api.g_ret_sts_error;
7423: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7424: ELSE
7425: x_return_status := fnd_api.g_ret_sts_unexp_error;
7426:
7427: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7428: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
7429: END IF;

Line 7443: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

7439:
7440: PROCEDURE query_reservation
7441: (
7442: p_api_version_number IN NUMBER
7443: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
7444: , x_return_status OUT NOCOPY VARCHAR2
7445: , x_msg_count OUT NOCOPY NUMBER
7446: , x_msg_data OUT NOCOPY VARCHAR2
7447: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 7448: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

7444: , x_return_status OUT NOCOPY VARCHAR2
7445: , x_msg_count OUT NOCOPY NUMBER
7446: , x_msg_data OUT NOCOPY VARCHAR2
7447: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
7448: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
7449: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
7450: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
7451: , p_serial_number_table IN inv_reservation_global.rsv_serial_number_table
7452: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type

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

7461: l_serial_table_index BINARY_INTEGER;
7462: l_output_index BINARY_INTEGER;
7463: l_reservation_index BINARY_INTEGER;
7464: l_reservation_id NUMBER;
7465: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
7466: l_debug NUMBER;
7467: l_serial_number varchar2(30);
7468: l_mtl_reservation_tbl
7469: inv_reservation_global.mtl_reservation_tbl_type;

Line 7497: p_init_msg_lst => fnd_api.g_false,

7493: -- First call the query reservations to get all the reservation
7494: -- records.
7495: inv_reservation_pvt.query_reservation
7496: (p_api_version_number => 1.0,
7497: p_init_msg_lst => fnd_api.g_false,
7498: x_return_status => l_return_status,
7499: x_msg_count => x_msg_count,
7500: x_msg_data => x_msg_data,
7501: p_query_input => l_rsv_rec,

Line 7502: p_lock_records => fnd_api.g_true,

7498: x_return_status => l_return_status,
7499: x_msg_count => x_msg_count,
7500: x_msg_data => x_msg_data,
7501: p_query_input => l_rsv_rec,
7502: p_lock_records => fnd_api.g_true,
7503: p_sort_by_req_date => p_sort_by_req_date,
7504: x_mtl_reservation_tbl => l_mtl_reservation_tbl,
7505: x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count,
7506: x_error_code => l_error_code

Line 7515: IF l_return_status = fnd_api.g_ret_sts_error THEN

7511: END IF;
7512:
7513: l_progress := 80;
7514:
7515: IF l_return_status = fnd_api.g_ret_sts_error THEN
7516:
7517: IF l_debug=1 THEN
7518: debug_print('Raising expected error'||l_return_status);
7519: END IF;

Line 7520: RAISE fnd_api.g_exc_error;

7516:
7517: IF l_debug=1 THEN
7518: debug_print('Raising expected error'||l_return_status);
7519: END IF;
7520: RAISE fnd_api.g_exc_error;
7521:
7522: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7523:
7524: IF l_debug=1 THEN

Line 7522: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7518: debug_print('Raising expected error'||l_return_status);
7519: END IF;
7520: RAISE fnd_api.g_exc_error;
7521:
7522: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7523:
7524: IF l_debug=1 THEN
7525: debug_print('Rasing Unexpected error'||l_return_status);
7526: END IF;

Line 7527: RAISE fnd_api.g_exc_unexpected_error;

7523:
7524: IF l_debug=1 THEN
7525: debug_print('Rasing Unexpected error'||l_return_status);
7526: END IF;
7527: RAISE fnd_api.g_exc_unexpected_error;
7528:
7529: END IF;
7530:
7531: IF (l_debug=1) THEN

Line 7616: WHEN fnd_api.g_exc_error THEN

7612: x_serial_number_table := l_serial_number_table;
7613: x_serial_number_table_count := l_serial_number_table.COUNT;
7614:
7615: EXCEPTION
7616: WHEN fnd_api.g_exc_error THEN
7617: x_return_status := fnd_api.g_ret_sts_error;
7618: -- Get message count and data
7619: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7620: WHEN fnd_api.g_exc_unexpected_error THEN

Line 7617: x_return_status := fnd_api.g_ret_sts_error;

7613: x_serial_number_table_count := l_serial_number_table.COUNT;
7614:
7615: EXCEPTION
7616: WHEN fnd_api.g_exc_error THEN
7617: x_return_status := fnd_api.g_ret_sts_error;
7618: -- Get message count and data
7619: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7620: WHEN fnd_api.g_exc_unexpected_error THEN
7621: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 7620: WHEN fnd_api.g_exc_unexpected_error THEN

7616: WHEN fnd_api.g_exc_error THEN
7617: x_return_status := fnd_api.g_ret_sts_error;
7618: -- Get message count and data
7619: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7620: WHEN fnd_api.g_exc_unexpected_error THEN
7621: x_return_status := fnd_api.g_ret_sts_unexp_error;
7622: -- Get message count and data
7623: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7624: WHEN OTHERS THEN

Line 7621: x_return_status := fnd_api.g_ret_sts_unexp_error;

7617: x_return_status := fnd_api.g_ret_sts_error;
7618: -- Get message count and data
7619: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7620: WHEN fnd_api.g_exc_unexpected_error THEN
7621: x_return_status := fnd_api.g_ret_sts_unexp_error;
7622: -- Get message count and data
7623: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7624: WHEN OTHERS THEN
7625: IF SQLCODE = -54 THEN -- failed to lock

Line 7626: x_return_status := fnd_api.g_ret_sts_error;

7622: -- Get message count and data
7623: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7624: WHEN OTHERS THEN
7625: IF SQLCODE = -54 THEN -- failed to lock
7626: x_return_status := fnd_api.g_ret_sts_error;
7627: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7628: ELSE
7629: x_return_status := fnd_api.g_ret_sts_unexp_error;
7630:

Line 7629: x_return_status := fnd_api.g_ret_sts_unexp_error;

7625: IF SQLCODE = -54 THEN -- failed to lock
7626: x_return_status := fnd_api.g_ret_sts_error;
7627: x_error_code := inv_reservation_global.g_err_fail_to_lock_rec;
7628: ELSE
7629: x_return_status := fnd_api.g_ret_sts_unexp_error;
7630:
7631: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7632: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
7633: END IF;

Line 7645: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

7641: --
7642: PROCEDURE create_reservation
7643: (
7644: p_api_version_number IN NUMBER
7645: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
7646: , x_return_status OUT NOCOPY VARCHAR2
7647: , x_msg_count OUT NOCOPY NUMBER
7648: , x_msg_data OUT NOCOPY VARCHAR2
7649: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 7652: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

7648: , x_msg_data OUT NOCOPY VARCHAR2
7649: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
7650: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
7651: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
7652: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7653: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7654: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
7655: , p_over_reservation_flag IN NUMBER DEFAULT 0
7656: , x_quantity_reserved OUT NOCOPY NUMBER

Line 7653: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

7649: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
7650: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
7651: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
7652: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7653: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7654: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
7655: , p_over_reservation_flag IN NUMBER DEFAULT 0
7656: , x_quantity_reserved OUT NOCOPY NUMBER
7657: , x_secondary_quantity_reserved OUT NOCOPY NUMBER

Line 7654: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

7650: , p_serial_number IN inv_reservation_global.serial_number_tbl_type
7651: , x_serial_number OUT NOCOPY inv_reservation_global.serial_number_tbl_type
7652: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7653: , p_force_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
7654: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
7655: , p_over_reservation_flag IN NUMBER DEFAULT 0
7656: , x_quantity_reserved OUT NOCOPY NUMBER
7657: , x_secondary_quantity_reserved OUT NOCOPY NUMBER
7658: -- INVCONV

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

7663: , p_substitute_flag IN BOOLEAN DEFAULT FALSE /* Bug 6044651 */
7664: ) IS
7665: l_api_version_number CONSTANT NUMBER := 1.0;
7666: l_api_name CONSTANT VARCHAR2(30) := 'Create_Reservation';
7667: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
7668: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
7669: l_actual_primary_quantity NUMBER := NULL;
7670: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
7671: l_tmp_rsv_tbl_count NUMBER;

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

7747: END IF;
7748:
7749: --
7750: -- Standard call to check for call compatibility
7751: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
7752: RAISE fnd_api.g_exc_unexpected_error;
7753: END IF;
7754:
7755: --

Line 7752: RAISE fnd_api.g_exc_unexpected_error;

7748:
7749: --
7750: -- Standard call to check for call compatibility
7751: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
7752: RAISE fnd_api.g_exc_unexpected_error;
7753: END IF;
7754:
7755: --
7756: -- Initialize message list.

Line 7757: IF fnd_api.to_boolean(p_init_msg_lst) THEN

7753: END IF;
7754:
7755: --
7756: -- Initialize message list.
7757: IF fnd_api.to_boolean(p_init_msg_lst) THEN
7758: fnd_msg_pub.initialize;
7759: END IF;
7760:
7761: /**** {{ R12 Enhanced reservations code changes.Initializing orig parameters }}****/

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

7765: l_rsv_rec := p_rsv_rec;
7766:
7767: -- Set the original columns to g_miss_xxx as the user should not be
7768: -- setting these values. Do not query by them
7769: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

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

7766:
7767: -- Set the original columns to g_miss_xxx as the user should not be
7768: -- setting these values. Do not query by them
7769: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

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

7767: -- Set the original columns to g_miss_xxx as the user should not be
7768: -- setting these values. Do not query by them
7769: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

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

7768: -- setting these values. Do not query by them
7769: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

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

7769: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
7777:

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

7770: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
7777:
7778:

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

7771: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
7777:
7778:
7779: IF (l_rsv_rec.project_id IS NULL) THEN

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

7772: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
7773: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
7774: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
7775: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
7777:
7778:
7779: IF (l_rsv_rec.project_id IS NULL) THEN
7780: l_rsv_rec.project_id := fnd_api.g_miss_num;

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

7776: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
7777:
7778:
7779: IF (l_rsv_rec.project_id IS NULL) THEN
7780: l_rsv_rec.project_id := fnd_api.g_miss_num;
7781: END IF;
7782: IF (l_rsv_rec.task_id IS NULL) THEN
7783: l_rsv_rec.task_id := fnd_api.g_miss_num;
7784: END IF;

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

7779: IF (l_rsv_rec.project_id IS NULL) THEN
7780: l_rsv_rec.project_id := fnd_api.g_miss_num;
7781: END IF;
7782: IF (l_rsv_rec.task_id IS NULL) THEN
7783: l_rsv_rec.task_id := fnd_api.g_miss_num;
7784: END IF;
7785:
7786: l_progress :=50;
7787:

Line 7797: IF l_return_status = fnd_api.g_ret_sts_error THEN

7793: IF l_debug=1 THEN
7794: debug_print('Return Status from convert quantity'||l_return_status);
7795: END IF;
7796:
7797: IF l_return_status = fnd_api.g_ret_sts_error THEN
7798:
7799: IF l_debug=1 THEN
7800: debug_print('Raising expected error'||l_return_status);
7801: END IF;

Line 7802: RAISE fnd_api.g_exc_error;

7798:
7799: IF l_debug=1 THEN
7800: debug_print('Raising expected error'||l_return_status);
7801: END IF;
7802: RAISE fnd_api.g_exc_error;
7803:
7804: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7805:
7806: IF l_debug=1 THEN

Line 7804: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7800: debug_print('Raising expected error'||l_return_status);
7801: END IF;
7802: RAISE fnd_api.g_exc_error;
7803:
7804: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7805:
7806: IF l_debug=1 THEN
7807: debug_print('Rasing Unexpected error'||l_return_status);
7808: END IF;

Line 7809: RAISE fnd_api.g_exc_unexpected_error;

7805:
7806: IF l_debug=1 THEN
7807: debug_print('Rasing Unexpected error'||l_return_status);
7808: END IF;
7809: RAISE fnd_api.g_exc_unexpected_error;
7810:
7811: END IF;
7812:
7813: l_progress :=60;

Line 7823: p_init_msg_lst => fnd_api.g_false,

7819: l_progress := 70;
7820:
7821: inv_reservation_pvt.query_reservation
7822: (p_api_version_number => 1.0,
7823: p_init_msg_lst => fnd_api.g_false,
7824: x_return_status => l_return_status,
7825: x_msg_count => x_msg_count,
7826: x_msg_data => x_msg_data,
7827: p_query_input => l_rsv_rec,

Line 7828: p_lock_records => fnd_api.g_true,

7824: x_return_status => l_return_status,
7825: x_msg_count => x_msg_count,
7826: x_msg_data => x_msg_data,
7827: p_query_input => l_rsv_rec,
7828: p_lock_records => fnd_api.g_true,
7829: x_mtl_reservation_tbl => l_mtl_reservation_tbl,
7830: x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count,
7831: x_error_code => l_error_code
7832: );

Line 7841: IF l_return_status = fnd_api.g_ret_sts_error THEN

7837: END IF;
7838:
7839: l_progress := 80;
7840:
7841: IF l_return_status = fnd_api.g_ret_sts_error THEN
7842:
7843: IF l_debug=1 THEN
7844: debug_print('Raising expected error'||l_return_status);
7845: END IF;

Line 7846: RAISE fnd_api.g_exc_error;

7842:
7843: IF l_debug=1 THEN
7844: debug_print('Raising expected error'||l_return_status);
7845: END IF;
7846: RAISE fnd_api.g_exc_error;
7847:
7848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7849:
7850: IF l_debug=1 THEN

Line 7848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7844: debug_print('Raising expected error'||l_return_status);
7845: END IF;
7846: RAISE fnd_api.g_exc_error;
7847:
7848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7849:
7850: IF l_debug=1 THEN
7851: debug_print('Rasing Unexpected error'||l_return_status);
7852: END IF;

Line 7853: RAISE fnd_api.g_exc_unexpected_error;

7849:
7850: IF l_debug=1 THEN
7851: debug_print('Rasing Unexpected error'||l_return_status);
7852: END IF;
7853: RAISE fnd_api.g_exc_unexpected_error;
7854:
7855: END IF;
7856:
7857: IF (l_debug=1) THEN

Line 7886: RAISE fnd_api.g_exc_error;

7882: debug_print('Serial numbers are passed with partial flag exists. error out');
7883: END IF;
7884: fnd_message.set_name('INV', 'INV_SER_PARTIAL_RSV_EXISTS');
7885: fnd_msg_pub.add;
7886: RAISE fnd_api.g_exc_error;
7887: END IF;
7888:
7889: IF l_debug=1 THEN
7890: inv_reservation_pvt.print_rsv_rec (p_rsv_rec);

Line 7903: 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)

7899: -- revision controlled or has an LPN Id stamped or has a different SubInventory
7900: l_progress := 100;
7901:
7902: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
7903: 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)
7904: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
7905: 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)
7906: 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
7907:

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

7900: l_progress := 100;
7901:
7902: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
7903: 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)
7904: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
7905: 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)
7906: 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
7907:
7908: IF (l_debug=1) THEN

Line 7905: 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)

7901:
7902: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
7903: 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)
7904: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
7905: 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)
7906: 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
7907:
7908: IF (l_debug=1) THEN
7909: debug_print('Skipping reservation record');

Line 7906: 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

7902: IF ((l_mtl_reservation_tbl(i).staged_flag='Y')
7903: 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)
7904: OR (nvl(l_mtl_reservation_tbl(i).revision,'@@@')<>nvl(p_rsv_rec.revision,'@@@')AND p_rsv_rec.revision <>fnd_api.g_miss_char)
7905: 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)
7906: 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
7907:
7908: IF (l_debug=1) THEN
7909: debug_print('Skipping reservation record');
7910: END IF;

Line 7967: p_init_msg_lst => fnd_api.g_false,

7963: END IF;
7964:
7965: inv_reservation_pvt.update_reservation
7966: (p_api_version_number => 1.0,
7967: p_init_msg_lst => fnd_api.g_false,
7968: x_return_status => l_return_status,
7969: x_msg_count => x_msg_count,
7970: x_msg_data => x_msg_data,
7971: x_quantity_reserved => l_quantity_reserved,

Line 7979: p_check_availability => fnd_api.g_true,

7975: p_original_serial_number => p_serial_number,
7976: p_to_serial_number => l_dummy_serial_array,
7977: p_validation_flag => p_validation_flag, -- BUG 4705409
7978: p_partial_reservation_flag => p_partial_reservation_flag,
7979: p_check_availability => fnd_api.g_true,
7980: p_over_reservation_flag => p_over_reservation_flag
7981: );
7982:
7983: l_progress := 150;

Line 7989: IF l_return_status = fnd_api.g_ret_sts_error THEN

7985: IF (l_debug=1) THEN
7986: debug_print ('Return Status after updating reservations '||l_return_status);
7987: END IF;
7988:
7989: IF l_return_status = fnd_api.g_ret_sts_error THEN
7990:
7991: IF l_debug=1 THEN
7992: debug_print('Raising expected error'||l_return_status);
7993: END IF;

Line 7995: RAISE fnd_api.g_exc_error;

7991: IF l_debug=1 THEN
7992: debug_print('Raising expected error'||l_return_status);
7993: END IF;
7994:
7995: RAISE fnd_api.g_exc_error;
7996:
7997: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7998:
7999: IF l_debug=1 THEN

Line 7997: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7993: END IF;
7994:
7995: RAISE fnd_api.g_exc_error;
7996:
7997: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7998:
7999: IF l_debug=1 THEN
8000: debug_print('Raising Unexpected error'||l_return_status);
8001: END IF;

Line 8003: RAISE fnd_api.g_exc_unexpected_error;

7999: IF l_debug=1 THEN
8000: debug_print('Raising Unexpected error'||l_return_status);
8001: END IF;
8002:
8003: RAISE fnd_api.g_exc_unexpected_error;
8004: END IF;
8005:
8006: l_progress := 160;
8007:

Line 8069: RAISE fnd_api.g_exc_error;

8065:
8066: IF l_lock_status = 0 THEN
8067: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
8068: fnd_msg_pub.ADD;
8069: RAISE fnd_api.g_exc_error;
8070: END if;
8071:
8072: inv_reservation_lock_pvt.lock_supply_demand_record
8073: (p_organization_id => l_rsv_rec.organization_id

Line 8085: RAISE fnd_api.g_exc_error;

8081:
8082: IF l_lock_status = 0 THEN
8083: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
8084: fnd_msg_pub.ADD;
8085: RAISE fnd_api.g_exc_error;
8086: END if;
8087:
8088: l_lock_obtained := TRUE;
8089:

Line 8111: RAISE fnd_api.g_exc_error;

8107: IF ((NVL(l_rsv_rec.reservation_quantity,0) < 0) OR
8108: (NVL(l_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
8109: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
8110: fnd_msg_pub.ADD;
8111: RAISE fnd_api.g_exc_error;
8112: END IF;
8113:
8114: /*---------------- Added by nimisra for bug6268983 ----------------
8115: This check is done in Order to Ensure that No custom code can Populate Demand_source_name for

Line 8122: RAISE fnd_api.g_exc_error;

8118: IF (p_rsv_rec.demand_source_type_id=2 or p_rsv_rec.demand_source_type_id=8)
8119: and (p_rsv_rec.demand_source_name is NOT NULL) THEN
8120: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
8121: fnd_msg_pub.ADD; debug_print('For Sales Orders and Internal Orders DEMAND_SOURCE_NAME Should Be Null');
8122: RAISE fnd_api.g_exc_error;
8123: END IF;
8124:
8125: /* ------------------Added by nimisra for bug6268983--------------- */
8126:

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

8125: /* ------------------Added by nimisra for bug6268983--------------- */
8126:
8127: -- handle specially for detailed_quantity
8128: IF l_rsv_rec.detailed_quantity IS NULL
8129: OR l_rsv_rec.detailed_quantity = fnd_api.g_miss_num THEN
8130: l_rsv_rec.detailed_quantity := 0;
8131: END IF;
8132:
8133: -- INVCONV - KYH Check this

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

8130: l_rsv_rec.detailed_quantity := 0;
8131: END IF;
8132:
8133: -- INVCONV - KYH Check this
8134: IF l_rsv_rec.secondary_detailed_quantity = fnd_api.g_miss_num THEN
8135: l_rsv_rec.secondary_detailed_quantity := NULL;
8136: END IF;
8137:
8138:

Line 8149: RAISE fnd_api.g_exc_error;

8145: -- must be some value or null.
8146: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
8147: fnd_message.set_token('FIELD_NAME', l_what_field);
8148: fnd_msg_pub.ADD;
8149: RAISE fnd_api.g_exc_error;
8150: END IF;
8151:
8152:
8153: IF (l_debug = 1) THEN

Line 8180: IF l_return_status = fnd_api.g_ret_sts_error THEN

8176: -- END IF;
8177:
8178: -- BUG 2737887. Inclding error handling for the above call to
8179: -- convert quantity.
8180: IF l_return_status = fnd_api.g_ret_sts_error THEN
8181: RAISE fnd_api.g_exc_error;
8182: END IF;
8183:
8184: --

Line 8181: RAISE fnd_api.g_exc_error;

8177:
8178: -- BUG 2737887. Inclding error handling for the above call to
8179: -- convert quantity.
8180: IF l_return_status = fnd_api.g_ret_sts_error THEN
8181: RAISE fnd_api.g_exc_error;
8182: END IF;
8183:
8184: --
8185: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8185: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8181: RAISE fnd_api.g_exc_error;
8182: END IF;
8183:
8184: --
8185: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8186: RAISE fnd_api.g_exc_unexpected_error;
8187: END IF;
8188:
8189: End comment *******/

Line 8186: RAISE fnd_api.g_exc_unexpected_error;

8182: END IF;
8183:
8184: --
8185: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8186: RAISE fnd_api.g_exc_unexpected_error;
8187: END IF;
8188:
8189: End comment *******/
8190: /*** End R12 ***/

Line 8212: , p_init_msg_lst => fnd_api.g_false

8208: -- user should use update instead.
8209: query_reservation
8210: (
8211: p_api_version_number => 1.0
8212: , p_init_msg_lst => fnd_api.g_false
8213: , x_return_status => l_return_status
8214: , x_msg_count => x_msg_count
8215: , x_msg_data => x_msg_data
8216: , p_query_input => l_rsv_rec

Line 8217: , p_lock_records => fnd_api.g_true

8213: , x_return_status => l_return_status
8214: , x_msg_count => x_msg_count
8215: , x_msg_data => x_msg_data
8216: , p_query_input => l_rsv_rec
8217: , p_lock_records => fnd_api.g_true
8218: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
8219: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
8220: , x_error_code => l_error_code
8221: );

Line 8227: IF l_return_status = fnd_api.g_ret_sts_error THEN

8223: IF (l_debug = 1) THEN
8224: debug_print('After query_reservations ' || l_return_status);
8225: END IF;
8226: --
8227: IF l_return_status = fnd_api.g_ret_sts_error THEN
8228: RAISE fnd_api.g_exc_error;
8229: END IF;
8230:
8231: --

Line 8228: RAISE fnd_api.g_exc_error;

8224: debug_print('After query_reservations ' || l_return_status);
8225: END IF;
8226: --
8227: IF l_return_status = fnd_api.g_ret_sts_error THEN
8228: RAISE fnd_api.g_exc_error;
8229: END IF;
8230:
8231: --
8232: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8232: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8228: RAISE fnd_api.g_exc_error;
8229: END IF;
8230:
8231: --
8232: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8233: RAISE fnd_api.g_exc_unexpected_error;
8234: END IF;
8235:
8236: --

Line 8233: RAISE fnd_api.g_exc_unexpected_error;

8229: END IF;
8230:
8231: --
8232: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8233: RAISE fnd_api.g_exc_unexpected_error;
8234: END IF;
8235:
8236: --
8237: IF l_tmp_rsv_tbl_count > 0 THEN

Line 8240: RAISE fnd_api.g_exc_error;

8236: --
8237: IF l_tmp_rsv_tbl_count > 0 THEN
8238: fnd_message.set_name('INV', 'INV-RESERVATION-EXIST');
8239: fnd_msg_pub.ADD;
8240: RAISE fnd_api.g_exc_error;
8241: END IF;
8242:
8243: *** End comment *******/
8244: -- Get the project and task for demands in OE, INT-ORD and RMA

Line 8258: RAISE fnd_api.g_exc_unexpected_error;

8254: THEN
8255: IF (l_debug = 1) THEN
8256: debug_print('Error caching the org record');
8257: END IF;
8258: RAISE fnd_api.g_exc_unexpected_error;
8259: END IF;
8260: -- Set the PJM enabled flag.
8261: l_pjm_enabled := INV_CACHE.org_rec.project_reference_enabled;
8262: ELSE

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

8279: inv_reservation_global.g_source_type_rma)) AND
8280: (l_pjm_enabled = 1) THEN
8281:
8282: IF (l_rsv_rec.demand_source_line_id IS NOT NULL) AND
8283: (l_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
8284: AND ((l_rsv_rec.project_id IS NULL) OR
8285: (l_rsv_rec.task_id IS NULL)) THEN
8286: BEGIN
8287: SELECT project_id, task_id INTO l_project_id, l_task_id

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

8328: /*** End R12 ***/
8329:
8330: -- call validation api if the validate_flag is set to true
8331: -- Bug 2354735: Proceed with Validation if p_validation_flag = 'T' or 'V'
8332: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN
8333: inv_reservation_validate_pvt.validate_input_parameters
8334: (
8335: x_return_status => l_return_status
8336: , p_orig_rsv_rec => l_rsv_rec

Line 8358: IF l_return_status = fnd_api.g_ret_sts_error THEN

8354: IF (l_debug = 1) THEN
8355: debug_print('After validate_input_parameters ' || l_return_status);
8356: END IF;
8357: --
8358: IF l_return_status = fnd_api.g_ret_sts_error THEN
8359: RAISE fnd_api.g_exc_error;
8360: END IF;
8361:
8362: --

Line 8359: RAISE fnd_api.g_exc_error;

8355: debug_print('After validate_input_parameters ' || l_return_status);
8356: END IF;
8357: --
8358: IF l_return_status = fnd_api.g_ret_sts_error THEN
8359: RAISE fnd_api.g_exc_error;
8360: END IF;
8361:
8362: --
8363: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8363: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8359: RAISE fnd_api.g_exc_error;
8360: END IF;
8361:
8362: --
8363: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8364: RAISE fnd_api.g_exc_unexpected_error;
8365: END IF;
8366:
8367: -- INVCONV BEGIN

Line 8364: RAISE fnd_api.g_exc_unexpected_error;

8360: END IF;
8361:
8362: --
8363: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8364: RAISE fnd_api.g_exc_unexpected_error;
8365: END IF;
8366:
8367: -- INVCONV BEGIN
8368: IF NOT is_lot_divisible(l_orig_item_cache_index) THEN

Line 8384: IF l_return_status = fnd_api.g_ret_sts_error THEN

8380: IF (l_debug = 1) THEN
8381: debug_print('After CTO validation ' || l_return_status);
8382: END IF;
8383: --
8384: IF l_return_status = fnd_api.g_ret_sts_error THEN
8385: RAISE fnd_api.g_exc_error;
8386: END IF;
8387:
8388: --

Line 8385: RAISE fnd_api.g_exc_error;

8381: debug_print('After CTO validation ' || l_return_status);
8382: END IF;
8383: --
8384: IF l_return_status = fnd_api.g_ret_sts_error THEN
8385: RAISE fnd_api.g_exc_error;
8386: END IF;
8387:
8388: --
8389: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8389: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8385: RAISE fnd_api.g_exc_error;
8386: END IF;
8387:
8388: --
8389: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8390: RAISE fnd_api.g_exc_unexpected_error;
8391: END IF;
8392: --
8393: END IF;

Line 8390: RAISE fnd_api.g_exc_unexpected_error;

8386: END IF;
8387:
8388: --
8389: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8390: RAISE fnd_api.g_exc_unexpected_error;
8391: END IF;
8392: --
8393: END IF;
8394:

Line 8396: IF l_return_status = fnd_api.g_ret_sts_error THEN

8392: --
8393: END IF;
8394:
8395:
8396: IF l_return_status = fnd_api.g_ret_sts_error THEN
8397: RAISE fnd_api.g_exc_error;
8398: END IF;
8399:
8400: --

Line 8397: RAISE fnd_api.g_exc_error;

8393: END IF;
8394:
8395:
8396: IF l_return_status = fnd_api.g_ret_sts_error THEN
8397: RAISE fnd_api.g_exc_error;
8398: END IF;
8399:
8400: --
8401: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8401: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8397: RAISE fnd_api.g_exc_error;
8398: END IF;
8399:
8400: --
8401: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8402: RAISE fnd_api.g_exc_unexpected_error;
8403: END IF;
8404:
8405: -- call modify tree procedure to change the tree if supply is inv

Line 8402: RAISE fnd_api.g_exc_unexpected_error;

8398: END IF;
8399:
8400: --
8401: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8402: RAISE fnd_api.g_exc_unexpected_error;
8403: END IF;
8404:
8405: -- call modify tree procedure to change the tree if supply is inv
8406: -- will call quantity validation for other supply sources in the future

Line 8408: IF p_force_reservation_flag <> fnd_api.g_true

8404:
8405: -- call modify tree procedure to change the tree if supply is inv
8406: -- will call quantity validation for other supply sources in the future
8407: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
8408: IF p_force_reservation_flag <> fnd_api.g_true
8409: AND p_validation_flag = fnd_api.g_true
8410: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8411: inv_quantity_tree_pvt.create_tree
8412: (

Line 8409: AND p_validation_flag = fnd_api.g_true

8405: -- call modify tree procedure to change the tree if supply is inv
8406: -- will call quantity validation for other supply sources in the future
8407: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
8408: IF p_force_reservation_flag <> fnd_api.g_true
8409: AND p_validation_flag = fnd_api.g_true
8410: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8411: inv_quantity_tree_pvt.create_tree
8412: (
8413: p_api_version_number => 1.0

Line 8414: , p_init_msg_lst => fnd_api.g_true

8410: AND l_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv THEN
8411: inv_quantity_tree_pvt.create_tree
8412: (
8413: p_api_version_number => 1.0
8414: , p_init_msg_lst => fnd_api.g_true
8415: , x_return_status => l_return_status
8416: , x_msg_count => x_msg_count
8417: , x_msg_data => x_msg_data
8418: , p_organization_id => l_rsv_rec.organization_id

Line 8439: IF l_return_status = fnd_api.g_ret_sts_error THEN

8435: IF (l_debug = 1) THEN
8436: debug_print('After create tree ' || l_return_status);
8437: END IF;
8438:
8439: IF l_return_status = fnd_api.g_ret_sts_error THEN
8440: RAISE fnd_api.g_exc_error;
8441: END IF;
8442:
8443: --

Line 8440: RAISE fnd_api.g_exc_error;

8436: debug_print('After create tree ' || l_return_status);
8437: END IF;
8438:
8439: IF l_return_status = fnd_api.g_ret_sts_error THEN
8440: RAISE fnd_api.g_exc_error;
8441: END IF;
8442:
8443: --
8444: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8444: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8440: RAISE fnd_api.g_exc_error;
8441: END IF;
8442:
8443: --
8444: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8445: RAISE fnd_api.g_exc_unexpected_error;
8446: END IF;
8447:
8448: IF (l_debug = 1) THEN

Line 8445: RAISE fnd_api.g_exc_unexpected_error;

8441: END IF;
8442:
8443: --
8444: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8445: RAISE fnd_api.g_exc_unexpected_error;
8446: END IF;
8447:
8448: IF (l_debug = 1) THEN
8449: debug_print('calling modify_tree_crt_del_rel');

Line 8484: IF l_return_status = fnd_api.g_ret_sts_error THEN

8480: debug_print('l_secondary_qty_changed: ' || l_secondary_qty_changed); -- INVCONV
8481: END IF;
8482:
8483: --
8484: IF l_return_status = fnd_api.g_ret_sts_error THEN
8485: RAISE fnd_api.g_exc_error;
8486: END IF;
8487:
8488: --

Line 8485: RAISE fnd_api.g_exc_error;

8481: END IF;
8482:
8483: --
8484: IF l_return_status = fnd_api.g_ret_sts_error THEN
8485: RAISE fnd_api.g_exc_error;
8486: END IF;
8487:
8488: --
8489: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8489: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8485: RAISE fnd_api.g_exc_error;
8486: END IF;
8487:
8488: --
8489: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8490: RAISE fnd_api.g_exc_unexpected_error;
8491: END IF;
8492:
8493: /**** {{ R12 Enhanced reservations code changes }}****/

Line 8490: RAISE fnd_api.g_exc_unexpected_error;

8486: END IF;
8487:
8488: --
8489: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8490: RAISE fnd_api.g_exc_unexpected_error;
8491: END IF;
8492:
8493: /**** {{ R12 Enhanced reservations code changes }}****/
8494: --IF (l_debug = 1) THEN

Line 8527: IF l_return_status = fnd_api.g_ret_sts_error THEN

8523: IF (l_debug = 1) THEN
8524: debug_print('After convert qty ' || l_return_status);
8525: END IF;
8526:
8527: IF l_return_status = fnd_api.g_ret_sts_error THEN
8528: RAISE fnd_api.g_exc_error;
8529: END IF;
8530:
8531: --

Line 8528: RAISE fnd_api.g_exc_error;

8524: debug_print('After convert qty ' || l_return_status);
8525: END IF;
8526:
8527: IF l_return_status = fnd_api.g_ret_sts_error THEN
8528: RAISE fnd_api.g_exc_error;
8529: END IF;
8530:
8531: --
8532: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8532: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8528: RAISE fnd_api.g_exc_error;
8529: END IF;
8530:
8531: --
8532: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8533: RAISE fnd_api.g_exc_unexpected_error;
8534: END IF;
8535: END IF;
8536:

Line 8533: RAISE fnd_api.g_exc_unexpected_error;

8529: END IF;
8530:
8531: --
8532: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8533: RAISE fnd_api.g_exc_unexpected_error;
8534: END IF;
8535: END IF;
8536:
8537: /**** {{ R12 Enhanced reservations code changes }}****/

Line 8546: RAISE fnd_api.g_exc_error;

8542: l_rsv_rec.serial_reservation_quantity := l_serial_number.COUNT;
8543: IF (l_rsv_rec.serial_reservation_quantity > l_rsv_rec.primary_reservation_quantity) THEN
8544: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
8545: fnd_msg_pub.ADD;
8546: RAISE fnd_api.g_exc_error;
8547: END IF;
8548:
8549: END IF;
8550: ********************/

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

8580: , p_locator_id => l_rsv_rec.locator_id
8581: , p_supply_source_type_id => l_rsv_rec.supply_source_type_id
8582: , p_supply_source_header_id => l_rsv_rec.supply_source_header_id
8583: , p_supply_source_line_id => l_rsv_rec.supply_source_line_id
8584: , p_supply_source_line_detail => Nvl(l_rsv_rec.supply_source_line_detail,fnd_api.g_miss_num)
8585: , p_lpn_id => l_rsv_rec.lpn_id
8586: , p_project_id => l_rsv_rec.project_id
8587: , p_task_id => l_rsv_rec.task_id
8588: , p_api_version_number => 1.0

Line 8589: , p_init_msg_lst => fnd_api.g_false

8585: , p_lpn_id => l_rsv_rec.lpn_id
8586: , p_project_id => l_rsv_rec.project_id
8587: , p_task_id => l_rsv_rec.task_id
8588: , p_api_version_number => 1.0
8589: , p_init_msg_lst => fnd_api.g_false
8590: );
8591:
8592: IF (l_debug = 1) THEN
8593: debug_print('After calling available supply to reserve ' || l_return_status);

Line 8599: IF l_return_status = fnd_api.g_ret_sts_error THEN

8595: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
8596: END IF;
8597:
8598: --
8599: IF l_return_status = fnd_api.g_ret_sts_error THEN
8600: RAISE fnd_api.g_exc_error;
8601: END IF;
8602:
8603: --

Line 8600: RAISE fnd_api.g_exc_error;

8596: END IF;
8597:
8598: --
8599: IF l_return_status = fnd_api.g_ret_sts_error THEN
8600: RAISE fnd_api.g_exc_error;
8601: END IF;
8602:
8603: --
8604: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8604: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8600: RAISE fnd_api.g_exc_error;
8601: END IF;
8602:
8603: --
8604: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8605: RAISE fnd_api.g_exc_unexpected_error;
8606: END IF;
8607:
8608: -- bug #5454715. Error out if the available supply to reserve is zero.

Line 8605: RAISE fnd_api.g_exc_unexpected_error;

8601: END IF;
8602:
8603: --
8604: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8605: RAISE fnd_api.g_exc_unexpected_error;
8606: END IF;
8607:
8608: -- bug #5454715. Error out if the available supply to reserve is zero.
8609: IF l_qty_changed = 0 THEN

Line 8612: RAISE fnd_api.g_exc_error;

8608: -- bug #5454715. Error out if the available supply to reserve is zero.
8609: IF l_qty_changed = 0 THEN
8610: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
8611: fnd_msg_pub.ADD;
8612: RAISE fnd_api.g_exc_error;
8613: END IF;
8614:
8615: -- Bug 5199672: Removed the condition l_qty_changed > 0
8616: IF ((l_rsv_rec.primary_reservation_quantity - l_qty_changed) > 0.000005) THEN

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

8614:
8615: -- Bug 5199672: Removed the condition l_qty_changed > 0
8616: IF ((l_rsv_rec.primary_reservation_quantity - l_qty_changed) > 0.000005) THEN
8617:
8618: IF (p_partial_reservation_flag = fnd_api.g_false) THEN
8619: IF (l_debug = 1) THEN
8620: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
8621: END IF;
8622: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');

Line 8624: RAISE fnd_api.g_exc_error;

8620: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
8621: END IF;
8622: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
8623: fnd_msg_pub.ADD;
8624: RAISE fnd_api.g_exc_error;
8625: ELSE
8626: l_rsv_rec.primary_reservation_quantity := l_qty_changed + NVL(l_rsv_rec.detailed_quantity, 0);
8627: l_rsv_rec.reservation_quantity := NULL;
8628: IF (l_debug = 1) THEN

Line 8638: IF l_return_status = fnd_api.g_ret_sts_error THEN

8634: IF (l_debug = 1) THEN
8635: debug_print('After convert qty ' || l_return_status);
8636: END IF;
8637:
8638: IF l_return_status = fnd_api.g_ret_sts_error THEN
8639: RAISE fnd_api.g_exc_error;
8640: END IF;
8641:
8642: --

Line 8639: RAISE fnd_api.g_exc_error;

8635: debug_print('After convert qty ' || l_return_status);
8636: END IF;
8637:
8638: IF l_return_status = fnd_api.g_ret_sts_error THEN
8639: RAISE fnd_api.g_exc_error;
8640: END IF;
8641:
8642: --
8643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8639: RAISE fnd_api.g_exc_error;
8640: END IF;
8641:
8642: --
8643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8644: RAISE fnd_api.g_exc_unexpected_error;
8645: END IF;
8646:
8647: END IF;

Line 8644: RAISE fnd_api.g_exc_unexpected_error;

8640: END IF;
8641:
8642: --
8643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8644: RAISE fnd_api.g_exc_unexpected_error;
8645: END IF;
8646:
8647: END IF;
8648: END IF;

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

8670: , p_primary_uom_code => l_rsv_rec.primary_uom_code
8671: , p_demand_source_type_id => l_rsv_rec.demand_source_type_id
8672: , p_demand_source_header_id => l_rsv_rec.demand_source_header_id
8673: , p_demand_source_line_id => l_rsv_rec.demand_source_line_id
8674: , p_demand_source_line_detail => Nvl(l_rsv_rec.demand_source_line_detail,fnd_api.g_miss_num)
8675: , p_project_id => l_rsv_rec.project_id
8676: , p_task_id => l_rsv_rec.task_id
8677: , p_api_version_number => 1.0
8678: , p_init_msg_lst => fnd_api.g_false

Line 8678: , p_init_msg_lst => fnd_api.g_false

8674: , p_demand_source_line_detail => Nvl(l_rsv_rec.demand_source_line_detail,fnd_api.g_miss_num)
8675: , p_project_id => l_rsv_rec.project_id
8676: , p_task_id => l_rsv_rec.task_id
8677: , p_api_version_number => 1.0
8678: , p_init_msg_lst => fnd_api.g_false
8679: );
8680:
8681:
8682: IF (l_debug = 1) THEN

Line 8689: IF l_return_status = fnd_api.g_ret_sts_error THEN

8685: debug_print('Available quantity on the document. l_qty_available: ' || l_qty_available);
8686: END IF;
8687:
8688: --
8689: IF l_return_status = fnd_api.g_ret_sts_error THEN
8690: RAISE fnd_api.g_exc_error;
8691: END IF;
8692:
8693: --

Line 8690: RAISE fnd_api.g_exc_error;

8686: END IF;
8687:
8688: --
8689: IF l_return_status = fnd_api.g_ret_sts_error THEN
8690: RAISE fnd_api.g_exc_error;
8691: END IF;
8692:
8693: --
8694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8690: RAISE fnd_api.g_exc_error;
8691: END IF;
8692:
8693: --
8694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8695: RAISE fnd_api.g_exc_unexpected_error;
8696: END IF;
8697:
8698:

Line 8695: RAISE fnd_api.g_exc_unexpected_error;

8691: END IF;
8692:
8693: --
8694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8695: RAISE fnd_api.g_exc_unexpected_error;
8696: END IF;
8697:
8698:
8699: IF (l_rsv_rec.demand_source_type_id in (inv_reservation_global.g_source_type_oe,

Line 8710: , p_init_msg_lst => fnd_api.g_false

8706: p_organization_id => l_rsv_rec.organization_id)) THEN
8707: get_ship_qty_tolerance
8708: (
8709: p_api_version_number => 1.0
8710: , p_init_msg_lst => fnd_api.g_false
8711: , x_return_status => x_return_status
8712: , x_msg_count => x_msg_count
8713: , x_msg_data => x_msg_data
8714: , p_demand_type_id => l_rsv_rec.demand_source_type_id

Line 8729: IF x_return_status = fnd_api.g_ret_sts_error THEN

8725: debug_print('Reservation margin above ' || l_reservation_margin_above);
8726: END IF;
8727:
8728: --
8729: IF x_return_status = fnd_api.g_ret_sts_error THEN
8730: RAISE fnd_api.g_exc_error;
8731: END IF;
8732:
8733: --

Line 8730: RAISE fnd_api.g_exc_error;

8726: END IF;
8727:
8728: --
8729: IF x_return_status = fnd_api.g_ret_sts_error THEN
8730: RAISE fnd_api.g_exc_error;
8731: END IF;
8732:
8733: --
8734: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8734: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

8730: RAISE fnd_api.g_exc_error;
8731: END IF;
8732:
8733: --
8734: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
8735: RAISE fnd_api.g_exc_unexpected_error;
8736: END IF;
8737:
8738: l_qty_changed := l_qty_changed + l_reservation_margin_above;

Line 8735: RAISE fnd_api.g_exc_unexpected_error;

8731: END IF;
8732:
8733: --
8734: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
8735: RAISE fnd_api.g_exc_unexpected_error;
8736: END IF;
8737:
8738: l_qty_changed := l_qty_changed + l_reservation_margin_above;
8739: l_qty_available := l_qty_available + l_reservation_margin_above;

Line 8757: RAISE fnd_api.g_exc_error;

8753: debug_print('The demand document doesnt have enough quantity to be reserved against. error out. ');
8754: END IF;
8755: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
8756: fnd_msg_pub.ADD;
8757: RAISE fnd_api.g_exc_error;
8758: END IF;
8759:
8760: END IF;
8761:

Line 8780: RAISE fnd_api.g_exc_error;

8776: IF ( (NVL(l_rsv_rec.reservation_quantity,0) < 0) OR
8777: (NVL(l_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
8778: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
8779: fnd_msg_pub.ADD;
8780: RAISE fnd_api.g_exc_error;
8781: END IF;
8782:
8783: --Bug 5535030 Selecting the sequence value has been moved to the table handler in
8784: -- INVRSV6B.pls

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

8827: ,p_organization_id => l_rsv_rec.organization_id
8828: ,x_index => l_orig_item_cache_index
8829: );
8830:
8831: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8832: RAISE fnd_api.g_exc_error;
8833: End If;
8834:
8835: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 8832: RAISE fnd_api.g_exc_error;

8828: ,x_index => l_orig_item_cache_index
8829: );
8830:
8831: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8832: RAISE fnd_api.g_exc_error;
8833: End If;
8834:
8835: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8836: RAISE fnd_api.g_exc_unexpected_error;

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

8831: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8832: RAISE fnd_api.g_exc_error;
8833: End If;
8834:
8835: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8836: RAISE fnd_api.g_exc_unexpected_error;
8837: END IF;
8838:
8839: IF (l_orig_item_cache_index IS NULL) THEN

Line 8836: RAISE fnd_api.g_exc_unexpected_error;

8832: RAISE fnd_api.g_exc_error;
8833: End If;
8834:
8835: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8836: RAISE fnd_api.g_exc_unexpected_error;
8837: END IF;
8838:
8839: IF (l_orig_item_cache_index IS NULL) THEN
8840: OPEN c_item(l_rsv_rec.inventory_item_id);

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

8847: ,p_item_record => l_item_rec
8848: ,x_index => l_orig_item_cache_index
8849: );
8850:
8851: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8852: RAISE fnd_api.g_exc_error;
8853: END IF;
8854:
8855: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 8852: RAISE fnd_api.g_exc_error;

8848: ,x_index => l_orig_item_cache_index
8849: );
8850:
8851: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8852: RAISE fnd_api.g_exc_error;
8853: END IF;
8854:
8855: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8856: RAISE fnd_api.g_exc_unexpected_error;

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

8851: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
8852: RAISE fnd_api.g_exc_error;
8853: END IF;
8854:
8855: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8856: RAISE fnd_api.g_exc_unexpected_error;
8857: END IF;
8858: END IF;
8859: END IF;

Line 8856: RAISE fnd_api.g_exc_unexpected_error;

8852: RAISE fnd_api.g_exc_error;
8853: END IF;
8854:
8855: IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
8856: RAISE fnd_api.g_exc_unexpected_error;
8857: END IF;
8858: END IF;
8859: END IF;
8860:

Line 8872: RAISE fnd_api.g_exc_error;

8868: l_rsv_rec.serial_reservation_quantity := l_serial_number.COUNT;
8869: IF (l_rsv_rec.serial_reservation_quantity > l_rsv_rec.primary_reservation_quantity) THEN
8870: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
8871: fnd_msg_pub.ADD;
8872: RAISE fnd_api.g_exc_error;
8873: END IF;
8874: END IF;
8875:
8876: IF (l_debug = 1) THEN

Line 8989: IF l_return_status = fnd_api.g_ret_sts_error THEN

8985: IF (l_debug = 1) THEN
8986: debug_print('After sync ' || l_return_status);
8987: END IF;
8988:
8989: IF l_return_status = fnd_api.g_ret_sts_error THEN
8990: RAISE fnd_api.g_exc_error;
8991: END IF;
8992:
8993: --

Line 8990: RAISE fnd_api.g_exc_error;

8986: debug_print('After sync ' || l_return_status);
8987: END IF;
8988:
8989: IF l_return_status = fnd_api.g_ret_sts_error THEN
8990: RAISE fnd_api.g_exc_error;
8991: END IF;
8992:
8993: --
8994: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8994: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8990: RAISE fnd_api.g_exc_error;
8991: END IF;
8992:
8993: --
8994: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8995: RAISE fnd_api.g_exc_unexpected_error;
8996: END IF;
8997:
8998: /**** {{ R12 Enhanced reservations code changes. Serial number

Line 8995: RAISE fnd_api.g_exc_unexpected_error;

8991: END IF;
8992:
8993: --
8994: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8995: RAISE fnd_api.g_exc_unexpected_error;
8996: END IF;
8997:
8998: /**** {{ R12 Enhanced reservations code changes. Serial number
8999: -- changes for creating new reservations }}****/

Line 9040: RAISE fnd_api.g_exc_error;

9036: debug_print('Errow while selecting the serial number. serial Number ' || l_serial_number(l_serial_index).serial_number);
9037: END IF;
9038: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9039: fnd_msg_pub.ADD;
9040: RAISE fnd_api.g_exc_error;
9041: END;
9042:
9043: IF (l_group_mark_id IS NOT NULL) AND (l_group_mark_id <> -1)THEN
9044: IF (l_debug = 1) THEN

Line 9049: RAISE fnd_api.g_exc_error;

9045: debug_print('Group Mark Id is not null for serial ' || l_serial_number(l_serial_index).serial_number);
9046: END IF;
9047: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9048: fnd_msg_pub.ADD;
9049: RAISE fnd_api.g_exc_error;
9050: END IF;
9051:
9052: BEGIN
9053: UPDATE mtl_serial_numbers SET reservation_id =

Line 9068: RAISE fnd_api.g_exc_error;

9064: 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);
9065: END IF;
9066: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
9067: fnd_msg_pub.ADD;
9068: RAISE fnd_api.g_exc_error;
9069: END;
9070: END LOOP;
9071:
9072: END IF;

Line 9085: IF l_return_status = fnd_api.g_ret_sts_error THEN

9081: IF (l_debug = 1) THEN
9082: debug_print('After post CTO validation ' || l_return_status);
9083: END IF;
9084: --
9085: IF l_return_status = fnd_api.g_ret_sts_error THEN
9086: RAISE fnd_api.g_exc_error;
9087: END IF;
9088:
9089: --

Line 9086: RAISE fnd_api.g_exc_error;

9082: debug_print('After post CTO validation ' || l_return_status);
9083: END IF;
9084: --
9085: IF l_return_status = fnd_api.g_ret_sts_error THEN
9086: RAISE fnd_api.g_exc_error;
9087: END IF;
9088:
9089: --
9090: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9090: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9086: RAISE fnd_api.g_exc_error;
9087: END IF;
9088:
9089: --
9090: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9091: RAISE fnd_api.g_exc_unexpected_error;
9092: END IF;
9093: END IF;
9094:

Line 9091: RAISE fnd_api.g_exc_unexpected_error;

9087: END IF;
9088:
9089: --
9090: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9091: RAISE fnd_api.g_exc_unexpected_error;
9092: END IF;
9093: END IF;
9094:
9095: insert_rsv_temp

Line 9112: IF l_return_status = fnd_api.g_ret_sts_error THEN

9108: IF (l_debug = 1) THEN
9109: debug_print('After insert into rsv temp ' || l_return_status);
9110: END IF;
9111:
9112: IF l_return_status = fnd_api.g_ret_sts_error THEN
9113: RAISE fnd_api.g_exc_error;
9114: END IF;
9115:
9116: --

Line 9113: RAISE fnd_api.g_exc_error;

9109: debug_print('After insert into rsv temp ' || l_return_status);
9110: END IF;
9111:
9112: IF l_return_status = fnd_api.g_ret_sts_error THEN
9113: RAISE fnd_api.g_exc_error;
9114: END IF;
9115:
9116: --
9117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9113: RAISE fnd_api.g_exc_error;
9114: END IF;
9115:
9116: --
9117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9118: RAISE fnd_api.g_exc_unexpected_error;
9119: END IF;
9120:
9121: --

Line 9118: RAISE fnd_api.g_exc_unexpected_error;

9114: END IF;
9115:
9116: --
9117: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9118: RAISE fnd_api.g_exc_unexpected_error;
9119: END IF;
9120:
9121: --
9122: IF (l_debug = 1) THEN

Line 9167: WHEN fnd_api.g_exc_error THEN

9163: -- would have updated the record.
9164: /*** End R12 ***/
9165:
9166: EXCEPTION
9167: WHEN fnd_api.g_exc_error THEN
9168: ROLLBACK TO create_reservation_sa;
9169: x_return_status := fnd_api.g_ret_sts_error;
9170: /**** {{ R12 Enhanced reservations code changes. Should be
9171: -- releasing the locks. }} *****/

Line 9169: x_return_status := fnd_api.g_ret_sts_error;

9165:
9166: EXCEPTION
9167: WHEN fnd_api.g_exc_error THEN
9168: ROLLBACK TO create_reservation_sa;
9169: x_return_status := fnd_api.g_ret_sts_error;
9170: /**** {{ R12 Enhanced reservations code changes. Should be
9171: -- releasing the locks. }} *****/
9172: IF l_lock_obtained THEN
9173: inv_reservation_lock_pvt.release_lock

Line 9181: WHEN fnd_api.g_exc_unexpected_error THEN

9177: END IF;
9178: /*** End R12 ***/
9179: -- Get message count and data
9180: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9181: WHEN fnd_api.g_exc_unexpected_error THEN
9182: ROLLBACK TO create_reservation_sa;
9183: x_return_status := fnd_api.g_ret_sts_unexp_error;
9184: /**** {{ R12 Enhanced reservations code changes. Should be
9185: -- releasing the locks. }} *****/

Line 9183: x_return_status := fnd_api.g_ret_sts_unexp_error;

9179: -- Get message count and data
9180: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9181: WHEN fnd_api.g_exc_unexpected_error THEN
9182: ROLLBACK TO create_reservation_sa;
9183: x_return_status := fnd_api.g_ret_sts_unexp_error;
9184: /**** {{ R12 Enhanced reservations code changes. Should be
9185: -- releasing the locks. }} *****/
9186: IF l_lock_obtained THEN
9187: inv_reservation_lock_pvt.release_lock

Line 9197: x_return_status := fnd_api.g_ret_sts_unexp_error;

9193: -- Get message count and data
9194: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9195: WHEN OTHERS THEN
9196: ROLLBACK TO create_reservation_sa;
9197: x_return_status := fnd_api.g_ret_sts_unexp_error;
9198: /**** {{ R12 Enhanced reservations code changes. Should be
9199: -- releasing the locks. }} *****/
9200: IF l_lock_obtained THEN
9201: inv_reservation_lock_pvt.release_lock

Line 9219: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

9215:
9216: PROCEDURE update_reservation
9217: (
9218: p_api_version_number IN NUMBER
9219: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
9220: , x_return_status OUT NOCOPY VARCHAR2
9221: , x_msg_count OUT NOCOPY NUMBER
9222: , x_msg_data OUT NOCOPY VARCHAR2
9223: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 9227: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

9223: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9224: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9225: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9226: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9227: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9228: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9229: , p_over_reservation_flag IN NUMBER DEFAULT 0
9230: ) IS
9231:

Line 9228: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

9224: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9225: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9226: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9227: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9228: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9229: , p_over_reservation_flag IN NUMBER DEFAULT 0
9230: ) IS
9231:
9232:

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

9231:
9232:
9233: l_api_version_number CONSTANT NUMBER := 1.0;
9234: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9235: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9236: l_quantity_reserved NUMBER;
9237: l_secondary_quantity_reserved NUMBER; -- INVCONV
9238: l_debug NUMBER;
9239:

Line 9242: IF NOT fnd_api.compatible_api_call

9238: l_debug NUMBER;
9239:
9240: BEGIN
9241: -- Standard call to check for call compatibility
9242: IF NOT fnd_api.compatible_api_call
9243: (l_api_version_number
9244: , p_api_version_number
9245: , l_api_name
9246: , G_PKG_NAME

Line 9248: RAISE fnd_api.g_exc_unexpected_error;

9244: , p_api_version_number
9245: , l_api_name
9246: , G_PKG_NAME
9247: ) THEN
9248: RAISE fnd_api.g_exc_unexpected_error;
9249: END IF;
9250:
9251: -- Initialize message list.
9252: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 9252: IF fnd_api.to_boolean(p_init_msg_lst) THEN

9248: RAISE fnd_api.g_exc_unexpected_error;
9249: END IF;
9250:
9251: -- Initialize message list.
9252: IF fnd_api.to_boolean(p_init_msg_lst) THEN
9253: fnd_msg_pub.initialize;
9254: END IF;
9255:
9256: -- Use cache to get value for l_debug

Line 9276: p_init_msg_lst => fnd_api.g_false,

9272:
9273: -- INVCONV Upgrade call to incorporate secondary_quantity_reserved
9274: inv_reservation_pvt.update_reservation
9275: (p_api_version_number => 1.0,
9276: p_init_msg_lst => fnd_api.g_false,
9277: x_return_status => l_return_status,
9278: x_msg_count => x_msg_count,
9279: x_msg_data => x_msg_data,
9280: x_quantity_reserved => l_quantity_reserved,

Line 9287: p_partial_reservation_flag => fnd_api.g_false,

9283: p_to_rsv_rec => p_to_rsv_rec,
9284: p_original_serial_number => p_original_serial_number ,
9285: p_to_serial_number => p_to_serial_number,
9286: p_validation_flag => p_validation_flag,
9287: p_partial_reservation_flag => fnd_api.g_false,
9288: p_check_availability => p_check_availability,
9289: p_over_reservation_flag => p_over_reservation_flag
9290: );
9291:

Line 9297: IF l_return_status = fnd_api.g_ret_sts_error THEN

9293: IF (l_debug=1) THEN
9294: debug_print ('Return Status after updating reservations '||l_return_status);
9295: END IF;
9296:
9297: IF l_return_status = fnd_api.g_ret_sts_error THEN
9298:
9299: IF l_debug=1 THEN
9300: debug_print('Raising expected error'||l_return_status);
9301: END IF;

Line 9303: RAISE fnd_api.g_exc_error;

9299: IF l_debug=1 THEN
9300: debug_print('Raising expected error'||l_return_status);
9301: END IF;
9302:
9303: RAISE fnd_api.g_exc_error;
9304:
9305: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9306:
9307: IF l_debug=1 THEN

Line 9305: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9301: END IF;
9302:
9303: RAISE fnd_api.g_exc_error;
9304:
9305: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9306:
9307: IF l_debug=1 THEN
9308: debug_print('Raising Unexpected error'||l_return_status);
9309: END IF;

Line 9311: RAISE fnd_api.g_exc_unexpected_error;

9307: IF l_debug=1 THEN
9308: debug_print('Raising Unexpected error'||l_return_status);
9309: END IF;
9310:
9311: RAISE fnd_api.g_exc_unexpected_error;
9312: END IF;
9313:
9314:
9315: x_return_status := l_return_status;

Line 9319: WHEN fnd_api.g_exc_error THEN

9315: x_return_status := l_return_status;
9316:
9317: EXCEPTION
9318:
9319: WHEN fnd_api.g_exc_error THEN
9320: x_return_status := fnd_api.g_ret_sts_error;
9321: -- Get message count and data
9322: fnd_msg_pub.count_and_get
9323: ( p_count => x_msg_count

Line 9320: x_return_status := fnd_api.g_ret_sts_error;

9316:
9317: EXCEPTION
9318:
9319: WHEN fnd_api.g_exc_error THEN
9320: x_return_status := fnd_api.g_ret_sts_error;
9321: -- Get message count and data
9322: fnd_msg_pub.count_and_get
9323: ( p_count => x_msg_count
9324: , p_data => x_msg_data

Line 9327: WHEN fnd_api.g_exc_unexpected_error THEN

9323: ( p_count => x_msg_count
9324: , p_data => x_msg_data
9325: );
9326:
9327: WHEN fnd_api.g_exc_unexpected_error THEN
9328: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9329:
9330: -- Get message count and data
9331: fnd_msg_pub.count_and_get

Line 9328: x_return_status := fnd_api.g_ret_sts_unexp_error ;

9324: , p_data => x_msg_data
9325: );
9326:
9327: WHEN fnd_api.g_exc_unexpected_error THEN
9328: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9329:
9330: -- Get message count and data
9331: fnd_msg_pub.count_and_get
9332: ( p_count => x_msg_count

Line 9337: x_return_status := fnd_api.g_ret_sts_unexp_error ;

9333: , p_data => x_msg_data
9334: );
9335:
9336: WHEN OTHERS THEN
9337: x_return_status := fnd_api.g_ret_sts_unexp_error ;
9338:
9339: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
9340: THEN
9341: fnd_msg_pub.add_exc_msg

Line 9361: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

9357: -- INVCONV incorporate parameter x_secondary_quantity_reserved
9358: PROCEDURE update_reservation
9359: (
9360: p_api_version_number IN NUMBER
9361: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
9362: , x_return_status OUT NOCOPY VARCHAR2
9363: , x_msg_count OUT NOCOPY NUMBER
9364: , x_msg_data OUT NOCOPY VARCHAR2
9365: , x_quantity_reserved OUT NOCOPY NUMBER

Line 9371: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

9367: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9368: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9369: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9370: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9371: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9372: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9373: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9374: , p_over_reservation_flag IN NUMBER DEFAULT 0
9375: ) IS

Line 9372: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false

9368: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
9369: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9370: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9371: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9372: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9373: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9374: , p_over_reservation_flag IN NUMBER DEFAULT 0
9375: ) IS
9376: l_api_version_number CONSTANT NUMBER := 1.0;

Line 9373: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false

9369: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
9370: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
9371: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
9372: , p_partial_reservation_flag IN VARCHAR2 DEFAULT fnd_api.g_false
9373: , p_check_availability IN VARCHAR2 DEFAULT fnd_api.g_false
9374: , p_over_reservation_flag IN NUMBER DEFAULT 0
9375: ) IS
9376: l_api_version_number CONSTANT NUMBER := 1.0;
9377: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';

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

9374: , p_over_reservation_flag IN NUMBER DEFAULT 0
9375: ) IS
9376: l_api_version_number CONSTANT NUMBER := 1.0;
9377: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9378: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9379: l_miss_num NUMBER := fnd_api.g_miss_num;
9380: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9381: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9382: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

Line 9379: l_miss_num NUMBER := fnd_api.g_miss_num;

9375: ) IS
9376: l_api_version_number CONSTANT NUMBER := 1.0;
9377: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9378: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9379: l_miss_num NUMBER := fnd_api.g_miss_num;
9380: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9381: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9382: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9383: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;

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

9376: l_api_version_number CONSTANT NUMBER := 1.0;
9377: l_api_name CONSTANT VARCHAR2(30) := 'Update_Reservation';
9378: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
9379: l_miss_num NUMBER := fnd_api.g_miss_num;
9380: l_miss_char VARCHAR2(1) := fnd_api.g_miss_char;
9381: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9382: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
9383: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
9384: l_orig_rsv_tbl_count NUMBER;

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

9464: END IF;
9465:
9466:
9467: -- Standard call to check for call compatibility
9468: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
9469: RAISE fnd_api.g_exc_unexpected_error;
9470: END IF;
9471:
9472: IF (l_debug = 1) THEN

Line 9469: RAISE fnd_api.g_exc_unexpected_error;

9465:
9466:
9467: -- Standard call to check for call compatibility
9468: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
9469: RAISE fnd_api.g_exc_unexpected_error;
9470: END IF;
9471:
9472: IF (l_debug = 1) THEN
9473: debug_print('The original reservation record: ');

Line 9500: RAISE fnd_api.g_exc_error;

9496: IF ((NVL(p_to_rsv_rec.reservation_quantity,0) < 0) OR
9497: (NVL(p_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
9498: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
9499: fnd_msg_pub.ADD;
9500: RAISE fnd_api.g_exc_error;
9501: END IF;
9502:
9503: -- INVCONV BEGIN
9504: IF (NVL(p_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 9507: RAISE fnd_api.g_exc_error;

9503: -- INVCONV BEGIN
9504: IF (NVL(p_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
9505: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY QTY'); -- INVCONV NEW MESSAGE
9506: fnd_msg_pub.ADD;
9507: RAISE fnd_api.g_exc_error;
9508: END IF;
9509: -- INVCONV END
9510:
9511: /**** {{ R12 Enhanced reservations code changes. Initializing orig parameters }}****/

Line 9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

9513: -- Set the original columns to g_miss_xxx as the user should not be
9514: -- setting these values. Do not query by them
9515: l_original_rsv_rec := p_original_rsv_rec;
9516:
9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

9514: -- setting these values. Do not query by them
9515: l_original_rsv_rec := p_original_rsv_rec;
9516:
9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

9515: l_original_rsv_rec := p_original_rsv_rec;
9516:
9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

9516:
9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

9517: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9525:

Line 9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

9518: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9525:
9526: /*** End R12 ***/

Line 9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

9519: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9525:
9526: /*** End R12 ***/
9527:

Line 9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

9520: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9521: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9522: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9523: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9524: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9525:
9526: /*** End R12 ***/
9527:
9528: --

Line 9532: (p_to_rsv_rec.primary_reservation_quantity IS NULL OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num))

9528: --
9529: -- if the update to quantity is 0, call delete instead
9530: IF p_to_rsv_rec.primary_reservation_quantity = 0 OR
9531: (p_to_rsv_rec.reservation_quantity = 0 AND
9532: (p_to_rsv_rec.primary_reservation_quantity IS NULL OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num))
9533: THEN
9534:
9535: delete_reservation
9536: (

Line 9547: IF l_return_status = fnd_api.g_ret_sts_error THEN

9543: , p_original_serial_number => p_original_serial_number
9544: , p_validation_flag => p_validation_flag
9545: );
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: , p_validation_flag => p_validation_flag
9545: );
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: --

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: --
9557: x_return_status := l_return_status;

Line 9563: IF fnd_api.to_boolean(p_init_msg_lst) THEN

9559: END IF;
9560:
9561: --
9562: -- Initialize message list.
9563: IF fnd_api.to_boolean(p_init_msg_lst) THEN
9564: fnd_msg_pub.initialize;
9565: END IF;
9566:
9567: --

Line 9577: , p_init_msg_lst => fnd_api.g_false

9573: /**** {{ R12 Enhanced reservations code changes }}****/
9574: query_reservation
9575: (
9576: p_api_version_number => 1.0
9577: , p_init_msg_lst => fnd_api.g_false
9578: , x_return_status => l_return_status
9579: , x_msg_count => x_msg_count
9580: , x_msg_data => x_msg_data
9581: , p_query_input => l_original_rsv_rec

Line 9582: , p_lock_records => fnd_api.g_true

9578: , x_return_status => l_return_status
9579: , x_msg_count => x_msg_count
9580: , x_msg_data => x_msg_data
9581: , p_query_input => l_original_rsv_rec
9582: , p_lock_records => fnd_api.g_true
9583: , x_mtl_reservation_tbl => l_orig_rsv_tbl
9584: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
9585: , x_error_code => l_error_code
9586: );

Line 9588: IF l_return_status = fnd_api.g_ret_sts_error THEN

9584: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
9585: , x_error_code => l_error_code
9586: );
9587: /*** End R12 ***/
9588: IF l_return_status = fnd_api.g_ret_sts_error THEN
9589: IF (l_debug = 1) THEN
9590: debug_print('Query Reservation returned error');
9591: END IF;
9592: RAISE fnd_api.g_exc_error;

Line 9592: RAISE fnd_api.g_exc_error;

9588: IF l_return_status = fnd_api.g_ret_sts_error THEN
9589: IF (l_debug = 1) THEN
9590: debug_print('Query Reservation returned error');
9591: END IF;
9592: RAISE fnd_api.g_exc_error;
9593: END IF;
9594:
9595: --
9596: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9596: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9592: RAISE fnd_api.g_exc_error;
9593: END IF;
9594:
9595: --
9596: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9597: IF (l_debug = 1) THEN
9598: debug_print('Query Reservation returned unexpected error');
9599: END IF;
9600: RAISE fnd_api.g_exc_unexpected_error;

Line 9600: RAISE fnd_api.g_exc_unexpected_error;

9596: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9597: IF (l_debug = 1) THEN
9598: debug_print('Query Reservation returned unexpected error');
9599: END IF;
9600: RAISE fnd_api.g_exc_unexpected_error;
9601: END IF;
9602:
9603: --
9604: IF l_orig_rsv_tbl_count = 0 THEN

Line 9610: RAISE fnd_api.g_exc_error;

9606: debug_print('Query Reservation returned no row');
9607: END IF;
9608: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
9609: fnd_msg_pub.ADD;
9610: RAISE fnd_api.g_exc_error;
9611: END IF;
9612:
9613: --
9614: IF l_orig_rsv_tbl_count > 1 THEN

Line 9620: RAISE fnd_api.g_exc_error;

9616: debug_print('Query Reservation returned more than one row');
9617: END IF;
9618: fnd_message.set_name('INV', 'INV-UPATE MORE THAN ONE RSV');
9619: fnd_msg_pub.ADD;
9620: RAISE fnd_api.g_exc_error;
9621: END IF;
9622:
9623: IF (l_debug = 1) THEN
9624: debug_print('Constructing to reservation row');

Line 9662: RAISE fnd_api.g_exc_error;

9658:
9659: IF l_lock_status = 0 THEN
9660: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
9661: fnd_msg_pub.ADD;
9662: RAISE fnd_api.g_exc_error;
9663: END if;
9664:
9665: inv_reservation_lock_pvt.lock_supply_demand_record
9666: (p_organization_id => l_to_rsv_rec.organization_id

Line 9678: RAISE fnd_api.g_exc_error;

9674:
9675: IF l_lock_status = 0 THEN
9676: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
9677: fnd_msg_pub.ADD;
9678: RAISE fnd_api.g_exc_error;
9679: END if;
9680:
9681: l_lock_obtained := TRUE;
9682: END IF;

Line 9693: RAISE fnd_api.g_exc_error;

9689: debug_print('Cannot update reservation ID');
9690: END IF;
9691: fnd_message.set_name('INV', 'CANNOT_UPDATE_RESERVATION_ID');
9692: fnd_msg_pub.ADD;
9693: RAISE fnd_api.g_exc_error;
9694: END IF;
9695:
9696: --
9697: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN

Line 9703: RAISE fnd_api.g_exc_error;

9699: debug_print('Cannot update organization ID');
9700: END IF;
9701: fnd_message.set_name('INV', 'CANNOT_UPDATE_ORGANIZATION_ID');
9702: fnd_msg_pub.ADD;
9703: RAISE fnd_api.g_exc_error;
9704: END IF;
9705:
9706: --
9707: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN

Line 9713: RAISE fnd_api.g_exc_error;

9709: debug_print('Cannot update Inventory Item ID');
9710: END IF;
9711: fnd_message.set_name('INV', 'CANNOT_UPDATE_INVENTORY_ITEM');
9712: fnd_msg_pub.ADD;
9713: RAISE fnd_api.g_exc_error;
9714: END IF;
9715:
9716: --
9717: -- convert quantity between primary uom and reservation uom

Line 9720: IF l_return_status = fnd_api.g_ret_sts_error THEN

9716: --
9717: -- convert quantity between primary uom and reservation uom
9718: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
9719:
9720: IF l_return_status = fnd_api.g_ret_sts_error THEN
9721: RAISE fnd_api.g_exc_error;
9722: END IF;
9723: --
9724: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9721: RAISE fnd_api.g_exc_error;

9717: -- convert quantity between primary uom and reservation uom
9718: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
9719:
9720: IF l_return_status = fnd_api.g_ret_sts_error THEN
9721: RAISE fnd_api.g_exc_error;
9722: END IF;
9723: --
9724: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9725: RAISE fnd_api.g_exc_unexpected_error;

Line 9724: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9720: IF l_return_status = fnd_api.g_ret_sts_error THEN
9721: RAISE fnd_api.g_exc_error;
9722: END IF;
9723: --
9724: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9725: RAISE fnd_api.g_exc_unexpected_error;
9726: END IF;
9727:
9728: --

Line 9725: RAISE fnd_api.g_exc_unexpected_error;

9721: RAISE fnd_api.g_exc_error;
9722: END IF;
9723: --
9724: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9725: RAISE fnd_api.g_exc_unexpected_error;
9726: END IF;
9727:
9728: --
9729: -- if the caller does not specified reservation_id, l_to_rsv_rec will

Line 9736: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;

9732: -- but we should set it to g_miss_num again
9733: -- otherwise query_reservation will use only the
9734: -- reservation_id to do the search.
9735: IF l_to_rsv_rec.reservation_id = l_orig_rsv_tbl(1).reservation_id THEN
9736: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;
9737: END IF;
9738:
9739: /**** {{ R12 Enhanced reservations code changes }}****/
9740:

Line 9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

9739: /**** {{ R12 Enhanced reservations code changes }}****/
9740:
9741: -- Set the original columns to g_miss_xxx as the user should not be
9742: -- setting these values. Do not query by them
9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

9740:
9741: -- Set the original columns to g_miss_xxx as the user should not be
9742: -- setting these values. Do not query by them
9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

9741: -- Set the original columns to g_miss_xxx as the user should not be
9742: -- setting these values. Do not query by them
9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

9742: -- setting these values. Do not query by them
9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

9743: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9751:

Line 9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

9744: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9751:
9752: IF (l_to_rsv_rec.project_id IS NULL) THEN

Line 9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

9745: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9751:
9752: IF (l_to_rsv_rec.project_id IS NULL) THEN
9753: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

Line 9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

9746: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
9747: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
9748: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9751:
9752: IF (l_to_rsv_rec.project_id IS NULL) THEN
9753: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
9754: END IF;

Line 9753: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

9749: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
9750: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
9751:
9752: IF (l_to_rsv_rec.project_id IS NULL) THEN
9753: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
9754: END IF;
9755: IF (l_to_rsv_rec.task_id IS NULL) THEN
9756: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
9757: END IF;

Line 9756: l_to_rsv_rec.task_id := fnd_api.g_miss_num;

9752: IF (l_to_rsv_rec.project_id IS NULL) THEN
9753: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
9754: END IF;
9755: IF (l_to_rsv_rec.task_id IS NULL) THEN
9756: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
9757: END IF;
9758: /*** End R12 ***/
9759:
9760: IF (l_debug = 1) THEN

Line 9767: , p_init_msg_lst => fnd_api.g_false

9763:
9764: query_reservation
9765: (
9766: p_api_version_number => 1.0
9767: , p_init_msg_lst => fnd_api.g_false
9768: , x_return_status => l_return_status
9769: , x_msg_count => x_msg_count
9770: , x_msg_data => x_msg_data
9771: , p_query_input => l_to_rsv_rec

Line 9772: , p_lock_records => fnd_api.g_true

9768: , x_return_status => l_return_status
9769: , x_msg_count => x_msg_count
9770: , x_msg_data => x_msg_data
9771: , p_query_input => l_to_rsv_rec
9772: , p_lock_records => fnd_api.g_true
9773: , x_mtl_reservation_tbl => l_to_rsv_tbl
9774: , x_mtl_reservation_tbl_count => l_to_rsv_tbl_count
9775: , x_error_code => l_error_code
9776: );

Line 9782: IF l_return_status = fnd_api.g_ret_sts_error THEN

9778: debug_print('Queried reservation');
9779: END IF;
9780:
9781: --
9782: IF l_return_status = fnd_api.g_ret_sts_error THEN
9783: IF (l_debug = 1) THEN
9784: debug_print('Query Reservation returned error');
9785: END IF;
9786: RAISE fnd_api.g_exc_error;

Line 9786: RAISE fnd_api.g_exc_error;

9782: IF l_return_status = fnd_api.g_ret_sts_error THEN
9783: IF (l_debug = 1) THEN
9784: debug_print('Query Reservation returned error');
9785: END IF;
9786: RAISE fnd_api.g_exc_error;
9787: END IF;
9788:
9789: --
9790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9786: RAISE fnd_api.g_exc_error;
9787: END IF;
9788:
9789: --
9790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9791: IF (l_debug = 1) THEN
9792: debug_print('Query Reservation returned unexpected error');
9793: END IF;
9794: RAISE fnd_api.g_exc_unexpected_error;

Line 9794: RAISE fnd_api.g_exc_unexpected_error;

9790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9791: IF (l_debug = 1) THEN
9792: debug_print('Query Reservation returned unexpected error');
9793: END IF;
9794: RAISE fnd_api.g_exc_unexpected_error;
9795: END IF;
9796:
9797: --
9798: IF l_to_rsv_tbl_count > 1

Line 9806: RAISE fnd_api.g_exc_error;

9802: debug_print('Reservation target row exists');
9803: END IF;
9804: fnd_message.set_name('INV', 'INV-RSV TARGET ROW EXISTS');
9805: fnd_msg_pub.ADD;
9806: RAISE fnd_api.g_exc_error;
9807: END IF;
9808:
9809: /**** {{ R12 Enhanced reservations code changes }}****/
9810:

Line 9836: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)

9832: inv_reservation_global.g_source_type_rma)) AND
9833: (l_pjm_enabled = 1) THEN
9834:
9835: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
9836: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
9837: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
9838: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
9839: BEGIN
9840: SELECT project_id, task_id INTO l_project_id, l_task_id

Line 9837: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR

9833: (l_pjm_enabled = 1) THEN
9834:
9835: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
9836: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
9837: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
9838: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
9839: BEGIN
9840: SELECT project_id, task_id INTO l_project_id, l_task_id
9841: FROM oe_order_lines_all WHERE

Line 9838: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

9834:
9835: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
9836: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
9837: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
9838: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
9839: BEGIN
9840: SELECT project_id, task_id INTO l_project_id, l_task_id
9841: FROM oe_order_lines_all WHERE
9842: line_id = l_to_rsv_rec.demand_source_line_id;

Line 9850: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

9846: debug_print('Cannot find the project and task information');
9847: END IF;
9848: END;
9849:
9850: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
9851: IF (l_project_id IS NOT NULL) THEN
9852: l_to_rsv_rec.project_id := l_project_id;
9853: ELSE
9854: l_to_rsv_rec.project_id := NULL;

Line 9858: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

9854: l_to_rsv_rec.project_id := NULL;
9855: END IF;
9856: END IF;
9857:
9858: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
9859: IF (l_task_id IS NOT NULL) THEN
9860: l_to_rsv_rec.task_id := l_task_id;
9861: ELSE
9862: l_to_rsv_rec.task_id := NULL;

Line 9888: IF (p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V') THEN

9884: END IF;
9885: /*** End R12 ***/
9886: --
9887: --Bug 2354735: Validate if p_validation_flag is either 'T' or 'V'
9888: IF (p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V') THEN
9889: IF (l_debug = 1) THEN
9890: debug_print('Validation flag is true');
9891: debug_print('from dmd src type:'|| l_orig_rsv_tbl(1).demand_source_type_id);
9892: debug_print('to dmd src type:'|| l_to_rsv_rec.demand_source_type_id);

Line 9925: IF l_return_status = fnd_api.g_ret_sts_error THEN

9921: , x_to_sub_cache_index => l_to_sub_cache_index
9922: );
9923:
9924: --
9925: IF l_return_status = fnd_api.g_ret_sts_error THEN
9926: IF (l_debug = 1) THEN
9927: debug_print('Validate input parameters returned error');
9928: END IF;
9929: RAISE fnd_api.g_exc_error;

Line 9929: RAISE fnd_api.g_exc_error;

9925: IF l_return_status = fnd_api.g_ret_sts_error THEN
9926: IF (l_debug = 1) THEN
9927: debug_print('Validate input parameters returned error');
9928: END IF;
9929: RAISE fnd_api.g_exc_error;
9930: END IF;
9931:
9932: --
9933: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9933: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9929: RAISE fnd_api.g_exc_error;
9930: END IF;
9931:
9932: --
9933: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9934: IF (l_debug = 1) THEN
9935: debug_print('Validate input parameters returned unexpected error');
9936: END IF;
9937: RAISE fnd_api.g_exc_unexpected_error;

Line 9937: RAISE fnd_api.g_exc_unexpected_error;

9933: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9934: IF (l_debug = 1) THEN
9935: debug_print('Validate input parameters returned unexpected error');
9936: END IF;
9937: RAISE fnd_api.g_exc_unexpected_error;
9938: END IF;
9939: END IF;
9940:
9941: -- INVCONV B4498579 BEGIN

Line 9964: IF (((p_validation_flag = fnd_api.g_true) OR (p_validation_flag = 'T') OR

9960:
9961: -- Pick Releaser Performance - Added validation_flag = 'Q' to distinguish
9962: -- between validation above and the qty tree processing below.
9963: /**** {{ R12 Enhanced reservations code changes }}****/
9964: IF (((p_validation_flag = fnd_api.g_true) OR (p_validation_flag = 'T') OR
9965: (p_validation_flag = 'Q')) AND l_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv)
9966: THEN
9967: /*** End R12 ***/
9968:

Line 9972: , p_init_msg_lst => fnd_api.g_true

9968:
9969: inv_quantity_tree_pvt.create_tree
9970: (
9971: p_api_version_number => 1.0
9972: , p_init_msg_lst => fnd_api.g_true
9973: , x_return_status => l_return_status
9974: , x_msg_count => x_msg_count
9975: , x_msg_data => x_msg_data
9976: , p_organization_id => l_orig_rsv_tbl(1).organization_id

Line 9994: IF l_return_status = fnd_api.g_ret_sts_error THEN

9990: , x_tree_id => l_tree_id1
9991: );
9992:
9993: --
9994: IF l_return_status = fnd_api.g_ret_sts_error THEN
9995: IF (l_debug = 1) THEN
9996: debug_print('Create Tree returned error');
9997: END IF;
9998: RAISE fnd_api.g_exc_error;

Line 9998: RAISE fnd_api.g_exc_error;

9994: IF l_return_status = fnd_api.g_ret_sts_error THEN
9995: IF (l_debug = 1) THEN
9996: debug_print('Create Tree returned error');
9997: END IF;
9998: RAISE fnd_api.g_exc_error;
9999: END IF;
10000:
10001: --
10002: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10002: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9998: RAISE fnd_api.g_exc_error;
9999: END IF;
10000:
10001: --
10002: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10003: IF (l_debug = 1) THEN
10004: debug_print('Create Tree returned unexpected error');
10005: END IF;
10006: RAISE fnd_api.g_exc_unexpected_error;

Line 10006: RAISE fnd_api.g_exc_unexpected_error;

10002: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10003: IF (l_debug = 1) THEN
10004: debug_print('Create Tree returned unexpected error');
10005: END IF;
10006: RAISE fnd_api.g_exc_unexpected_error;
10007: END IF;
10008:
10009: --
10010: /* Bug 1575930

Line 10020: * , p_init_msg_lst => fnd_api.g_true

10016: * Instead, pass NULL to the modify_tree procedure.
10017: *inv_quantity_tree_pvt.create_tree
10018: * (
10019: * p_api_version_number => 1.0
10020: * , p_init_msg_lst => fnd_api.g_true
10021: * , x_return_status => l_return_status
10022: * , x_msg_count => x_msg_count
10023: * , x_msg_data => x_msg_data
10024: * , p_organization_id => l_to_rsv_rec.organization_id

Line 10041: *IF l_return_status = fnd_api.g_ret_sts_error THEN

10037: * , p_lot_expiration_date => NULL
10038: * , x_tree_id => l_tree_id2
10039: *);
10040: --
10041: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10042: * RAISE fnd_api.g_exc_error;
10043: *END IF ;
10044: --
10045: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10042: * RAISE fnd_api.g_exc_error;

10038: * , x_tree_id => l_tree_id2
10039: *);
10040: --
10041: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10042: * RAISE fnd_api.g_exc_error;
10043: *END IF ;
10044: --
10045: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10046: * RAISE fnd_api.g_exc_unexpected_error;

Line 10045: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10041: *IF l_return_status = fnd_api.g_ret_sts_error THEN
10042: * RAISE fnd_api.g_exc_error;
10043: *END IF ;
10044: --
10045: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10046: * RAISE fnd_api.g_exc_unexpected_error;
10047: *END IF;
10048: */
10049: --

Line 10046: * RAISE fnd_api.g_exc_unexpected_error;

10042: * RAISE fnd_api.g_exc_error;
10043: *END IF ;
10044: --
10045: *IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10046: * RAISE fnd_api.g_exc_unexpected_error;
10047: *END IF;
10048: */
10049: --
10050: l_tree_id2 := NULL;

Line 10086: IF l_return_status = fnd_api.g_ret_sts_error THEN

10082: , p_partial_reservation_flag => p_partial_reservation_flag
10083: , p_check_availability => p_check_availability
10084: );
10085:
10086: IF l_return_status = fnd_api.g_ret_sts_error THEN
10087: IF (l_debug = 1) THEN
10088: debug_print('modify_tree_for_update_xfer returned error');
10089: END IF;
10090: RAISE fnd_api.g_exc_error;

Line 10090: RAISE fnd_api.g_exc_error;

10086: IF l_return_status = fnd_api.g_ret_sts_error THEN
10087: IF (l_debug = 1) THEN
10088: debug_print('modify_tree_for_update_xfer returned error');
10089: END IF;
10090: RAISE fnd_api.g_exc_error;
10091: END IF;
10092:
10093: --
10094: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10094: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10090: RAISE fnd_api.g_exc_error;
10091: END IF;
10092:
10093: --
10094: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10095: IF (l_debug = 1) THEN
10096: debug_print('modify_tree_for_update_xfer returned unexpected error');
10097: END IF;
10098: RAISE fnd_api.g_exc_unexpected_error;

Line 10098: RAISE fnd_api.g_exc_unexpected_error;

10094: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10095: IF (l_debug = 1) THEN
10096: debug_print('modify_tree_for_update_xfer returned unexpected error');
10097: END IF;
10098: RAISE fnd_api.g_exc_unexpected_error;
10099: END IF;
10100:
10101:
10102: IF (l_debug = 1) THEN

Line 10135: IF l_return_status = fnd_api.g_ret_sts_error THEN

10131: IF (l_debug = 1) THEN
10132: debug_print('After convert qty ' || l_return_status);
10133: END IF;
10134:
10135: IF l_return_status = fnd_api.g_ret_sts_error THEN
10136: IF (l_debug = 1) THEN
10137: debug_print('The convert_quantity returned a expected error');
10138: END IF;
10139: RAISE fnd_api.g_exc_error;

Line 10139: RAISE fnd_api.g_exc_error;

10135: IF l_return_status = fnd_api.g_ret_sts_error THEN
10136: IF (l_debug = 1) THEN
10137: debug_print('The convert_quantity returned a expected error');
10138: END IF;
10139: RAISE fnd_api.g_exc_error;
10140: END IF;
10141:
10142: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10143: IF (l_debug = 1) THEN

Line 10142: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10138: END IF;
10139: RAISE fnd_api.g_exc_error;
10140: END IF;
10141:
10142: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10143: IF (l_debug = 1) THEN
10144: debug_print('The convert_quantity returned a unexpected error');
10145: END IF;
10146: RAISE fnd_api.g_exc_unexpected_error;

Line 10146: RAISE fnd_api.g_exc_unexpected_error;

10142: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10143: IF (l_debug = 1) THEN
10144: debug_print('The convert_quantity returned a unexpected error');
10145: END IF;
10146: RAISE fnd_api.g_exc_unexpected_error;
10147: END IF;
10148:
10149: END IF;--partial reservation case
10150:

Line 10198: IF l_return_status = fnd_api.g_ret_sts_error THEN

10194: debug_print('Available quantity to reserve: ' || l_quantity_reserved);
10195: END IF;
10196:
10197: --
10198: IF l_return_status = fnd_api.g_ret_sts_error THEN
10199: RAISE fnd_api.g_exc_error;
10200: END IF;
10201:
10202: --

Line 10199: RAISE fnd_api.g_exc_error;

10195: END IF;
10196:
10197: --
10198: IF l_return_status = fnd_api.g_ret_sts_error THEN
10199: RAISE fnd_api.g_exc_error;
10200: END IF;
10201:
10202: --
10203: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10203: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10199: RAISE fnd_api.g_exc_error;
10200: END IF;
10201:
10202: --
10203: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10204: RAISE fnd_api.g_exc_unexpected_error;
10205: END IF;
10206:
10207: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)

Line 10204: RAISE fnd_api.g_exc_unexpected_error;

10200: END IF;
10201:
10202: --
10203: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10204: RAISE fnd_api.g_exc_unexpected_error;
10205: END IF;
10206:
10207: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)
10208: > 0.000005) THEN

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

10206:
10207: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)
10208: > 0.000005) THEN
10209:
10210: IF (p_partial_reservation_flag = fnd_api.g_false) THEN
10211: IF (l_debug = 1) THEN
10212: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
10213: END IF;
10214: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');

Line 10216: RAISE fnd_api.g_exc_error;

10212: debug_print('The supply document doesnt have enough quantity to be reserved against. error out. ');
10213: END IF;
10214: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
10215: fnd_msg_pub.ADD;
10216: RAISE fnd_api.g_exc_error;
10217: ELSE
10218: l_to_rsv_rec.primary_reservation_quantity := l_quantity_reserved;
10219: l_to_rsv_rec.reservation_quantity := NULL;
10220: IF (l_debug = 1) THEN

Line 10229: IF l_return_status = fnd_api.g_ret_sts_error THEN

10225: IF (l_debug = 1) THEN
10226: debug_print('After convert qty ' || l_return_status);
10227: END IF;
10228:
10229: IF l_return_status = fnd_api.g_ret_sts_error THEN
10230: RAISE fnd_api.g_exc_error;
10231: END IF;
10232:
10233: --

Line 10230: RAISE fnd_api.g_exc_error;

10226: debug_print('After convert qty ' || l_return_status);
10227: END IF;
10228:
10229: IF l_return_status = fnd_api.g_ret_sts_error THEN
10230: RAISE fnd_api.g_exc_error;
10231: END IF;
10232:
10233: --
10234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10230: RAISE fnd_api.g_exc_error;
10231: END IF;
10232:
10233: --
10234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10235: RAISE fnd_api.g_exc_unexpected_error;
10236: END IF;
10237:
10238: END IF;

Line 10235: RAISE fnd_api.g_exc_unexpected_error;

10231: END IF;
10232:
10233: --
10234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10235: RAISE fnd_api.g_exc_unexpected_error;
10236: END IF;
10237:
10238: END IF;
10239:

Line 10269: RAISE fnd_api.g_exc_error;

10265: WHERE line_id = l_to_rsv_rec.demand_source_line_id;
10266: EXCEPTION WHEN no_data_found THEN
10267: fnd_message.set_name('INV', 'INV_INVALID_SALES_ORDER');
10268: fnd_msg_pub.ADD;
10269: RAISE fnd_api.g_exc_error;
10270: END;
10271: END IF;
10272:
10273: IF (l_debug = 1) THEN

Line 10329: IF l_return_status = fnd_api.g_ret_sts_error THEN

10325: debug_print('Available quantity to reserve. l_qty_changed: ' || l_quantity_reserved);
10326: END IF;
10327:
10328: --
10329: IF l_return_status = fnd_api.g_ret_sts_error THEN
10330: RAISE fnd_api.g_exc_error;
10331: END IF;
10332:
10333: --

Line 10330: RAISE fnd_api.g_exc_error;

10326: END IF;
10327:
10328: --
10329: IF l_return_status = fnd_api.g_ret_sts_error THEN
10330: RAISE fnd_api.g_exc_error;
10331: END IF;
10332:
10333: --
10334: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10334: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10330: RAISE fnd_api.g_exc_error;
10331: END IF;
10332:
10333: --
10334: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10335: RAISE fnd_api.g_exc_unexpected_error;
10336: END IF;
10337:
10338: IF ((l_to_rsv_rec.primary_reservation_quantity -

Line 10335: RAISE fnd_api.g_exc_unexpected_error;

10331: END IF;
10332:
10333: --
10334: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10335: RAISE fnd_api.g_exc_unexpected_error;
10336: END IF;
10337:
10338: IF ((l_to_rsv_rec.primary_reservation_quantity -
10339: l_quantity_reserved) > 0.000005) THEN

Line 10347: RAISE fnd_api.g_exc_error;

10343: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
10344: END IF;
10345: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
10346: fnd_msg_pub.ADD;
10347: RAISE fnd_api.g_exc_error;
10348: END IF;
10349:
10350: END IF;
10351:

Line 10382: IF l_return_status = fnd_api.g_ret_sts_error THEN

10378: ,x_msg_data => x_msg_data
10379: );
10380: END IF;
10381: --
10382: IF l_return_status = fnd_api.g_ret_sts_error THEN
10383: debug_print('Pre Update CTO validation returned error');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386:

Line 10384: RAISE fnd_api.g_exc_error;

10380: END IF;
10381: --
10382: IF l_return_status = fnd_api.g_ret_sts_error THEN
10383: debug_print('Pre Update CTO validation returned error');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386:
10387: --
10388: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10388: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386:
10387: --
10388: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10389: debug_print('Pre Update CTO validation returned unexpected error');
10390: RAISE fnd_api.g_exc_unexpected_error;
10391: END IF;
10392: --

Line 10390: RAISE fnd_api.g_exc_unexpected_error;

10386:
10387: --
10388: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10389: debug_print('Pre Update CTO validation returned unexpected error');
10390: RAISE fnd_api.g_exc_unexpected_error;
10391: END IF;
10392: --
10393: END IF;
10394:

Line 10430: RAISE fnd_api.g_exc_error;

10426: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
10427: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
10428: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
10429: fnd_msg_pub.ADD;
10430: RAISE fnd_api.g_exc_error;
10431: END IF;
10432:
10433: -- INVCONV BEGIN
10434: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 10437: RAISE fnd_api.g_exc_error;

10433: -- INVCONV BEGIN
10434: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
10435: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
10436: fnd_msg_pub.ADD;
10437: RAISE fnd_api.g_exc_error;
10438: END IF;
10439: -- INVCONV END
10440:
10441: /**** {{ R12 Enhanced reservations code changes }}****/

Line 10489: IF l_return_status = fnd_api.g_ret_sts_error THEN

10485: debug_print('After calling validate serials ' || l_return_status);
10486: END IF;
10487:
10488: --
10489: IF l_return_status = fnd_api.g_ret_sts_error THEN
10490: RAISE fnd_api.g_exc_error;
10491: END IF;
10492:
10493:

Line 10490: RAISE fnd_api.g_exc_error;

10486: END IF;
10487:
10488: --
10489: IF l_return_status = fnd_api.g_ret_sts_error THEN
10490: RAISE fnd_api.g_exc_error;
10491: END IF;
10492:
10493:
10494: --

Line 10495: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10491: END IF;
10492:
10493:
10494: --
10495: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10496: RAISE fnd_api.g_exc_unexpected_error;
10497: END IF;
10498:
10499: -- there are some serial reserved. Check if the number of serials

Line 10496: RAISE fnd_api.g_exc_unexpected_error;

10492:
10493:
10494: --
10495: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10496: RAISE fnd_api.g_exc_unexpected_error;
10497: END IF;
10498:
10499: -- there are some serial reserved. Check if the number of serials
10500: -- exceed the reservation quantity.

Line 10526: RAISE fnd_api.g_exc_error;

10522: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
10523: END IF;
10524: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10525: fnd_msg_pub.ADD;
10526: RAISE fnd_api.g_exc_error;
10527: END;
10528: IF l_debug=1 THEN
10529: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);
10530: END IF;

Line 10569: RAISE fnd_api.g_exc_error;

10565: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
10566: END IF;
10567: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10568: fnd_msg_pub.ADD;
10569: RAISE fnd_api.g_exc_error;
10570: END;
10571: IF l_debug=1 THEN
10572: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);
10573: END IF;

Line 10607: RAISE fnd_api.g_exc_error;

10603: p_to_serial_number(i).serial_number);
10604: END IF;
10605: fnd_message.set_name('INV', 'INV_INVALID_TO_SERIAL');
10606: fnd_msg_pub.ADD;
10607: RAISE fnd_api.g_exc_error;
10608: END;
10609:
10610: IF (l_reservation_id IS NOT NULL AND l_reservation_id <>
10611: l_orig_rsv_tbl(1).reservation_id) THEN

Line 10614: RAISE fnd_api.g_exc_error;

10610: IF (l_reservation_id IS NOT NULL AND l_reservation_id <>
10611: l_orig_rsv_tbl(1).reservation_id) THEN
10612: fnd_message.set_name('INV', 'INV_INVALID_TO_SERIAL');
10613: fnd_msg_pub.ADD;
10614: RAISE fnd_api.g_exc_error;
10615: END IF;
10616:
10617: -- If the serial is not reserved then it should not have the
10618: -- group mark id stamped. It means it is being used by

Line 10627: RAISE fnd_api.g_exc_error;

10623: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
10624: END IF;
10625: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10626: fnd_msg_pub.ADD;
10627: RAISE fnd_api.g_exc_error;
10628: END IF;
10629:
10630: END LOOP;
10631:

Line 10654: RAISE fnd_api.g_exc_error;

10650: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
10651: END IF;
10652: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10653: fnd_msg_pub.ADD;
10654: RAISE fnd_api.g_exc_error;
10655: END;
10656: END LOOP;
10657: END IF;
10658:

Line 10685: RAISE fnd_api.g_exc_error;

10681: record. serial number: ' || p_to_serial_number(i).serial_number);
10682: END IF;
10683: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10684: fnd_msg_pub.ADD;
10685: RAISE fnd_api.g_exc_error;
10686: END;
10687: END LOOP;
10688: END IF;
10689:

Line 10755: RAISE fnd_api.g_exc_error;

10751: debug_print('Inside relieve serials.No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
10752: END IF;
10753: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
10754: fnd_msg_pub.ADD;
10755: RAISE fnd_api.g_exc_error;
10756: END;
10757: END LOOP;
10758: -- update the serial reservation quantity to be the primary
10759: -- reservation quantity, as it is in excess.

Line 10902: IF l_return_status = fnd_api.g_ret_sts_error THEN

10898: debug_print('Calling inv_rsv_synch.for_update');
10899: END IF;
10900: 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);
10901:
10902: IF l_return_status = fnd_api.g_ret_sts_error THEN
10903: RAISE fnd_api.g_exc_error;
10904: END IF;
10905:
10906: --

Line 10903: RAISE fnd_api.g_exc_error;

10899: END IF;
10900: 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);
10901:
10902: IF l_return_status = fnd_api.g_ret_sts_error THEN
10903: RAISE fnd_api.g_exc_error;
10904: END IF;
10905:
10906: --
10907: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10907: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10903: RAISE fnd_api.g_exc_error;
10904: END IF;
10905:
10906: --
10907: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10908: RAISE fnd_api.g_exc_unexpected_error;
10909: END IF;
10910:
10911: --

Line 10908: RAISE fnd_api.g_exc_unexpected_error;

10904: END IF;
10905:
10906: --
10907: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10908: RAISE fnd_api.g_exc_unexpected_error;
10909: END IF;
10910:
10911: --
10912: -- Post Update CTO Validation

Line 10939: IF l_return_status = fnd_api.g_ret_sts_error THEN

10935: ,x_msg_data => x_msg_data
10936: );
10937: END IF;
10938: --
10939: IF l_return_status = fnd_api.g_ret_sts_error THEN
10940: RAISE fnd_api.g_exc_error;
10941: END IF;
10942:
10943: --

Line 10940: RAISE fnd_api.g_exc_error;

10936: );
10937: END IF;
10938: --
10939: IF l_return_status = fnd_api.g_ret_sts_error THEN
10940: RAISE fnd_api.g_exc_error;
10941: END IF;
10942:
10943: --
10944: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 10944: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10940: RAISE fnd_api.g_exc_error;
10941: END IF;
10942:
10943: --
10944: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10945: RAISE fnd_api.g_exc_unexpected_error;
10946: END IF;
10947: --
10948: END IF;

Line 10945: RAISE fnd_api.g_exc_unexpected_error;

10941: END IF;
10942:
10943: --
10944: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10945: RAISE fnd_api.g_exc_unexpected_error;
10946: END IF;
10947: --
10948: END IF;
10949:

Line 10968: WHEN fnd_api.g_exc_error THEN

10964: x_secondary_quantity_reserved:=l_secondary_quantity_reserved;
10965: END IF;
10966: -- INVCONV END
10967: EXCEPTION
10968: WHEN fnd_api.g_exc_error THEN
10969: IF (l_debug = 1) THEN
10970: debug_print('Exception');
10971: END IF;
10972: ROLLBACK TO update_reservation_sa;

Line 10973: x_return_status := fnd_api.g_ret_sts_error;

10969: IF (l_debug = 1) THEN
10970: debug_print('Exception');
10971: END IF;
10972: ROLLBACK TO update_reservation_sa;
10973: x_return_status := fnd_api.g_ret_sts_error;
10974: /**** {{ R12 Enhanced reservations code changes. Should be
10975: -- releasing the locks. }} *****/
10976: IF l_lock_obtained THEN
10977: inv_reservation_lock_pvt.release_lock

Line 10985: WHEN fnd_api.g_exc_unexpected_error THEN

10981: END IF;
10982: /*** End R12 ***/
10983: -- Get message count and data
10984: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
10985: WHEN fnd_api.g_exc_unexpected_error THEN
10986: IF (l_debug = 1) THEN
10987: debug_print('Exception Unexpected');
10988: END IF;
10989: ROLLBACK TO update_reservation_sa;

Line 10990: x_return_status := fnd_api.g_ret_sts_unexp_error;

10986: IF (l_debug = 1) THEN
10987: debug_print('Exception Unexpected');
10988: END IF;
10989: ROLLBACK TO update_reservation_sa;
10990: x_return_status := fnd_api.g_ret_sts_unexp_error;
10991: /**** {{ R12 Enhanced reservations code changes. Should be
10992: -- releasing the locks. }} *****/
10993: IF l_lock_obtained THEN
10994: inv_reservation_lock_pvt.release_lock

Line 11007: x_return_status := fnd_api.g_ret_sts_unexp_error;

11003: IF (l_debug = 1) THEN
11004: debug_print('Exception Others'|| SQLERRM);
11005: END IF;
11006: ROLLBACK TO update_reservation_sa;
11007: x_return_status := fnd_api.g_ret_sts_unexp_error;
11008: /**** {{ R12 Enhanced reservations code changes. Should be
11009: -- releasing the locks. }} *****/
11010: IF l_lock_obtained THEN
11011: inv_reservation_lock_pvt.release_lock

Line 11028: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

11024:
11025: --
11026: PROCEDURE relieve_reservation(
11027: p_api_version_number IN NUMBER
11028: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
11029: , x_return_status OUT NOCOPY VARCHAR2
11030: , x_msg_count OUT NOCOPY NUMBER
11031: , x_msg_data OUT NOCOPY VARCHAR2
11032: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 11035: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true

11031: , x_msg_data OUT NOCOPY VARCHAR2
11032: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
11033: , p_primary_relieved_quantity IN NUMBER
11034: , p_secondary_relieved_quantity IN NUMBER -- INVCONV
11035: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true
11036: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
11037: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11038: , x_primary_relieved_quantity OUT NOCOPY NUMBER
11039: , x_secondary_relieved_quantity OUT NOCOPY NUMBER -- INVCONV

Line 11037: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

11033: , p_primary_relieved_quantity IN NUMBER
11034: , p_secondary_relieved_quantity IN NUMBER -- INVCONV
11035: , p_relieve_all IN VARCHAR2 DEFAULT fnd_api.g_true
11036: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
11037: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11038: , x_primary_relieved_quantity OUT NOCOPY NUMBER
11039: , x_secondary_relieved_quantity OUT NOCOPY NUMBER -- INVCONV
11040: , x_primary_remain_quantity OUT NOCOPY NUMBER
11041: , x_secondary_remain_quantity OUT NOCOPY NUMBER -- INVCONV

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

11041: , x_secondary_remain_quantity OUT NOCOPY NUMBER -- INVCONV
11042: ) IS
11043: l_api_version_number CONSTANT NUMBER := 1.0;
11044: l_api_name CONSTANT VARCHAR2(30) := 'Relieve_Reservation';
11045: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
11046: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
11047: l_tmp_rsv_tbl_count NUMBER;
11048: l_reservation_id NUMBER;
11049: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

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

11083: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
11084: /*** End R12 }} ***/
11085: BEGIN
11086: -- Standard call to check for call compatibility
11087: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11088: RAISE fnd_api.g_exc_unexpected_error;
11089: END IF;
11090:
11091: --

Line 11088: RAISE fnd_api.g_exc_unexpected_error;

11084: /*** End R12 }} ***/
11085: BEGIN
11086: -- Standard call to check for call compatibility
11087: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11088: RAISE fnd_api.g_exc_unexpected_error;
11089: END IF;
11090:
11091: --
11092: -- Initialize message list.

Line 11093: IF fnd_api.to_boolean(p_init_msg_lst) THEN

11089: END IF;
11090:
11091: --
11092: -- Initialize message list.
11093: IF fnd_api.to_boolean(p_init_msg_lst) THEN
11094: fnd_msg_pub.initialize;
11095: END IF;
11096:
11097: --

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

11114: -- Set the original columns to g_miss_xxx as the user should not be
11115: -- setting these values. Do not query by them
11116: l_rsv_rec := p_rsv_rec;
11117:
11118: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

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

11115: -- setting these values. Do not query by them
11116: l_rsv_rec := p_rsv_rec;
11117:
11118: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

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

11116: l_rsv_rec := p_rsv_rec;
11117:
11118: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

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

11117:
11118: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11125: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

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

11118: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11125: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11126:

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

11119: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11125: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11126:
11127: /*** End R12 }} ***/

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

11120: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11125: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11126:
11127: /*** End R12 }} ***/
11128:

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

11121: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11122: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11123: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11124: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11125: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11126:
11127: /*** End R12 }} ***/
11128:
11129: IF (l_debug = 1) THEN

Line 11134: , p_init_msg_lst => fnd_api.g_false

11130: debug_print('calling query_reservation');
11131: END IF;
11132: query_reservation(
11133: p_api_version_number => 1.0
11134: , p_init_msg_lst => fnd_api.g_false
11135: , x_return_status => l_return_status
11136: , x_msg_count => x_msg_count
11137: , x_msg_data => x_msg_data
11138: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/

Line 11139: , p_lock_records => fnd_api.g_true

11135: , x_return_status => l_return_status
11136: , x_msg_count => x_msg_count
11137: , x_msg_data => x_msg_data
11138: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/
11139: , p_lock_records => fnd_api.g_true
11140: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
11141: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
11142: , x_error_code => l_error_code
11143: );

Line 11146: IF l_return_status = fnd_api.g_ret_sts_error THEN

11142: , x_error_code => l_error_code
11143: );
11144:
11145: --
11146: IF l_return_status = fnd_api.g_ret_sts_error THEN
11147: IF (l_debug = 1) THEN
11148: debug_print( 'error from query reservation');
11149: END IF;
11150: RAISE fnd_api.g_exc_error;

Line 11150: RAISE fnd_api.g_exc_error;

11146: IF l_return_status = fnd_api.g_ret_sts_error THEN
11147: IF (l_debug = 1) THEN
11148: debug_print( 'error from query reservation');
11149: END IF;
11150: RAISE fnd_api.g_exc_error;
11151: END IF;
11152:
11153: --
11154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11150: RAISE fnd_api.g_exc_error;
11151: END IF;
11152:
11153: --
11154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11155: IF (l_debug = 1) THEN
11156: debug_print('error from query reservation');
11157: END IF;
11158: RAISE fnd_api.g_exc_unexpected_error;

Line 11158: RAISE fnd_api.g_exc_unexpected_error;

11154: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11155: IF (l_debug = 1) THEN
11156: debug_print('error from query reservation');
11157: END IF;
11158: RAISE fnd_api.g_exc_unexpected_error;
11159: END IF;
11160:
11161: --
11162: IF l_tmp_rsv_tbl_count = 0 THEN

Line 11168: RAISE fnd_api.g_exc_error;

11164: debug_print('reservation not found ');
11165: END IF;
11166: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
11167: fnd_msg_pub.ADD;
11168: RAISE fnd_api.g_exc_error;
11169: END IF;
11170:
11171: --
11172: IF l_tmp_rsv_tbl_count > 1 THEN

Line 11178: RAISE fnd_api.g_exc_error;

11174: debug_print('found more than one row reservation');
11175: END IF;
11176: fnd_message.set_name('INV', 'INV-RELIEVE MORE THAN ONE ROW');
11177: fnd_msg_pub.ADD;
11178: RAISE fnd_api.g_exc_error;
11179: END IF;
11180:
11181: --
11182: l_reservation_id := l_tmp_rsv_tbl(1).reservation_id;

Line 11187: IF p_validation_flag = fnd_api.g_true THEN

11183: IF (l_debug = 1) THEN
11184: debug_print('reservation id is ' || l_reservation_id);
11185: END IF;
11186:
11187: IF p_validation_flag = fnd_api.g_true THEN
11188: -- validation is needed to get revision, lot,
11189: --serial control information
11190: -- for creating the quantity tree
11191:

Line 11196: (l_tmp_rsv_tbl(1).crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

11192: -- added for crossdock reservation, pass the to reservation record
11193: -- with values instead of dummy record with the remain quantity
11194: -- populated to the record.
11195: IF ((l_tmp_rsv_tbl(1).crossdock_criteria_id is not null) and
11196: (l_tmp_rsv_tbl(1).crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
11197: IF (l_debug = 1) THEN
11198: debug_print('assigning cross dock to record');
11199: END IF;
11200:

Line 11201: IF (p_relieve_all = fnd_api.g_false) THEN

11197: IF (l_debug = 1) THEN
11198: debug_print('assigning cross dock to record');
11199: END IF;
11200:
11201: IF (p_relieve_all = fnd_api.g_false) THEN
11202: IF (l_debug = 1) THEN
11203: debug_print('relieve all is false');
11204: END IF;
11205: l_primary_remain_quantity :=

Line 11249: IF l_return_status = fnd_api.g_ret_sts_error THEN

11245: , x_to_sub_cache_index => l_to_sub_cache_index
11246: );
11247:
11248: --
11249: IF l_return_status = fnd_api.g_ret_sts_error THEN
11250: IF (l_debug = 1) THEN
11251: debug_print('Error in validate_input_parameters');
11252: END IF;
11253: RAISE fnd_api.g_exc_error;

Line 11253: RAISE fnd_api.g_exc_error;

11249: IF l_return_status = fnd_api.g_ret_sts_error THEN
11250: IF (l_debug = 1) THEN
11251: debug_print('Error in validate_input_parameters');
11252: END IF;
11253: RAISE fnd_api.g_exc_error;
11254: END IF;
11255:
11256: --
11257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11253: RAISE fnd_api.g_exc_error;
11254: END IF;
11255:
11256: --
11257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11258: IF (l_debug = 1) THEN
11259: debug_print('Unexpected error in validate_input_parameters');
11260: END IF;
11261: RAISE fnd_api.g_exc_unexpected_error;

Line 11261: RAISE fnd_api.g_exc_unexpected_error;

11257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11258: IF (l_debug = 1) THEN
11259: debug_print('Unexpected error in validate_input_parameters');
11260: END IF;
11261: RAISE fnd_api.g_exc_unexpected_error;
11262: END IF;
11263:
11264: --
11265: -- INVCONV BEGIN

Line 11273: AND p_relieve_all <> fnd_api.g_true THEN

11269: -- INVCONV END
11270: --
11271: -- check quantity
11272: IF p_primary_relieved_quantity IS NULL
11273: AND p_relieve_all <> fnd_api.g_true THEN
11274: IF (l_debug = 1) THEN
11275: debug_print('relieve_quantity_not_specified');
11276: END IF;
11277: fnd_message.set_name('INV', 'RELIEVE_QUANTITY_NOT_SPECIFIED');

Line 11279: RAISE fnd_api.g_exc_error;

11275: debug_print('relieve_quantity_not_specified');
11276: END IF;
11277: fnd_message.set_name('INV', 'RELIEVE_QUANTITY_NOT_SPECIFIED');
11278: fnd_msg_pub.ADD;
11279: RAISE fnd_api.g_exc_error;
11280: END IF;
11281:
11282: IF p_primary_relieved_quantity > l_tmp_rsv_tbl(1).primary_reservation_quantity THEN
11283: IF (l_debug = 1) THEN

Line 11288: RAISE fnd_api.g_exc_unexpected_error;

11284: debug_print('relieve_more_than_reserved');
11285: END IF;
11286: fnd_message.set_name('INV', 'RELIEVE_MORE_THAN_RESERVED');
11287: fnd_msg_pub.ADD;
11288: RAISE fnd_api.g_exc_unexpected_error;
11289: END IF;
11290:
11291: IF is_dual_control(l_orig_item_cache_index) THEN
11292: l_dual_control_flag := 'Y';

Line 11295: IF p_relieve_all = fnd_api.g_true THEN

11291: IF is_dual_control(l_orig_item_cache_index) THEN
11292: l_dual_control_flag := 'Y';
11293: END IF;
11294:
11295: IF p_relieve_all = fnd_api.g_true THEN
11296: l_primary_relieved_quantity := l_tmp_rsv_tbl(1).primary_reservation_quantity;
11297: l_primary_remain_quantity := 0;
11298: -- INVCONV BEGIN
11299: IF l_dual_control_flag = 'Y' THEN

Line 11324: , p_init_msg_lst => fnd_api.g_true

11320: debug_print('calling inv_quantity_tree_pvt.create_tree');
11321: END IF;
11322: inv_quantity_tree_pvt.create_tree(
11323: p_api_version_number => 1.0
11324: , p_init_msg_lst => fnd_api.g_true
11325: , x_return_status => l_return_status
11326: , x_msg_count => x_msg_count
11327: , x_msg_data => x_msg_data
11328: , p_organization_id => l_tmp_rsv_tbl(1).organization_id

Line 11345: IF l_return_status = fnd_api.g_ret_sts_error THEN

11341: , p_lot_expiration_date => NULL
11342: , x_tree_id => l_tree_id
11343: );
11344:
11345: IF l_return_status = fnd_api.g_ret_sts_error THEN
11346: IF (l_debug = 1) THEN
11347: debug_print('error calling inv_quantity_tree_pvt.create_tree');
11348: END IF;
11349: RAISE fnd_api.g_exc_error;

Line 11349: RAISE fnd_api.g_exc_error;

11345: IF l_return_status = fnd_api.g_ret_sts_error THEN
11346: IF (l_debug = 1) THEN
11347: debug_print('error calling inv_quantity_tree_pvt.create_tree');
11348: END IF;
11349: RAISE fnd_api.g_exc_error;
11350: END IF;
11351:
11352: --
11353: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11353: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11349: RAISE fnd_api.g_exc_error;
11350: END IF;
11351:
11352: --
11353: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11354: IF (l_debug = 1) THEN
11355: debug_print('unexpected error calling inv_quantity_tree_pvt.create_tree');
11356: END IF;
11357: RAISE fnd_api.g_exc_unexpected_error;

Line 11357: RAISE fnd_api.g_exc_unexpected_error;

11353: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11354: IF (l_debug = 1) THEN
11355: debug_print('unexpected error calling inv_quantity_tree_pvt.create_tree');
11356: END IF;
11357: RAISE fnd_api.g_exc_unexpected_error;
11358: END IF;
11359:
11360: IF (l_debug = 1) THEN
11361: debug_print('calling modify_tree_crt_del_rel');

Line 11378: , p_partial_reservation_flag => fnd_api.g_false

11374: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
11375: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
11376: , p_relieve_quantity => l_primary_relieved_quantity
11377: , p_secondary_relieve_quantity => l_secondary_relieved_quantity
11378: , p_partial_reservation_flag => fnd_api.g_false
11379: , p_force_reservation_flag => fnd_api.g_false
11380: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
11381: , p_action => 'RELIEVE'
11382: , x_qty_changed => l_qty_changed

Line 11379: , p_force_reservation_flag => fnd_api.g_false

11375: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
11376: , p_relieve_quantity => l_primary_relieved_quantity
11377: , p_secondary_relieve_quantity => l_secondary_relieved_quantity
11378: , p_partial_reservation_flag => fnd_api.g_false
11379: , p_force_reservation_flag => fnd_api.g_false
11380: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
11381: , p_action => 'RELIEVE'
11382: , x_qty_changed => l_qty_changed
11383: , x_secondary_qty_changed => l_secondary_qty_changed

Line 11387: IF l_return_status = fnd_api.g_ret_sts_error THEN

11383: , x_secondary_qty_changed => l_secondary_qty_changed
11384: );
11385:
11386: --
11387: IF l_return_status = fnd_api.g_ret_sts_error THEN
11388: IF (l_debug = 1) THEN
11389: debug_print('error calling modify_tree_crt_del_rel');
11390: END IF;
11391: RAISE fnd_api.g_exc_error;

Line 11391: RAISE fnd_api.g_exc_error;

11387: IF l_return_status = fnd_api.g_ret_sts_error THEN
11388: IF (l_debug = 1) THEN
11389: debug_print('error calling modify_tree_crt_del_rel');
11390: END IF;
11391: RAISE fnd_api.g_exc_error;
11392: END IF;
11393:
11394: --
11395: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11395: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11391: RAISE fnd_api.g_exc_error;
11392: END IF;
11393:
11394: --
11395: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11396: IF (l_debug = 1) THEN
11397: debug_print('unexpected error calling modify_tree_crt_del_rel');
11398: END IF;
11399: RAISE fnd_api.g_exc_unexpected_error;

Line 11399: RAISE fnd_api.g_exc_unexpected_error;

11395: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11396: IF (l_debug = 1) THEN
11397: debug_print('unexpected error calling modify_tree_crt_del_rel');
11398: END IF;
11399: RAISE fnd_api.g_exc_unexpected_error;
11400: END IF;
11401: --
11402: END IF;
11403: END IF;

Line 11423: IF l_return_status = fnd_api.g_ret_sts_error THEN

11419: , x_msg_count => x_msg_count
11420: , x_msg_data => x_msg_data
11421: );
11422:
11423: IF l_return_status = fnd_api.g_ret_sts_error THEN
11424: IF (l_debug = 1) THEN
11425: debug_print('error calling inv_rsv_synch.for_delete');
11426: END IF;
11427: RAISE fnd_api.g_exc_error;

Line 11427: RAISE fnd_api.g_exc_error;

11423: IF l_return_status = fnd_api.g_ret_sts_error THEN
11424: IF (l_debug = 1) THEN
11425: debug_print('error calling inv_rsv_synch.for_delete');
11426: END IF;
11427: RAISE fnd_api.g_exc_error;
11428: END IF;
11429:
11430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11431: IF (l_debug = 1) THEN

Line 11430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11426: END IF;
11427: RAISE fnd_api.g_exc_error;
11428: END IF;
11429:
11430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11431: IF (l_debug = 1) THEN
11432: debug_print('unexpected error calling inv_rsv_synch.for_delete');
11433: END IF;
11434: RAISE fnd_api.g_exc_unexpected_error;

Line 11434: RAISE fnd_api.g_exc_unexpected_error;

11430: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11431: IF (l_debug = 1) THEN
11432: debug_print('unexpected error calling inv_rsv_synch.for_delete');
11433: END IF;
11434: RAISE fnd_api.g_exc_unexpected_error;
11435: END IF;
11436: -- End changes for bug 3827307
11437:
11438: /*** {{ R12 Enhanced reservations code changes ***/

Line 11482: IF l_return_status = fnd_api.g_ret_sts_error THEN

11478: , x_msg_count => x_msg_count
11479: , x_msg_data => x_msg_data
11480: );
11481:
11482: IF l_return_status = fnd_api.g_ret_sts_error THEN
11483: IF (l_debug = 1) THEN
11484: debug_print('error calling inv_rsv_synch.for_relieve');
11485: END IF;
11486: RAISE fnd_api.g_exc_error;

Line 11486: RAISE fnd_api.g_exc_error;

11482: IF l_return_status = fnd_api.g_ret_sts_error THEN
11483: IF (l_debug = 1) THEN
11484: debug_print('error calling inv_rsv_synch.for_relieve');
11485: END IF;
11486: RAISE fnd_api.g_exc_error;
11487: END IF;
11488:
11489: --
11490: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11490: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11486: RAISE fnd_api.g_exc_error;
11487: END IF;
11488:
11489: --
11490: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11491: IF (l_debug = 1) THEN
11492: debug_print('unexpected error calling inv_rsv_synch.for_relieve');
11493: END IF;
11494: RAISE fnd_api.g_exc_unexpected_error;

Line 11494: RAISE fnd_api.g_exc_unexpected_error;

11490: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11491: IF (l_debug = 1) THEN
11492: debug_print('unexpected error calling inv_rsv_synch.for_relieve');
11493: END IF;
11494: RAISE fnd_api.g_exc_unexpected_error;
11495: END IF;
11496:
11497: -- End changes Bug3830160.
11498:

Line 11517: IF l_return_status = fnd_api.g_ret_sts_error THEN

11513: END IF;
11514: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_tmp_rsv_tbl(1));
11515:
11516: --
11517: IF l_return_status = fnd_api.g_ret_sts_error THEN
11518: RAISE fnd_api.g_exc_error;
11519: END IF;
11520:
11521: --

Line 11518: RAISE fnd_api.g_exc_error;

11514: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_tmp_rsv_tbl(1));
11515:
11516: --
11517: IF l_return_status = fnd_api.g_ret_sts_error THEN
11518: RAISE fnd_api.g_exc_error;
11519: END IF;
11520:
11521: --
11522: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11522: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11518: RAISE fnd_api.g_exc_error;
11519: END IF;
11520:
11521: --
11522: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11523: RAISE fnd_api.g_exc_unexpected_error;
11524: END IF;
11525:
11526: -- obtain program and user info

Line 11523: RAISE fnd_api.g_exc_unexpected_error;

11519: END IF;
11520:
11521: --
11522: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11523: RAISE fnd_api.g_exc_unexpected_error;
11524: END IF;
11525:
11526: -- obtain program and user info
11527: l_date := SYSDATE;

Line 11556: RAISE fnd_api.g_exc_error;

11552: IF ( (NVL(l_tmp_rsv_tbl(1).reservation_quantity,0) < 0) OR
11553: (NVL(l_tmp_rsv_tbl(1).primary_reservation_quantity,0) < 0) ) THEN
11554: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
11555: fnd_msg_pub.ADD;
11556: RAISE fnd_api.g_exc_error;
11557: END IF;
11558:
11559: -- INVCONV BEGIN
11560: IF (NVL(l_tmp_rsv_tbl(1).secondary_reservation_quantity,0) < 0) THEN

Line 11563: RAISE fnd_api.g_exc_error;

11559: -- INVCONV BEGIN
11560: IF (NVL(l_tmp_rsv_tbl(1).secondary_reservation_quantity,0) < 0) THEN
11561: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY');
11562: fnd_msg_pub.ADD;
11563: RAISE fnd_api.g_exc_error;
11564: END IF;
11565: -- INVCONV END
11566:
11567: /*** {{ R12 Enhanced reservations code changes ***/

Line 11646: RAISE fnd_api.g_exc_error;

11642: debug_print('No serials found for reservation record. id = ' || l_reservation_id);
11643: END IF;
11644: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
11645: fnd_msg_pub.add;
11646: RAISE fnd_api.g_exc_error;
11647: END;
11648:
11649: IF (l_debug = 1) THEN
11650: debug_print('After query serials');

Line 11662: RAISE fnd_api.g_exc_error;

11658: debug_print('Not enough serials to unreserved for reservation record. id = ' || l_reservation_id);
11659: END IF;
11660: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
11661: fnd_msg_pub.add;
11662: RAISE fnd_api.g_exc_error;
11663: END IF;
11664:
11665: FOR i in 1..l_count_to_unrsv_serials LOOP
11666: BEGIN

Line 11726: RAISE fnd_api.g_exc_error;

11722: debug_print('No serial found for reservation record. id = ' || l_reservation_id);
11723: END IF;
11724: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
11725: fnd_msg_pub.add;
11726: RAISE fnd_api.g_exc_error;
11727: END;
11728:
11729: IF (l_serial_number_table.COUNT < l_count_to_unrsv_serials) THEN
11730: IF (l_debug = 1) THEN

Line 11735: RAISE fnd_api.g_exc_error;

11731: debug_print('Not enough serials to unreserved for reservation record. id = ' || l_reservation_id);
11732: END IF;
11733: fnd_message.set_name('INV', 'INV_SR_EXCEED_RSV_QTY');
11734: fnd_msg_pub.add;
11735: RAISE fnd_api.g_exc_error;
11736: END IF;
11737:
11738: FOR i in 1..l_count_to_unrsv_serials LOOP
11739: BEGIN

Line 11796: WHEN fnd_api.g_exc_error THEN

11792: -- INVCONV END
11793: x_return_status := l_return_status;
11794: --
11795: EXCEPTION
11796: WHEN fnd_api.g_exc_error THEN
11797: ROLLBACK TO relieve_reservation_sa;
11798: x_return_status := fnd_api.g_ret_sts_error;
11799: -- Get message count and data
11800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 11798: x_return_status := fnd_api.g_ret_sts_error;

11794: --
11795: EXCEPTION
11796: WHEN fnd_api.g_exc_error THEN
11797: ROLLBACK TO relieve_reservation_sa;
11798: x_return_status := fnd_api.g_ret_sts_error;
11799: -- Get message count and data
11800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11801: WHEN fnd_api.g_exc_unexpected_error THEN
11802: ROLLBACK TO relieve_reservation_sa;

Line 11801: WHEN fnd_api.g_exc_unexpected_error THEN

11797: ROLLBACK TO relieve_reservation_sa;
11798: x_return_status := fnd_api.g_ret_sts_error;
11799: -- Get message count and data
11800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11801: WHEN fnd_api.g_exc_unexpected_error THEN
11802: ROLLBACK TO relieve_reservation_sa;
11803: x_return_status := fnd_api.g_ret_sts_unexp_error;
11804: -- Get message count and data
11805: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 11803: x_return_status := fnd_api.g_ret_sts_unexp_error;

11799: -- Get message count and data
11800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11801: WHEN fnd_api.g_exc_unexpected_error THEN
11802: ROLLBACK TO relieve_reservation_sa;
11803: x_return_status := fnd_api.g_ret_sts_unexp_error;
11804: -- Get message count and data
11805: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11806: WHEN OTHERS THEN
11807: ROLLBACK TO relieve_reservation_sa;

Line 11808: x_return_status := fnd_api.g_ret_sts_unexp_error;

11804: -- Get message count and data
11805: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11806: WHEN OTHERS THEN
11807: ROLLBACK TO relieve_reservation_sa;
11808: x_return_status := fnd_api.g_ret_sts_unexp_error;
11809:
11810: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
11811: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
11812: END IF;

Line 11821: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

11817:
11818: --
11819: PROCEDURE delete_reservation(
11820: p_api_version_number IN NUMBER
11821: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
11822: , x_return_status OUT NOCOPY VARCHAR2
11823: , x_msg_count OUT NOCOPY NUMBER
11824: , x_msg_data OUT NOCOPY VARCHAR2
11825: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 11827: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

11823: , x_msg_count OUT NOCOPY NUMBER
11824: , x_msg_data OUT NOCOPY VARCHAR2
11825: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
11826: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
11827: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11828: ) IS
11829: l_api_version_number CONSTANT NUMBER := 1.0;
11830: l_api_name CONSTANT VARCHAR2(30) := 'Delete_Reservation';
11831: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

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

11827: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
11828: ) IS
11829: l_api_version_number CONSTANT NUMBER := 1.0;
11830: l_api_name CONSTANT VARCHAR2(30) := 'Delete_Reservation';
11831: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
11832: l_tmp_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
11833: l_tmp_rsv_tbl_count NUMBER;
11834: l_reservation_id NUMBER;
11835: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

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

11871: IF (l_debug = 1) THEN
11872: debug_print('Inside delete reservation...');
11873: END IF;
11874: -- Standard call to check for call compatibility
11875: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11876: RAISE fnd_api.g_exc_unexpected_error;
11877: END IF;
11878:
11879: --

Line 11876: RAISE fnd_api.g_exc_unexpected_error;

11872: debug_print('Inside delete reservation...');
11873: END IF;
11874: -- Standard call to check for call compatibility
11875: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
11876: RAISE fnd_api.g_exc_unexpected_error;
11877: END IF;
11878:
11879: --
11880: -- Initialize message list.

Line 11881: IF fnd_api.to_boolean(p_init_msg_lst) THEN

11877: END IF;
11878:
11879: --
11880: -- Initialize message list.
11881: IF fnd_api.to_boolean(p_init_msg_lst) THEN
11882: fnd_msg_pub.initialize;
11883: END IF;
11884:
11885: /**** {{ R12 Enhanced reservations code changes ****/

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

11886: -- Set the original columns to g_miss_xxx as the user should not be
11887: -- setting these values. Do not query by them
11888: l_rsv_rec := p_rsv_rec;
11889:
11890: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

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

11887: -- setting these values. Do not query by them
11888: l_rsv_rec := p_rsv_rec;
11889:
11890: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

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

11888: l_rsv_rec := p_rsv_rec;
11889:
11890: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

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

11889:
11890: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11897: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

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

11890: l_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11897: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11898:

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

11891: l_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11897: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11898:
11899: /*** End R12 }} ***/

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

11892: l_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11897: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11898:
11899: /*** End R12 }} ***/
11900:

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

11893: l_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
11894: l_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
11895: l_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
11896: l_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
11897: l_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
11898:
11899: /*** End R12 }} ***/
11900:
11901: IF (l_debug = 1) THEN

Line 11907: , p_init_msg_lst => fnd_api.g_false

11903: END IF;
11904: --
11905: query_reservation(
11906: p_api_version_number => 1.0
11907: , p_init_msg_lst => fnd_api.g_false
11908: , x_return_status => l_return_status
11909: , x_msg_count => x_msg_count
11910: , x_msg_data => x_msg_data
11911: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/

Line 11912: , p_lock_records => fnd_api.g_true

11908: , x_return_status => l_return_status
11909: , x_msg_count => x_msg_count
11910: , x_msg_data => x_msg_data
11911: , p_query_input => l_rsv_rec /*** {{ R12 Enhanced reservations code changes ***/
11912: , p_lock_records => fnd_api.g_true
11913: , x_mtl_reservation_tbl => l_tmp_rsv_tbl
11914: , x_mtl_reservation_tbl_count => l_tmp_rsv_tbl_count
11915: , x_error_code => l_error_code
11916: );

Line 11919: IF l_return_status = fnd_api.g_ret_sts_error THEN

11915: , x_error_code => l_error_code
11916: );
11917:
11918: --
11919: IF l_return_status = fnd_api.g_ret_sts_error THEN
11920: RAISE fnd_api.g_exc_error;
11921: END IF;
11922:
11923: --

Line 11920: RAISE fnd_api.g_exc_error;

11916: );
11917:
11918: --
11919: IF l_return_status = fnd_api.g_ret_sts_error THEN
11920: RAISE fnd_api.g_exc_error;
11921: END IF;
11922:
11923: --
11924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11920: RAISE fnd_api.g_exc_error;
11921: END IF;
11922:
11923: --
11924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11925: RAISE fnd_api.g_exc_unexpected_error;
11926: END IF;
11927:
11928: --

Line 11925: RAISE fnd_api.g_exc_unexpected_error;

11921: END IF;
11922:
11923: --
11924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11925: RAISE fnd_api.g_exc_unexpected_error;
11926: END IF;
11927:
11928: --
11929: IF l_tmp_rsv_tbl_count = 0 THEN

Line 11932: RAISE fnd_api.g_exc_error;

11928: --
11929: IF l_tmp_rsv_tbl_count = 0 THEN
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: IF (l_debug = 1) THEN
11936: debug_print('After calling query reservation... ' || l_return_status);

Line 11943: RAISE fnd_api.g_exc_error;

11939: --
11940: IF l_tmp_rsv_tbl_count > 1 THEN
11941: fnd_message.set_name('INV', 'INV-DELETE MORE THAN ONE ROW');
11942: fnd_msg_pub.ADD;
11943: RAISE fnd_api.g_exc_error;
11944: END IF;
11945:
11946: --
11947: l_reservation_id := l_tmp_rsv_tbl(1).reservation_id;

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

11950: IF (l_debug = 1) THEN
11951: debug_print('Before calling validate...');
11952: END IF;
11953: -- Bug 2354735: Proceed with Validation if p_validation_flag = 'T' or 'V'
11954: IF p_validation_flag = fnd_api.g_true OR p_validation_flag = 'V' THEN
11955: -- validation is needed to get revision, lot,
11956: --serial control information
11957: -- for creating the quantity tree
11958: inv_reservation_validate_pvt.validate_input_parameters(

Line 11978: IF l_return_status = fnd_api.g_ret_sts_error THEN

11974: , x_to_sub_cache_index => l_to_sub_cache_index
11975: );
11976:
11977: --
11978: IF l_return_status = fnd_api.g_ret_sts_error THEN
11979: RAISE fnd_api.g_exc_error;
11980: END IF;
11981:
11982: --

Line 11979: RAISE fnd_api.g_exc_error;

11975: );
11976:
11977: --
11978: IF l_return_status = fnd_api.g_ret_sts_error THEN
11979: RAISE fnd_api.g_exc_error;
11980: END IF;
11981:
11982: --
11983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 11983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11979: RAISE fnd_api.g_exc_error;
11980: END IF;
11981:
11982: --
11983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11984: RAISE fnd_api.g_exc_unexpected_error;
11985: END IF;
11986:
11987: --

Line 11984: RAISE fnd_api.g_exc_unexpected_error;

11980: END IF;
11981:
11982: --
11983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11984: RAISE fnd_api.g_exc_unexpected_error;
11985: END IF;
11986:
11987: --
11988: -- INVCONV BEGIN

Line 11996: AND p_validation_flag = fnd_api.g_true THEN

11992: -- INVCONV END
11993:
11994: -- Bug 2354735: Proceed with Trees only if p_validation_flag = 'T'
11995: IF l_tmp_rsv_tbl(1).supply_source_type_id = inv_reservation_global.g_source_type_inv
11996: AND p_validation_flag = fnd_api.g_true THEN
11997: -- call quantity processor to
11998: -- modify the tree so that the quantity tree
11999: -- reflect the deletion
12000: inv_quantity_tree_pvt.create_tree(

Line 12002: , p_init_msg_lst => fnd_api.g_true

11998: -- modify the tree so that the quantity tree
11999: -- reflect the deletion
12000: inv_quantity_tree_pvt.create_tree(
12001: p_api_version_number => 1.0
12002: , p_init_msg_lst => fnd_api.g_true
12003: , x_return_status => l_return_status
12004: , x_msg_count => x_msg_count
12005: , x_msg_data => x_msg_data
12006: , p_organization_id => l_tmp_rsv_tbl(1).organization_id

Line 12023: IF l_return_status = fnd_api.g_ret_sts_error THEN

12019: , p_lot_expiration_date => NULL
12020: , x_tree_id => l_tree_id
12021: );
12022:
12023: IF l_return_status = fnd_api.g_ret_sts_error THEN
12024: RAISE fnd_api.g_exc_error;
12025: END IF;
12026:
12027: --

Line 12024: RAISE fnd_api.g_exc_error;

12020: , x_tree_id => l_tree_id
12021: );
12022:
12023: IF l_return_status = fnd_api.g_ret_sts_error THEN
12024: RAISE fnd_api.g_exc_error;
12025: END IF;
12026:
12027: --
12028: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12028: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12024: RAISE fnd_api.g_exc_error;
12025: END IF;
12026:
12027: --
12028: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12029: RAISE fnd_api.g_exc_unexpected_error;
12030: END IF;
12031:
12032: IF (l_debug = 1) THEN

Line 12029: RAISE fnd_api.g_exc_unexpected_error;

12025: END IF;
12026:
12027: --
12028: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12029: RAISE fnd_api.g_exc_unexpected_error;
12030: END IF;
12031:
12032: IF (l_debug = 1) THEN
12033: debug_print('After calling validate...' || l_return_status);

Line 12049: , p_partial_reservation_flag => fnd_api.g_false

12045: , p_primary_reservation_quantity=> l_tmp_rsv_tbl(1).primary_reservation_quantity
12046: , p_second_reservation_quantity=> l_tmp_rsv_tbl(1).secondary_reservation_quantity
12047: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
12048: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12049: , p_partial_reservation_flag => fnd_api.g_false
12050: , p_force_reservation_flag => fnd_api.g_false
12051: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12052: , p_action => 'DELETE'
12053: , x_qty_changed => l_qty_changed

Line 12050: , p_force_reservation_flag => fnd_api.g_false

12046: , p_second_reservation_quantity=> l_tmp_rsv_tbl(1).secondary_reservation_quantity
12047: , p_detailed_quantity => l_tmp_rsv_tbl(1).detailed_quantity
12048: , p_secondary_detailed_quantity=> l_tmp_rsv_tbl(1).secondary_detailed_quantity
12049: , p_partial_reservation_flag => fnd_api.g_false
12050: , p_force_reservation_flag => fnd_api.g_false
12051: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
12052: , p_action => 'DELETE'
12053: , x_qty_changed => l_qty_changed
12054: , x_secondary_qty_changed => l_secondary_qty_changed

Line 12058: IF l_return_status = fnd_api.g_ret_sts_error THEN

12054: , x_secondary_qty_changed => l_secondary_qty_changed
12055: );
12056:
12057: --
12058: IF l_return_status = fnd_api.g_ret_sts_error THEN
12059: RAISE fnd_api.g_exc_error;
12060: END IF;
12061:
12062: --

Line 12059: RAISE fnd_api.g_exc_error;

12055: );
12056:
12057: --
12058: IF l_return_status = fnd_api.g_ret_sts_error THEN
12059: RAISE fnd_api.g_exc_error;
12060: END IF;
12061:
12062: --
12063: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12063: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12059: RAISE fnd_api.g_exc_error;
12060: END IF;
12061:
12062: --
12063: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12064: RAISE fnd_api.g_exc_unexpected_error;
12065: END IF;
12066: IF (l_debug = 1) THEN
12067: debug_print('Return Status...' || l_return_status);

Line 12064: RAISE fnd_api.g_exc_unexpected_error;

12060: END IF;
12061:
12062: --
12063: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12064: RAISE fnd_api.g_exc_unexpected_error;
12065: END IF;
12066: IF (l_debug = 1) THEN
12067: debug_print('Return Status...' || l_return_status);
12068: END IF;

Line 12086: IF l_return_status = fnd_api.g_ret_sts_error THEN

12082: , x_msg_data => x_msg_data
12083: );
12084:
12085: --
12086: IF l_return_status = fnd_api.g_ret_sts_error THEN
12087: RAISE fnd_api.g_exc_error;
12088: END IF;
12089:
12090: --

Line 12087: RAISE fnd_api.g_exc_error;

12083: );
12084:
12085: --
12086: IF l_return_status = fnd_api.g_ret_sts_error THEN
12087: RAISE fnd_api.g_exc_error;
12088: END IF;
12089:
12090: --
12091: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12091: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12087: RAISE fnd_api.g_exc_error;
12088: END IF;
12089:
12090: --
12091: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12092: RAISE fnd_api.g_exc_unexpected_error;
12093: END IF;
12094: --
12095: END IF;

Line 12092: RAISE fnd_api.g_exc_unexpected_error;

12088: END IF;
12089:
12090: --
12091: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12092: RAISE fnd_api.g_exc_unexpected_error;
12093: END IF;
12094: --
12095: END IF;
12096: IF (l_debug = 1) THEN

Line 12104: IF l_return_status = fnd_api.g_ret_sts_error THEN

12100: --
12101: -- for data sync b/w mtl_demand and mtl_reservations
12102: 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);
12103:
12104: IF l_return_status = fnd_api.g_ret_sts_error THEN
12105: RAISE fnd_api.g_exc_error;
12106: END IF;
12107:
12108: --

Line 12105: RAISE fnd_api.g_exc_error;

12101: -- for data sync b/w mtl_demand and mtl_reservations
12102: 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);
12103:
12104: IF l_return_status = fnd_api.g_ret_sts_error THEN
12105: RAISE fnd_api.g_exc_error;
12106: END IF;
12107:
12108: --
12109: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12109: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12105: RAISE fnd_api.g_exc_error;
12106: END IF;
12107:
12108: --
12109: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12110: RAISE fnd_api.g_exc_unexpected_error;
12111: END IF;
12112:
12113: /*** {{ R12 Enhanced reservations code changes ***/

Line 12110: RAISE fnd_api.g_exc_unexpected_error;

12106: END IF;
12107:
12108: --
12109: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12110: RAISE fnd_api.g_exc_unexpected_error;
12111: END IF;
12112:
12113: /*** {{ R12 Enhanced reservations code changes ***/
12114: -- update the mtl_serial_numbers, null out the reservation_id

Line 12148: IF l_return_status = fnd_api.g_ret_sts_error THEN

12144: , x_msg_data => x_msg_data
12145: );
12146:
12147: --
12148: IF l_return_status = fnd_api.g_ret_sts_error THEN
12149: RAISE fnd_api.g_exc_error;
12150: END IF;
12151:
12152: --

Line 12149: RAISE fnd_api.g_exc_error;

12145: );
12146:
12147: --
12148: IF l_return_status = fnd_api.g_ret_sts_error THEN
12149: RAISE fnd_api.g_exc_error;
12150: END IF;
12151:
12152: --
12153: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12153: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12149: RAISE fnd_api.g_exc_error;
12150: END IF;
12151:
12152: --
12153: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12154: RAISE fnd_api.g_exc_unexpected_error;
12155: END IF;
12156: --
12157: IF (l_debug = 1) THEN

Line 12154: RAISE fnd_api.g_exc_unexpected_error;

12150: END IF;
12151:
12152: --
12153: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12154: RAISE fnd_api.g_exc_unexpected_error;
12155: END IF;
12156: --
12157: IF (l_debug = 1) THEN
12158: debug_print('After calling wf_update_after_inv_unreserv...' || l_return_status);

Line 12165: WHEN fnd_api.g_exc_error THEN

12161:
12162: x_return_status := l_return_status;
12163: --
12164: EXCEPTION
12165: WHEN fnd_api.g_exc_error THEN
12166: x_return_status := fnd_api.g_ret_sts_error;
12167: -- Get message count and data
12168: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12169: WHEN fnd_api.g_exc_unexpected_error THEN

Line 12166: x_return_status := fnd_api.g_ret_sts_error;

12162: x_return_status := l_return_status;
12163: --
12164: EXCEPTION
12165: WHEN fnd_api.g_exc_error THEN
12166: x_return_status := fnd_api.g_ret_sts_error;
12167: -- Get message count and data
12168: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12169: WHEN fnd_api.g_exc_unexpected_error THEN
12170: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 12169: WHEN fnd_api.g_exc_unexpected_error THEN

12165: WHEN fnd_api.g_exc_error THEN
12166: x_return_status := fnd_api.g_ret_sts_error;
12167: -- Get message count and data
12168: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12169: WHEN fnd_api.g_exc_unexpected_error THEN
12170: x_return_status := fnd_api.g_ret_sts_unexp_error;
12171: -- Get message count and data
12172: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12173: WHEN OTHERS THEN

Line 12170: x_return_status := fnd_api.g_ret_sts_unexp_error;

12166: x_return_status := fnd_api.g_ret_sts_error;
12167: -- Get message count and data
12168: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12169: WHEN fnd_api.g_exc_unexpected_error THEN
12170: x_return_status := fnd_api.g_ret_sts_unexp_error;
12171: -- Get message count and data
12172: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12173: WHEN OTHERS THEN
12174: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 12174: x_return_status := fnd_api.g_ret_sts_unexp_error;

12170: x_return_status := fnd_api.g_ret_sts_unexp_error;
12171: -- Get message count and data
12172: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12173: WHEN OTHERS THEN
12174: x_return_status := fnd_api.g_ret_sts_unexp_error;
12175:
12176: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12177: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12178: END IF;

Line 12193: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

12189: -- exist (will be add upon)
12190: PROCEDURE transfer_reservation
12191: (
12192: p_api_version_number IN NUMBER
12193: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
12194: , x_return_status OUT NOCOPY VARCHAR2
12195: , x_msg_count OUT NOCOPY NUMBER
12196: , x_msg_data OUT NOCOPY VARCHAR2
12197: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 12200: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

12196: , x_msg_data OUT NOCOPY VARCHAR2
12197: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
12198: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
12199: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
12200: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
12201: , p_over_reservation_flag IN NUMBER DEFAULT 0
12202: , x_reservation_id OUT NOCOPY NUMBER
12203: ) IS
12204:

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

12203: ) IS
12204:
12205: l_api_version_number CONSTANT NUMBER := 1.0;
12206: l_api_name CONSTANT VARCHAR2(30) := 'Transfrer_Reservation';
12207: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
12208: l_quantity_reserved NUMBER;
12209: l_secondary_quantity_reserved NUMBER; -- INVCONV
12210: l_debug NUMBER;
12211: l_dummy_serial_number inv_reservation_global.serial_number_tbl_type;

Line 12216: IF NOT fnd_api.compatible_api_call

12212: l_reservation_id NUMBER;
12213:
12214: BEGIN
12215: -- Standard call to check for call compatibility
12216: IF NOT fnd_api.compatible_api_call
12217: (l_api_version_number
12218: , p_api_version_number
12219: , l_api_name
12220: , G_PKG_NAME

Line 12222: RAISE fnd_api.g_exc_unexpected_error;

12218: , p_api_version_number
12219: , l_api_name
12220: , G_PKG_NAME
12221: ) THEN
12222: RAISE fnd_api.g_exc_unexpected_error;
12223: END IF;
12224:
12225: -- Initialize message list.
12226: IF fnd_api.to_boolean(p_init_msg_lst) THEN

Line 12226: IF fnd_api.to_boolean(p_init_msg_lst) THEN

12222: RAISE fnd_api.g_exc_unexpected_error;
12223: END IF;
12224:
12225: -- Initialize message list.
12226: IF fnd_api.to_boolean(p_init_msg_lst) THEN
12227: fnd_msg_pub.initialize;
12228: END IF;
12229:
12230: -- Use cache to get value for l_debug

Line 12266: IF l_return_status = fnd_api.g_ret_sts_error THEN

12262: IF (l_debug=1) THEN
12263: debug_print ('Return Status after transfer reservations '||l_return_status);
12264: END IF;
12265:
12266: IF l_return_status = fnd_api.g_ret_sts_error THEN
12267:
12268: IF l_debug=1 THEN
12269: debug_print('Raising expected error'||l_return_status);
12270: END IF;

Line 12272: RAISE fnd_api.g_exc_error;

12268: IF l_debug=1 THEN
12269: debug_print('Raising expected error'||l_return_status);
12270: END IF;
12271:
12272: RAISE fnd_api.g_exc_error;
12273:
12274: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12275:
12276: IF l_debug=1 THEN

Line 12274: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12270: END IF;
12271:
12272: RAISE fnd_api.g_exc_error;
12273:
12274: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12275:
12276: IF l_debug=1 THEN
12277: debug_print('Raising Unexpected error'||l_return_status);
12278: END IF;

Line 12280: RAISE fnd_api.g_exc_unexpected_error;

12276: IF l_debug=1 THEN
12277: debug_print('Raising Unexpected error'||l_return_status);
12278: END IF;
12279:
12280: RAISE fnd_api.g_exc_unexpected_error;
12281: END IF;
12282:
12283:
12284: x_return_status := l_return_status;

Line 12289: WHEN fnd_api.g_exc_error THEN

12285: x_reservation_id := l_reservation_id;
12286:
12287: EXCEPTION
12288:
12289: WHEN fnd_api.g_exc_error THEN
12290: x_return_status := fnd_api.g_ret_sts_error;
12291: -- Get message count and data
12292: fnd_msg_pub.count_and_get
12293: ( p_count => x_msg_count

Line 12290: x_return_status := fnd_api.g_ret_sts_error;

12286:
12287: EXCEPTION
12288:
12289: WHEN fnd_api.g_exc_error THEN
12290: x_return_status := fnd_api.g_ret_sts_error;
12291: -- Get message count and data
12292: fnd_msg_pub.count_and_get
12293: ( p_count => x_msg_count
12294: , p_data => x_msg_data

Line 12297: WHEN fnd_api.g_exc_unexpected_error THEN

12293: ( p_count => x_msg_count
12294: , p_data => x_msg_data
12295: );
12296:
12297: WHEN fnd_api.g_exc_unexpected_error THEN
12298: x_return_status := fnd_api.g_ret_sts_unexp_error ;
12299:
12300: -- Get message count and data
12301: fnd_msg_pub.count_and_get

Line 12298: x_return_status := fnd_api.g_ret_sts_unexp_error ;

12294: , p_data => x_msg_data
12295: );
12296:
12297: WHEN fnd_api.g_exc_unexpected_error THEN
12298: x_return_status := fnd_api.g_ret_sts_unexp_error ;
12299:
12300: -- Get message count and data
12301: fnd_msg_pub.count_and_get
12302: ( p_count => x_msg_count

Line 12307: x_return_status := fnd_api.g_ret_sts_unexp_error ;

12303: , p_data => x_msg_data
12304: );
12305:
12306: WHEN OTHERS THEN
12307: x_return_status := fnd_api.g_ret_sts_unexp_error ;
12308:
12309: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
12310: THEN
12311: fnd_msg_pub.add_exc_msg

Line 12334: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

12330: -- exist (will be add upon)
12331: PROCEDURE transfer_reservation
12332: (
12333: p_api_version_number IN NUMBER
12334: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
12335: , x_return_status OUT NOCOPY VARCHAR2
12336: , x_msg_count OUT NOCOPY NUMBER
12337: , x_msg_data OUT NOCOPY VARCHAR2
12338: , p_original_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

Line 12344: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true

12340: , p_original_serial_number IN inv_reservation_global.serial_number_tbl_type
12341: /**** {{ R12 Enhanced reservations code changes }}****/
12342: , p_to_serial_number IN inv_reservation_global.serial_number_tbl_type
12343: /*** End R12 ***/
12344: , p_validation_flag IN VARCHAR2 DEFAULT fnd_api.g_true
12345: , p_over_reservation_flag IN NUMBER DEFAULT 0
12346: , x_reservation_id OUT NOCOPY NUMBER
12347: ) IS
12348: l_api_version_number CONSTANT NUMBER := 1.0;

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

12346: , x_reservation_id OUT NOCOPY NUMBER
12347: ) IS
12348: l_api_version_number CONSTANT NUMBER := 1.0;
12349: l_api_name CONSTANT VARCHAR2(30) := 'Transfer_Reservation';
12350: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
12351: l_original_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
12352: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
12353: l_orig_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type;
12354: l_orig_rsv_tbl_count NUMBER;

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

12449: debug_print('Inside transfer reservation...');
12450: END IF;
12451:
12452: -- Standard call to check for call compatibility
12453: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
12454: RAISE fnd_api.g_exc_unexpected_error;
12455: END IF;
12456:
12457: IF (l_debug = 1) THEN

Line 12454: RAISE fnd_api.g_exc_unexpected_error;

12450: END IF;
12451:
12452: -- Standard call to check for call compatibility
12453: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
12454: RAISE fnd_api.g_exc_unexpected_error;
12455: END IF;
12456:
12457: IF (l_debug = 1) THEN
12458: debug_print('The original reservation record: ');

Line 12472: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num

12468: -- if the transfer quantity is 0, call delete instead
12469: IF p_to_rsv_rec.primary_reservation_quantity = 0
12470: OR (p_to_rsv_rec.reservation_quantity = 0
12471: AND (p_to_rsv_rec.primary_reservation_quantity IS NULL
12472: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
12473: )
12474: ) THEN
12475: x_return_status := fnd_api.g_ret_sts_success;
12476: RETURN;

Line 12475: x_return_status := fnd_api.g_ret_sts_success;

12471: AND (p_to_rsv_rec.primary_reservation_quantity IS NULL
12472: OR p_to_rsv_rec.primary_reservation_quantity = fnd_api.g_miss_num
12473: )
12474: ) THEN
12475: x_return_status := fnd_api.g_ret_sts_success;
12476: RETURN;
12477: END IF;
12478:
12479: -- Initialize message list.

Line 12480: IF fnd_api.to_boolean(p_init_msg_lst) THEN

12476: RETURN;
12477: END IF;
12478:
12479: -- Initialize message list.
12480: IF fnd_api.to_boolean(p_init_msg_lst) THEN
12481: fnd_msg_pub.initialize;
12482: END IF;
12483:
12484: /**** {{ R12 Enhanced reservations code changes }}****/

Line 12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

12486: -- Set the original columns to g_miss_xxx as the user should not be
12487: -- setting these values. Do not query by them
12488: l_original_rsv_rec := p_original_rsv_rec;
12489:
12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

12487: -- setting these values. Do not query by them
12488: l_original_rsv_rec := p_original_rsv_rec;
12489:
12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

12488: l_original_rsv_rec := p_original_rsv_rec;
12489:
12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

12489:
12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

12490: l_original_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12498:

Line 12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

12491: l_original_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12498:
12499: /*** End R12 ***/

Line 12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

12492: l_original_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12498:
12499: /*** End R12 ***/
12500:

Line 12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

12493: l_original_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12494: l_original_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12495: l_original_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12496: l_original_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12497: l_original_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12498:
12499: /*** End R12 ***/
12500:
12501: SAVEPOINT transfer_reservation_sa;

Line 12509: , p_init_msg_lst => fnd_api.g_false

12505:
12506: -- search for the from row
12507: query_reservation(
12508: p_api_version_number => 1.0
12509: , p_init_msg_lst => fnd_api.g_false
12510: , x_return_status => l_return_status
12511: , x_msg_count => x_msg_count
12512: , x_msg_data => x_msg_data
12513: , p_query_input => l_original_rsv_rec

Line 12514: , p_lock_records => fnd_api.g_true

12510: , x_return_status => l_return_status
12511: , x_msg_count => x_msg_count
12512: , x_msg_data => x_msg_data
12513: , p_query_input => l_original_rsv_rec
12514: , p_lock_records => fnd_api.g_true
12515: , x_mtl_reservation_tbl => l_orig_rsv_tbl
12516: , x_mtl_reservation_tbl_count => l_orig_rsv_tbl_count
12517: , x_error_code => l_error_code
12518: );

Line 12521: IF l_return_status = fnd_api.g_ret_sts_error THEN

12517: , x_error_code => l_error_code
12518: );
12519:
12520: --
12521: IF l_return_status = fnd_api.g_ret_sts_error THEN
12522: RAISE fnd_api.g_exc_error;
12523: END IF;
12524:
12525: --

Line 12522: RAISE fnd_api.g_exc_error;

12518: );
12519:
12520: --
12521: IF l_return_status = fnd_api.g_ret_sts_error THEN
12522: RAISE fnd_api.g_exc_error;
12523: END IF;
12524:
12525: --
12526: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12526: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12522: RAISE fnd_api.g_exc_error;
12523: END IF;
12524:
12525: --
12526: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12527: RAISE fnd_api.g_exc_unexpected_error;
12528: END IF;
12529:
12530: --

Line 12527: RAISE fnd_api.g_exc_unexpected_error;

12523: END IF;
12524:
12525: --
12526: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12527: RAISE fnd_api.g_exc_unexpected_error;
12528: END IF;
12529:
12530: --
12531: IF l_orig_rsv_tbl_count = 0 THEN

Line 12534: RAISE fnd_api.g_exc_error;

12530: --
12531: IF l_orig_rsv_tbl_count = 0 THEN
12532: fnd_message.set_name('INV', 'INV-ROW NOT FOUND');
12533: fnd_msg_pub.ADD;
12534: RAISE fnd_api.g_exc_error;
12535: END IF;
12536:
12537: --
12538: IF l_orig_rsv_tbl_count > 1 THEN

Line 12541: RAISE fnd_api.g_exc_error;

12537: --
12538: IF l_orig_rsv_tbl_count > 1 THEN
12539: fnd_message.set_name('INV', 'TRANSFER MORE THAN ONE ROW');
12540: fnd_msg_pub.ADD;
12541: RAISE fnd_api.g_exc_error;
12542: END IF;
12543:
12544: IF (l_debug = 1) THEN
12545: debug_print('After calling query rsv from record: ' || l_return_status);

Line 12559: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;

12555: -- but we should set it to g_miss_num again
12556: -- otherwise query_reservation will use only the
12557: -- reservation_id to do the search.
12558: IF l_to_rsv_rec.reservation_id = l_orig_rsv_tbl(1).reservation_id THEN
12559: l_to_rsv_rec.reservation_id := fnd_api.g_miss_num;
12560: END IF;
12561:
12562: --
12563: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN

Line 12566: RAISE fnd_api.g_exc_error;

12562: --
12563: IF l_orig_rsv_tbl(1).organization_id <> l_to_rsv_rec.organization_id THEN
12564: fnd_message.set_name('INV', 'CANNOT_CHANGE_ORGANIZATION_ID');
12565: fnd_msg_pub.ADD;
12566: RAISE fnd_api.g_exc_error;
12567: END IF;
12568:
12569: --
12570: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN

Line 12573: RAISE fnd_api.g_exc_error;

12569: --
12570: IF l_orig_rsv_tbl(1).inventory_item_id <> l_to_rsv_rec.inventory_item_id THEN
12571: fnd_message.set_name('INV', 'CANNOT_CHANGE_INVENTORY_ITEM');
12572: fnd_msg_pub.ADD;
12573: RAISE fnd_api.g_exc_error;
12574: END IF;
12575:
12576: -- convert quantity between primary uom and reservation uom
12577: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);

Line 12580: IF l_return_status = fnd_api.g_ret_sts_error THEN

12576: -- convert quantity between primary uom and reservation uom
12577: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
12578:
12579: --
12580: IF l_return_status = fnd_api.g_ret_sts_error THEN
12581: RAISE fnd_api.g_exc_error;
12582: END IF;
12583:
12584: --

Line 12581: RAISE fnd_api.g_exc_error;

12577: convert_quantity(x_return_status => l_return_status, px_rsv_rec => l_to_rsv_rec);
12578:
12579: --
12580: IF l_return_status = fnd_api.g_ret_sts_error THEN
12581: RAISE fnd_api.g_exc_error;
12582: END IF;
12583:
12584: --
12585: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12585: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12581: RAISE fnd_api.g_exc_error;
12582: END IF;
12583:
12584: --
12585: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12586: RAISE fnd_api.g_exc_unexpected_error;
12587: END IF;
12588:
12589: /**** {{ R12 Enhanced reservations code changes }}****/

Line 12586: RAISE fnd_api.g_exc_unexpected_error;

12582: END IF;
12583:
12584: --
12585: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12586: RAISE fnd_api.g_exc_unexpected_error;
12587: END IF;
12588:
12589: /**** {{ R12 Enhanced reservations code changes }}****/
12590:

Line 12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;

12589: /**** {{ R12 Enhanced reservations code changes }}****/
12590:
12591: -- Set the original columns to g_miss_xxx as the user should not be
12592: -- setting these values. Do not query by them
12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

Line 12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;

12590:
12591: -- Set the original columns to g_miss_xxx as the user should not be
12592: -- setting these values. Do not query by them
12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

Line 12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;

12591: -- Set the original columns to g_miss_xxx as the user should not be
12592: -- setting these values. Do not query by them
12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

Line 12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;

12592: -- setting these values. Do not query by them
12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

Line 12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;

12593: l_to_rsv_rec.orig_supply_source_type_id := fnd_api.g_miss_num;
12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12601:

Line 12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;

12594: l_to_rsv_rec.orig_supply_source_header_id := fnd_api.g_miss_num;
12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12601:
12602: IF (l_to_rsv_rec.project_id IS NULL) THEN

Line 12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;

12595: l_to_rsv_rec.orig_supply_source_line_id := fnd_api.g_miss_num;
12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12601:
12602: IF (l_to_rsv_rec.project_id IS NULL) THEN
12603: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

Line 12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;

12596: l_to_rsv_rec.orig_supply_source_line_detail := fnd_api.g_miss_num;
12597: l_to_rsv_rec.orig_demand_source_type_id := fnd_api.g_miss_num;
12598: l_to_rsv_rec.orig_demand_source_header_id := fnd_api.g_miss_num;
12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12601:
12602: IF (l_to_rsv_rec.project_id IS NULL) THEN
12603: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
12604: END IF;

Line 12603: l_to_rsv_rec.project_id := fnd_api.g_miss_num;

12599: l_to_rsv_rec.orig_demand_source_line_id := fnd_api.g_miss_num;
12600: l_to_rsv_rec.orig_demand_source_line_detail := fnd_api.g_miss_num;
12601:
12602: IF (l_to_rsv_rec.project_id IS NULL) THEN
12603: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
12604: END IF;
12605: IF (l_to_rsv_rec.task_id IS NULL) THEN
12606: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
12607: END IF;

Line 12606: l_to_rsv_rec.task_id := fnd_api.g_miss_num;

12602: IF (l_to_rsv_rec.project_id IS NULL) THEN
12603: l_to_rsv_rec.project_id := fnd_api.g_miss_num;
12604: END IF;
12605: IF (l_to_rsv_rec.task_id IS NULL) THEN
12606: l_to_rsv_rec.task_id := fnd_api.g_miss_num;
12607: END IF;
12608: /*** End R12 ***/
12609:
12610: IF (l_debug = 1) THEN

Line 12617: , p_init_msg_lst => fnd_api.g_false

12613: --
12614: -- search for the to row
12615: query_reservation(
12616: p_api_version_number => 1.0
12617: , p_init_msg_lst => fnd_api.g_false
12618: , x_return_status => l_return_status
12619: , x_msg_count => x_msg_count
12620: , x_msg_data => x_msg_data
12621: , p_query_input => l_to_rsv_rec

Line 12622: , p_lock_records => fnd_api.g_true

12618: , x_return_status => l_return_status
12619: , x_msg_count => x_msg_count
12620: , x_msg_data => x_msg_data
12621: , p_query_input => l_to_rsv_rec
12622: , p_lock_records => fnd_api.g_true
12623: , x_mtl_reservation_tbl => l_to_rsv_tbl
12624: , x_mtl_reservation_tbl_count => l_to_rsv_tbl_count
12625: , x_error_code => l_error_code
12626: );

Line 12629: IF l_return_status = fnd_api.g_ret_sts_error THEN

12625: , x_error_code => l_error_code
12626: );
12627:
12628: --
12629: IF l_return_status = fnd_api.g_ret_sts_error THEN
12630: RAISE fnd_api.g_exc_error;
12631: END IF;
12632:
12633: --

Line 12630: RAISE fnd_api.g_exc_error;

12626: );
12627:
12628: --
12629: IF l_return_status = fnd_api.g_ret_sts_error THEN
12630: RAISE fnd_api.g_exc_error;
12631: END IF;
12632:
12633: --
12634: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12634: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12630: RAISE fnd_api.g_exc_error;
12631: END IF;
12632:
12633: --
12634: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12635: RAISE fnd_api.g_exc_unexpected_error;
12636: END IF;
12637:
12638: --

Line 12635: RAISE fnd_api.g_exc_unexpected_error;

12631: END IF;
12632:
12633: --
12634: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12635: RAISE fnd_api.g_exc_unexpected_error;
12636: END IF;
12637:
12638: --
12639: IF l_to_rsv_tbl_count > 1 THEN

Line 12644: RAISE fnd_api.g_exc_error;

12640: -- if there more than one target row, the reservation table
12641: -- must be damaged. We can not do anything but failed
12642: fnd_message.set_name('INV', 'INV-RSV-TOO-MANY-TARGET');
12643: fnd_msg_pub.ADD;
12644: RAISE fnd_api.g_exc_error;
12645: END IF;
12646:
12647: IF (l_debug = 1) THEN
12648: debug_print('After query reservation to rec...' || l_return_status);

Line 12663: RAISE fnd_api.g_exc_error;

12659: -- as the original reservation.
12660: -- we might want to move that to the validation api soon
12661: fnd_message.set_name('INV', 'MISS_USE_TRANSFER');
12662: fnd_msg_pub.ADD;
12663: RAISE fnd_api.g_exc_error;
12664: END IF;
12665:
12666: l_to_row_exist := (l_to_rsv_tbl_count > 0);
12667:

Line 12678: RAISE fnd_api.g_exc_error;

12674: --
12675: IF l_orig_rsv_tbl(1).primary_reservation_quantity < l_to_rsv_rec.primary_reservation_quantity THEN
12676: fnd_message.set_name('INV', 'TRANSFER MORE THAN RESERVE');
12677: fnd_msg_pub.ADD;
12678: RAISE fnd_api.g_exc_error;
12679: END IF;
12680:
12681: /**** {{ R12 Enhanced reservations code changes.Calling the reservation
12682: -- lock API to create a user-defined lock for non-inventory supplies }} *****/

Line 12710: RAISE fnd_api.g_exc_error;

12706:
12707: IF l_lock_status = 0 THEN
12708: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
12709: fnd_msg_pub.ADD;
12710: RAISE fnd_api.g_exc_error;
12711: END if;
12712:
12713: inv_reservation_lock_pvt.lock_supply_demand_record
12714: (p_organization_id => l_to_rsv_rec.organization_id

Line 12726: RAISE fnd_api.g_exc_error;

12722:
12723: IF l_lock_status = 0 THEN
12724: fnd_message.set_name('INV', 'INV_INVALID_LOCK');
12725: fnd_msg_pub.ADD;
12726: RAISE fnd_api.g_exc_error;
12727: END if;
12728:
12729: l_lock_obtained := TRUE;
12730: END IF;

Line 12747: RAISE fnd_api.g_exc_unexpected_error;

12743: THEN
12744: IF (l_debug = 1) THEN
12745: debug_print('Error caching the org record');
12746: END IF;
12747: RAISE fnd_api.g_exc_unexpected_error;
12748: END IF;
12749: -- Set the PJM enabled flag.
12750: l_pjm_enabled := INV_CACHE.org_rec.project_reference_enabled;
12751: ELSE

Line 12772: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)

12768: inv_reservation_global.g_source_type_rma)) AND
12769: (l_pjm_enabled = 1) THEN
12770:
12771: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
12772: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
12773: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
12774: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
12775: -- Added the below IF condition for Bug Fix 5264987
12776: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN

Line 12773: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR

12769: (l_pjm_enabled = 1) THEN
12770:
12771: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
12772: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
12773: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
12774: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
12775: -- Added the below IF condition for Bug Fix 5264987
12776: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN
12777: l_project_id := g_project_id;

Line 12774: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN

12770:
12771: IF (l_to_rsv_rec.demand_source_line_id IS NOT NULL) AND
12772: (l_to_rsv_rec.demand_source_line_id <> fnd_api.g_miss_num)
12773: AND ((l_to_rsv_rec.project_id = fnd_api.g_miss_num) OR
12774: (l_to_rsv_rec.task_id = fnd_api.g_miss_num)) THEN
12775: -- Added the below IF condition for Bug Fix 5264987
12776: IF l_to_rsv_rec.demand_source_line_id = g_oe_line_id THEN
12777: l_project_id := g_project_id;
12778: l_task_id := g_task_id;

Line 12792: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN

12788: END IF;
12789: END;
12790: END IF;
12791:
12792: IF (l_to_rsv_rec.project_id = fnd_api.g_miss_num) THEN
12793: IF (l_project_id IS NOT NULL) THEN
12794: l_to_rsv_rec.project_id := l_project_id;
12795: ELSE
12796: l_to_rsv_rec.project_id := NULL;

Line 12800: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN

12796: l_to_rsv_rec.project_id := NULL;
12797: END IF;
12798: END IF;
12799:
12800: IF (l_to_rsv_rec.task_id = fnd_api.g_miss_num) THEN
12801: IF (l_task_id IS NOT NULL) THEN
12802: l_to_rsv_rec.task_id := l_task_id;
12803: ELSE
12804: l_to_rsv_rec.task_id := NULL;

Line 12850: RAISE fnd_api.g_exc_error;

12846: debug_print('Cannot determine what is being passed to the serial tables');
12847: END IF;
12848: fnd_message.set_name('INV', 'INV_INVALID_SERIAL_TABLES');
12849: fnd_msg_pub.ADD;
12850: RAISE fnd_api.g_exc_error;
12851: END IF;
12852:
12853: IF (l_debug = 1) THEN
12854: debug_print('Serial Param' || l_serial_param);

Line 12871: IF p_validation_flag = fnd_api.g_true THEN

12867: IF (l_debug = 1) THEN
12868: debug_print('Before calling validate');
12869: END IF;
12870:
12871: IF p_validation_flag = fnd_api.g_true THEN
12872: -- we do validation after the query because
12873: -- for transfer, we might have many input value set to
12874: -- missing. We need to use the actual value to do
12875: -- validation

Line 12899: IF l_return_status = fnd_api.g_ret_sts_error THEN

12895: , x_to_sub_cache_index => l_to_sub_cache_index
12896: );
12897:
12898: --
12899: IF l_return_status = fnd_api.g_ret_sts_error THEN
12900: RAISE fnd_api.g_exc_error;
12901: END IF;
12902:
12903: --

Line 12900: RAISE fnd_api.g_exc_error;

12896: );
12897:
12898: --
12899: IF l_return_status = fnd_api.g_ret_sts_error THEN
12900: RAISE fnd_api.g_exc_error;
12901: END IF;
12902:
12903: --
12904: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12904: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12900: RAISE fnd_api.g_exc_error;
12901: END IF;
12902:
12903: --
12904: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12905: RAISE fnd_api.g_exc_unexpected_error;
12906: END IF;
12907:
12908: IF (l_debug = 1) THEN

Line 12905: RAISE fnd_api.g_exc_unexpected_error;

12901: END IF;
12902:
12903: --
12904: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12905: RAISE fnd_api.g_exc_unexpected_error;
12906: END IF;
12907:
12908: IF (l_debug = 1) THEN
12909: debug_print('After calling validate' || l_return_status);

Line 12915: IF p_validation_flag = fnd_api.g_true AND

12911:
12912: /**** {{ R12 Enhanced reservations code changes }}****/
12913: END IF;
12914:
12915: IF p_validation_flag = fnd_api.g_true AND
12916: (l_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_inv) THEN
12917:
12918: /*** End R12 ***/
12919: -- INVCONV BEGIN

Line 12931: , p_init_msg_lst => fnd_api.g_true

12927:
12928: inv_quantity_tree_pvt.create_tree
12929: (
12930: p_api_version_number => 1.0
12931: , p_init_msg_lst => fnd_api.g_true
12932: , x_return_status => l_return_status
12933: , x_msg_count => x_msg_count
12934: , x_msg_data => x_msg_data
12935: , p_organization_id => l_orig_rsv_tbl(1).organization_id

Line 12953: IF l_return_status = fnd_api.g_ret_sts_error THEN

12949: , x_tree_id => l_tree_id1
12950: );
12951:
12952: --
12953: IF l_return_status = fnd_api.g_ret_sts_error THEN
12954: RAISE fnd_api.g_exc_error;
12955: END IF;
12956:
12957: --

Line 12954: RAISE fnd_api.g_exc_error;

12950: );
12951:
12952: --
12953: IF l_return_status = fnd_api.g_ret_sts_error THEN
12954: RAISE fnd_api.g_exc_error;
12955: END IF;
12956:
12957: --
12958: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12958: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12954: RAISE fnd_api.g_exc_error;
12955: END IF;
12956:
12957: --
12958: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12959: RAISE fnd_api.g_exc_unexpected_error;
12960: END IF;
12961:
12962: --

Line 12959: RAISE fnd_api.g_exc_unexpected_error;

12955: END IF;
12956:
12957: --
12958: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12959: RAISE fnd_api.g_exc_unexpected_error;
12960: END IF;
12961:
12962: --
12963: inv_quantity_tree_pvt.create_tree

Line 12966: , p_init_msg_lst => fnd_api.g_true

12962: --
12963: inv_quantity_tree_pvt.create_tree
12964: (
12965: p_api_version_number => 1.0
12966: , p_init_msg_lst => fnd_api.g_true
12967: , x_return_status => l_return_status
12968: , x_msg_count => x_msg_count
12969: , x_msg_data => x_msg_data
12970: , p_organization_id => l_to_rsv_rec.organization_id

Line 12988: IF l_return_status = fnd_api.g_ret_sts_error THEN

12984: , x_tree_id => l_tree_id2
12985: );
12986:
12987: --
12988: IF l_return_status = fnd_api.g_ret_sts_error THEN
12989: RAISE fnd_api.g_exc_error;
12990: END IF;
12991:
12992: --

Line 12989: RAISE fnd_api.g_exc_error;

12985: );
12986:
12987: --
12988: IF l_return_status = fnd_api.g_ret_sts_error THEN
12989: RAISE fnd_api.g_exc_error;
12990: END IF;
12991:
12992: --
12993: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 12993: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

12989: RAISE fnd_api.g_exc_error;
12990: END IF;
12991:
12992: --
12993: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12994: RAISE fnd_api.g_exc_unexpected_error;
12995: END IF;
12996:
12997: --

Line 12994: RAISE fnd_api.g_exc_unexpected_error;

12990: END IF;
12991:
12992: --
12993: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
12994: RAISE fnd_api.g_exc_unexpected_error;
12995: END IF;
12996:
12997: --
12998: -- INVCONV - upgrade call to incorporate secondaries

Line 13030: , p_partial_reservation_flag => fnd_api.g_false

13026: , p_to_revision_control => is_revision_control(l_to_item_cache_index)
13027: , p_to_lot_control => is_lot_control(l_to_item_cache_index)
13028: , p_action => 'TRANSFER'
13029: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
13030: , p_partial_reservation_flag => fnd_api.g_false
13031: , p_check_availability => fnd_api.g_false
13032: );
13033:
13034:

Line 13031: , p_check_availability => fnd_api.g_false

13027: , p_to_lot_control => is_lot_control(l_to_item_cache_index)
13028: , p_action => 'TRANSFER'
13029: , p_lot_divisible_flag => l_lot_divisible_flag -- INVCONV
13030: , p_partial_reservation_flag => fnd_api.g_false
13031: , p_check_availability => fnd_api.g_false
13032: );
13033:
13034:
13035: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 13035: IF l_return_status = fnd_api.g_ret_sts_error THEN

13031: , p_check_availability => fnd_api.g_false
13032: );
13033:
13034:
13035: IF l_return_status = fnd_api.g_ret_sts_error THEN
13036: RAISE fnd_api.g_exc_error;
13037: END IF;
13038:
13039: --

Line 13036: RAISE fnd_api.g_exc_error;

13032: );
13033:
13034:
13035: IF l_return_status = fnd_api.g_ret_sts_error THEN
13036: RAISE fnd_api.g_exc_error;
13037: END IF;
13038:
13039: --
13040: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13040: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13036: RAISE fnd_api.g_exc_error;
13037: END IF;
13038:
13039: --
13040: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13041: RAISE fnd_api.g_exc_unexpected_error;
13042: END IF;
13043:
13044: /**** {{ R12 Enhanced reservations code changes }}****/

Line 13041: RAISE fnd_api.g_exc_unexpected_error;

13037: END IF;
13038:
13039: --
13040: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13041: RAISE fnd_api.g_exc_unexpected_error;
13042: END IF;
13043:
13044: /**** {{ R12 Enhanced reservations code changes }}****/
13045: ELSIF (l_to_rsv_rec.supply_source_type_id IN

Line 13090: IF l_return_status = fnd_api.g_ret_sts_error THEN

13086: debug_print('Available quantity to reserve. l_quantity_reserved: ' || l_quantity_reserved);
13087: END IF;
13088:
13089: --
13090: IF l_return_status = fnd_api.g_ret_sts_error THEN
13091: RAISE fnd_api.g_exc_error;
13092: END IF;
13093:
13094: --

Line 13091: RAISE fnd_api.g_exc_error;

13087: END IF;
13088:
13089: --
13090: IF l_return_status = fnd_api.g_ret_sts_error THEN
13091: RAISE fnd_api.g_exc_error;
13092: END IF;
13093:
13094: --
13095: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13095: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13091: RAISE fnd_api.g_exc_error;
13092: END IF;
13093:
13094: --
13095: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13096: RAISE fnd_api.g_exc_unexpected_error;
13097: END IF;
13098:
13099: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)

Line 13096: RAISE fnd_api.g_exc_unexpected_error;

13092: END IF;
13093:
13094: --
13095: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13096: RAISE fnd_api.g_exc_unexpected_error;
13097: END IF;
13098:
13099: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)
13100: > 0.000005) THEN

Line 13108: RAISE fnd_api.g_exc_error;

13104: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
13105: END IF;
13106: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
13107: fnd_msg_pub.ADD;
13108: RAISE fnd_api.g_exc_error;
13109:
13110: END IF;
13111: END IF;
13112:

Line 13166: IF l_return_status = fnd_api.g_ret_sts_error THEN

13162: debug_print('Available quantity to reserve. l_quantity_reserved: ' || l_quantity_reserved);
13163: END IF;
13164:
13165: --
13166: IF l_return_status = fnd_api.g_ret_sts_error THEN
13167: RAISE fnd_api.g_exc_error;
13168: END IF;
13169:
13170: --

Line 13167: RAISE fnd_api.g_exc_error;

13163: END IF;
13164:
13165: --
13166: IF l_return_status = fnd_api.g_ret_sts_error THEN
13167: RAISE fnd_api.g_exc_error;
13168: END IF;
13169:
13170: --
13171: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13171: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13167: RAISE fnd_api.g_exc_error;
13168: END IF;
13169:
13170: --
13171: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13172: RAISE fnd_api.g_exc_unexpected_error;
13173: END IF;
13174:
13175: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)

Line 13172: RAISE fnd_api.g_exc_unexpected_error;

13168: END IF;
13169:
13170: --
13171: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13172: RAISE fnd_api.g_exc_unexpected_error;
13173: END IF;
13174:
13175: IF ((l_to_rsv_rec.primary_reservation_quantity - l_quantity_reserved)
13176: > 0.000005) THEN

Line 13184: RAISE fnd_api.g_exc_error;

13180: debug_print('l_to_rsv_rec.primary_reservation_quantity: ' || l_to_rsv_rec.primary_reservation_quantity);
13181: END IF;
13182: fnd_message.set_name('INV', 'INV_INVALID_AVAILABLE_QTY');
13183: fnd_msg_pub.ADD;
13184: RAISE fnd_api.g_exc_error;
13185:
13186: END IF;
13187:
13188: END IF;

Line 13238: IF l_return_status = fnd_api.g_ret_sts_error THEN

13234: , x_msg_data => x_msg_data
13235: );
13236:
13237: --
13238: IF l_return_status = fnd_api.g_ret_sts_error THEN
13239: RAISE fnd_api.g_exc_error;
13240: END IF;
13241:
13242: --

Line 13239: RAISE fnd_api.g_exc_error;

13235: );
13236:
13237: --
13238: IF l_return_status = fnd_api.g_ret_sts_error THEN
13239: RAISE fnd_api.g_exc_error;
13240: END IF;
13241:
13242: --
13243: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13243: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13239: RAISE fnd_api.g_exc_error;
13240: END IF;
13241:
13242: --
13243: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13244: RAISE fnd_api.g_exc_unexpected_error;
13245: END IF;
13246: --
13247: IF (l_debug = 1) THEN

Line 13244: RAISE fnd_api.g_exc_unexpected_error;

13240: END IF;
13241:
13242: --
13243: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13244: RAISE fnd_api.g_exc_unexpected_error;
13245: END IF;
13246: --
13247: IF (l_debug = 1) THEN
13248: debug_print('After calling cto work flow unresv check');

Line 13320: RAISE fnd_api.g_exc_error;

13316: IF l_new_orig_rsv_qty = -99999 THEN
13317: -- conversion failed
13318: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-PRIMARY-UOM');
13319: fnd_msg_pub.ADD;
13320: RAISE fnd_api.g_exc_error;
13321: END IF;
13322: ELSE
13323: l_new_orig_rsv_qty := l_new_orig_prim_qty;
13324: END IF;

Line 13349: RAISE fnd_api.g_exc_error;

13345: IF ( (NVL(l_new_orig_rsv_qty,0) < 0) OR
13346: (NVL(l_new_orig_prim_qty,0) < 0) ) THEN
13347: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
13348: fnd_msg_pub.ADD;
13349: RAISE fnd_api.g_exc_error;
13350: END IF;
13351:
13352: -- INVCONV BEGIN
13353: IF (NVL(l_orig_second_rsv_qty,0) < 0) THEN

Line 13356: RAISE fnd_api.g_exc_error;

13352: -- INVCONV BEGIN
13353: IF (NVL(l_orig_second_rsv_qty,0) < 0) THEN
13354: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
13355: fnd_msg_pub.ADD;
13356: RAISE fnd_api.g_exc_error;
13357: END IF;
13358: -- INVCONV END
13359: -- Bug 3461990: Reservations API should not update reservations with more
13360: -- than 5 decimal places, since the transaction quantity is being

Line 13405: IF l_return_status = fnd_api.g_ret_sts_error THEN

13401:
13402: -- for data sync b/w mtl_demand and mtl_reservations
13403: 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);
13404:
13405: IF l_return_status = fnd_api.g_ret_sts_error THEN
13406: RAISE fnd_api.g_exc_error;
13407: END IF;
13408:
13409: --

Line 13406: RAISE fnd_api.g_exc_error;

13402: -- for data sync b/w mtl_demand and mtl_reservations
13403: 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);
13404:
13405: IF l_return_status = fnd_api.g_ret_sts_error THEN
13406: RAISE fnd_api.g_exc_error;
13407: END IF;
13408:
13409: --
13410: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13410: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13406: RAISE fnd_api.g_exc_error;
13407: END IF;
13408:
13409: --
13410: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13411: RAISE fnd_api.g_exc_unexpected_error;
13412: END IF;
13413: --
13414: /** Commented out by request of CTO. This was causing an extra

Line 13411: RAISE fnd_api.g_exc_unexpected_error;

13407: END IF;
13408:
13409: --
13410: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13411: RAISE fnd_api.g_exc_unexpected_error;
13412: END IF;
13413: --
13414: /** Commented out by request of CTO. This was causing an extra
13415: * update to the workflow that was causing problems.

Line 13433: * IF l_return_status = fnd_api.g_ret_sts_error THEN

13429: * , x_msg_count => x_msg_count
13430: * , x_msg_data => x_msg_data
13431: * );
13432: * --
13433: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13434: * RAISE fnd_api.g_exc_error;
13435: * END IF ;
13436: * --
13437: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13434: * RAISE fnd_api.g_exc_error;

13430: * , x_msg_data => x_msg_data
13431: * );
13432: * --
13433: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13434: * RAISE fnd_api.g_exc_error;
13435: * END IF ;
13436: * --
13437: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13438: * RAISE fnd_api.g_exc_unexpected_error;

Line 13437: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13433: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13434: * RAISE fnd_api.g_exc_error;
13435: * END IF ;
13436: * --
13437: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13438: * RAISE fnd_api.g_exc_unexpected_error;
13439: * END IF;
13440: * --
13441: * END IF;

Line 13438: * RAISE fnd_api.g_exc_unexpected_error;

13434: * RAISE fnd_api.g_exc_error;
13435: * END IF ;
13436: * --
13437: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13438: * RAISE fnd_api.g_exc_unexpected_error;
13439: * END IF;
13440: * --
13441: * END IF;
13442: */

Line 13459: IF l_return_status = fnd_api.g_ret_sts_error THEN

13455: , x_msg_data => x_msg_data
13456: );
13457:
13458: --
13459: IF l_return_status = fnd_api.g_ret_sts_error THEN
13460: RAISE fnd_api.g_exc_error;
13461: END IF;
13462:
13463: --

Line 13460: RAISE fnd_api.g_exc_error;

13456: );
13457:
13458: --
13459: IF l_return_status = fnd_api.g_ret_sts_error THEN
13460: RAISE fnd_api.g_exc_error;
13461: END IF;
13462:
13463: --
13464: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13464: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13460: RAISE fnd_api.g_exc_error;
13461: END IF;
13462:
13463: --
13464: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13465: RAISE fnd_api.g_exc_unexpected_error;
13466: END IF;
13467: --
13468: END IF;

Line 13465: RAISE fnd_api.g_exc_unexpected_error;

13461: END IF;
13462:
13463: --
13464: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13465: RAISE fnd_api.g_exc_unexpected_error;
13466: END IF;
13467: --
13468: END IF;
13469:

Line 13473: IF l_return_status = fnd_api.g_ret_sts_error THEN

13469:
13470: -- for data sync b/w mtl_demand and mtl_reservations
13471: 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);
13472:
13473: IF l_return_status = fnd_api.g_ret_sts_error THEN
13474: RAISE fnd_api.g_exc_error;
13475: END IF;
13476:
13477: --

Line 13474: RAISE fnd_api.g_exc_error;

13470: -- for data sync b/w mtl_demand and mtl_reservations
13471: 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);
13472:
13473: IF l_return_status = fnd_api.g_ret_sts_error THEN
13474: RAISE fnd_api.g_exc_error;
13475: END IF;
13476:
13477: --
13478: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13478: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13474: RAISE fnd_api.g_exc_error;
13475: END IF;
13476:
13477: --
13478: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13479: RAISE fnd_api.g_exc_unexpected_error;
13480: END IF;
13481:
13482: -- 2884492

Line 13479: RAISE fnd_api.g_exc_unexpected_error;

13475: END IF;
13476:
13477: --
13478: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13479: RAISE fnd_api.g_exc_unexpected_error;
13480: END IF;
13481:
13482: -- 2884492
13483: mtl_reservations_pkg.delete_row

Line 13505: * IF l_return_status = fnd_api.g_ret_sts_error THEN

13501: * , x_msg_count => x_msg_count
13502: * , x_msg_data => x_msg_data
13503: * );
13504: * --
13505: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13506: * RAISE fnd_api.g_exc_error;
13507: * END IF ;
13508: * --
13509: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13506: * RAISE fnd_api.g_exc_error;

13502: * , x_msg_data => x_msg_data
13503: * );
13504: * --
13505: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13506: * RAISE fnd_api.g_exc_error;
13507: * END IF ;
13508: * --
13509: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13510: * RAISE fnd_api.g_exc_unexpected_error;

Line 13509: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13505: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13506: * RAISE fnd_api.g_exc_error;
13507: * END IF ;
13508: * --
13509: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13510: * RAISE fnd_api.g_exc_unexpected_error;
13511: * END IF;
13512: * --
13513: * END IF;

Line 13510: * RAISE fnd_api.g_exc_unexpected_error;

13506: * RAISE fnd_api.g_exc_error;
13507: * END IF ;
13508: * --
13509: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13510: * RAISE fnd_api.g_exc_unexpected_error;
13511: * END IF;
13512: * --
13513: * END IF;
13514: */

Line 13531: IF l_return_status = fnd_api.g_ret_sts_error THEN

13527: , x_msg_data => x_msg_data
13528: );
13529:
13530: --
13531: IF l_return_status = fnd_api.g_ret_sts_error THEN
13532: RAISE fnd_api.g_exc_error;
13533: END IF;
13534:
13535: --

Line 13532: RAISE fnd_api.g_exc_error;

13528: );
13529:
13530: --
13531: IF l_return_status = fnd_api.g_ret_sts_error THEN
13532: RAISE fnd_api.g_exc_error;
13533: END IF;
13534:
13535: --
13536: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13536: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13532: RAISE fnd_api.g_exc_error;
13533: END IF;
13534:
13535: --
13536: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13537: RAISE fnd_api.g_exc_unexpected_error;
13538: END IF;
13539: --
13540: END IF;

Line 13537: RAISE fnd_api.g_exc_unexpected_error;

13533: END IF;
13534:
13535: --
13536: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13537: RAISE fnd_api.g_exc_unexpected_error;
13538: END IF;
13539: --
13540: END IF;
13541:

Line 13558: IF l_return_status = fnd_api.g_ret_sts_error THEN

13554: , x_msg_data => x_msg_data
13555: );
13556:
13557: --
13558: IF l_return_status = fnd_api.g_ret_sts_error THEN
13559: RAISE fnd_api.g_exc_error;
13560: END IF;
13561:
13562: --

Line 13559: RAISE fnd_api.g_exc_error;

13555: );
13556:
13557: --
13558: IF l_return_status = fnd_api.g_ret_sts_error THEN
13559: RAISE fnd_api.g_exc_error;
13560: END IF;
13561:
13562: --
13563: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13563: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13559: RAISE fnd_api.g_exc_error;
13560: END IF;
13561:
13562: --
13563: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13564: RAISE fnd_api.g_exc_unexpected_error;
13565: END IF;
13566: --
13567: END IF;

Line 13564: RAISE fnd_api.g_exc_unexpected_error;

13560: END IF;
13561:
13562: --
13563: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13564: RAISE fnd_api.g_exc_unexpected_error;
13565: END IF;
13566: --
13567: END IF;
13568:

Line 13585: RAISE fnd_api.g_exc_error;

13581: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
13582: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
13583: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
13584: fnd_msg_pub.ADD;
13585: RAISE fnd_api.g_exc_error;
13586: END IF;
13587:
13588: -- INVCONV BEGIN
13589: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 13592: RAISE fnd_api.g_exc_error;

13588: -- INVCONV BEGIN
13589: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
13590: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
13591: fnd_msg_pub.ADD;
13592: RAISE fnd_api.g_exc_error;
13593: END IF;
13594: -- INVCONV END
13595:
13596: -- Bug 3461990: Reservations API should not update reservations with more

Line 13709: IF l_return_status = fnd_api.g_ret_sts_error THEN

13705: 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);
13706:
13707: debug_print(' return status after updating row' || l_return_status);
13708:
13709: IF l_return_status = fnd_api.g_ret_sts_error THEN
13710: RAISE fnd_api.g_exc_error;
13711: END IF;
13712:
13713: --

Line 13710: RAISE fnd_api.g_exc_error;

13706:
13707: debug_print(' return status after updating row' || l_return_status);
13708:
13709: IF l_return_status = fnd_api.g_ret_sts_error THEN
13710: RAISE fnd_api.g_exc_error;
13711: END IF;
13712:
13713: --
13714: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13714: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13710: RAISE fnd_api.g_exc_error;
13711: END IF;
13712:
13713: --
13714: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13715: RAISE fnd_api.g_exc_unexpected_error;
13716: END IF;
13717:
13718: --

Line 13715: RAISE fnd_api.g_exc_unexpected_error;

13711: END IF;
13712:
13713: --
13714: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13715: RAISE fnd_api.g_exc_unexpected_error;
13716: END IF;
13717:
13718: --
13719: -- since to row not exists, transfer all

Line 13752: * IF l_return_status = fnd_api.g_ret_sts_error THEN

13748: * , x_msg_count => x_msg_count
13749: * , x_msg_data => x_msg_data
13750: * );
13751: * --
13752: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13753: * RAISE fnd_api.g_exc_error;
13754: * END IF ;
13755: * --
13756: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13753: * RAISE fnd_api.g_exc_error;

13749: * , x_msg_data => x_msg_data
13750: * );
13751: * --
13752: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13753: * RAISE fnd_api.g_exc_error;
13754: * END IF ;
13755: * --
13756: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13757: * RAISE fnd_api.g_exc_unexpected_error;

Line 13756: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13752: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13753: * RAISE fnd_api.g_exc_error;
13754: * END IF ;
13755: * --
13756: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13757: * RAISE fnd_api.g_exc_unexpected_error;
13758: * END IF;
13759: * --
13760: * END IF;

Line 13757: * RAISE fnd_api.g_exc_unexpected_error;

13753: * RAISE fnd_api.g_exc_error;
13754: * END IF ;
13755: * --
13756: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13757: * RAISE fnd_api.g_exc_unexpected_error;
13758: * END IF;
13759: * --
13760: * END IF;
13761: */

Line 13785: IF l_return_status = fnd_api.g_ret_sts_error THEN

13781: , x_msg_data => x_msg_data
13782: );
13783:
13784: --
13785: IF l_return_status = fnd_api.g_ret_sts_error THEN
13786: RAISE fnd_api.g_exc_error;
13787: END IF;
13788:
13789: --

Line 13786: RAISE fnd_api.g_exc_error;

13782: );
13783:
13784: --
13785: IF l_return_status = fnd_api.g_ret_sts_error THEN
13786: RAISE fnd_api.g_exc_error;
13787: END IF;
13788:
13789: --
13790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13786: RAISE fnd_api.g_exc_error;
13787: END IF;
13788:
13789: --
13790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13791: RAISE fnd_api.g_exc_unexpected_error;
13792: END IF;
13793: --
13794: END IF;

Line 13791: RAISE fnd_api.g_exc_unexpected_error;

13787: END IF;
13788:
13789: --
13790: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13791: RAISE fnd_api.g_exc_unexpected_error;
13792: END IF;
13793: --
13794: END IF;
13795: */

Line 13813: IF l_return_status = fnd_api.g_ret_sts_error THEN

13809: , x_msg_data => x_msg_data
13810: );
13811:
13812: --
13813: IF l_return_status = fnd_api.g_ret_sts_error THEN
13814: RAISE fnd_api.g_exc_error;
13815: END IF;
13816:
13817: --

Line 13814: RAISE fnd_api.g_exc_error;

13810: );
13811:
13812: --
13813: IF l_return_status = fnd_api.g_ret_sts_error THEN
13814: RAISE fnd_api.g_exc_error;
13815: END IF;
13816:
13817: --
13818: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13818: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13814: RAISE fnd_api.g_exc_error;
13815: END IF;
13816:
13817: --
13818: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13819: RAISE fnd_api.g_exc_unexpected_error;
13820: END IF;
13821: --
13822: END IF;

Line 13819: RAISE fnd_api.g_exc_unexpected_error;

13815: END IF;
13816:
13817: --
13818: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13819: RAISE fnd_api.g_exc_unexpected_error;
13820: END IF;
13821: --
13822: END IF;
13823:

Line 13856: RAISE fnd_api.g_exc_error;

13852: IF ( (NVL(l_primary_rsv_quantity,0) < 0) OR
13853: (NVL(l_rsv_quantity,0)< 0) ) THEN
13854: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
13855: fnd_msg_pub.ADD;
13856: RAISE fnd_api.g_exc_error;
13857: END IF;
13858:
13859: -- INVCONV BEGIN
13860: IF (NVL(l_secondary_rsv_quantity,0) < 0) THEN

Line 13863: RAISE fnd_api.g_exc_error;

13859: -- INVCONV BEGIN
13860: IF (NVL(l_secondary_rsv_quantity,0) < 0) THEN
13861: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
13862: fnd_msg_pub.ADD;
13863: RAISE fnd_api.g_exc_error;
13864: END IF;
13865: -- INVCONV END
13866:
13867: -- Bug 3461990: Reservations API should not be updated with more

Line 13895: IF l_return_status = fnd_api.g_ret_sts_error THEN

13891:
13892: -- for data sync b/w mtl_demand and mtl_reservations
13893: 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);
13894:
13895: IF l_return_status = fnd_api.g_ret_sts_error THEN
13896: RAISE fnd_api.g_exc_error;
13897: END IF;
13898:
13899: --

Line 13896: RAISE fnd_api.g_exc_error;

13892: -- for data sync b/w mtl_demand and mtl_reservations
13893: 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);
13894:
13895: IF l_return_status = fnd_api.g_ret_sts_error THEN
13896: RAISE fnd_api.g_exc_error;
13897: END IF;
13898:
13899: --
13900: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13900: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13896: RAISE fnd_api.g_exc_error;
13897: END IF;
13898:
13899: --
13900: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13901: RAISE fnd_api.g_exc_unexpected_error;
13902: END IF;
13903:
13904: --

Line 13901: RAISE fnd_api.g_exc_unexpected_error;

13897: END IF;
13898:
13899: --
13900: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13901: RAISE fnd_api.g_exc_unexpected_error;
13902: END IF;
13903:
13904: --
13905: x_reservation_id := l_to_rsv_tbl(1).reservation_id;

Line 13925: * IF l_return_status = fnd_api.g_ret_sts_error THEN

13921: * , x_msg_count => x_msg_count
13922: * , x_msg_data => x_msg_data
13923: * );
13924: * --
13925: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13926: * RAISE fnd_api.g_exc_error;
13927: * END IF ;
13928: * --
13929: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13926: * RAISE fnd_api.g_exc_error;

13922: * , x_msg_data => x_msg_data
13923: * );
13924: * --
13925: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13926: * RAISE fnd_api.g_exc_error;
13927: * END IF ;
13928: * --
13929: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13930: * RAISE fnd_api.g_exc_unexpected_error;

Line 13929: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13925: * IF l_return_status = fnd_api.g_ret_sts_error THEN
13926: * RAISE fnd_api.g_exc_error;
13927: * END IF ;
13928: * --
13929: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13930: * RAISE fnd_api.g_exc_unexpected_error;
13931: * END IF;
13932: * --
13933: *END IF;

Line 13930: * RAISE fnd_api.g_exc_unexpected_error;

13926: * RAISE fnd_api.g_exc_error;
13927: * END IF ;
13928: * --
13929: * IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13930: * RAISE fnd_api.g_exc_unexpected_error;
13931: * END IF;
13932: * --
13933: *END IF;
13934: */

Line 13950: IF l_return_status = fnd_api.g_ret_sts_error THEN

13946: , x_msg_data => x_msg_data
13947: );
13948:
13949: --
13950: IF l_return_status = fnd_api.g_ret_sts_error THEN
13951: RAISE fnd_api.g_exc_error;
13952: END IF;
13953:
13954: --

Line 13951: RAISE fnd_api.g_exc_error;

13947: );
13948:
13949: --
13950: IF l_return_status = fnd_api.g_ret_sts_error THEN
13951: RAISE fnd_api.g_exc_error;
13952: END IF;
13953:
13954: --
13955: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 13955: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

13951: RAISE fnd_api.g_exc_error;
13952: END IF;
13953:
13954: --
13955: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13956: RAISE fnd_api.g_exc_unexpected_error;
13957: END IF;
13958: --
13959: END IF;

Line 13956: RAISE fnd_api.g_exc_unexpected_error;

13952: END IF;
13953:
13954: --
13955: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
13956: RAISE fnd_api.g_exc_unexpected_error;
13957: END IF;
13958: --
13959: END IF;
13960:

Line 13977: RAISE fnd_api.g_exc_error;

13973: IF ( (NVL(l_to_rsv_rec.reservation_quantity,0) < 0) OR
13974: (NVL(l_to_rsv_rec.primary_reservation_quantity,0) < 0) ) THEN
13975: fnd_message.set_name('INV', 'INV-INVALID RESERVATION QTY');
13976: fnd_msg_pub.ADD;
13977: RAISE fnd_api.g_exc_error;
13978: END IF;
13979:
13980: -- INVCONV BEGIN
13981: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN

Line 13984: RAISE fnd_api.g_exc_error;

13980: -- INVCONV BEGIN
13981: IF (NVL(l_to_rsv_rec.secondary_reservation_quantity,0) < 0) THEN
13982: fnd_message.set_name('INV', 'INV-INVALID NEGATIVE SECONDARY'); -- INVCONV New Message
13983: fnd_msg_pub.ADD;
13984: RAISE fnd_api.g_exc_error;
13985: END IF;
13986: -- INVCONV END
13987:
13988:

Line 14140: IF l_return_status = fnd_api.g_ret_sts_error THEN

14136:
14137: -- for data sync b/w mtl_demand and mtl_reservations
14138: 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);
14139:
14140: IF l_return_status = fnd_api.g_ret_sts_error THEN
14141: RAISE fnd_api.g_exc_error;
14142: END IF;
14143:
14144: --

Line 14141: RAISE fnd_api.g_exc_error;

14137: -- for data sync b/w mtl_demand and mtl_reservations
14138: 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);
14139:
14140: IF l_return_status = fnd_api.g_ret_sts_error THEN
14141: RAISE fnd_api.g_exc_error;
14142: END IF;
14143:
14144: --
14145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14141: RAISE fnd_api.g_exc_error;
14142: END IF;
14143:
14144: --
14145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14146: RAISE fnd_api.g_exc_unexpected_error;
14147: END IF;
14148: --
14149: END IF;

Line 14146: RAISE fnd_api.g_exc_unexpected_error;

14142: END IF;
14143:
14144: --
14145: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14146: RAISE fnd_api.g_exc_unexpected_error;
14147: END IF;
14148: --
14149: END IF;
14150:

Line 14165: IF l_return_status = fnd_api.g_ret_sts_error THEN

14161: 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);
14162:
14163: debug_print(' After CTO API' || l_return_status);
14164: --
14165: IF l_return_status = fnd_api.g_ret_sts_error THEN
14166: RAISE fnd_api.g_exc_error;
14167: END IF;
14168:
14169: --

Line 14166: RAISE fnd_api.g_exc_error;

14162:
14163: debug_print(' After CTO API' || l_return_status);
14164: --
14165: IF l_return_status = fnd_api.g_ret_sts_error THEN
14166: RAISE fnd_api.g_exc_error;
14167: END IF;
14168:
14169: --
14170: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14170: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14166: RAISE fnd_api.g_exc_error;
14167: END IF;
14168:
14169: --
14170: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14171: RAISE fnd_api.g_exc_unexpected_error;
14172: END IF;
14173: --
14174: END IF;

Line 14171: RAISE fnd_api.g_exc_unexpected_error;

14167: END IF;
14168:
14169: --
14170: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14171: RAISE fnd_api.g_exc_unexpected_error;
14172: END IF;
14173: --
14174: END IF;
14175:

Line 14288: IF l_return_status = fnd_api.g_ret_sts_error THEN

14284: debug_print('After calling validate serials ' || l_return_status);
14285: END IF;
14286:
14287: --
14288: IF l_return_status = fnd_api.g_ret_sts_error THEN
14289: RAISE fnd_api.g_exc_error;
14290: END IF;
14291:
14292: --

Line 14289: RAISE fnd_api.g_exc_error;

14285: END IF;
14286:
14287: --
14288: IF l_return_status = fnd_api.g_ret_sts_error THEN
14289: RAISE fnd_api.g_exc_error;
14290: END IF;
14291:
14292: --
14293: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14293: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14289: RAISE fnd_api.g_exc_error;
14290: END IF;
14291:
14292: --
14293: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14294: RAISE fnd_api.g_exc_unexpected_error;
14295: END IF;
14296: END IF;
14297:

Line 14294: RAISE fnd_api.g_exc_unexpected_error;

14290: END IF;
14291:
14292: --
14293: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14294: RAISE fnd_api.g_exc_unexpected_error;
14295: END IF;
14296: END IF;
14297:
14298: IF (l_total_serials_reserved > 0) THEN

Line 14315: RAISE fnd_api.g_exc_error;

14311:
14312: IF (l_total_serials_reserved > l_to_primary_reservation_qty) THEN
14313: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14314: fnd_msg_pub.ADD;
14315: RAISE fnd_api.g_exc_error;
14316: END IF;
14317: -- we will have to migrate the serials to the new reservation
14318: -- Just make sure that the group_mark_id and the
14319: -- reservation id are populated.

Line 14335: RAISE fnd_api.g_exc_error;

14331: debug_print('No serials found for serial number. : ' || l_serial_number_table(l_serial_index).serial_number);
14332: END IF;
14333: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
14334: fnd_msg_pub.ADD;
14335: RAISE fnd_api.g_exc_error;
14336: END;
14337: IF l_debug=1 THEN
14338: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);
14339: END IF;

Line 14355: IF l_return_status = fnd_api.g_ret_sts_error THEN

14351: IF (l_debug = 1) THEN
14352: debug_print('After calling update serial reservations ' || l_return_status);
14353: END IF;
14354:
14355: IF l_return_status = fnd_api.g_ret_sts_error THEN
14356: RAISE fnd_api.g_exc_error;
14357: END IF;
14358:
14359: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14356: RAISE fnd_api.g_exc_error;

14352: debug_print('After calling update serial reservations ' || l_return_status);
14353: END IF;
14354:
14355: IF l_return_status = fnd_api.g_ret_sts_error THEN
14356: RAISE fnd_api.g_exc_error;
14357: END IF;
14358:
14359: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14360: RAISE fnd_api.g_exc_unexpected_error;

Line 14359: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14355: IF l_return_status = fnd_api.g_ret_sts_error THEN
14356: RAISE fnd_api.g_exc_error;
14357: END IF;
14358:
14359: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14360: RAISE fnd_api.g_exc_unexpected_error;
14361: END IF;
14362:
14363: ELSIF (NOT l_transfer_all) THEN

Line 14360: RAISE fnd_api.g_exc_unexpected_error;

14356: RAISE fnd_api.g_exc_error;
14357: END IF;
14358:
14359: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14360: RAISE fnd_api.g_exc_unexpected_error;
14361: END IF;
14362:
14363: ELSIF (NOT l_transfer_all) THEN
14364: -- transfer the excess to the to record there are some serial reserved. Check if the

Line 14394: RAISE fnd_api.g_exc_error;

14390: debug_print('No serials found for Serial Number: ' || l_serial_number_table(i).serial_number);
14391: END IF;
14392: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
14393: fnd_msg_pub.ADD;
14394: RAISE fnd_api.g_exc_error;
14395: END;
14396:
14397: IF l_debug=1 THEN
14398: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 14417: IF l_return_status = fnd_api.g_ret_sts_error THEN

14413: IF (l_debug = 1) THEN
14414: debug_print('After calling update serial reservations ' || l_return_status);
14415: END IF;
14416:
14417: IF l_return_status = fnd_api.g_ret_sts_error THEN
14418: RAISE fnd_api.g_exc_error;
14419: END IF;
14420:
14421: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14418: RAISE fnd_api.g_exc_error;

14414: debug_print('After calling update serial reservations ' || l_return_status);
14415: END IF;
14416:
14417: IF l_return_status = fnd_api.g_ret_sts_error THEN
14418: RAISE fnd_api.g_exc_error;
14419: END IF;
14420:
14421: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14422: RAISE fnd_api.g_exc_unexpected_error;

Line 14421: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14417: IF l_return_status = fnd_api.g_ret_sts_error THEN
14418: RAISE fnd_api.g_exc_error;
14419: END IF;
14420:
14421: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14422: RAISE fnd_api.g_exc_unexpected_error;
14423: END IF;
14424:
14425: update_serial_rsv_quantity

Line 14422: RAISE fnd_api.g_exc_unexpected_error;

14418: RAISE fnd_api.g_exc_error;
14419: END IF;
14420:
14421: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14422: RAISE fnd_api.g_exc_unexpected_error;
14423: END IF;
14424:
14425: update_serial_rsv_quantity
14426: (x_return_status => l_return_status

Line 14437: IF l_return_status = fnd_api.g_ret_sts_error THEN

14433: IF (l_debug = 1) THEN
14434: debug_print('After calling update serial reservations ' || l_return_status);
14435: END IF;
14436:
14437: IF l_return_status = fnd_api.g_ret_sts_error THEN
14438: RAISE fnd_api.g_exc_error;
14439: END IF;
14440:
14441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14438: RAISE fnd_api.g_exc_error;

14434: debug_print('After calling update serial reservations ' || l_return_status);
14435: END IF;
14436:
14437: IF l_return_status = fnd_api.g_ret_sts_error THEN
14438: RAISE fnd_api.g_exc_error;
14439: END IF;
14440:
14441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14442: RAISE fnd_api.g_exc_unexpected_error;

Line 14441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14437: IF l_return_status = fnd_api.g_ret_sts_error THEN
14438: RAISE fnd_api.g_exc_error;
14439: END IF;
14440:
14441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14442: RAISE fnd_api.g_exc_unexpected_error;
14443: END IF;
14444:
14445: -- check to see if we are transferring more than the

Line 14442: RAISE fnd_api.g_exc_unexpected_error;

14438: RAISE fnd_api.g_exc_error;
14439: END IF;
14440:
14441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14442: RAISE fnd_api.g_exc_unexpected_error;
14443: END IF;
14444:
14445: -- check to see if we are transferring more than the
14446: -- reserved qty

Line 14461: RAISE fnd_api.g_exc_error;

14457: END;
14458: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
14459: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14460: fnd_msg_pub.ADD;
14461: RAISE fnd_api.g_exc_error;
14462: END IF;
14463:
14464: END IF; -- total serials more than orig reservation qty
14465:

Line 14473: RAISE fnd_api.g_exc_error;

14469: -- are validated.
14470: IF (l_total_serials_reserved > l_to_primary_reservation_qty) THEN
14471: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14472: fnd_msg_pub.ADD;
14473: RAISE fnd_api.g_exc_error;
14474: END IF;
14475: END IF; -- transfer all and to row exists
14476:
14477: END IF; -- serials reserved

Line 14513: RAISE fnd_api.g_exc_error;

14509: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
14510: l_orig_rsv_tbl(1).reservation_id) OR (l_from_reservation_id IS NULL) THEN
14511: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
14512: fnd_msg_pub.ADD;
14513: RAISE fnd_api.g_exc_error;
14514: END IF;
14515:
14516: IF (l_total_serials_reserved > 0) THEN
14517: -- unreserve the passed serials.

Line 14581: IF l_return_status = fnd_api.g_ret_sts_error THEN

14577: debug_print('After calling validate serials ' || l_return_status);
14578: END IF;
14579:
14580: --
14581: IF l_return_status = fnd_api.g_ret_sts_error THEN
14582: RAISE fnd_api.g_exc_error;
14583: END IF;
14584:
14585: --

Line 14582: RAISE fnd_api.g_exc_error;

14578: END IF;
14579:
14580: --
14581: IF l_return_status = fnd_api.g_ret_sts_error THEN
14582: RAISE fnd_api.g_exc_error;
14583: END IF;
14584:
14585: --
14586: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14586: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14582: RAISE fnd_api.g_exc_error;
14583: END IF;
14584:
14585: --
14586: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14587: RAISE fnd_api.g_exc_unexpected_error;
14588: END IF;
14589: END IF;
14590:

Line 14587: RAISE fnd_api.g_exc_unexpected_error;

14583: END IF;
14584:
14585: --
14586: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14587: RAISE fnd_api.g_exc_unexpected_error;
14588: END IF;
14589: END IF;
14590:
14591: BEGIN

Line 14604: RAISE fnd_api.g_exc_error;

14600: debug_print('No serials found for this data. rsv id: ' || l_orig_rsv_tbl(1).reservation_id);
14601: END IF;
14602: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
14603: fnd_msg_pub.ADD;
14604: RAISE fnd_api.g_exc_error;
14605: END;
14606:
14607: -- check to see if we have reserved more than the to_record
14608: BEGIN

Line 14623: RAISE fnd_api.g_exc_error;

14619:
14620: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
14621: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14622: fnd_msg_pub.ADD;
14623: RAISE fnd_api.g_exc_error;
14624: END IF;
14625:
14626: -- update with whatever is being moved to the to record
14627: update_serial_rsv_quantity

Line 14639: IF l_return_status = fnd_api.g_ret_sts_error THEN

14635: IF (l_debug = 1) THEN
14636: debug_print('After calling update serial reservations ' || l_return_status);
14637: END IF;
14638:
14639: IF l_return_status = fnd_api.g_ret_sts_error THEN
14640: RAISE fnd_api.g_exc_error;
14641: END IF;
14642:
14643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14640: RAISE fnd_api.g_exc_error;

14636: debug_print('After calling update serial reservations ' || l_return_status);
14637: END IF;
14638:
14639: IF l_return_status = fnd_api.g_ret_sts_error THEN
14640: RAISE fnd_api.g_exc_error;
14641: END IF;
14642:
14643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14644: RAISE fnd_api.g_exc_unexpected_error;

Line 14643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14639: IF l_return_status = fnd_api.g_ret_sts_error THEN
14640: RAISE fnd_api.g_exc_error;
14641: END IF;
14642:
14643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14644: RAISE fnd_api.g_exc_unexpected_error;
14645: END IF;
14646:
14647: ELSIF (NOT l_transfer_all) THEN

Line 14644: RAISE fnd_api.g_exc_unexpected_error;

14640: RAISE fnd_api.g_exc_error;
14641: END IF;
14642:
14643: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14644: RAISE fnd_api.g_exc_unexpected_error;
14645: END IF;
14646:
14647: ELSIF (NOT l_transfer_all) THEN
14648: --the from serials are already unreserved. If there are

Line 14689: IF l_return_status = fnd_api.g_ret_sts_error THEN

14685: debug_print('After calling validate serials ' || l_return_status);
14686: END IF;
14687:
14688: --
14689: IF l_return_status = fnd_api.g_ret_sts_error THEN
14690: RAISE fnd_api.g_exc_error;
14691: END IF;
14692:
14693: --

Line 14690: RAISE fnd_api.g_exc_error;

14686: END IF;
14687:
14688: --
14689: IF l_return_status = fnd_api.g_ret_sts_error THEN
14690: RAISE fnd_api.g_exc_error;
14691: END IF;
14692:
14693: --
14694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14690: RAISE fnd_api.g_exc_error;
14691: END IF;
14692:
14693: --
14694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14695: RAISE fnd_api.g_exc_unexpected_error;
14696: END IF;
14697:
14698: -- we have to unreserve some of the serials

Line 14695: RAISE fnd_api.g_exc_unexpected_error;

14691: END IF;
14692:
14693: --
14694: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14695: RAISE fnd_api.g_exc_unexpected_error;
14696: END IF;
14697:
14698: -- we have to unreserve some of the serials
14699: -- unreserve the extra serials that are more than the primary_reservation_quantity

Line 14721: RAISE fnd_api.g_exc_error;

14717: debug_print('No serials found for serial number: ' || l_validate_serial_number_table(i).serial_number);
14718: END IF;
14719: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
14720: fnd_msg_pub.ADD;
14721: RAISE fnd_api.g_exc_error;
14722: END;
14723:
14724: IF l_debug=1 THEN
14725: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 14745: RAISE fnd_api.g_exc_error;

14741:
14742: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
14743: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14744: fnd_msg_pub.ADD;
14745: RAISE fnd_api.g_exc_error;
14746: END IF;
14747:
14748: update_serial_rsv_quantity
14749: (x_return_status => l_return_status

Line 14760: IF l_return_status = fnd_api.g_ret_sts_error THEN

14756: IF (l_debug = 1) THEN
14757: debug_print('After calling update serial reservations ' || l_return_status);
14758: END IF;
14759:
14760: IF l_return_status = fnd_api.g_ret_sts_error THEN
14761: RAISE fnd_api.g_exc_error;
14762: END IF;
14763:
14764: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14761: RAISE fnd_api.g_exc_error;

14757: debug_print('After calling update serial reservations ' || l_return_status);
14758: END IF;
14759:
14760: IF l_return_status = fnd_api.g_ret_sts_error THEN
14761: RAISE fnd_api.g_exc_error;
14762: END IF;
14763:
14764: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14765: RAISE fnd_api.g_exc_unexpected_error;

Line 14764: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14760: IF l_return_status = fnd_api.g_ret_sts_error THEN
14761: RAISE fnd_api.g_exc_error;
14762: END IF;
14763:
14764: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14765: RAISE fnd_api.g_exc_unexpected_error;
14766: END IF;
14767: END IF; -- total serials more than orig reservation qty
14768: -- now update the from reservation record as we have to

Line 14765: RAISE fnd_api.g_exc_unexpected_error;

14761: RAISE fnd_api.g_exc_error;
14762: END IF;
14763:
14764: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14765: RAISE fnd_api.g_exc_unexpected_error;
14766: END IF;
14767: END IF; -- total serials more than orig reservation qty
14768: -- now update the from reservation record as we have to
14769: -- update the unreserved serial and the transferred serial

Line 14789: IF l_return_status = fnd_api.g_ret_sts_error THEN

14785: IF (l_debug = 1) THEN
14786: debug_print('After calling update serial reservation qty ' || l_return_status);
14787: END IF;
14788:
14789: IF l_return_status = fnd_api.g_ret_sts_error THEN
14790: RAISE fnd_api.g_exc_error;
14791: END IF;
14792:
14793: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14790: RAISE fnd_api.g_exc_error;

14786: debug_print('After calling update serial reservation qty ' || l_return_status);
14787: END IF;
14788:
14789: IF l_return_status = fnd_api.g_ret_sts_error THEN
14790: RAISE fnd_api.g_exc_error;
14791: END IF;
14792:
14793: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14794: RAISE fnd_api.g_exc_unexpected_error;

Line 14793: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14789: IF l_return_status = fnd_api.g_ret_sts_error THEN
14790: RAISE fnd_api.g_exc_error;
14791: END IF;
14792:
14793: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14794: RAISE fnd_api.g_exc_unexpected_error;
14795: END IF;
14796:
14797: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN

Line 14794: RAISE fnd_api.g_exc_unexpected_error;

14790: RAISE fnd_api.g_exc_error;
14791: END IF;
14792:
14793: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14794: RAISE fnd_api.g_exc_unexpected_error;
14795: END IF;
14796:
14797: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
14798: -- we have already unreserved the serials. Since we are

Line 14827: RAISE fnd_api.g_exc_error;

14823:
14824: IF (l_validate_serials_reserved > l_to_primary_reservation_qty) THEN
14825: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
14826: fnd_msg_pub.ADD;
14827: RAISE fnd_api.g_exc_error;
14828: END IF;
14829:
14830: IF (l_validate_serials_reserved > 0) THEN
14831: inv_reservation_validate_pvt.validate_serials

Line 14846: IF l_return_status = fnd_api.g_ret_sts_error THEN

14842: debug_print('After calling validate serials ' || l_return_status);
14843: END IF;
14844:
14845: --
14846: IF l_return_status = fnd_api.g_ret_sts_error THEN
14847: RAISE fnd_api.g_exc_error;
14848: END IF;
14849:
14850: --

Line 14847: RAISE fnd_api.g_exc_error;

14843: END IF;
14844:
14845: --
14846: IF l_return_status = fnd_api.g_ret_sts_error THEN
14847: RAISE fnd_api.g_exc_error;
14848: END IF;
14849:
14850: --
14851: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14851: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14847: RAISE fnd_api.g_exc_error;
14848: END IF;
14849:
14850: --
14851: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14852: RAISE fnd_api.g_exc_unexpected_error;
14853: END IF;
14854:
14855: -- we have to unreserve some of the serials

Line 14852: RAISE fnd_api.g_exc_unexpected_error;

14848: END IF;
14849:
14850: --
14851: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14852: RAISE fnd_api.g_exc_unexpected_error;
14853: END IF;
14854:
14855: -- we have to unreserve some of the serials
14856: -- unreserve the extra serials that are more than the primary_reservation_quantity

Line 14874: IF l_return_status = fnd_api.g_ret_sts_error THEN

14870: IF (l_debug = 1) THEN
14871: debug_print('After calling update serial reservation qty ' || l_return_status);
14872: END IF;
14873:
14874: IF l_return_status = fnd_api.g_ret_sts_error THEN
14875: RAISE fnd_api.g_exc_error;
14876: END IF;
14877:
14878: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14875: RAISE fnd_api.g_exc_error;

14871: debug_print('After calling update serial reservation qty ' || l_return_status);
14872: END IF;
14873:
14874: IF l_return_status = fnd_api.g_ret_sts_error THEN
14875: RAISE fnd_api.g_exc_error;
14876: END IF;
14877:
14878: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14879: RAISE fnd_api.g_exc_unexpected_error;

Line 14878: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14874: IF l_return_status = fnd_api.g_ret_sts_error THEN
14875: RAISE fnd_api.g_exc_error;
14876: END IF;
14877:
14878: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14879: RAISE fnd_api.g_exc_unexpected_error;
14880: END IF;
14881:
14882: END IF;-- transfer all and to row exists

Line 14879: RAISE fnd_api.g_exc_unexpected_error;

14875: RAISE fnd_api.g_exc_error;
14876: END IF;
14877:
14878: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14879: RAISE fnd_api.g_exc_unexpected_error;
14880: END IF;
14881:
14882: END IF;-- transfer all and to row exists
14883: END IF ; -- total serials reserved > 0

Line 14919: RAISE fnd_api.g_exc_error;

14915: p_to_serial_number(i).serial_number);
14916: END IF;
14917: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
14918: fnd_msg_pub.ADD;
14919: RAISE fnd_api.g_exc_error;
14920: END;
14921:
14922: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
14923: l_orig_rsv_tbl(1).reservation_id) THEN

Line 14926: RAISE fnd_api.g_exc_error;

14922: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
14923: l_orig_rsv_tbl(1).reservation_id) THEN
14924: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
14925: fnd_msg_pub.ADD;
14926: RAISE fnd_api.g_exc_error;
14927: END IF;
14928:
14929: -- If reservation id is null, then we are reserving a new
14930: -- serial. we should check to see if the group mark id is null or

Line 14939: RAISE fnd_api.g_exc_error;

14935: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
14936: END IF;
14937: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
14938: fnd_msg_pub.ADD;
14939: RAISE fnd_api.g_exc_error;
14940: END IF;
14941:
14942: BEGIN
14943: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 14984: IF l_return_status = fnd_api.g_ret_sts_error THEN

14980: debug_print('After calling validate serials ' || l_return_status);
14981: END IF;
14982:
14983: --
14984: IF l_return_status = fnd_api.g_ret_sts_error THEN
14985: RAISE fnd_api.g_exc_error;
14986: END IF;
14987:
14988: --

Line 14985: RAISE fnd_api.g_exc_error;

14981: END IF;
14982:
14983: --
14984: IF l_return_status = fnd_api.g_ret_sts_error THEN
14985: RAISE fnd_api.g_exc_error;
14986: END IF;
14987:
14988: --
14989: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 14989: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

14985: RAISE fnd_api.g_exc_error;
14986: END IF;
14987:
14988: --
14989: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14990: RAISE fnd_api.g_exc_unexpected_error;
14991: END IF;
14992:
14993: END IF;

Line 14990: RAISE fnd_api.g_exc_unexpected_error;

14986: END IF;
14987:
14988: --
14989: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
14990: RAISE fnd_api.g_exc_unexpected_error;
14991: END IF;
14992:
14993: END IF;
14994:

Line 15013: RAISE fnd_api.g_exc_error;

15009: debug_print('No serials found for the serial number: ' || l_serial_number_table(l_serial_index).serial_number);
15010: END IF;
15011: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15012: fnd_msg_pub.ADD;
15013: RAISE fnd_api.g_exc_error;
15014: END;
15015:
15016: IF l_debug=1 THEN
15017: debug_print('Serial being migrated. serial number: ' || l_serial_number_table(l_serial_index).serial_number);

Line 15037: RAISE fnd_api.g_exc_error;

15033:
15034: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15035: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15036: fnd_msg_pub.ADD;
15037: RAISE fnd_api.g_exc_error;
15038: END IF;
15039:
15040: -- update the to serial reservation quantity. dont have
15041: -- to update from as the from record is deleted.

Line 15055: RAISE fnd_api.g_exc_error;

15051: debug_print('Update failed for from reservation record. id: ' || l_to_reservation_id);
15052: END IF;
15053: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15054: fnd_msg_pub.ADD;
15055: RAISE fnd_api.g_exc_error;
15056: END;
15057:
15058: IF (l_debug = 1) THEN
15059: debug_print('After updating serial count of the to_record.');

Line 15062: IF l_return_status = fnd_api.g_ret_sts_error THEN

15058: IF (l_debug = 1) THEN
15059: debug_print('After updating serial count of the to_record.');
15060: END IF;
15061:
15062: IF l_return_status = fnd_api.g_ret_sts_error THEN
15063: RAISE fnd_api.g_exc_error;
15064: END IF;
15065:
15066: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15063: RAISE fnd_api.g_exc_error;

15059: debug_print('After updating serial count of the to_record.');
15060: END IF;
15061:
15062: IF l_return_status = fnd_api.g_ret_sts_error THEN
15063: RAISE fnd_api.g_exc_error;
15064: END IF;
15065:
15066: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15067: RAISE fnd_api.g_exc_unexpected_error;

Line 15066: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15062: IF l_return_status = fnd_api.g_ret_sts_error THEN
15063: RAISE fnd_api.g_exc_error;
15064: END IF;
15065:
15066: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15067: RAISE fnd_api.g_exc_unexpected_error;
15068: END IF;
15069:
15070: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN

Line 15067: RAISE fnd_api.g_exc_unexpected_error;

15063: RAISE fnd_api.g_exc_error;
15064: END IF;
15065:
15066: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15067: RAISE fnd_api.g_exc_unexpected_error;
15068: END IF;
15069:
15070: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
15071: -- validate the from serial with the to record.

Line 15096: IF l_return_status = fnd_api.g_ret_sts_error THEN

15092: debug_print('After calling validate serials ' || l_return_status);
15093: END IF;
15094:
15095: --
15096: IF l_return_status = fnd_api.g_ret_sts_error THEN
15097: RAISE fnd_api.g_exc_error;
15098: END IF;
15099:
15100: --

Line 15097: RAISE fnd_api.g_exc_error;

15093: END IF;
15094:
15095: --
15096: IF l_return_status = fnd_api.g_ret_sts_error THEN
15097: RAISE fnd_api.g_exc_error;
15098: END IF;
15099:
15100: --
15101: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15101: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15097: RAISE fnd_api.g_exc_error;
15098: END IF;
15099:
15100: --
15101: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15102: RAISE fnd_api.g_exc_unexpected_error;
15103: END IF;
15104:
15105: END IF;

Line 15102: RAISE fnd_api.g_exc_unexpected_error;

15098: END IF;
15099:
15100: --
15101: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15102: RAISE fnd_api.g_exc_unexpected_error;
15103: END IF;
15104:
15105: END IF;
15106:

Line 15125: RAISE fnd_api.g_exc_error;

15121:
15122: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15123: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15124: fnd_msg_pub.ADD;
15125: RAISE fnd_api.g_exc_error;
15126: END IF;
15127:
15128: BEGIN
15129: UPDATE mtl_reservations SET serial_reservation_quantity

Line 15140: RAISE fnd_api.g_exc_error;

15136: debug_print('Update failed for from reservation record. id: ' || l_to_reservation_id);
15137: END IF;
15138: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15139: fnd_msg_pub.ADD;
15140: RAISE fnd_api.g_exc_error;
15141: END;
15142:
15143: IF (l_debug = 1) THEN
15144: debug_print('After calling update serial reservation qty ' || l_return_status);

Line 15147: IF l_return_status = fnd_api.g_ret_sts_error THEN

15143: IF (l_debug = 1) THEN
15144: debug_print('After calling update serial reservation qty ' || l_return_status);
15145: END IF;
15146:
15147: IF l_return_status = fnd_api.g_ret_sts_error THEN
15148: RAISE fnd_api.g_exc_error;
15149: END IF;
15150:
15151: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15148: RAISE fnd_api.g_exc_error;

15144: debug_print('After calling update serial reservation qty ' || l_return_status);
15145: END IF;
15146:
15147: IF l_return_status = fnd_api.g_ret_sts_error THEN
15148: RAISE fnd_api.g_exc_error;
15149: END IF;
15150:
15151: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15152: RAISE fnd_api.g_exc_unexpected_error;

Line 15151: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15147: IF l_return_status = fnd_api.g_ret_sts_error THEN
15148: RAISE fnd_api.g_exc_error;
15149: END IF;
15150:
15151: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15152: RAISE fnd_api.g_exc_unexpected_error;
15153: END IF;
15154:
15155: ELSIF (NOT l_transfer_all) THEN

Line 15152: RAISE fnd_api.g_exc_unexpected_error;

15148: RAISE fnd_api.g_exc_error;
15149: END IF;
15150:
15151: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15152: RAISE fnd_api.g_exc_unexpected_error;
15153: END IF;
15154:
15155: ELSIF (NOT l_transfer_all) THEN
15156: -- serials passed have already been reserved. make sure the

Line 15207: IF l_return_status = fnd_api.g_ret_sts_error THEN

15203: debug_print('After calling validate serials ' || l_return_status);
15204: END IF;
15205:
15206: --
15207: IF l_return_status = fnd_api.g_ret_sts_error THEN
15208: RAISE fnd_api.g_exc_error;
15209: END IF;
15210:
15211: --

Line 15208: RAISE fnd_api.g_exc_error;

15204: END IF;
15205:
15206: --
15207: IF l_return_status = fnd_api.g_ret_sts_error THEN
15208: RAISE fnd_api.g_exc_error;
15209: END IF;
15210:
15211: --
15212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15208: RAISE fnd_api.g_exc_error;
15209: END IF;
15210:
15211: --
15212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15213: RAISE fnd_api.g_exc_unexpected_error;
15214: END IF;
15215:
15216:

Line 15213: RAISE fnd_api.g_exc_unexpected_error;

15209: END IF;
15210:
15211: --
15212: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15213: RAISE fnd_api.g_exc_unexpected_error;
15214: END IF;
15215:
15216:
15217: l_serials_tobe_unreserved := l_total_from_serials_reserved - l_from_primary_reservation_qty;

Line 15235: RAISE fnd_api.g_exc_error;

15231: debug_print('No serials found for Serial Number: ' || l_serial_number_table(i).serial_number);
15232: END IF;
15233: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15234: fnd_msg_pub.ADD;
15235: RAISE fnd_api.g_exc_error;
15236: END;
15237:
15238: IF l_debug=1 THEN
15239: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 15261: RAISE fnd_api.g_exc_error;

15257:
15258: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15259: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15260: fnd_msg_pub.ADD;
15261: RAISE fnd_api.g_exc_error;
15262: END IF;
15263:
15264: BEGIN
15265: UPDATE mtl_reservations SET serial_reservation_quantity

Line 15276: RAISE fnd_api.g_exc_error;

15272: debug_print('Update failed for to reservation record. id: ' || l_to_reservation_id);
15273: END IF;
15274: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15275: fnd_msg_pub.ADD;
15276: RAISE fnd_api.g_exc_error;
15277: END;
15278:
15279: BEGIN
15280: SELECT COUNT(1) INTO l_total_from_serials_reserved FROM

Line 15303: RAISE fnd_api.g_exc_error;

15299: debug_print('Update failed for from reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
15300: END IF;
15301: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15302: fnd_msg_pub.ADD;
15303: RAISE fnd_api.g_exc_error;
15304: END;
15305:
15306:
15307: END if; -- transfer all and to row exist

Line 15344: RAISE fnd_api.g_exc_error;

15340: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
15341: l_orig_rsv_tbl(1).reservation_id) OR (l_from_reservation_id IS NULL) THEN
15342: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
15343: fnd_msg_pub.ADD;
15344: RAISE fnd_api.g_exc_error;
15345: END IF;
15346:
15347: -- unreserve the passed serials.
15348: BEGIN

Line 15384: RAISE fnd_api.g_exc_error;

15380: debug_print('No serials found for this data : ' || p_to_serial_number(i).serial_number);
15381: END IF;
15382: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
15383: fnd_msg_pub.ADD;
15384: RAISE fnd_api.g_exc_error;
15385: END;
15386:
15387: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
15388: l_orig_rsv_tbl(1).reservation_id) THEN

Line 15391: RAISE fnd_api.g_exc_error;

15387: IF (l_from_reservation_id IS NOT NULL AND l_from_reservation_id <>
15388: l_orig_rsv_tbl(1).reservation_id) THEN
15389: fnd_message.set_name('INV', 'INV_INVALID_FROM_SERIAL');
15390: fnd_msg_pub.ADD;
15391: RAISE fnd_api.g_exc_error;
15392: END IF;
15393:
15394: IF (l_from_reservation_id IS NULL) AND (l_group_mark_id IS NOT NULL) AND (l_group_mark_id <> -1)THEN
15395: IF (l_debug = 1) THEN

Line 15400: RAISE fnd_api.g_exc_error;

15396: debug_print('Group Mark Id is not null for serial ' || p_to_serial_number(i).serial_number);
15397: END IF;
15398: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15399: fnd_msg_pub.ADD;
15400: RAISE fnd_api.g_exc_error;
15401: END IF;
15402:
15403: BEGIN
15404: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 15461: IF l_return_status = fnd_api.g_ret_sts_error THEN

15457: debug_print('After calling validate serials ' || l_return_status);
15458: END IF;
15459:
15460: --
15461: IF l_return_status = fnd_api.g_ret_sts_error THEN
15462: RAISE fnd_api.g_exc_error;
15463: END IF;
15464:
15465: --

Line 15462: RAISE fnd_api.g_exc_error;

15458: END IF;
15459:
15460: --
15461: IF l_return_status = fnd_api.g_ret_sts_error THEN
15462: RAISE fnd_api.g_exc_error;
15463: END IF;
15464:
15465: --
15466: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15466: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15462: RAISE fnd_api.g_exc_error;
15463: END IF;
15464:
15465: --
15466: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15467: RAISE fnd_api.g_exc_unexpected_error;
15468: END IF;
15469:
15470: BEGIN

Line 15467: RAISE fnd_api.g_exc_unexpected_error;

15463: END IF;
15464:
15465: --
15466: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15467: RAISE fnd_api.g_exc_unexpected_error;
15468: END IF;
15469:
15470: BEGIN
15471: UPDATE mtl_serial_numbers SET reservation_id = l_to_reservation_id,

Line 15483: RAISE fnd_api.g_exc_error;

15479: debug_print('No serials found for this data. rsv id: ' || l_orig_rsv_tbl(1).reservation_id);
15480: END IF;
15481: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15482: fnd_msg_pub.ADD;
15483: RAISE fnd_api.g_exc_error;
15484: END;
15485: END IF;
15486: END IF;
15487:

Line 15503: RAISE fnd_api.g_exc_error;

15499:
15500: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15501: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15502: fnd_msg_pub.ADD;
15503: RAISE fnd_api.g_exc_error;
15504: END IF;
15505:
15506: BEGIN
15507: UPDATE mtl_reservations SET serial_reservation_quantity

Line 15518: RAISE fnd_api.g_exc_error;

15514: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
15515: END IF;
15516: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15517: fnd_msg_pub.ADD;
15518: RAISE fnd_api.g_exc_error;
15519: END;
15520:
15521: ELSIF (l_transfer_all AND (NOT l_to_row_exist)) THEN
15522:

Line 15566: IF l_return_status = fnd_api.g_ret_sts_error THEN

15562: debug_print('After calling validate serials ' || l_return_status);
15563: END IF;
15564:
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: --

Line 15567: RAISE fnd_api.g_exc_error;

15563: END IF;
15564:
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: --
15571: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15571: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15567: RAISE fnd_api.g_exc_error;
15568: END IF;
15569:
15570: --
15571: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15572: RAISE fnd_api.g_exc_unexpected_error;
15573: END IF;
15574: END IF;
15575: END IF;

Line 15572: RAISE fnd_api.g_exc_unexpected_error;

15568: END IF;
15569:
15570: --
15571: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15572: RAISE fnd_api.g_exc_unexpected_error;
15573: END IF;
15574: END IF;
15575: END IF;
15576:

Line 15591: RAISE fnd_api.g_exc_error;

15587: END;
15588: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15589: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15590: fnd_msg_pub.ADD;
15591: RAISE fnd_api.g_exc_error;
15592: END IF;
15593:
15594: BEGIN
15595: UPDATE mtl_reservations SET serial_reservation_quantity

Line 15606: RAISE fnd_api.g_exc_error;

15602: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
15603: END IF;
15604: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15605: fnd_msg_pub.ADD;
15606: RAISE fnd_api.g_exc_error;
15607: END;
15608:
15609: ELSIF (NOT l_transfer_all) THEN
15610: -- check to see if there are excess serials in from

Line 15660: IF l_return_status = fnd_api.g_ret_sts_error THEN

15656: debug_print('After calling validate serials ' || l_return_status);
15657: END IF;
15658:
15659: --
15660: IF l_return_status = fnd_api.g_ret_sts_error THEN
15661: RAISE fnd_api.g_exc_error;
15662: END IF;
15663:
15664: --

Line 15661: RAISE fnd_api.g_exc_error;

15657: END IF;
15658:
15659: --
15660: IF l_return_status = fnd_api.g_ret_sts_error THEN
15661: RAISE fnd_api.g_exc_error;
15662: END IF;
15663:
15664: --
15665: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 15665: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

15661: RAISE fnd_api.g_exc_error;
15662: END IF;
15663:
15664: --
15665: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15666: RAISE fnd_api.g_exc_unexpected_error;
15667: END IF;
15668:
15669: l_serials_tobe_unreserved := l_validate_serials_reserved - l_from_primary_reservation_qty;

Line 15666: RAISE fnd_api.g_exc_unexpected_error;

15662: END IF;
15663:
15664: --
15665: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
15666: RAISE fnd_api.g_exc_unexpected_error;
15667: END IF;
15668:
15669: l_serials_tobe_unreserved := l_validate_serials_reserved - l_from_primary_reservation_qty;
15670:

Line 15686: RAISE fnd_api.g_exc_error;

15682: debug_print('No serials found for serial number: ' || l_validate_serial_number_table(i).serial_number);
15683: END IF;
15684: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
15685: fnd_msg_pub.ADD;
15686: RAISE fnd_api.g_exc_error;
15687: END;
15688:
15689: IF l_debug=1 THEN
15690: debug_print('Serial being unreserved. serial number: ' || l_serial_number_table(i).serial_number);

Line 15712: RAISE fnd_api.g_exc_error;

15708: END;
15709: IF (l_total_to_serials_reserved > l_to_primary_reservation_qty) THEN
15710: fnd_message.set_name('INV', 'INV_SERIAL_QTY_MORE_THAN_RSV');
15711: fnd_msg_pub.ADD;
15712: RAISE fnd_api.g_exc_error;
15713: END IF;
15714:
15715: BEGIN
15716: UPDATE mtl_reservations SET serial_reservation_quantity

Line 15727: RAISE fnd_api.g_exc_error;

15723: debug_print('No serials found for reservation record. id: ' || l_to_reservation_id);
15724: END IF;
15725: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15726: fnd_msg_pub.ADD;
15727: RAISE fnd_api.g_exc_error;
15728: END;
15729:
15730: BEGIN
15731: SELECT COUNT(1) INTO l_total_from_serials_reserved FROM

Line 15754: RAISE fnd_api.g_exc_error;

15750: debug_print('No serials found for reservation record. id: ' || l_orig_rsv_tbl(1).reservation_id);
15751: END IF;
15752: fnd_message.set_name('INV', 'INV_INVALID_ROW');
15753: fnd_msg_pub.ADD;
15754: RAISE fnd_api.g_exc_error;
15755: END;
15756:
15757: END IF;-- transfer all and to row exist
15758:

Line 15775: WHEN fnd_api.g_exc_error THEN

15771: /*** End R12 ***/
15772:
15773: x_return_status := l_return_status;
15774: EXCEPTION
15775: WHEN fnd_api.g_exc_error THEN
15776: ROLLBACK TO transfer_reservation_sa;
15777: x_return_status := fnd_api.g_ret_sts_error;
15778: /**** {{ R12 Enhanced reservations code changes. Should be
15779: -- releasing the locks. }} *****/

Line 15777: x_return_status := fnd_api.g_ret_sts_error;

15773: x_return_status := l_return_status;
15774: EXCEPTION
15775: WHEN fnd_api.g_exc_error THEN
15776: ROLLBACK TO transfer_reservation_sa;
15777: x_return_status := fnd_api.g_ret_sts_error;
15778: /**** {{ R12 Enhanced reservations code changes. Should be
15779: -- releasing the locks. }} *****/
15780: IF l_lock_obtained THEN
15781: inv_reservation_lock_pvt.release_lock

Line 15789: WHEN fnd_api.g_exc_unexpected_error THEN

15785: END IF;
15786: /*** End R12 ***/
15787: -- Get message count and data
15788: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
15789: WHEN fnd_api.g_exc_unexpected_error THEN
15790: ROLLBACK TO transfer_reservation_sa;
15791: x_return_status := fnd_api.g_ret_sts_unexp_error;
15792: /**** {{ R12 Enhanced reservations code changes. Should be
15793: -- releasing the locks. }} *****/

Line 15791: x_return_status := fnd_api.g_ret_sts_unexp_error;

15787: -- Get message count and data
15788: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
15789: WHEN fnd_api.g_exc_unexpected_error THEN
15790: ROLLBACK TO transfer_reservation_sa;
15791: x_return_status := fnd_api.g_ret_sts_unexp_error;
15792: /**** {{ R12 Enhanced reservations code changes. Should be
15793: -- releasing the locks. }} *****/
15794: IF l_lock_obtained THEN
15795: inv_reservation_lock_pvt.release_lock

Line 15805: x_return_status := fnd_api.g_ret_sts_unexp_error;

15801: -- Get message count and data
15802: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
15803: WHEN OTHERS THEN
15804: ROLLBACK TO transfer_reservation_sa;
15805: x_return_status := fnd_api.g_ret_sts_unexp_error;
15806: /**** {{ R12 Enhanced reservations code changes. Should be
15807: -- releasing the locks. }} *****/
15808: IF l_lock_obtained THEN
15809: inv_reservation_lock_pvt.release_lock

Line 15850: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

15846: ** new cursors.Did not use Dynamic SQL for parsing performance issue.
15847: */
15848: PROCEDURE query_reservation_om_hdr_line(
15849: p_api_version_number IN NUMBER
15850: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
15851: , x_return_status OUT NOCOPY VARCHAR2
15852: , x_msg_count OUT NOCOPY NUMBER
15853: , x_msg_data OUT NOCOPY VARCHAR2
15854: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type

Line 15855: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false

15851: , x_return_status OUT NOCOPY VARCHAR2
15852: , x_msg_count OUT NOCOPY NUMBER
15853: , x_msg_data OUT NOCOPY VARCHAR2
15854: , p_query_input IN inv_reservation_global.mtl_reservation_rec_type
15855: , p_lock_records IN VARCHAR2 DEFAULT fnd_api.g_false
15856: , p_sort_by_req_date IN NUMBER DEFAULT inv_reservation_global.g_query_no_sort
15857: , p_cancel_order_mode IN NUMBER DEFAULT inv_reservation_global.g_cancel_order_no
15858: , x_mtl_reservation_tbl OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type
15859: , x_mtl_reservation_tbl_count OUT NOCOPY NUMBER

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

15860: , x_error_code OUT NOCOPY NUMBER
15861: ) IS
15862: l_api_version_number CONSTANT NUMBER := 1.0;
15863: l_api_name CONSTANT VARCHAR2(30) := 'Query_Reservation_OM_Hdr_Line';
15864: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
15865: l_counter INTEGER;
15866: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
15867:
15868: -- Cursor to fetch MTL_RESERVATION record based on passed

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

16146: x_error_code := inv_reservation_global.g_err_unexpected;
16147:
16148: --
16149: -- Standard call to check for call compatibility
16150: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
16151: RAISE fnd_api.g_exc_unexpected_error;
16152: END IF;
16153:
16154: --

Line 16151: RAISE fnd_api.g_exc_unexpected_error;

16147:
16148: --
16149: -- Standard call to check for call compatibility
16150: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
16151: RAISE fnd_api.g_exc_unexpected_error;
16152: END IF;
16153:
16154: --
16155: -- Initialize message list.

Line 16156: IF fnd_api.to_boolean(p_init_msg_lst) THEN

16152: END IF;
16153:
16154: --
16155: -- Initialize message list.
16156: IF fnd_api.to_boolean(p_init_msg_lst) THEN
16157: fnd_msg_pub.initialize;
16158: END IF;
16159:
16160: --

Line 16164: IF (p_query_input.demand_source_header_id = fnd_api.g_miss_num

16160: --
16161: /*
16162: ** Make sure the required parameters are passed
16163: */
16164: IF (p_query_input.demand_source_header_id = fnd_api.g_miss_num
16165: OR p_query_input.demand_source_header_id IS NULL
16166: ) THEN
16167: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
16168: fnd_message.set_token('FIELD_NAME', 'demand_source_header_id');

Line 16170: RAISE fnd_api.g_exc_error;

16166: ) THEN
16167: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
16168: fnd_message.set_token('FIELD_NAME', 'demand_source_header_id');
16169: fnd_msg_pub.ADD;
16170: RAISE fnd_api.g_exc_error;
16171: END IF;
16172:
16173: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num
16174: OR p_query_input.demand_source_line_id IS NULL

Line 16173: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num

16169: fnd_msg_pub.ADD;
16170: RAISE fnd_api.g_exc_error;
16171: END IF;
16172:
16173: IF (p_query_input.demand_source_line_id = fnd_api.g_miss_num
16174: OR p_query_input.demand_source_line_id IS NULL
16175: ) THEN
16176: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
16177: fnd_message.set_token('FIELD_NAME', 'demand_source_line_id');

Line 16179: RAISE fnd_api.g_exc_error;

16175: ) THEN
16176: fnd_message.set_name('INV', 'INV-RSV-INPUT-MISSING');
16177: fnd_message.set_token('FIELD_NAME', 'demand_source_line_id');
16178: fnd_msg_pub.ADD;
16179: RAISE fnd_api.g_exc_error;
16180: END IF;
16181:
16182: --Bug#2872822/2914726 OM call to this API passes null. This was changed
16183: -- handle null also.

Line 16229: WHEN fnd_api.g_exc_error THEN

16225: x_return_status := l_return_status;
16226: x_error_code := inv_reservation_global.g_err_no_error;
16227: --
16228: EXCEPTION
16229: WHEN fnd_api.g_exc_error THEN
16230: x_return_status := fnd_api.g_ret_sts_error;
16231: -- Get message count and data
16232: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16233: WHEN fnd_api.g_exc_unexpected_error THEN

Line 16230: x_return_status := fnd_api.g_ret_sts_error;

16226: x_error_code := inv_reservation_global.g_err_no_error;
16227: --
16228: EXCEPTION
16229: WHEN fnd_api.g_exc_error THEN
16230: x_return_status := fnd_api.g_ret_sts_error;
16231: -- Get message count and data
16232: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16233: WHEN fnd_api.g_exc_unexpected_error THEN
16234: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 16233: WHEN fnd_api.g_exc_unexpected_error THEN

16229: WHEN fnd_api.g_exc_error THEN
16230: x_return_status := fnd_api.g_ret_sts_error;
16231: -- Get message count and data
16232: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16233: WHEN fnd_api.g_exc_unexpected_error THEN
16234: x_return_status := fnd_api.g_ret_sts_unexp_error;
16235: -- Get message count and data
16236: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16237: WHEN OTHERS THEN

Line 16234: x_return_status := fnd_api.g_ret_sts_unexp_error;

16230: x_return_status := fnd_api.g_ret_sts_error;
16231: -- Get message count and data
16232: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16233: WHEN fnd_api.g_exc_unexpected_error THEN
16234: x_return_status := fnd_api.g_ret_sts_unexp_error;
16235: -- Get message count and data
16236: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16237: WHEN OTHERS THEN
16238: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 16238: x_return_status := fnd_api.g_ret_sts_unexp_error;

16234: x_return_status := fnd_api.g_ret_sts_unexp_error;
16235: -- Get message count and data
16236: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16237: WHEN OTHERS THEN
16238: x_return_status := fnd_api.g_ret_sts_unexp_error;
16239:
16240: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
16241: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
16242: END IF;

Line 16255: , p_commit IN VARCHAR2 := fnd_api.g_false

16251: PROCEDURE Upd_Reservation_Pup_New(
16252: x_return_status OUT NOCOPY VARCHAR2
16253: , x_msg_count OUT NOCOPY NUMBER
16254: , x_msg_data OUT NOCOPY VARCHAR2
16255: , p_commit IN VARCHAR2 := fnd_api.g_false
16256: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16257: , p_organization_id IN NUMBER
16258: , p_demand_source_header_id IN NUMBER
16259: , p_demand_source_line_id IN NUMBER

Line 16256: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

16252: x_return_status OUT NOCOPY VARCHAR2
16253: , x_msg_count OUT NOCOPY NUMBER
16254: , x_msg_data OUT NOCOPY VARCHAR2
16255: , p_commit IN VARCHAR2 := fnd_api.g_false
16256: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16257: , p_organization_id IN NUMBER
16258: , p_demand_source_header_id IN NUMBER
16259: , p_demand_source_line_id IN NUMBER
16260: , p_from_subinventory_code IN VARCHAR2

Line 16270: , p_validation_flag IN VARCHAR2 := fnd_api.g_false

16266: , p_lot_number IN VARCHAR2
16267: , p_quantity IN NUMBER
16268: , p_uom IN VARCHAR2
16269: , p_lpn_id IN NUMBER := NULL
16270: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
16271: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
16272: , p_requirement_date IN DATE DEFAULT NULL -- bug 2879208
16273: , p_source_lpn_id IN NUMBER := NULL -- Bug 4016953/3871066
16274: ) IS

Line 16271: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false

16267: , p_quantity IN NUMBER
16268: , p_uom IN VARCHAR2
16269: , p_lpn_id IN NUMBER := NULL
16270: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
16271: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
16272: , p_requirement_date IN DATE DEFAULT NULL -- bug 2879208
16273: , p_source_lpn_id IN NUMBER := NULL -- Bug 4016953/3871066
16274: ) IS
16275: l_api_name CONSTANT VARCHAR2(30) := 'Upd_Reservation_PUP_New';

Line 16389: x_return_status := fnd_api.g_ret_sts_success;

16385: ORDER BY lpn_id asc;
16386:
16387: BEGIN
16388: -- Initialize return status to success
16389: x_return_status := fnd_api.g_ret_sts_success;
16390:
16391: -- Initialize message list.
16392: IF fnd_api.to_boolean(p_init_msg_list) THEN
16393: fnd_msg_pub.initialize;

Line 16392: IF fnd_api.to_boolean(p_init_msg_list) THEN

16388: -- Initialize return status to success
16389: x_return_status := fnd_api.g_ret_sts_success;
16390:
16391: -- Initialize message list.
16392: IF fnd_api.to_boolean(p_init_msg_list) THEN
16393: fnd_msg_pub.initialize;
16394: END IF;
16395:
16396: SAVEPOINT upd_reservation_pup_new;

Line 16460: RAISE fnd_api.g_exc_error;

16456: debug_print('Conversion to RSV UOM Failed');
16457: END IF;
16458: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-RSV-UOM');
16459: fnd_msg_pub.ADD;
16460: RAISE fnd_api.g_exc_error;
16461: END IF;
16462:
16463: -- Remember UOM of current remaining quantity
16464: l_remaining_qty_uom := l_src_rsv.primary_uom_code;

Line 16498: RAISE fnd_api.g_exc_error;

16494: debug_print('Conversion to SECONDARY UOM Failed');
16495: END IF;
16496: fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-SECOND-UOM');
16497: fnd_msg_pub.ADD;
16498: RAISE fnd_api.g_exc_error;
16499: END IF;
16500: IF (l_debug = 1) THEN
16501: debug_print('After conversion secondary_qty= '||l_src_rsv.secondary_reservation_quantity); -- KYH
16502: END IF;

Line 16546: , p_init_msg_lst => fnd_api.g_false

16542:
16543: l_progress := 'Call to Transfer_Reservation';
16544: INV_RESERVATION_PVT.Transfer_Reservation (
16545: p_api_version_number => 1.0
16546: , p_init_msg_lst => fnd_api.g_false
16547: , x_return_status => x_return_status
16548: , x_msg_count => x_msg_count
16549: , x_msg_data => x_msg_data
16550: , p_original_rsv_rec => l_src_rsv

Line 16556: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

16552: , p_original_serial_number => l_serial_number
16553: , p_validation_flag => p_validation_flag
16554: , x_reservation_id => l_reservation_id );
16555:
16556: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
16557: RAISE FND_API.G_EXC_ERROR;
16558: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
16559: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16560: END IF;

Line 16557: RAISE FND_API.G_EXC_ERROR;

16553: , p_validation_flag => p_validation_flag
16554: , x_reservation_id => l_reservation_id );
16555:
16556: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
16557: RAISE FND_API.G_EXC_ERROR;
16558: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
16559: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16560: END IF;
16561:

Line 16558: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

16554: , x_reservation_id => l_reservation_id );
16555:
16556: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
16557: RAISE FND_API.G_EXC_ERROR;
16558: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
16559: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16560: END IF;
16561:
16562: l_call_xfr_rsv := FALSE;

Line 16559: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

16555:
16556: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
16557: RAISE FND_API.G_EXC_ERROR;
16558: ELSIF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
16559: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16560: END IF;
16561:
16562: l_call_xfr_rsv := FALSE;
16563: l_progress := 'Done with reservation loop';

Line 16580: RAISE FND_API.G_EXC_ERROR;

16576: debug_print('Not enough reserved quantity l_remaining_qty='||l_remaining_qty);
16577: END IF;
16578: fnd_message.set_name('INV', 'INV_UPDATE_RSV_FAILED');
16579: fnd_msg_pub.ADD;
16580: RAISE FND_API.G_EXC_ERROR;
16581: END IF;
16582:
16583: -- Standard check of p_commit.
16584: IF fnd_api.to_boolean(p_commit) THEN

Line 16584: IF fnd_api.to_boolean(p_commit) THEN

16580: RAISE FND_API.G_EXC_ERROR;
16581: END IF;
16582:
16583: -- Standard check of p_commit.
16584: IF fnd_api.to_boolean(p_commit) THEN
16585: COMMIT WORK;
16586: END IF;
16587: EXCEPTION
16588: WHEN FND_API.G_EXC_ERROR THEN

Line 16588: WHEN FND_API.G_EXC_ERROR THEN

16584: IF fnd_api.to_boolean(p_commit) THEN
16585: COMMIT WORK;
16586: END IF;
16587: EXCEPTION
16588: WHEN FND_API.G_EXC_ERROR THEN
16589: ROLLBACK TO upd_reservation_pup_new;
16590: x_return_status := fnd_api.g_ret_sts_error;
16591: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
16592: IF (l_debug = 1) THEN

Line 16590: x_return_status := fnd_api.g_ret_sts_error;

16586: END IF;
16587: EXCEPTION
16588: WHEN FND_API.G_EXC_ERROR THEN
16589: ROLLBACK TO upd_reservation_pup_new;
16590: x_return_status := fnd_api.g_ret_sts_error;
16591: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
16592: IF (l_debug = 1) THEN
16593: debug_print(l_api_name ||' Exec Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
16594: END IF;

Line 16597: x_return_status := fnd_api.g_ret_sts_unexp_error;

16593: debug_print(l_api_name ||' Exec Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
16594: END IF;
16595: WHEN OTHERS THEN
16596: ROLLBACK TO upd_reservation_pup_new;
16597: x_return_status := fnd_api.g_ret_sts_unexp_error;
16598: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
16599: IF (l_debug = 1) THEN
16600: debug_print(l_api_name ||' Unexp Err prog='||l_progress||' SQL error: '|| SQLERRM(SQLCODE));
16601: END IF;

Line 16610: , p_commit IN VARCHAR2 := fnd_api.g_false

16606: PROCEDURE upd_reservation_pup(
16607: x_return_status OUT NOCOPY VARCHAR2
16608: , x_msg_count OUT NOCOPY NUMBER
16609: , x_msg_data OUT NOCOPY VARCHAR2
16610: , p_commit IN VARCHAR2 := fnd_api.g_false
16611: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16612: , p_organization_id IN NUMBER
16613: , p_demand_source_header_id IN NUMBER
16614: , p_demand_source_line_id IN NUMBER

Line 16611: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

16607: x_return_status OUT NOCOPY VARCHAR2
16608: , x_msg_count OUT NOCOPY NUMBER
16609: , x_msg_data OUT NOCOPY VARCHAR2
16610: , p_commit IN VARCHAR2 := fnd_api.g_false
16611: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16612: , p_organization_id IN NUMBER
16613: , p_demand_source_header_id IN NUMBER
16614: , p_demand_source_line_id IN NUMBER
16615: , p_from_subinventory_code IN VARCHAR2

Line 16624: , p_validation_flag IN VARCHAR2 := fnd_api.g_false

16620: , p_revision IN VARCHAR2
16621: , p_lot_number IN VARCHAR2
16622: , p_quantity IN NUMBER
16623: , p_uom IN VARCHAR2
16624: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
16625: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
16626: )
16627: IS
16628:

Line 16625: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false

16621: , p_lot_number IN VARCHAR2
16622: , p_quantity IN NUMBER
16623: , p_uom IN VARCHAR2
16624: , p_validation_flag IN VARCHAR2 := fnd_api.g_false
16625: , p_force_reservation_flag IN VARCHAR2 := fnd_api.g_false
16626: )
16627: IS
16628:
16629: BEGIN

Line 16659: , p_commit IN VARCHAR2 := fnd_api.g_false

16655: PROCEDURE transfer_lpn_trx_reservation(
16656: x_return_status OUT NOCOPY VARCHAR2
16657: , x_msg_count OUT NOCOPY NUMBER
16658: , x_msg_data OUT NOCOPY VARCHAR2
16659: , p_commit IN VARCHAR2 := fnd_api.g_false
16660: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16661: , p_transaction_temp_id IN NUMBER := 0
16662: , p_organization_id IN NUMBER
16663: , p_lpn_id IN NUMBER

Line 16660: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

16656: x_return_status OUT NOCOPY VARCHAR2
16657: , x_msg_count OUT NOCOPY NUMBER
16658: , x_msg_data OUT NOCOPY VARCHAR2
16659: , p_commit IN VARCHAR2 := fnd_api.g_false
16660: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
16661: , p_transaction_temp_id IN NUMBER := 0
16662: , p_organization_id IN NUMBER
16663: , p_lpn_id IN NUMBER
16664: , p_from_subinventory_code IN VARCHAR2

Line 16803: , p_force_reservation_flag => fnd_api.g_true

16799: , p_revision => lpn_del_rec.revision
16800: , p_lot_number => lpn_del_rec.lot_number
16801: , p_quantity => lpn_del_rec.requested_quantity
16802: , p_uom => lpn_del_rec.requested_quantity_uom
16803: , p_force_reservation_flag => fnd_api.g_true
16804: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600)) -- bug 2879208
16805: );
16806:
16807: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 16807: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

16803: , p_force_reservation_flag => fnd_api.g_true
16804: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600)) -- bug 2879208
16805: );
16806:
16807: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
16808: IF (l_debug = 1) THEN
16809: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16810: END IF;
16811: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 16813: RAISE fnd_api.g_exc_unexpected_error;

16809: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16810: END IF;
16811: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
16812: fnd_msg_pub.ADD;
16813: RAISE fnd_api.g_exc_unexpected_error;
16814: END IF;
16815: END LOOP;
16816:
16817: -- Workaround for performance issue 3631133

Line 16858: , p_force_reservation_flag => fnd_api.g_true

16854: , p_revision => p_revision
16855: , p_lot_number => v_lottmp.lot_number
16856: , p_quantity => v_lottmp.transaction_quantity
16857: , p_uom => p_trx_uom
16858: , p_force_reservation_flag => fnd_api.g_true
16859: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
16860: );
16861:
16862: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 16862: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

16858: , p_force_reservation_flag => fnd_api.g_true
16859: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
16860: );
16861:
16862: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
16863: IF (l_debug = 1) THEN
16864: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16865: END IF;
16866: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 16868: RAISE fnd_api.g_exc_unexpected_error;

16864: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16865: END IF;
16866: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
16867: fnd_msg_pub.ADD;
16868: RAISE fnd_api.g_exc_unexpected_error;
16869: END IF;
16870:
16871: l_count := l_count + 1;
16872: ELSE

Line 16878: RAISE fnd_api.g_exc_error;

16874: debug_print('**Split disallowed for lpns with multiple delivery lines for the same item', 1);
16875: END IF;
16876: fnd_message.set_name('INV', 'INV_MULTI_DEL_SPLIT_ERROR');
16877: fnd_msg_pub.ADD;
16878: RAISE fnd_api.g_exc_error;
16879: END IF;
16880: END LOOP;
16881: END LOOP;
16882:

Line 16913: , p_force_reservation_flag => fnd_api.g_true

16909: , p_revision => p_revision
16910: , p_lot_number => p_lot_number
16911: , p_quantity => p_trx_quantity
16912: , p_uom => p_trx_uom
16913: , p_force_reservation_flag => fnd_api.g_true
16914: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
16915: );
16916:
16917: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 16917: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

16913: , p_force_reservation_flag => fnd_api.g_true
16914: , p_requirement_date => (Sysdate + l_loop_counter/(24*3600))
16915: );
16916:
16917: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
16918: IF (l_debug = 1) THEN
16919: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16920: END IF;
16921: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');

Line 16923: RAISE fnd_api.g_exc_unexpected_error;

16919: debug_print('upd_reservation_pup failed '|| x_msg_data, 1);
16920: END IF;
16921: fnd_message.set_name('WMS', 'UPD_RESERVATION_PUP_FAIL');
16922: fnd_msg_pub.ADD;
16923: RAISE fnd_api.g_exc_unexpected_error;
16924: END IF;
16925:
16926: l_count := l_count + 1;
16927: ELSE

Line 16933: RAISE fnd_api.g_exc_error;

16929: debug_print('**Split disallowed for lpns with multiple delivery lines for the same item', 1);
16930: END IF;
16931: fnd_message.set_name('INV', 'INV_MULTI_DEL_SPLIT_ERROR');
16932: fnd_msg_pub.ADD;
16933: RAISE fnd_api.g_exc_error;
16934: END IF;
16935: END LOOP;
16936: END IF;
16937: END IF;

Line 16939: WHEN fnd_api.g_exc_error THEN

16935: END LOOP;
16936: END IF;
16937: END IF;
16938: EXCEPTION
16939: WHEN fnd_api.g_exc_error THEN
16940: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16941: fnd_msg_pub.ADD;
16942: ROLLBACK TO transfer_lpn_trx_reservation;
16943: x_return_status := fnd_api.g_ret_sts_error;

Line 16943: x_return_status := fnd_api.g_ret_sts_error;

16939: WHEN fnd_api.g_exc_error THEN
16940: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16941: fnd_msg_pub.ADD;
16942: ROLLBACK TO transfer_lpn_trx_reservation;
16943: x_return_status := fnd_api.g_ret_sts_error;
16944: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16945: WHEN fnd_api.g_exc_unexpected_error THEN
16946: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16947: fnd_msg_pub.ADD;

Line 16945: WHEN fnd_api.g_exc_unexpected_error THEN

16941: fnd_msg_pub.ADD;
16942: ROLLBACK TO transfer_lpn_trx_reservation;
16943: x_return_status := fnd_api.g_ret_sts_error;
16944: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16945: WHEN fnd_api.g_exc_unexpected_error THEN
16946: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16947: fnd_msg_pub.ADD;
16948: ROLLBACK TO transfer_lpn_trx_reservation;
16949: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 16949: x_return_status := fnd_api.g_ret_sts_unexp_error;

16945: WHEN fnd_api.g_exc_unexpected_error THEN
16946: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16947: fnd_msg_pub.ADD;
16948: ROLLBACK TO transfer_lpn_trx_reservation;
16949: x_return_status := fnd_api.g_ret_sts_unexp_error;
16950: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
16951: WHEN OTHERS THEN
16952: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16953: fnd_msg_pub.ADD;

Line 16955: x_return_status := fnd_api.g_ret_sts_unexp_error;

16951: WHEN OTHERS THEN
16952: fnd_message.set_name('WMS', 'INV_XFR_RSV_FAILURE');
16953: fnd_msg_pub.ADD;
16954: ROLLBACK TO transfer_lpn_trx_reservation;
16955: x_return_status := fnd_api.g_ret_sts_unexp_error;
16956:
16957: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
16958: fnd_msg_pub.add_exc_msg('wms_upd_res_pvt', 'TRANSFER_LPN_TRX_RESERVATION');
16959: END IF;

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

16974: ) IS
16975: l_api_name VARCHAR2(100) := 'Insert_rsv_temp';
16976: x_msg_count NUMBER;
16977: x_msg_data VARCHAR2(1000);
16978: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
16979: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
16980: BEGIN
16981: INSERT INTO rsv_temp
16982: (

Line 17010: x_return_status := fnd_api.g_ret_sts_unexp_error;

17006:
17007: x_return_status := l_return_status;
17008: EXCEPTION
17009: WHEN OTHERS THEN
17010: x_return_status := fnd_api.g_ret_sts_unexp_error;
17011:
17012: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
17013: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
17014: END IF;

Line 17027: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

17023: --to ensure that bad trees are not in place.
17024:
17025: PROCEDURE do_check_for_commit(
17026: p_api_version_number IN NUMBER
17027: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
17028: , x_return_status OUT NOCOPY VARCHAR2
17029: , x_msg_count OUT NOCOPY NUMBER
17030: , x_msg_data OUT NOCOPY VARCHAR2
17031: , x_failed_rsv_temp_tbl OUT NOCOPY inv_reservation_global.mtl_failed_rsv_tbl_type

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

17031: , x_failed_rsv_temp_tbl OUT NOCOPY inv_reservation_global.mtl_failed_rsv_tbl_type
17032: ) IS
17033: l_api_version_number CONSTANT NUMBER := 1.0;
17034: l_api_name CONSTANT VARCHAR2(30) := 'Do_check_for_commit';
17035: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
17036: l_no_violation BOOLEAN;
17037: l_root_id INTEGER;
17038: l_failed_rsv_temp_tbl inv_reservation_global.mtl_failed_rsv_tbl_type;
17039: l_failed_rsv_temp_rec inv_reservation_global.mtl_failed_rsv_rec_type;

Line 17078: IF l_return_status = fnd_api.g_ret_sts_error THEN

17074: END IF;
17075:
17076: 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);
17077:
17078: IF l_return_status = fnd_api.g_ret_sts_error THEN
17079: RAISE fnd_api.g_exc_error;
17080: END IF;
17081:
17082: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 17079: RAISE fnd_api.g_exc_error;

17075:
17076: 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);
17077:
17078: IF l_return_status = fnd_api.g_ret_sts_error THEN
17079: RAISE fnd_api.g_exc_error;
17080: END IF;
17081:
17082: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17083: RAISE fnd_api.g_exc_unexpected_error;

Line 17082: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

17078: IF l_return_status = fnd_api.g_ret_sts_error THEN
17079: RAISE fnd_api.g_exc_error;
17080: END IF;
17081:
17082: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17083: RAISE fnd_api.g_exc_unexpected_error;
17084: END IF;
17085:
17086: IF NOT (l_no_violation) THEN

Line 17083: RAISE fnd_api.g_exc_unexpected_error;

17079: RAISE fnd_api.g_exc_error;
17080: END IF;
17081:
17082: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17083: RAISE fnd_api.g_exc_unexpected_error;
17084: END IF;
17085:
17086: IF NOT (l_no_violation) THEN
17087: OPEN rsv_csr(tree_rec.p_tree_id);

Line 17106: , p_validation_flag => fnd_api.g_false

17102: , x_msg_count => x_msg_count
17103: , x_msg_data => x_msg_data
17104: , p_rsv_rec => l_rsv_rec
17105: , p_original_serial_number => p_original_serial_number
17106: , p_validation_flag => fnd_api.g_false
17107: );
17108:
17109: IF l_return_status = fnd_api.g_ret_sts_error THEN
17110: RAISE fnd_api.g_exc_error;

Line 17109: IF l_return_status = fnd_api.g_ret_sts_error THEN

17105: , p_original_serial_number => p_original_serial_number
17106: , p_validation_flag => fnd_api.g_false
17107: );
17108:
17109: IF l_return_status = fnd_api.g_ret_sts_error THEN
17110: RAISE fnd_api.g_exc_error;
17111: END IF;
17112:
17113: --

Line 17110: RAISE fnd_api.g_exc_error;

17106: , p_validation_flag => fnd_api.g_false
17107: );
17108:
17109: IF l_return_status = fnd_api.g_ret_sts_error THEN
17110: RAISE fnd_api.g_exc_error;
17111: END IF;
17112:
17113: --
17114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 17114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

17110: RAISE fnd_api.g_exc_error;
17111: END IF;
17112:
17113: --
17114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17115: RAISE fnd_api.g_exc_unexpected_error;
17116: -- END IF;
17117: END IF;
17118:

Line 17115: RAISE fnd_api.g_exc_unexpected_error;

17111: END IF;
17112:
17113: --
17114: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17115: RAISE fnd_api.g_exc_unexpected_error;
17116: -- END IF;
17117: END IF;
17118:
17119: l_failed_rsv_temp_tbl_count := l_failed_rsv_temp_tbl_count + 1;

Line 17139: WHEN fnd_api.g_exc_error THEN

17135: x_failed_rsv_temp_tbl := l_failed_rsv_temp_tbl;
17136: x_return_status := l_return_status;
17137: inv_quantity_tree_pub.clear_quantity_cache;
17138: EXCEPTION
17139: WHEN fnd_api.g_exc_error THEN
17140: x_return_status := fnd_api.g_ret_sts_error;
17141: -- Get message count and data
17142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17143: WHEN fnd_api.g_exc_unexpected_error THEN

Line 17140: x_return_status := fnd_api.g_ret_sts_error;

17136: x_return_status := l_return_status;
17137: inv_quantity_tree_pub.clear_quantity_cache;
17138: EXCEPTION
17139: WHEN fnd_api.g_exc_error THEN
17140: x_return_status := fnd_api.g_ret_sts_error;
17141: -- Get message count and data
17142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17143: WHEN fnd_api.g_exc_unexpected_error THEN
17144: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 17143: WHEN fnd_api.g_exc_unexpected_error THEN

17139: WHEN fnd_api.g_exc_error THEN
17140: x_return_status := fnd_api.g_ret_sts_error;
17141: -- Get message count and data
17142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17143: WHEN fnd_api.g_exc_unexpected_error THEN
17144: x_return_status := fnd_api.g_ret_sts_unexp_error;
17145: -- Get message count and data
17146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17147: WHEN OTHERS THEN

Line 17144: x_return_status := fnd_api.g_ret_sts_unexp_error;

17140: x_return_status := fnd_api.g_ret_sts_error;
17141: -- Get message count and data
17142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17143: WHEN fnd_api.g_exc_unexpected_error THEN
17144: x_return_status := fnd_api.g_ret_sts_unexp_error;
17145: -- Get message count and data
17146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17147: WHEN OTHERS THEN
17148: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 17148: x_return_status := fnd_api.g_ret_sts_unexp_error;

17144: x_return_status := fnd_api.g_ret_sts_unexp_error;
17145: -- Get message count and data
17146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17147: WHEN OTHERS THEN
17148: x_return_status := fnd_api.g_ret_sts_unexp_error;
17149:
17150: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
17151: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
17152: END IF;

Line 17161: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

17157:
17158: /**** {{ R12 Enhanced reservations code changes }}****/
17159: PROCEDURE Transfer_Reservation_SubXfer
17160: ( p_api_version_number IN NUMBER DEFAULT 1.0
17161: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
17162: , x_return_status OUT NOCOPY VARCHAR2
17163: , x_msg_count OUT NOCOPY NUMBER
17164: , x_msg_data OUT NOCOPY VARCHAR2
17165: , p_Inventory_Item_Id IN Number

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

17180: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type ;
17181: l_original_serial_number_Tab inv_reservation_global.serial_number_tbl_type ;
17182: l_to_serial_number_Tab inv_reservation_global.serial_number_tbl_type ;
17183: l_Reservation_Id Number;
17184: l_return_status VARCHAR2(1):= fnd_api.g_ret_sts_success;
17185: l_debug number;
17186:
17187: --Define a cursor that gets ReservationId information for a given org_id,
17188: --item_id and serial number information

Line 17232: RAISE fnd_api.g_exc_unexpected_error;

17228: END IF;
17229: l_Reservation_Id := p_original_Reservation_Id ;
17230: End If;
17231: If l_Reservation_Id IS NULL Then
17232: RAISE fnd_api.g_exc_unexpected_error;
17233: End If;
17234:
17235: l_original_rsv_rec.Reservation_id := l_Reservation_Id ;
17236: l_To_Rsv_Rec.subinventory_code := p_to_SubInventory ;

Line 17262: IF l_return_status = fnd_api.g_ret_sts_error THEN

17258: IF (l_debug = 1) THEN
17259: debug_print('After calling transfer reservation. Return status: ' || l_return_status);
17260: END IF;
17261:
17262: IF l_return_status = fnd_api.g_ret_sts_error THEN
17263: RAISE fnd_api.g_exc_error;
17264: END IF ;
17265:
17266: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 17263: RAISE fnd_api.g_exc_error;

17259: debug_print('After calling transfer reservation. Return status: ' || l_return_status);
17260: END IF;
17261:
17262: IF l_return_status = fnd_api.g_ret_sts_error THEN
17263: RAISE fnd_api.g_exc_error;
17264: END IF ;
17265:
17266: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17267: RAISE fnd_api.g_exc_unexpected_error;

Line 17266: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

17262: IF l_return_status = fnd_api.g_ret_sts_error THEN
17263: RAISE fnd_api.g_exc_error;
17264: END IF ;
17265:
17266: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17267: RAISE fnd_api.g_exc_unexpected_error;
17268: END IF;
17269:
17270: x_return_status := l_return_status;

Line 17267: RAISE fnd_api.g_exc_unexpected_error;

17263: RAISE fnd_api.g_exc_error;
17264: END IF ;
17265:
17266: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
17267: RAISE fnd_api.g_exc_unexpected_error;
17268: END IF;
17269:
17270: x_return_status := l_return_status;
17271:

Line 17274: WHEN fnd_api.g_exc_error THEN

17270: x_return_status := l_return_status;
17271:
17272: EXCEPTION
17273:
17274: WHEN fnd_api.g_exc_error THEN
17275: x_return_status := fnd_api.g_ret_sts_error;
17276:
17277: -- Get message count and data
17278: fnd_msg_pub.count_and_get

Line 17275: x_return_status := fnd_api.g_ret_sts_error;

17271:
17272: EXCEPTION
17273:
17274: WHEN fnd_api.g_exc_error THEN
17275: x_return_status := fnd_api.g_ret_sts_error;
17276:
17277: -- Get message count and data
17278: fnd_msg_pub.count_and_get
17279: ( p_count => x_msg_count

Line 17283: WHEN fnd_api.g_exc_unexpected_error THEN

17279: ( p_count => x_msg_count
17280: , p_data => x_msg_data
17281: );
17282:
17283: WHEN fnd_api.g_exc_unexpected_error THEN
17284: x_return_status := fnd_api.g_ret_sts_unexp_error ;
17285:
17286: -- Get message count and data
17287: fnd_msg_pub.count_and_get

Line 17284: x_return_status := fnd_api.g_ret_sts_unexp_error ;

17280: , p_data => x_msg_data
17281: );
17282:
17283: WHEN fnd_api.g_exc_unexpected_error THEN
17284: x_return_status := fnd_api.g_ret_sts_unexp_error ;
17285:
17286: -- Get message count and data
17287: fnd_msg_pub.count_and_get
17288: ( p_count => x_msg_count

Line 17293: x_return_status := fnd_api.g_ret_sts_unexp_error ;

17289: , p_data => x_msg_data
17290: );
17291:
17292: WHEN OTHERS THEN
17293: x_return_status := fnd_api.g_ret_sts_unexp_error ;
17294:
17295: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
17296: THEN
17297: fnd_msg_pub.add_exc_msg

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

17319: , p_to_subinventory_code IN VARCHAR2
17320: , p_to_locator_id IN NUMBER)
17321: IS
17322: l_api_name CONSTANT VARCHAR2(30) := 'transfer_serial_rsv_in_LPN';
17323: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
17324: l_msg_count NUMBER;
17325: l_msg_data VARCHAR2(1000);
17326: l_debug NUMBER;
17327:

Line 17507: , p_init_msg_lst => fnd_api.g_false

17503: END IF;
17504:
17505: inv_reservation_pvt.transfer_reservation(
17506: p_api_version_number => 1.0
17507: , p_init_msg_lst => fnd_api.g_false
17508: , x_return_status => l_return_status
17509: , x_msg_count => l_msg_count
17510: , x_msg_data => l_msg_data
17511: , p_original_rsv_rec => l_original_rsv_rec

Line 17515: , p_validation_flag => fnd_api.g_true

17511: , p_original_rsv_rec => l_original_rsv_rec
17512: , p_to_rsv_rec => l_to_rsv_rec
17513: , p_original_serial_number => l_serial_number_tbl
17514: , p_to_serial_number => l_serial_number_tbl
17515: , p_validation_flag => fnd_api.g_true
17516: , x_reservation_id => l_reservation_id
17517: );
17518:
17519: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

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

17515: , p_validation_flag => fnd_api.g_true
17516: , x_reservation_id => l_reservation_id
17517: );
17518:
17519: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
17520: IF (l_debug = 1) THEN
17521: debug_print('Error return status from transfer_reservation');
17522: END IF;
17523:

Line 17524: RAISE fnd_api.g_exc_error;

17520: IF (l_debug = 1) THEN
17521: debug_print('Error return status from transfer_reservation');
17522: END IF;
17523:
17524: RAISE fnd_api.g_exc_error;
17525: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
17526: IF (l_debug = 1) THEN
17527: debug_print('Unexpected return status from transfer_reservation');
17528: END IF;

Line 17525: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

17521: debug_print('Error return status from transfer_reservation');
17522: END IF;
17523:
17524: RAISE fnd_api.g_exc_error;
17525: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
17526: IF (l_debug = 1) THEN
17527: debug_print('Unexpected return status from transfer_reservation');
17528: END IF;
17529:

Line 17530: RAISE fnd_api.g_exc_unexpected_error;

17526: IF (l_debug = 1) THEN
17527: debug_print('Unexpected return status from transfer_reservation');
17528: END IF;
17529:
17530: RAISE fnd_api.g_exc_unexpected_error;
17531: END IF;
17532:
17533: -- delete the content of l_serial_number_tbl and reset the index
17534: l_serial_number_tbl.DELETE;

Line 17545: WHEN fnd_api.g_exc_error THEN

17541: x_msg_count := l_msg_count;
17542: x_msg_data := l_msg_data;
17543:
17544: EXCEPTION
17545: WHEN fnd_api.g_exc_error THEN
17546: x_return_status := fnd_api.g_ret_sts_error;
17547: -- Get message count and data
17548: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17549: WHEN fnd_api.g_exc_unexpected_error THEN

Line 17546: x_return_status := fnd_api.g_ret_sts_error;

17542: x_msg_data := l_msg_data;
17543:
17544: EXCEPTION
17545: WHEN fnd_api.g_exc_error THEN
17546: x_return_status := fnd_api.g_ret_sts_error;
17547: -- Get message count and data
17548: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17549: WHEN fnd_api.g_exc_unexpected_error THEN
17550: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 17549: WHEN fnd_api.g_exc_unexpected_error THEN

17545: WHEN fnd_api.g_exc_error THEN
17546: x_return_status := fnd_api.g_ret_sts_error;
17547: -- Get message count and data
17548: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17549: WHEN fnd_api.g_exc_unexpected_error THEN
17550: x_return_status := fnd_api.g_ret_sts_unexp_error;
17551:
17552: IF (l_debug = 1) THEN
17553: debug_print('unexpected error: ' || SQLERRM);

Line 17550: x_return_status := fnd_api.g_ret_sts_unexp_error;

17546: x_return_status := fnd_api.g_ret_sts_error;
17547: -- Get message count and data
17548: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17549: WHEN fnd_api.g_exc_unexpected_error THEN
17550: x_return_status := fnd_api.g_ret_sts_unexp_error;
17551:
17552: IF (l_debug = 1) THEN
17553: debug_print('unexpected error: ' || SQLERRM);
17554: END IF;

Line 17559: x_return_status := fnd_api.g_ret_sts_unexp_error;

17555:
17556: -- Get message count and data
17557: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
17558: WHEN OTHERS THEN
17559: x_return_status := fnd_api.g_ret_sts_unexp_error;
17560:
17561: IF (l_debug = 1) THEN
17562: debug_print('others error: ' || SQLERRM);
17563: END IF;