DBA Data[Home] [Help]

APPS.WMS_XDOCK_PEGGING_PUB dependencies on FND_API

Line 220: RAISE fnd_api.g_exc_unexpected_error;

216: EXCEPTION
217: WHEN NO_DATA_FOUND THEN
218: NULL;
219: WHEN OTHERS THEN
220: RAISE fnd_api.g_exc_unexpected_error;
221: END;
222: END IF;
223:
224: -- Return the item default routing ID if a cached value exists

Line 252: RAISE fnd_api.g_exc_unexpected_error;

248: EXCEPTION
249: WHEN NO_DATA_FOUND THEN
250: NULL;
251: WHEN OTHERS THEN
252: RAISE fnd_api.g_exc_unexpected_error;
253: END;
254: END IF;
255:
256: -- Return the vendor default routing ID if a cached value exists

Line 283: RAISE fnd_api.g_exc_unexpected_error;

279: EXCEPTION
280: WHEN NO_DATA_FOUND THEN
281: NULL;
282: WHEN OTHERS THEN
283: RAISE fnd_api.g_exc_unexpected_error;
284: END;
285: END IF;
286:
287: -- Return the org default routing ID if a cached value exists

Line 551: RAISE FND_API.G_EXC_ERROR;

547: END IF;
548: -- Raise an exception. The caller will do the rollback, cleanups,
549: -- and decide where to goto next.
550: x_error_code := 'UOM';
551: RAISE FND_API.G_EXC_ERROR;
552: END IF;
553: -- Round the converted quantity to the standard precision
554: l_atd_wdd_qty := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
555: IF (l_debug = 1) THEN

Line 572: RAISE FND_API.G_EXC_ERROR;

568: END IF;
569: -- Raise an exception. The caller will do the rollback, cleanups,
570: -- and decide where to goto next.
571: x_error_code := 'UOM';
572: RAISE FND_API.G_EXC_ERROR;
573: END IF;
574: -- Round the converted quantity to the standard precision
575: l_atd_wdd_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
576: ELSE

Line 599: p_init_msg_list => fnd_api.g_false,

595: print_debug(p_log_prefix || 'Call the Delivery_Detail_Action API to split the WDD');
596: END IF;
597: WSH_INTERFACE_GRP.Delivery_Detail_Action
598: (p_api_version_number => 1.0,
599: p_init_msg_list => fnd_api.g_false,
600: p_commit => fnd_api.g_false,
601: x_return_status => x_return_status,
602: x_msg_count => x_msg_count,
603: x_msg_data => x_msg_data,

Line 600: p_commit => fnd_api.g_false,

596: END IF;
597: WSH_INTERFACE_GRP.Delivery_Detail_Action
598: (p_api_version_number => 1.0,
599: p_init_msg_list => fnd_api.g_false,
600: p_commit => fnd_api.g_false,
601: x_return_status => x_return_status,
602: x_msg_count => x_msg_count,
603: x_msg_data => x_msg_data,
604: p_detail_id_tab => l_detail_id_tab,

Line 609: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

605: p_action_prms => l_action_prms,
606: x_action_out_rec => l_action_out_rec
607: );
608:
609: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
610: IF (l_debug = 1) THEN
611: print_debug(p_log_prefix || 'Error returned from Split Delivery_Detail_Action API: '
612: || x_return_status);
613: END IF;

Line 617: RAISE FND_API.G_EXC_ERROR;

613: END IF;
614: -- Raise an exception. The caller will do the rollback, cleanups,
615: -- and decide where to goto next.
616: x_error_code := 'DB';
617: RAISE FND_API.G_EXC_ERROR;
618: END IF;
619: IF (l_debug = 1) THEN
620: print_debug(p_log_prefix || 'Successfully split the WDD record');
621: END IF;

Line 758: x_return_status := fnd_api.g_ret_sts_error;

754: l_progress := '60';
755:
756: EXCEPTION
757: WHEN OTHERS THEN
758: x_return_status := fnd_api.g_ret_sts_error;
759: fnd_msg_pub.count_and_get(p_count => x_msg_count,
760: p_data => x_msg_data);
761: IF (l_debug = 1) THEN
762: print_debug(p_log_prefix || 'Exiting Crossdock_WDD - Execution error: ' ||

Line 832: RAISE FND_API.G_EXC_ERROR;

828: END IF;
829: -- Raise an exception. The caller will do the rollback, cleanups,
830: -- and decide where to goto next.
831: x_error_code := 'UOM';
832: RAISE FND_API.G_EXC_ERROR;
833: END IF;
834: -- Round the converted quantity to the standard precision
835: l_atd_rsv_qty := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
836: IF (l_debug = 1) THEN

Line 853: RAISE FND_API.G_EXC_ERROR;

849: END IF;
850: -- Raise an exception. The caller will do the rollback, cleanups,
851: -- and decide where to goto next.
852: x_error_code := 'UOM';
853: RAISE FND_API.G_EXC_ERROR;
854: END IF;
855: -- Round the converted quantity to the standard precision
856: l_atd_rsv_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
857: ELSE

Line 895: p_init_msg_lst => fnd_api.g_false,

891: print_debug(p_log_prefix || 'Call the transfer_reservation API to split the RSV record');
892: END IF;
893: INV_RESERVATION_PVT.transfer_reservation
894: (p_api_version_number => 1.0,
895: p_init_msg_lst => fnd_api.g_false,
896: x_return_status => x_return_status,
897: x_msg_count => x_msg_count,
898: x_msg_data => x_msg_data,
899: p_original_rsv_rec => l_original_rsv_rec,

Line 902: p_validation_flag => fnd_api.g_true,

898: x_msg_data => x_msg_data,
899: p_original_rsv_rec => l_original_rsv_rec,
900: p_to_rsv_rec => l_to_rsv_rec,
901: p_original_serial_number => l_original_serial_number,
902: p_validation_flag => fnd_api.g_true,
903: x_reservation_id => l_split_rsv_id);
904:
905: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
906: IF (l_debug = 1) THEN

Line 905: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

901: p_original_serial_number => l_original_serial_number,
902: p_validation_flag => fnd_api.g_true,
903: x_reservation_id => l_split_rsv_id);
904:
905: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
906: IF (l_debug = 1) THEN
907: print_debug(p_log_prefix || 'Error returned from transfer_reservation API: '
908: || x_return_status);
909: END IF;

Line 913: RAISE FND_API.G_EXC_ERROR;

909: END IF;
910: -- Raise an exception. The caller will do the rollback, cleanups,
911: -- and decide where to goto next.
912: x_error_code := 'DB';
913: RAISE FND_API.G_EXC_ERROR;
914: END IF;
915: IF (l_debug = 1) THEN
916: print_debug(p_log_prefix || 'Successfully split the RSV record');
917: END IF;

Line 957: p_init_msg_lst => fnd_api.g_false,

953: print_debug(p_log_prefix || 'Call the update_reservation API to crossdock the RSV record');
954: END IF;
955: INV_RESERVATION_PVT.update_reservation
956: (p_api_version_number => 1.0,
957: p_init_msg_lst => fnd_api.g_false,
958: x_return_status => x_return_status,
959: x_msg_count => x_msg_count,
960: x_msg_data => x_msg_data,
961: p_original_rsv_rec => l_original_rsv_rec,

Line 965: p_validation_flag => fnd_api.g_true,

961: p_original_rsv_rec => l_original_rsv_rec,
962: p_to_rsv_rec => l_to_rsv_rec,
963: p_original_serial_number => l_original_serial_number,
964: p_to_serial_number => l_to_serial_number,
965: p_validation_flag => fnd_api.g_true,
966: p_check_availability => fnd_api.g_false);
967:
968: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
969: IF (l_debug = 1) THEN

Line 966: p_check_availability => fnd_api.g_false);

962: p_to_rsv_rec => l_to_rsv_rec,
963: p_original_serial_number => l_original_serial_number,
964: p_to_serial_number => l_to_serial_number,
965: p_validation_flag => fnd_api.g_true,
966: p_check_availability => fnd_api.g_false);
967:
968: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
969: IF (l_debug = 1) THEN
970: print_debug(p_log_prefix || 'Error returned from update_reservation API: '

Line 968: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

964: p_to_serial_number => l_to_serial_number,
965: p_validation_flag => fnd_api.g_true,
966: p_check_availability => fnd_api.g_false);
967:
968: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
969: IF (l_debug = 1) THEN
970: print_debug(p_log_prefix || 'Error returned from update_reservation API: '
971: || x_return_status);
972: END IF;

Line 976: RAISE FND_API.G_EXC_ERROR;

972: END IF;
973: -- Raise an exception. The caller will do the rollback, cleanups,
974: -- and decide where to goto next.
975: x_error_code := 'DB';
976: RAISE FND_API.G_EXC_ERROR;
977: END IF;
978: IF (l_debug = 1) THEN
979: print_debug(p_log_prefix || 'Successfully updated and crossdocked the RSV record');
980: END IF;

Line 991: x_return_status := fnd_api.g_ret_sts_error;

987: END IF; -- End crossdocking RSV record: Matches 'IF (l_rsv_txn_qty > l_atd_qty) THEN'
988:
989: EXCEPTION
990: WHEN OTHERS THEN
991: x_return_status := fnd_api.g_ret_sts_error;
992: fnd_msg_pub.count_and_get(p_count => x_msg_count,
993: p_data => x_msg_data);
994: IF (l_debug = 1) THEN
995: print_debug(p_log_prefix || 'Exiting Crossdock_RSV - Execution error: ' ||

Line 1088: RAISE FND_API.G_EXC_ERROR;

1084: END IF;
1085: -- Raise an exception. The caller will do the rollback, cleanups,
1086: -- and decide where to goto next.
1087: x_error_code := 'UOM';
1088: RAISE FND_API.G_EXC_ERROR;
1089: END IF;
1090: -- Round the converted quantity to the standard precision
1091: l_atd_mol_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
1092: ELSE

Line 1319: RAISE FND_API.G_EXC_ERROR;

1315: END IF;
1316: -- Raise an exception. The caller will do the rollback, cleanups,
1317: -- and decide where to goto next.
1318: x_error_code := 'DB';
1319: RAISE FND_API.G_EXC_ERROR;
1320: END; -- End inserting split MOL record into MTL_TXN_REQUEST_LINES
1321:
1322: -- Retrieve the split MOL line ID we have just inserted above.
1323: -- We cannot use the RETURNING clause since a sub-query was used for the insert.

Line 1340: RAISE FND_API.G_EXC_ERROR;

1336: END IF;
1337: -- Raise an exception. The caller will do the rollback, cleanups,
1338: -- and decide where to goto next.
1339: x_error_code := 'DB';
1340: RAISE FND_API.G_EXC_ERROR;
1341: END;
1342: IF (l_debug = 1) THEN
1343: print_debug(p_log_prefix || 'Successfully inserted/split the MOL record: ' ||
1344: l_split_mol_line_id);

Line 1362: RAISE FND_API.G_EXC_ERROR;

1358: END IF;
1359: -- Raise an exception. The caller will do the rollback, cleanups,
1360: -- and decide where to goto next.
1361: x_error_code := 'DB';
1362: RAISE FND_API.G_EXC_ERROR;
1363: END;
1364:
1365: -- Update the MOL qty values to indicate how much quantity from the original MOL
1366: -- is still available for crossdocking.

Line 1408: RAISE FND_API.G_EXC_ERROR;

1404: END IF;
1405: -- Raise an exception. The caller will do the rollback, cleanups,
1406: -- and decide where to goto next.
1407: x_error_code := 'DB';
1408: RAISE FND_API.G_EXC_ERROR;
1409: END;
1410:
1411: -- Update the MOL qty field to indicate how much quantity from the original MOL
1412: -- is still available for crossdocking.

Line 1460: x_return_status := fnd_api.g_ret_sts_error;

1456: END IF; -- End of logic to update WDD records with split MOL line
1457:
1458: EXCEPTION
1459: WHEN OTHERS THEN
1460: x_return_status := fnd_api.g_ret_sts_error;
1461: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1462: p_data => x_msg_data);
1463: IF (l_debug = 1) THEN
1464: print_debug(p_log_prefix || 'Exiting Crossdock_MOL - Execution error: ' ||

Line 1648: p_init_msg_lst => fnd_api.g_false,

1644: print_debug(p_log_prefix || 'Call the create_reservation API to create the crossdock peg');
1645: END IF;
1646: INV_RESERVATION_PVT.create_reservation
1647: (p_api_version_number => 1.0,
1648: p_init_msg_lst => fnd_api.g_false,
1649: x_return_status => x_return_status,
1650: x_msg_count => x_msg_count,
1651: x_msg_data => x_msg_data,
1652: p_rsv_rec => l_original_rsv_rec,

Line 1655: p_partial_reservation_flag => fnd_api.g_false,

1651: x_msg_data => x_msg_data,
1652: p_rsv_rec => l_original_rsv_rec,
1653: p_serial_number => l_original_serial_number,
1654: x_serial_number => l_to_serial_number,
1655: p_partial_reservation_flag => fnd_api.g_false,
1656: p_force_reservation_flag => fnd_api.g_false,
1657: p_validation_flag => fnd_api.g_true,
1658: x_quantity_reserved => l_quantity_reserved,
1659: x_secondary_quantity_reserved => l_quantity_reserved2,

Line 1656: p_force_reservation_flag => fnd_api.g_false,

1652: p_rsv_rec => l_original_rsv_rec,
1653: p_serial_number => l_original_serial_number,
1654: x_serial_number => l_to_serial_number,
1655: p_partial_reservation_flag => fnd_api.g_false,
1656: p_force_reservation_flag => fnd_api.g_false,
1657: p_validation_flag => fnd_api.g_true,
1658: x_quantity_reserved => l_quantity_reserved,
1659: x_secondary_quantity_reserved => l_quantity_reserved2,
1660: x_reservation_id => l_rsv_id

Line 1657: p_validation_flag => fnd_api.g_true,

1653: p_serial_number => l_original_serial_number,
1654: x_serial_number => l_to_serial_number,
1655: p_partial_reservation_flag => fnd_api.g_false,
1656: p_force_reservation_flag => fnd_api.g_false,
1657: p_validation_flag => fnd_api.g_true,
1658: x_quantity_reserved => l_quantity_reserved,
1659: x_secondary_quantity_reserved => l_quantity_reserved2,
1660: x_reservation_id => l_rsv_id
1661: );

Line 1663: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1659: x_secondary_quantity_reserved => l_quantity_reserved2,
1660: x_reservation_id => l_rsv_id
1661: );
1662:
1663: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1664: IF (l_debug = 1) THEN
1665: print_debug(p_log_prefix || 'Error returned from create_reservation API: '
1666: || x_return_status);
1667: END IF;

Line 1670: RAISE FND_API.G_EXC_ERROR;

1666: || x_return_status);
1667: END IF;
1668: -- Raise an exception. The caller will do the rollback, cleanups,
1669: -- and decide where to goto next.
1670: RAISE FND_API.G_EXC_ERROR;
1671: END IF;
1672: l_progress := '20';
1673:
1674: EXCEPTION

Line 1676: x_return_status := fnd_api.g_ret_sts_error;

1672: l_progress := '20';
1673:
1674: EXCEPTION
1675: WHEN OTHERS THEN
1676: x_return_status := fnd_api.g_ret_sts_error;
1677: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1678: p_data => x_msg_data);
1679: IF (l_debug = 1) THEN
1680: print_debug(p_log_prefix || 'Exiting Create_RSV - Execution error: ' ||

Line 2656: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

2652: SAVEPOINT Planned_Cross_Dock_sp;
2653: l_progress := '10';
2654:
2655: -- Standard Call to check for call compatibility
2656: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2657: IF (l_debug = 1) THEN
2658: print_debug('FND_API version not compatible!');
2659: END IF;
2660: RAISE fnd_api.g_exc_unexpected_error;

Line 2658: print_debug('FND_API version not compatible!');

2654:
2655: -- Standard Call to check for call compatibility
2656: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2657: IF (l_debug = 1) THEN
2658: print_debug('FND_API version not compatible!');
2659: END IF;
2660: RAISE fnd_api.g_exc_unexpected_error;
2661: END IF;
2662:

Line 2660: RAISE fnd_api.g_exc_unexpected_error;

2656: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2657: IF (l_debug = 1) THEN
2658: print_debug('FND_API version not compatible!');
2659: END IF;
2660: RAISE fnd_api.g_exc_unexpected_error;
2661: END IF;
2662:
2663: -- Initialize message list to clear any existing messages
2664: IF fnd_api.To_Boolean(p_init_msg_list) THEN

Line 2664: IF fnd_api.To_Boolean(p_init_msg_list) THEN

2660: RAISE fnd_api.g_exc_unexpected_error;
2661: END IF;
2662:
2663: -- Initialize message list to clear any existing messages
2664: IF fnd_api.To_Boolean(p_init_msg_list) THEN
2665: fnd_msg_pub.initialize;
2666: END IF;
2667: l_progress := '20';
2668:

Line 2670: x_return_status := fnd_api.g_ret_sts_success;

2666: END IF;
2667: l_progress := '20';
2668:
2669: -- Initialize API return status to success
2670: x_return_status := fnd_api.g_ret_sts_success;
2671: l_progress := '30';
2672:
2673: -- Return if there are no records to crossdock in p_wsh_release_table.
2674: -- {{

Line 2738: RAISE fnd_api.g_exc_unexpected_error;

2734: p_request_number => NULL)) THEN
2735: IF (l_debug = 1) THEN
2736: print_debug('Error caching the WSH picking batch record');
2737: END IF;
2738: RAISE fnd_api.g_exc_unexpected_error;
2739: END IF;
2740: l_progress := '50';
2741:
2742: -- Retrieve the necessary parameters from the picking batch

Line 2760: RAISE fnd_api.g_exc_unexpected_error;

2756: IF (NOT INV_CACHE.set_org_rec(l_organization_id)) THEN
2757: IF (l_debug = 1) THEN
2758: print_debug('Error caching the org record');
2759: END IF;
2760: RAISE fnd_api.g_exc_unexpected_error;
2761: END IF;
2762: -- Set the PJM enabled flag.
2763: l_project_ref_enabled := INV_CACHE.org_rec.project_reference_enabled;
2764: l_progress := '70';

Line 2772: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

2768: (x_return_status => x_return_status,
2769: x_msg_count => x_msg_count,
2770: x_msg_data => x_msg_data,
2771: p_organization_id => l_organization_id);
2772: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2773: IF (l_debug = 1) THEN
2774: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
2775: END IF;
2776: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2776: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2772: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2773: IF (l_debug = 1) THEN
2774: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
2775: END IF;
2776: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2777: END IF;
2778: l_progress := '80';
2779:
2780: -- Retrieve the org parameter for allowing cross project allocation for crossdocking.

Line 2810: RAISE fnd_api.g_exc_unexpected_error;

2806: IF (l_allocation_method = G_INVENTORY_ONLY) THEN
2807: IF (l_debug = 1) THEN
2808: print_debug('Allocation method of Inventory Only is invalid');
2809: END IF;
2810: RAISE fnd_api.g_exc_unexpected_error;
2811: END IF;
2812: l_progress := '100';
2813:
2814: -- Query for and cache the crossdock criteria record for the picking batch

Line 2825: RAISE fnd_api.g_exc_unexpected_error;

2821: IF (l_debug = 1) THEN
2822: print_debug('Error caching the crossdock criteria record: ' ||
2823: l_wpb_xdock_criteria_id);
2824: END IF;
2825: RAISE fnd_api.g_exc_unexpected_error;
2826: END IF;
2827: END IF;
2828: l_progress := '110';
2829: -- End of validations and initializations

Line 2926: --RAISE fnd_api.g_exc_unexpected_error;

2922: print_debug('1.1 - Error caching the item parameters: ' ||
2923: l_inventory_item_id);
2924: END IF;
2925: GOTO next_record;
2926: --RAISE fnd_api.g_exc_unexpected_error;
2927: END;
2928: END IF;
2929: -- Store the item's primary UOM code in a local variable
2930: l_primary_uom_code := l_item_params_tb(l_inventory_item_id).primary_uom_code;

Line 3027: --RAISE fnd_api.g_exc_unexpected_error;

3023: IF (l_debug = 1) THEN
3024: print_debug('1.3 - Error caching the UOM class: ' || l_demand_uom_code);
3025: END IF;
3026: --GOTO next_record;
3027: --RAISE fnd_api.g_exc_unexpected_error;
3028: -- Instead of skipping to the next record, just store a NULL value
3029: -- for the UOM class. The crossdock criteria retrieved will thus not
3030: -- make use of the UOM class as a filter.
3031: l_uom_class_tb(l_demand_uom_code) := NULL;

Line 3049: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3045: x_msg_data => x_msg_data,
3046: x_api_is_implemented => l_api_is_implemented,
3047: x_crossdock_criteria_id => l_crossdock_criteria_id);
3048:
3049: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3050: IF (l_debug = 1) THEN
3051: print_debug('1.3 - Success returned from Get_Crossdock_Criteria API');
3052: END IF;
3053: ELSE

Line 3058: --RAISE fnd_api.g_exc_error;

3054: IF (l_debug = 1) THEN
3055: print_debug('1.3 - Failure returned from Get_Crossdock_Criteria API');
3056: END IF;
3057: GOTO next_record;
3058: --RAISE fnd_api.g_exc_error;
3059: END IF;
3060:
3061: -- If the custom API is not implemented, call the rules engine to determine the
3062: -- crossdock criteria for the current WDD record.

Line 3090: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3086: x_return_type_id => l_crossdock_criteria_id,
3087: x_sequence_number => l_sequence_number,
3088: x_return_status => x_return_status);
3089:
3090: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3091: IF (l_debug = 1) THEN
3092: print_debug('1.3 - Success returned from cross_dock_search API');
3093: END IF;
3094: ELSE

Line 3099: --RAISE fnd_api.g_exc_error;

3095: IF (l_debug = 1) THEN
3096: print_debug('1.3 - Failure returned from cross_dock_search API');
3097: END IF;
3098: GOTO next_record;
3099: --RAISE fnd_api.g_exc_error;
3100: END IF;
3101: END IF;
3102:
3103: -- Query for and cache the crossdock criteria retrieved from the rules engine

Line 3111: --RAISE fnd_api.g_exc_unexpected_error;

3107: print_debug('1.3 - Error caching the crossdock criteria record: ' ||
3108: l_crossdock_criteria_id);
3109: END IF;
3110: GOTO next_record;
3111: --RAISE fnd_api.g_exc_unexpected_error;
3112: END IF;
3113: END IF;
3114:
3115: END IF; -- END IF matching 'IF (l_wpb_xdock_criteria_id IS NOT NULL) THEN'

Line 3149: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3145: x_dock_mean_time => l_dock_mean_time,
3146: x_dock_end_time => l_dock_end_time,
3147: x_expected_time => l_demand_expected_time);
3148:
3149: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3150: IF (l_debug = 1) THEN
3151: print_debug('1.4 - Success returned from Get_Expected_Time API');
3152: END IF;
3153: ELSE

Line 3158: --RAISE fnd_api.g_exc_error;

3154: IF (l_debug = 1) THEN
3155: print_debug('1.4 - Failure returned from Get_Expected_Time API');
3156: END IF;
3157: GOTO next_record;
3158: --RAISE fnd_api.g_exc_error;
3159: END IF;
3160: -- Use this value to determine if a dock appointment for the demand line exists.
3161: -- There is a parameter on the crossdock criteria to decide if we should schedule
3162: -- demand anytime on the shipment date if no dock appointment exists.

Line 3319: --RAISE fnd_api.g_exc_unexpected_error;

3315: IF (l_debug = 1) THEN
3316: print_debug('2.1 - Exception retrieving the existing reservations');
3317: END IF;
3318: GOTO after_existing_rsvs;
3319: --RAISE fnd_api.g_exc_unexpected_error;
3320: END;
3321: l_progress := '170';
3322:
3323: -- Loop through the existing reservations and try to crossdock them

Line 3456: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3452: x_dock_mean_time => l_dock_mean_time,
3453: x_dock_end_time => l_dock_end_time,
3454: x_expected_time => l_supply_expected_time);
3455:
3456: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3457: IF (l_debug = 1) THEN
3458: print_debug('2.2 - Success returned from Get_Expected_Time API');
3459: END IF;
3460: ELSE

Line 3465: --RAISE fnd_api.g_exc_error;

3461: IF (l_debug = 1) THEN
3462: print_debug('2.2 - Failure returned from Get_Expected_Time API');
3463: END IF;
3464: GOTO next_reservation;
3465: --RAISE fnd_api.g_exc_error;
3466: END IF;
3467: -- Use this value to determine if a dock appointment for the supply line exists.
3468: -- There is a parameter on the crossdock criteria to decide if we should schedule
3469: -- supply anytime on the expected receipt date if no dock appointment exists.

Line 3941: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3937: x_msg_data => x_msg_data,
3938: x_error_code => l_error_code
3939: );
3940:
3941: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3942: IF (l_debug = 1) THEN
3943: print_debug('2.4 - Error returned from Crossdock_WDD API: '
3944: || x_return_status);
3945: END IF;

Line 3946: --RAISE fnd_api.g_exc_error;

3942: IF (l_debug = 1) THEN
3943: print_debug('2.4 - Error returned from Crossdock_WDD API: '
3944: || x_return_status);
3945: END IF;
3946: --RAISE fnd_api.g_exc_error;
3947: -- If an exception occurs while modifying a database record, rollback the changes
3948: -- and just go to the next WDD record or reservation to crossdock.
3949: ROLLBACK TO Existing_Reservation_sp;
3950: -- We need to also rollback changes done to local PLSQL data structures

Line 4023: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4019: x_msg_data => x_msg_data,
4020: x_error_code => l_error_code
4021: );
4022:
4023: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4024: IF (l_debug = 1) THEN
4025: print_debug('2.4 - Error returned from Crossdock_RSV API: '
4026: || x_return_status);
4027: END IF;

Line 4028: --RAISE fnd_api.g_exc_error;

4024: IF (l_debug = 1) THEN
4025: print_debug('2.4 - Error returned from Crossdock_RSV API: '
4026: || x_return_status);
4027: END IF;
4028: --RAISE fnd_api.g_exc_error;
4029: -- If an exception occurs while modifying a database record, rollback the changes
4030: -- and just go to the next WDD record or reservation to crossdock.
4031: ROLLBACK TO Existing_Reservation_sp;
4032: -- We need to also rollback changes done to local PLSQL data structures

Line 4108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4104: x_msg_data => x_msg_data,
4105: x_error_code => l_error_code
4106: );
4107:
4108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4109: IF (l_debug = 1) THEN
4110: print_debug('2.4 - Error returned from Crossdock_MOL API: '
4111: || x_return_status);
4112: END IF;

Line 4113: --RAISE fnd_api.g_exc_error;

4109: IF (l_debug = 1) THEN
4110: print_debug('2.4 - Error returned from Crossdock_MOL API: '
4111: || x_return_status);
4112: END IF;
4113: --RAISE fnd_api.g_exc_error;
4114: -- If an exception occurs while modifying a database record, rollback the changes
4115: -- and just go to the next WDD record or reservation to crossdock.
4116: ROLLBACK TO Existing_Reservation_sp;
4117: -- We need to also rollback changes done to local PLSQL data structures

Line 4224: p_init_msg_lst => fnd_api.g_false,

4220: print_debug('2.6 - Calculate the ATR qty on the demand line for crossdocking');
4221: END IF;
4222: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
4223: (p_api_version_number => 1.0,
4224: p_init_msg_lst => fnd_api.g_false,
4225: x_return_status => x_return_status,
4226: x_msg_count => x_msg_count,
4227: x_msg_data => x_msg_data,
4228: p_primary_uom_code => l_primary_uom_code,

Line 4238: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4234: p_task_id => l_demand_task_id,
4235: x_qty_available_to_reserve => l_demand_atr_prim_qty,
4236: x_qty_available => l_demand_available_qty);
4237:
4238: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4239: IF (l_debug = 1) THEN
4240: print_debug('2.6 - Error returned from available_demand_to_reserve API: '
4241: || x_return_status);
4242: END IF;

Line 4244: --RAISE fnd_api.g_exc_error;

4240: print_debug('2.6 - Error returned from available_demand_to_reserve API: '
4241: || x_return_status);
4242: END IF;
4243: GOTO next_record;
4244: --RAISE fnd_api.g_exc_error;
4245: END IF;
4246: IF (l_debug = 1) THEN
4247: print_debug('2.6 - Available qty to reserve (primary) for demand: ' ||
4248: l_demand_atr_prim_qty || ' ' || l_primary_uom_code);

Line 4312: --RAISE fnd_api.g_exc_unexpected_error;

4308: IF (l_debug = 1) THEN
4309: print_debug('3.1 - Exception retrieving the eligible supply source types');
4310: END IF;
4311: GOTO next_record;
4312: --RAISE fnd_api.g_exc_unexpected_error;
4313: END;
4314: IF (l_debug = 1) THEN
4315: print_debug('3.1 - Successfully retrieved the eligible supply source types for criteria: '
4316: || l_crossdock_criteria_id);

Line 4558: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

4554: x_dock_mean_time => l_dock_mean_time_tb(j),
4555: x_dock_end_time => l_dock_end_time_tb(j),
4556: x_expected_time => l_expected_time_tb(j));
4557:
4558: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
4559: IF (l_debug = 1) THEN
4560: print_debug('3.3 - Success returned from Get_Expected_Time API');
4561: END IF;
4562: ELSE

Line 4569: --RAISE fnd_api.g_exc_error;

4565: END IF;
4566: -- Rollback any db changes that might have occurred (currently none).
4567: ROLLBACK TO Supply_Lines_sp;
4568: GOTO next_record;
4569: --RAISE fnd_api.g_exc_error;
4570: END IF;
4571: ELSE
4572: -- In Receiving supply types have an expected time of SYSDATE
4573: -- since it has already been received. Just set the dock expected times

Line 4643: --RAISE fnd_api.g_exc_error;

4639: WHEN OTHERS THEN
4640: IF (l_debug = 1) THEN
4641: print_debug('3.4 - Error inserting available supply lines into temp table');
4642: END IF;
4643: --RAISE fnd_api.g_exc_error;
4644: -- If an exception occurs while inserting supply line records, just
4645: -- rollback the changes and go to the next WDD record to crossdock.
4646: ROLLBACK TO Supply_Lines_sp;
4647: GOTO next_record;

Line 4812: p_init_msg_lst => fnd_api.g_false,

4808: print_debug('3.6 - Call the Available_supply_to_reserve API');
4809: END IF;
4810: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
4811: (p_api_version_number => 1.0,
4812: p_init_msg_lst => fnd_api.g_false,
4813: x_return_status => x_return_status,
4814: x_msg_count => x_msg_count,
4815: x_msg_data => x_msg_data,
4816: p_organization_id => l_organization_id,

Line 4827: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4823: p_task_id => l_shopping_basket_tb(i).task_id,
4824: x_qty_available_to_reserve => l_supply_atr_prim_qty,
4825: x_qty_available => l_supply_available_qty);
4826:
4827: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4828: IF (l_debug = 1) THEN
4829: print_debug('3.6 - Error returned from available_supply_to_reserve API: '
4830: || x_return_status);
4831: END IF;

Line 4838: --RAISE fnd_api.g_exc_error;

4834: -- table can therefore be a sparsely populated table after running custom logic.
4835: l_shopping_basket_tb.DELETE(i);
4836: GOTO next_custom_supply;
4837: --GOTO next_record;
4838: --RAISE fnd_api.g_exc_error;
4839: END IF;
4840:
4841: -- If the supply is 'In Receiving', the ATR qty returned is for all of receiving.
4842: -- Since we're working on a specific MOL supply line, we need to use a LEAST

Line 4910: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

4906: x_msg_data => x_msg_data,
4907: x_api_is_implemented => l_api_is_implemented,
4908: x_sorted_order_tb => l_sorted_order_tb);
4909:
4910: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
4911: IF (l_debug = 1) THEN
4912: print_debug('3.6 - Success returned from Sort_Supply_Lines API');
4913: END IF;
4914: ELSE

Line 4920: --RAISE fnd_api.g_exc_error;

4916: print_debug('3.6 - Failure returned from Sort_Supply_Lines API');
4917: END IF;
4918: -- In case of exception, do not error out. Just use whatever order the
4919: -- supply lines are in when the shopping basket table was created.
4920: --RAISE fnd_api.g_exc_error;
4921: l_sorted_order_tb.DELETE;
4922: END IF;
4923: l_progress := '450';
4924:

Line 5314: p_init_msg_lst => fnd_api.g_false,

5310: print_debug('4.2 - Call the Available_supply_to_reserve API');
5311: END IF;
5312: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
5313: (p_api_version_number => 1.0,
5314: p_init_msg_lst => fnd_api.g_false,
5315: x_return_status => x_return_status,
5316: x_msg_count => x_msg_count,
5317: x_msg_data => x_msg_data,
5318: p_organization_id => l_organization_id,

Line 5329: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5325: p_task_id => l_supply_task_id,
5326: x_qty_available_to_reserve => l_supply_atr_prim_qty,
5327: x_qty_available => l_supply_available_qty);
5328:
5329: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5330: IF (l_debug = 1) THEN
5331: print_debug('4.2 - Error returned from available_supply_to_reserve API: '
5332: || x_return_status);
5333: END IF;

Line 5337: --RAISE fnd_api.g_exc_error;

5333: END IF;
5334: -- Rollback any db changes that might have occurred (currently none).
5335: ROLLBACK TO Crossdock_Supply_sp;
5336: GOTO next_supply;
5337: --RAISE fnd_api.g_exc_error;
5338: END IF;
5339:
5340: -- If the supply is 'In Receiving', the ATR qty returned is for all of receiving.
5341: -- Since we're working on a specific MOL supply line, we need to use a LEAST

Line 5584: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5580: x_msg_data => x_msg_data,
5581: x_error_code => l_error_code
5582: );
5583:
5584: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5585: IF (l_debug = 1) THEN
5586: print_debug('4.3 - Error returned from Crossdock_WDD API: '
5587: || x_return_status);
5588: END IF;

Line 5589: --RAISE fnd_api.g_exc_error;

5585: IF (l_debug = 1) THEN
5586: print_debug('4.3 - Error returned from Crossdock_WDD API: '
5587: || x_return_status);
5588: END IF;
5589: --RAISE fnd_api.g_exc_error;
5590: -- If an exception occurs while modifying a database record, rollback the changes
5591: -- and just go to the next WDD record or supply to crossdock.
5592: ROLLBACK TO Crossdock_Supply_sp;
5593: -- We need to also rollback changes done to local PLSQL data structures

Line 5669: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5665: x_msg_data => x_msg_data,
5666: x_error_code => l_error_code
5667: );
5668:
5669: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5670: IF (l_debug = 1) THEN
5671: print_debug('4.3 - Error returned from Crossdock_MOL API: '
5672: || x_return_status);
5673: END IF;

Line 5674: --RAISE fnd_api.g_exc_error;

5670: IF (l_debug = 1) THEN
5671: print_debug('4.3 - Error returned from Crossdock_MOL API: '
5672: || x_return_status);
5673: END IF;
5674: --RAISE fnd_api.g_exc_error;
5675: -- If an exception occurs while modifying a database record, rollback the changes
5676: -- and just go to the next WDD record or supply to crossdock.
5677: ROLLBACK TO Crossdock_Supply_sp;
5678: -- We need to also rollback changes done to local PLSQL data structures

Line 5788: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5784: x_msg_count => x_msg_count,
5785: x_msg_data => x_msg_data
5786: );
5787:
5788: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5789: IF (l_debug = 1) THEN
5790: print_debug('4.4 - Error returned from create_reservation API: '
5791: || x_return_status);
5792: END IF;

Line 5793: --RAISE fnd_api.g_exc_error;

5789: IF (l_debug = 1) THEN
5790: print_debug('4.4 - Error returned from create_reservation API: '
5791: || x_return_status);
5792: END IF;
5793: --RAISE fnd_api.g_exc_error;
5794: -- If an exception occurs while modifying a database record, rollback the changes
5795: -- and just go to the next WDD record to crossdock.
5796: ROLLBACK TO Crossdock_Supply_sp;
5797: -- We need to also rollback changes done to local PLSQL data structures

Line 5864: RAISE fnd_api.g_exc_error;

5860: END IF;
5861: -- If an exception occurs while performing this bulk update, raise an exception.
5862: -- This error should not occur but if it does, we should stop the crossdock pegging
5863: -- process.
5864: RAISE fnd_api.g_exc_error;
5865: END;
5866: IF (l_debug = 1) THEN
5867: print_debug('4.5 - Successfully updated the ATR qty for ' || l_supply_rowid_tb.COUNT
5868: || ' (non RCV or Int Req) supply lines ');

Line 5909: p_init_msg_list => fnd_api.g_false,

5905: l_in_rec.action_code := 'UPDATE';
5906:
5907: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
5908: (p_api_version_number => 1.0,
5909: p_init_msg_list => fnd_api.g_false,
5910: p_commit => fnd_api.g_false,
5911: x_return_status => x_return_status,
5912: x_msg_count => x_msg_count,
5913: x_msg_data => x_msg_data,

Line 5910: p_commit => fnd_api.g_false,

5906:
5907: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
5908: (p_api_version_number => 1.0,
5909: p_init_msg_list => fnd_api.g_false,
5910: p_commit => fnd_api.g_false,
5911: x_return_status => x_return_status,
5912: x_msg_count => x_msg_count,
5913: x_msg_data => x_msg_data,
5914: p_detail_info_tab => l_detail_info_tab,

Line 5919: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5915: p_in_rec => l_in_rec,
5916: x_out_rec => l_out_rec
5917: );
5918:
5919: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5920: IF (l_debug = 1) THEN
5921: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
5922: || x_return_status);
5923: END IF;

Line 5924: RAISE FND_API.G_EXC_ERROR;

5920: IF (l_debug = 1) THEN
5921: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
5922: || x_return_status);
5923: END IF;
5924: RAISE FND_API.G_EXC_ERROR;
5925: ELSE
5926: IF (l_debug = 1) THEN
5927: print_debug('5.1 - Successfully updated the crossdocked WDD records');
5928: END IF;

Line 5957: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5953: p_commit => 'N',
5954: p_organization_id => l_organization_id,
5955: p_lpn_id => l_lpn_index);
5956:
5957: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5958: IF (l_debug = 1) THEN
5959: print_debug('5.2 - Error returned from pre_generate API: ' || l_lpn_index
5960: || ': ' || x_return_status);
5961: END IF;

Line 5962: --RAISE fnd_api.g_exc_error;

5958: IF (l_debug = 1) THEN
5959: print_debug('5.2 - Error returned from pre_generate API: ' || l_lpn_index
5960: || ': ' || x_return_status);
5961: END IF;
5962: --RAISE fnd_api.g_exc_error;
5963: -- No need to throw an exception if the pre_generate API errors out.
5964: END IF;
5965:
5966: EXIT WHEN l_lpn_index = l_crossdocked_lpns_tb.LAST;

Line 6085: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6081: (p_source_code => 'INV',
6082: p_changed_attributes => l_shipping_attr,
6083: x_return_status => x_return_status
6084: );
6085: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6086: IF (l_debug = 1) THEN
6087: print_debug('5.4 - Error returned from Update_Shipping_Attributes API: '
6088: || x_return_status);
6089: END IF;

Line 6090: RAISE FND_API.G_EXC_ERROR;

6086: IF (l_debug = 1) THEN
6087: print_debug('5.4 - Error returned from Update_Shipping_Attributes API: '
6088: || x_return_status);
6089: END IF;
6090: RAISE FND_API.G_EXC_ERROR;
6091: END IF;
6092: END IF;
6093:
6094: -- Loop through table p_del_detail_id. If that WDD is backordered (value exists in

Line 6129: IF fnd_api.To_Boolean(p_commit) THEN

6125: print_debug('5.5 - Cleared the temp table wms_xdock_pegging_gtmp');
6126: END IF;
6127:
6128: -- Standard call to commit
6129: IF fnd_api.To_Boolean(p_commit) THEN
6130: COMMIT;
6131: END IF;
6132: l_progress := '620';
6133:

Line 6145: x_return_status := fnd_api.g_ret_sts_success;

6141: -- allocation methods are taken care of when backordering unallocated WDD lines.
6142: IF (l_allocation_method = G_CROSSDOCK_ONLY AND l_unable_to_crossdock) THEN
6143: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
6144: ELSE
6145: x_return_status := fnd_api.g_ret_sts_success;
6146: END IF;
6147: l_progress := '630';
6148:
6149: IF (l_debug = 1) THEN

Line 6157: WHEN FND_API.G_EXC_ERROR THEN

6153: -- Stop the profiler
6154: -- dbms_profiler.stop_profiler;
6155:
6156: EXCEPTION
6157: WHEN FND_API.G_EXC_ERROR THEN
6158: ROLLBACK TO Planned_Cross_Dock_sp;
6159: x_return_status := fnd_api.g_ret_sts_error;
6160: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6161: p_data => x_msg_data);

Line 6159: x_return_status := fnd_api.g_ret_sts_error;

6155:
6156: EXCEPTION
6157: WHEN FND_API.G_EXC_ERROR THEN
6158: ROLLBACK TO Planned_Cross_Dock_sp;
6159: x_return_status := fnd_api.g_ret_sts_error;
6160: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6161: p_data => x_msg_data);
6162: IF (l_debug = 1) THEN
6163: print_debug('Exiting Planned_Cross_Dock - Execution error: ' ||

Line 6167: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6163: print_debug('Exiting Planned_Cross_Dock - Execution error: ' ||
6164: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
6165: END IF;
6166:
6167: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6168: ROLLBACK TO Planned_Cross_Dock_sp;
6169: x_return_status := fnd_api.g_ret_sts_unexp_error;
6170: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6171: p_data => x_msg_data);

Line 6169: x_return_status := fnd_api.g_ret_sts_unexp_error;

6165: END IF;
6166:
6167: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6168: ROLLBACK TO Planned_Cross_Dock_sp;
6169: x_return_status := fnd_api.g_ret_sts_unexp_error;
6170: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6171: p_data => x_msg_data);
6172: IF (l_debug = 1) THEN
6173: print_debug('Exiting Planned_Cross_Dock - Unexpected error: ' ||

Line 6179: x_return_status := fnd_api.g_ret_sts_unexp_error;

6175: END IF;
6176:
6177: WHEN OTHERS THEN
6178: ROLLBACK TO Planned_Cross_Dock_sp;
6179: x_return_status := fnd_api.g_ret_sts_unexp_error;
6180: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
6181: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
6182: END IF;
6183: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 6926: x_return_status := fnd_api.g_ret_sts_success;

6922: fnd_msg_pub.initialize;
6923: l_progress := '20';
6924:
6925: -- Initialize API return status to success
6926: x_return_status := fnd_api.g_ret_sts_success;
6927: l_progress := '30';
6928:
6929: -- Initialize local versions of the following input parameters
6930: l_organization_id := p_organization_id;

Line 6962: RAISE fnd_api.g_exc_unexpected_error;

6958: IF (NOT INV_CACHE.set_org_rec(l_organization_id)) THEN
6959: IF (l_debug = 1) THEN
6960: print_debug('Error caching the org record');
6961: END IF;
6962: RAISE fnd_api.g_exc_unexpected_error;
6963: END IF;
6964: -- Set the PJM enabled flag.
6965: l_project_ref_enabled := INV_CACHE.org_rec.project_reference_enabled;
6966: l_progress := '50';

Line 6974: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

6970: (x_return_status => x_return_status,
6971: x_msg_count => x_msg_count,
6972: x_msg_data => x_msg_data,
6973: p_organization_id => l_organization_id);
6974: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
6975: IF (l_debug = 1) THEN
6976: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
6977: END IF;
6978: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6978: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6974: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
6975: IF (l_debug = 1) THEN
6976: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
6977: END IF;
6978: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6979: END IF;
6980: l_progress := '60';
6981:
6982: -- Retrieve the org parameter for allowing cross project allocation for crossdocking.

Line 7014: RAISE fnd_api.g_exc_unexpected_error;

7010: IF (l_debug = 1) THEN
7011: print_debug('Error caching the crossdock criteria record: ' ||
7012: l_crossdock_criteria_id);
7013: END IF;
7014: RAISE fnd_api.g_exc_unexpected_error;
7015: END IF;
7016: -- Validate that the crossdock criterion is of type 'Opportunistic'
7017: IF (g_crossdock_criteria_tb(l_crossdock_criteria_id).criterion_type <> G_CRT_TYPE_OPP) THEN
7018: IF (l_debug = 1) THEN

Line 7022: RAISE fnd_api.g_exc_unexpected_error;

7018: IF (l_debug = 1) THEN
7019: print_debug('Invalid crossdock criterion type: ' ||
7020: g_crossdock_criteria_tb(l_crossdock_criteria_id).criterion_type);
7021: END IF;
7022: RAISE fnd_api.g_exc_unexpected_error;
7023: END IF;
7024: l_progress := '80';
7025: -- End of validations and initializations
7026:

Line 7410: --RAISE fnd_api.g_exc_unexpected_error;

7406: IF (l_debug = 1) THEN
7407: print_debug('2.1 - Exception retrieving the existing reservations');
7408: END IF;
7409: GOTO after_existing_rsvs;
7410: --RAISE fnd_api.g_exc_unexpected_error;
7411: END;
7412: l_progress := '150';
7413:
7414: -- Loop through the existing reservations and try to crossdock them

Line 7443: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

7439: (p_salesorder_id => l_demand_so_header_id,
7440: x_oe_header_id => l_demand_header_id,
7441: x_return_status => x_return_status);
7442:
7443: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7444: IF (l_debug = 1) THEN
7445: print_debug('2.1 - Error returned from get_oeheader_for_salesorder API: '
7446: || x_return_status);
7447: END IF;

Line 7596: --RAISE fnd_api.g_exc_unexpected_error;

7592: IF (l_debug = 1) THEN
7593: print_debug('2.2 - Exception retrieving the reserved WDD demand lines');
7594: END IF;
7595: GOTO next_reservation;
7596: --RAISE fnd_api.g_exc_unexpected_error;
7597: END;
7598: l_progress := '180';
7599:
7600: -- Loop through the available WDD lines and try to crossdock the valid ones

Line 7720: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

7716: x_dock_mean_time => l_dock_mean_time,
7717: x_dock_end_time => l_dock_end_time,
7718: x_expected_time => l_demand_expected_time);
7719:
7720: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
7721: IF (l_debug = 1) THEN
7722: print_debug('2.3 - Success returned from Get_Expected_Time API');
7723: END IF;
7724: ELSE

Line 7729: --RAISE fnd_api.g_exc_error;

7725: IF (l_debug = 1) THEN
7726: print_debug('2.3 - Failure returned from Get_Expected_Time API');
7727: END IF;
7728: GOTO next_reserved_wdd;
7729: --RAISE fnd_api.g_exc_error;
7730: END IF;
7731:
7732: -- Do not crossdock the demand line on the reservation if an expected ship
7733: -- time cannot be determined.

Line 7938: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

7934: x_msg_data => x_msg_data,
7935: x_error_code => l_error_code
7936: );
7937:
7938: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7939: IF (l_debug = 1) THEN
7940: print_debug('2.4 - Error returned from Crossdock_WDD API: '
7941: || x_return_status);
7942: END IF;

Line 7943: --RAISE fnd_api.g_exc_error;

7939: IF (l_debug = 1) THEN
7940: print_debug('2.4 - Error returned from Crossdock_WDD API: '
7941: || x_return_status);
7942: END IF;
7943: --RAISE fnd_api.g_exc_error;
7944: -- If an exception occurs while modifying a database record, rollback the changes
7945: -- and just go to the next WDD record or reservation to crossdock.
7946: ROLLBACK TO Reserved_WDD_sp;
7947: -- We need to also rollback changes done to local PLSQL data structures

Line 8001: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

7997: x_msg_data => x_msg_data,
7998: x_error_code => l_error_code
7999: );
8000:
8001: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8002: IF (l_debug = 1) THEN
8003: print_debug('2.4 - Error returned from Crossdock_RSV API: '
8004: || x_return_status);
8005: END IF;

Line 8006: --RAISE fnd_api.g_exc_error;

8002: IF (l_debug = 1) THEN
8003: print_debug('2.4 - Error returned from Crossdock_RSV API: '
8004: || x_return_status);
8005: END IF;
8006: --RAISE fnd_api.g_exc_error;
8007: -- If an exception occurs while modifying a database record, rollback the changes
8008: -- and just go to the next WDD record or reservation to crossdock.
8009: ROLLBACK TO Reserved_WDD_sp;
8010: -- We need to also rollback changes done to local PLSQL data structures

Line 8065: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

8061: x_error_code => l_error_code,
8062: l_criterion_type => G_CRT_TYPE_OPP
8063: );
8064:
8065: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8066: IF (l_debug = 1) THEN
8067: print_debug('2.4 - Error returned from Crossdock_MOL API: '
8068: || x_return_status);
8069: END IF;

Line 8070: --RAISE fnd_api.g_exc_error;

8066: IF (l_debug = 1) THEN
8067: print_debug('2.4 - Error returned from Crossdock_MOL API: '
8068: || x_return_status);
8069: END IF;
8070: --RAISE fnd_api.g_exc_error;
8071: -- If an exception occurs while modifying a database record, rollback the changes
8072: -- and just go to the next WDD record or reservation to crossdock.
8073: ROLLBACK TO Reserved_WDD_sp;
8074: -- We need to also rollback changes done to local PLSQL data structures

Line 8136: p_init_msg_lst => fnd_api.g_false,

8132: IF (l_supply_type_id = 27) THEN
8133: -- RCV MOL
8134: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
8135: (p_api_version_number => 1.0,
8136: p_init_msg_lst => fnd_api.g_false,
8137: x_return_status => x_return_status,
8138: x_msg_count => x_msg_count,
8139: x_msg_data => x_msg_data,
8140: p_organization_id => l_organization_id,

Line 8154: p_init_msg_lst => fnd_api.g_false,

8150: ELSIF (l_wip_entity_type = 1) THEN
8151: -- WIP Discrete Job MOL
8152: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
8153: (p_api_version_number => 1.0,
8154: p_init_msg_lst => fnd_api.g_false,
8155: x_return_status => x_return_status,
8156: x_msg_count => x_msg_count,
8157: x_msg_data => x_msg_data,
8158: p_organization_id => l_organization_id,

Line 8175: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

8171: -- you cannot create reservations against WIP Flow jobs as supply in R12.
8172: l_supply_atr_prim_qty := l_mol_prim_qty;
8173: END IF;
8174:
8175: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8176: IF (l_debug = 1) THEN
8177: print_debug('2.5 - Error returned from available_supply_to_reserve API: '
8178: || x_return_status);
8179: END IF;

Line 8181: --RAISE fnd_api.g_exc_error;

8177: print_debug('2.5 - Error returned from available_supply_to_reserve API: '
8178: || x_return_status);
8179: END IF;
8180: GOTO end_crossdock;
8181: --RAISE fnd_api.g_exc_error;
8182: END IF;
8183:
8184: -- The ATR qty returned is for all of receiving. Since we are working on a specific
8185: -- MOL supply line, we need to use a LEAST to get the min qty value.

Line 8466: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

8462: x_dock_mean_time => l_dock_mean_time_tb(j),
8463: x_dock_end_time => l_dock_end_time_tb(j),
8464: x_expected_time => l_expected_time_tb(j));
8465:
8466: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8467: IF (l_debug = 1) THEN
8468: print_debug('3.2 - Success returned from Get_Expected_Time API');
8469: END IF;
8470: ELSE

Line 8796: p_init_msg_lst => fnd_api.g_false,

8792: print_debug('3.5 - Call the Available_demand_to_reserve API');
8793: END IF;
8794: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
8795: (p_api_version_number => 1.0,
8796: p_init_msg_lst => fnd_api.g_false,
8797: x_return_status => x_return_status,
8798: x_msg_count => x_msg_count,
8799: x_msg_data => x_msg_data,
8800: p_primary_uom_code => l_primary_uom_code,

Line 8810: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

8806: p_task_id => l_shopping_basket_tb(i).task_id,
8807: x_qty_available_to_reserve => l_demand_atr_prim_qty,
8808: x_qty_available => l_demand_available_qty);
8809:
8810: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8811: IF (l_debug = 1) THEN
8812: print_debug('3.5 - Error returned from available_demand_to_reserve API: '
8813: || x_return_status);
8814: END IF;

Line 8877: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

8873: x_msg_data => x_msg_data,
8874: x_api_is_implemented => l_api_is_implemented,
8875: x_sorted_order_tb => l_sorted_order_tb);
8876:
8877: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8878: IF (l_debug = 1) THEN
8879: print_debug('3.5 - Success returned from Sort_Demand_Lines API');
8880: END IF;
8881: ELSE

Line 9121: p_init_msg_lst => fnd_api.g_false,

9117: print_debug('4.2 - Call the Available_demand_to_reserve API');
9118: END IF;
9119: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
9120: (p_api_version_number => 1.0,
9121: p_init_msg_lst => fnd_api.g_false,
9122: x_return_status => x_return_status,
9123: x_msg_count => x_msg_count,
9124: x_msg_data => x_msg_data,
9125: p_primary_uom_code => l_primary_uom_code,

Line 9135: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9131: p_task_id => l_demand_task_id,
9132: x_qty_available_to_reserve => l_demand_atr_prim_qty,
9133: x_qty_available => l_demand_available_qty);
9134:
9135: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9136: IF (l_debug = 1) THEN
9137: print_debug('4.2 - Error returned from available_demand_to_reserve API: '
9138: || x_return_status);
9139: END IF;

Line 9322: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9318: x_msg_data => x_msg_data,
9319: x_error_code => l_error_code
9320: );
9321:
9322: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9323: IF (l_debug = 1) THEN
9324: print_debug('4.3 - Error returned from Crossdock_WDD API: '
9325: || x_return_status);
9326: END IF;

Line 9327: --RAISE fnd_api.g_exc_error;

9323: IF (l_debug = 1) THEN
9324: print_debug('4.3 - Error returned from Crossdock_WDD API: '
9325: || x_return_status);
9326: END IF;
9327: --RAISE fnd_api.g_exc_error;
9328: -- If an exception occurs while modifying a database record, rollback the changes
9329: -- and just go to the next available demand to crossdock
9330: ROLLBACK TO Crossdock_Demand_sp;
9331: -- We need to also rollback changes done to local PLSQL data structures

Line 9362: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR l_wip_qty_allocated = 0) THEN

9358: x_return_status => x_return_status,
9359: x_msg_data => x_msg_data
9360: );
9361:
9362: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR l_wip_qty_allocated = 0) THEN
9363: IF (l_debug = 1) THEN
9364: print_debug('4.3 - Error returned from wip_picking_pub.allocate_material API: '
9365: || x_return_status);
9366: END IF;

Line 9367: --RAISE fnd_api.g_exc_error;

9363: IF (l_debug = 1) THEN
9364: print_debug('4.3 - Error returned from wip_picking_pub.allocate_material API: '
9365: || x_return_status);
9366: END IF;
9367: --RAISE fnd_api.g_exc_error;
9368: -- If an exception occurs while modifying a database record, rollback the changes
9369: -- and just go to the next available demand to crossdock
9370: ROLLBACK TO Crossdock_Demand_sp;
9371: GOTO next_demand;

Line 9422: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9418: x_error_code => l_error_code,
9419: l_criterion_type => G_CRT_TYPE_OPP
9420: );
9421:
9422: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9423: IF (l_debug = 1) THEN
9424: print_debug('4.3 - Error returned from Crossdock_MOL API: '
9425: || x_return_status);
9426: END IF;

Line 9427: --RAISE fnd_api.g_exc_error;

9423: IF (l_debug = 1) THEN
9424: print_debug('4.3 - Error returned from Crossdock_MOL API: '
9425: || x_return_status);
9426: END IF;
9427: --RAISE fnd_api.g_exc_error;
9428: -- If an exception occurs while modifying a database record, rollback the changes
9429: -- and just go to the next WDD record or supply to crossdock.
9430: ROLLBACK TO Crossdock_Demand_sp;
9431: -- We need to also rollback changes done to local PLSQL data structures

Line 9495: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9491: x_msg_count => x_msg_count,
9492: x_msg_data => x_msg_data
9493: );
9494:
9495: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9496: IF (l_debug = 1) THEN
9497: print_debug('4.4 - Error returned from create_reservation API: '
9498: || x_return_status);
9499: END IF;

Line 9500: --RAISE fnd_api.g_exc_error;

9496: IF (l_debug = 1) THEN
9497: print_debug('4.4 - Error returned from create_reservation API: '
9498: || x_return_status);
9499: END IF;
9500: --RAISE fnd_api.g_exc_error;
9501: -- If an exception occurs while modifying a database record, rollback the changes
9502: -- and just go to the next WDD record to crossdock.
9503: ROLLBACK TO Crossdock_Demand_sp;
9504: -- We need to also rollback changes done to local PLSQL data structures

Line 9580: p_init_msg_list => fnd_api.g_false,

9576: l_in_rec.action_code := 'UPDATE';
9577:
9578: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
9579: (p_api_version_number => 1.0,
9580: p_init_msg_list => fnd_api.g_false,
9581: p_commit => fnd_api.g_false,
9582: x_return_status => x_return_status,
9583: x_msg_count => x_msg_count,
9584: x_msg_data => x_msg_data,

Line 9581: p_commit => fnd_api.g_false,

9577:
9578: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
9579: (p_api_version_number => 1.0,
9580: p_init_msg_list => fnd_api.g_false,
9581: p_commit => fnd_api.g_false,
9582: x_return_status => x_return_status,
9583: x_msg_count => x_msg_count,
9584: x_msg_data => x_msg_data,
9585: p_detail_info_tab => l_detail_info_tab,

Line 9590: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9586: p_in_rec => l_in_rec,
9587: x_out_rec => l_out_rec
9588: );
9589:
9590: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9591: IF (l_debug = 1) THEN
9592: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
9593: || x_return_status);
9594: END IF;

Line 9595: RAISE FND_API.G_EXC_ERROR;

9591: IF (l_debug = 1) THEN
9592: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
9593: || x_return_status);
9594: END IF;
9595: RAISE FND_API.G_EXC_ERROR;
9596: ELSE
9597: IF (l_debug = 1) THEN
9598: print_debug('5.1 - Successfully updated the crossdocked WDD records');
9599: END IF;

Line 9615: x_return_status := fnd_api.g_ret_sts_success;

9611: -- This variable is reused each time we call another API but we try to continue with the
9612: -- flow and raise an exception only when absolutely necessary. Since this is a planning
9613: -- and pegging API, if exceptions occur, we should just not peg anything instead of throwing
9614: -- errors.
9615: x_return_status := fnd_api.g_ret_sts_success;
9616: l_progress := '560';
9617:
9618: IF (l_debug = 1) THEN
9619: print_debug('***End of Opportunistic_Cross_Dock***');

Line 9626: WHEN FND_API.G_EXC_ERROR THEN

9622: -- Stop the profiler
9623: -- dbms_profiler.stop_profiler;
9624:
9625: EXCEPTION
9626: WHEN FND_API.G_EXC_ERROR THEN
9627: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9628: x_return_status := fnd_api.g_ret_sts_error;
9629: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9630: p_data => x_msg_data);

Line 9628: x_return_status := fnd_api.g_ret_sts_error;

9624:
9625: EXCEPTION
9626: WHEN FND_API.G_EXC_ERROR THEN
9627: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9628: x_return_status := fnd_api.g_ret_sts_error;
9629: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9630: p_data => x_msg_data);
9631: IF (l_debug = 1) THEN
9632: print_debug('Exiting Opportunistic_Cross_Dock - Execution error: ' ||

Line 9636: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

9632: print_debug('Exiting Opportunistic_Cross_Dock - Execution error: ' ||
9633: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
9634: END IF;
9635:
9636: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9637: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9638: x_return_status := fnd_api.g_ret_sts_unexp_error;
9639: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9640: p_data => x_msg_data);

Line 9638: x_return_status := fnd_api.g_ret_sts_unexp_error;

9634: END IF;
9635:
9636: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9637: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9638: x_return_status := fnd_api.g_ret_sts_unexp_error;
9639: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9640: p_data => x_msg_data);
9641: IF (l_debug = 1) THEN
9642: print_debug('Exiting Opportunistic_Cross_Dock - Unexpected error: ' ||

Line 9648: x_return_status := fnd_api.g_ret_sts_unexp_error;

9644: END IF;
9645:
9646: WHEN OTHERS THEN
9647: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9648: x_return_status := fnd_api.g_ret_sts_unexp_error;
9649: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
9650: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
9651: END IF;
9652: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 9981: x_return_status := fnd_api.g_ret_sts_success;

9977: fnd_msg_pub.initialize;
9978: l_progress := '20';
9979:
9980: -- Initialize API return status to success
9981: x_return_status := fnd_api.g_ret_sts_success;
9982: l_progress := '30';
9983:
9984: -- Validate p_supply_or_demand
9985: -- {{

Line 9991: RAISE fnd_api.g_exc_unexpected_error;

9987: IF (p_supply_or_demand NOT IN (G_SRC_TYPE_SUP, G_SRC_TYPE_DEM)) THEN
9988: IF (l_debug = 1) THEN
9989: print_debug('Invalid value for p_supply_or_demand: ' || p_supply_or_demand);
9990: END IF;
9991: RAISE fnd_api.g_exc_unexpected_error;
9992: END IF;
9993: l_progress := '40';
9994:
9995: -- Validate that source type matches supply or demand

Line 10004: RAISE fnd_api.g_exc_unexpected_error;

10000: IF (p_source_type_id NOT IN (1, 7, 25, 26)) THEN
10001: IF (l_debug = 1) THEN
10002: print_debug('Invalid supply source type: ' || p_source_type_id);
10003: END IF;
10004: RAISE fnd_api.g_exc_unexpected_error;
10005: END IF;
10006: ELSIF (p_supply_or_demand = G_SRC_TYPE_DEM) THEN
10007: -- Check that source type is a valid demand source
10008: -- {{

Line 10014: RAISE fnd_api.g_exc_unexpected_error;

10010: IF (p_source_type_id NOT IN (2, 8)) THEN
10011: IF (l_debug = 1) THEN
10012: print_debug('Invalid demand source type: ' || p_source_type_id);
10013: END IF;
10014: RAISE fnd_api.g_exc_unexpected_error;
10015: END IF;
10016: END IF;
10017: l_progress := '50';
10018:

Line 10024: RAISE fnd_api.g_exc_unexpected_error;

10020: IF (p_crossdock_criterion_id IS NOT NULL) THEN
10021: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN
10022: IF (l_debug = 1) THEN
10023: print_debug('Unable to set the crossdock criterion: ' || p_crossdock_criterion_id);
10024: RAISE fnd_api.g_exc_unexpected_error;
10025: END IF;
10026: END IF;
10027:
10028: -- Get the dock schedule method from the crossdock criterion

Line 10065: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10061: x_dock_mean_time => x_dock_mean_time,
10062: x_dock_end_time => x_dock_end_time,
10063: x_expected_time => x_expected_time);
10064:
10065: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10066: IF (l_debug = 1) THEN
10067: print_debug('Success returned from Custom Get_Expected_Time API');
10068: END IF;
10069: ELSE

Line 10073: RAISE fnd_api.g_exc_error;

10069: ELSE
10070: IF (l_debug = 1) THEN
10071: print_debug('Failure returned from Custom Get_Expected_Time API');
10072: END IF;
10073: RAISE fnd_api.g_exc_error;
10074: END IF;
10075:
10076: -- If the custom API is implemented, just use the values retrieved from there.
10077: -- Skip all further processing and logic in this API.

Line 10102: RAISE fnd_api.g_exc_unexpected_error;

10098: IF (l_debug = 1) THEN
10099: print_debug('WDD cursor did not return any records!');
10100: END IF;
10101: CLOSE wdd_rec_cursor;
10102: RAISE fnd_api.g_exc_unexpected_error;
10103: END IF;
10104: CLOSE wdd_rec_cursor;
10105: ELSIF (p_source_type_id = 1) THEN
10106: -- Purchase Order

Line 10116: RAISE fnd_api.g_exc_unexpected_error;

10112: IF (l_debug = 1) THEN
10113: print_debug('PO cursor did not return any records!');
10114: END IF;
10115: CLOSE po_rec_cursor;
10116: RAISE fnd_api.g_exc_unexpected_error;
10117: END IF;
10118: CLOSE po_rec_cursor;
10119: ELSIF (p_source_type_id = 25) THEN
10120: -- ASN

Line 10130: RAISE fnd_api.g_exc_unexpected_error;

10126: IF (l_debug = 1) THEN
10127: print_debug('ASN cursor did not return any records!');
10128: END IF;
10129: CLOSE asn_rec_cursor;
10130: RAISE fnd_api.g_exc_unexpected_error;
10131: END IF;
10132: CLOSE asn_rec_cursor;
10133: ELSIF (p_source_type_id = 7) THEN
10134: -- Internal Requisition

Line 10144: RAISE fnd_api.g_exc_unexpected_error;

10140: IF (l_debug = 1) THEN
10141: print_debug('INTREQ cursor did not return any records!');
10142: END IF;
10143: CLOSE intreq_rec_cursor;
10144: RAISE fnd_api.g_exc_unexpected_error;
10145: END IF;
10146: CLOSE intreq_rec_cursor;
10147: ELSIF (p_source_type_id = 26) THEN
10148: -- In Transit Shipment

Line 10158: RAISE fnd_api.g_exc_unexpected_error;

10154: IF (l_debug = 1) THEN
10155: print_debug('INTSHIP cursor did not return any records!');
10156: END IF;
10157: CLOSE intship_rec_cursor;
10158: RAISE fnd_api.g_exc_unexpected_error;
10159: END IF;
10160: CLOSE intship_rec_cursor;
10161: END IF;
10162: l_progress := '70';

Line 10194: p_init_msg_list => fnd_api.g_false,

10190: l_progress := '90';
10191:
10192: wms_dock_appointments_pub.get_dock_appointment_range
10193: (p_api_version => 1.0,
10194: p_init_msg_list => fnd_api.g_false,
10195: x_return_status => x_return_status,
10196: x_msg_count => x_msg_count,
10197: x_msg_data => x_msg_data,
10198: x_dock_appt_list => l_dock_appt_list,

Line 10220: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10216: END IF;
10217: l_progress := '100';
10218:
10219: -- Check to see if the get_dock_appointment_range API returned successfully
10220: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10221: IF (l_debug = 1) THEN
10222: print_debug('Success returned from get_dock_appointment_range API');
10223: END IF;
10224: ELSE

Line 10228: x_return_status := fnd_api.g_ret_sts_success;

10224: ELSE
10225: IF (l_debug = 1) THEN
10226: print_debug('Failure returned from get_dock_appointment_range API');
10227: END IF;
10228: x_return_status := fnd_api.g_ret_sts_success;
10229: -- do not thrown an error but just go to the next way to calculate time
10230: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10231: --FND_MSG_PUB.ADD;
10232: --RAISE fnd_api.g_exc_error;

Line 10232: --RAISE fnd_api.g_exc_error;

10228: x_return_status := fnd_api.g_ret_sts_success;
10229: -- do not thrown an error but just go to the next way to calculate time
10230: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10231: --FND_MSG_PUB.ADD;
10232: --RAISE fnd_api.g_exc_error;
10233: END IF;
10234: l_progress := '110';
10235: END IF;
10236:

Line 10254: p_init_msg_list => fnd_api.g_false,

10250: l_progress := '120';
10251:
10252: wms_dock_appointments_pub.get_dock_appointment_range
10253: (p_api_version => 1.0,
10254: p_init_msg_list => fnd_api.g_false,
10255: x_return_status => x_return_status,
10256: x_msg_count => x_msg_count,
10257: x_msg_data => x_msg_data,
10258: x_dock_appt_list => l_dock_appt_list,

Line 10281: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10277: END IF;
10278: l_progress := '130';
10279:
10280: -- Check to see if the get_dock_appointment_range API returned successfully
10281: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10282: IF (l_debug = 1) THEN
10283: print_debug('Success returned from get_dock_appointment_range API');
10284: END IF;
10285: ELSE

Line 10289: x_return_status := fnd_api.g_ret_sts_success;

10285: ELSE
10286: IF (l_debug = 1) THEN
10287: print_debug('Failure returned from get_dock_appointment_range API');
10288: END IF;
10289: x_return_status := fnd_api.g_ret_sts_success;
10290: -- do not thrown an error but just go to the next way to calculate time
10291: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10292: --FND_MSG_PUB.ADD;
10293: --RAISE fnd_api.g_exc_error;

Line 10293: --RAISE fnd_api.g_exc_error;

10289: x_return_status := fnd_api.g_ret_sts_success;
10290: -- do not thrown an error but just go to the next way to calculate time
10291: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10292: --FND_MSG_PUB.ADD;
10293: --RAISE fnd_api.g_exc_error;
10294: END IF;
10295: l_progress := '140';
10296: END IF;
10297:

Line 10416: WHEN FND_API.G_EXC_ERROR THEN

10412: print_debug('***End of Get_Expected_Time***');
10413: END IF;
10414:
10415: EXCEPTION
10416: WHEN FND_API.G_EXC_ERROR THEN
10417: ROLLBACK TO Get_Expected_Time_sp;
10418: x_return_status := fnd_api.g_ret_sts_error;
10419: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10420: p_data => x_msg_data);

Line 10418: x_return_status := fnd_api.g_ret_sts_error;

10414:
10415: EXCEPTION
10416: WHEN FND_API.G_EXC_ERROR THEN
10417: ROLLBACK TO Get_Expected_Time_sp;
10418: x_return_status := fnd_api.g_ret_sts_error;
10419: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10420: p_data => x_msg_data);
10421: IF (l_debug = 1) THEN
10422: print_debug('Exiting Get_Expected_Time - Execution error: ' ||

Line 10426: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

10422: print_debug('Exiting Get_Expected_Time - Execution error: ' ||
10423: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
10424: END IF;
10425:
10426: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10427: ROLLBACK TO Get_Expected_Time_sp;
10428: x_return_status := fnd_api.g_ret_sts_unexp_error;
10429: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10430: p_data => x_msg_data);

Line 10428: x_return_status := fnd_api.g_ret_sts_unexp_error;

10424: END IF;
10425:
10426: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10427: ROLLBACK TO Get_Expected_Time_sp;
10428: x_return_status := fnd_api.g_ret_sts_unexp_error;
10429: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10430: p_data => x_msg_data);
10431: IF (l_debug = 1) THEN
10432: print_debug('Exiting Get_Expected_Time - Unexpected error: ' ||

Line 10438: x_return_status := fnd_api.g_ret_sts_unexp_error;

10434: END IF;
10435:
10436: WHEN OTHERS THEN
10437: ROLLBACK TO Get_Expected_Time_sp;
10438: x_return_status := fnd_api.g_ret_sts_unexp_error;
10439: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
10440: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
10441: END IF;
10442: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 10555: x_return_status := fnd_api.g_ret_sts_success;

10551: fnd_msg_pub.initialize;
10552: l_progress := '20';
10553:
10554: -- Initialize API return status to success
10555: x_return_status := fnd_api.g_ret_sts_success;
10556: l_progress := '30';
10557:
10558: -- Query and cache the crossdock criterion record
10559: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN

Line 10562: RAISE fnd_api.g_exc_unexpected_error;

10558: -- Query and cache the crossdock criterion record
10559: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN
10560: IF (l_debug = 1) THEN
10561: print_debug('Unable to set the crossdock criterion: ' || p_crossdock_criterion_id);
10562: RAISE fnd_api.g_exc_unexpected_error;
10563: END IF;
10564: END IF;
10565: l_progress := '40';
10566:

Line 10575: RAISE fnd_api.g_exc_unexpected_error;

10571: IF (l_debug = 1) THEN
10572: print_debug('Invalid crossdock criterion type: ' ||
10573: g_crossdock_criteria_tb(p_crossdock_criterion_id).criterion_type);
10574: END IF;
10575: RAISE fnd_api.g_exc_unexpected_error;
10576: END IF;*/
10577: l_progress := '50';
10578:
10579: -- Get the dock schedule method from the crossdock criterion

Line 10605: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10601: x_dock_start_time => x_dock_start_time,
10602: x_dock_end_time => x_dock_end_time,
10603: x_expected_time => x_expected_time);
10604:
10605: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10606: IF (l_debug = 1) THEN
10607: print_debug('Success returned from Custom Get_Expected_Delivery_Time API');
10608: END IF;
10609: ELSE

Line 10613: RAISE fnd_api.g_exc_error;

10609: ELSE
10610: IF (l_debug = 1) THEN
10611: print_debug('Failure returned from Custom Get_Expected_Delivery_Time API');
10612: END IF;
10613: RAISE fnd_api.g_exc_error;
10614: END IF;
10615:
10616: -- If the custom API is implemented, just use the values retrieved from there.
10617: -- Skip all further processing and logic in this API.

Line 10641: RAISE fnd_api.g_exc_unexpected_error;

10637: IF (l_debug = 1) THEN
10638: print_debug('Delivery cursor did not return any records!');
10639: END IF;
10640: CLOSE delivery_rec_cursor;
10641: RAISE fnd_api.g_exc_unexpected_error;
10642: END IF;
10643: CLOSE delivery_rec_cursor;
10644: l_progress := '70';
10645:

Line 10700: p_init_msg_list => fnd_api.g_false,

10696: l_progress := '90';
10697:
10698: wms_dock_appointments_pub.get_dock_appointment_range
10699: (p_api_version => 1.0,
10700: p_init_msg_list => fnd_api.g_false,
10701: x_return_status => x_return_status,
10702: x_msg_count => x_msg_count,
10703: x_msg_data => x_msg_data,
10704: x_dock_appt_list => l_dock_appt_list,

Line 10726: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10722: END IF;
10723: l_progress := '100';
10724:
10725: -- Check to see if the get_dock_appointment_range API returned successfully
10726: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10727: IF (l_debug = 1) THEN
10728: print_debug('Success returned from get_dock_appointment_range API');
10729: END IF;
10730: ELSE

Line 10734: x_return_status := fnd_api.g_ret_sts_success;

10730: ELSE
10731: IF (l_debug = 1) THEN
10732: print_debug('Failure returned from get_dock_appointment_range API');
10733: END IF;
10734: x_return_status := fnd_api.g_ret_sts_success;
10735: -- do not thrown an error but just go to the next way to calculate time
10736: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10737: --FND_MSG_PUB.ADD;
10738: --RAISE fnd_api.g_exc_error;

Line 10738: --RAISE fnd_api.g_exc_error;

10734: x_return_status := fnd_api.g_ret_sts_success;
10735: -- do not thrown an error but just go to the next way to calculate time
10736: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10737: --FND_MSG_PUB.ADD;
10738: --RAISE fnd_api.g_exc_error;
10739: END IF;
10740: l_progress := '110';
10741: END IF;
10742:

Line 10759: p_init_msg_list => fnd_api.g_false,

10755: l_progress := '120';
10756:
10757: wms_dock_appointments_pub.get_dock_appointment_range
10758: (p_api_version => 1.0,
10759: p_init_msg_list => fnd_api.g_false,
10760: x_return_status => x_return_status,
10761: x_msg_count => x_msg_count,
10762: x_msg_data => x_msg_data,
10763: x_dock_appt_list => l_dock_appt_list,

Line 10785: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

10781: END IF;
10782: l_progress := '130';
10783:
10784: -- Check to see if the get_dock_appointment_range API returned successfully
10785: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10786: IF (l_debug = 1) THEN
10787: print_debug('Success returned from get_dock_appointment_range API');
10788: END IF;
10789: ELSE

Line 10793: x_return_status := fnd_api.g_ret_sts_success;

10789: ELSE
10790: IF (l_debug = 1) THEN
10791: print_debug('Failure returned from get_dock_appointment_range API');
10792: END IF;
10793: x_return_status := fnd_api.g_ret_sts_success;
10794: -- do not thrown an error but just go to the next way to calculate time
10795: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10796: --FND_MSG_PUB.ADD;
10797: --RAISE fnd_api.g_exc_error;

Line 10797: --RAISE fnd_api.g_exc_error;

10793: x_return_status := fnd_api.g_ret_sts_success;
10794: -- do not thrown an error but just go to the next way to calculate time
10795: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10796: --FND_MSG_PUB.ADD;
10797: --RAISE fnd_api.g_exc_error;
10798: END IF;
10799: l_progress := '140';
10800: END IF;
10801:

Line 10927: WHEN FND_API.G_EXC_ERROR THEN

10923: print_debug('***End of Get_Expected_Delivery_Time***');
10924: END IF;
10925:
10926: EXCEPTION
10927: WHEN FND_API.G_EXC_ERROR THEN
10928: ROLLBACK TO Get_Expected_Delivery_Time_sp;
10929: x_return_status := fnd_api.g_ret_sts_error;
10930: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10931: p_data => x_msg_data);

Line 10929: x_return_status := fnd_api.g_ret_sts_error;

10925:
10926: EXCEPTION
10927: WHEN FND_API.G_EXC_ERROR THEN
10928: ROLLBACK TO Get_Expected_Delivery_Time_sp;
10929: x_return_status := fnd_api.g_ret_sts_error;
10930: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10931: p_data => x_msg_data);
10932: IF (l_debug = 1) THEN
10933: print_debug('Exiting Get_Expected_Delivery_Time - Execution error: ' ||

Line 10937: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

10933: print_debug('Exiting Get_Expected_Delivery_Time - Execution error: ' ||
10934: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
10935: END IF;
10936:
10937: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10938: ROLLBACK TO Get_Expected_Delivery_Time_sp;
10939: x_return_status := fnd_api.g_ret_sts_unexp_error;
10940: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10941: p_data => x_msg_data);

Line 10939: x_return_status := fnd_api.g_ret_sts_unexp_error;

10935: END IF;
10936:
10937: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10938: ROLLBACK TO Get_Expected_Delivery_Time_sp;
10939: x_return_status := fnd_api.g_ret_sts_unexp_error;
10940: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10941: p_data => x_msg_data);
10942: IF (l_debug = 1) THEN
10943: print_debug('Exiting Get_Expected_Delivery_Time - Unexpected error: ' ||

Line 10949: x_return_status := fnd_api.g_ret_sts_unexp_error;

10945: END IF;
10946:
10947: WHEN OTHERS THEN
10948: ROLLBACK TO Get_Expected_Delivery_Time_sp;
10949: x_return_status := fnd_api.g_ret_sts_unexp_error;
10950: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
10951: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
10952: END IF;
10953: fnd_msg_pub.count_and_get(p_count => x_msg_count,