DBA Data[Home] [Help]

APPS.WMS_XDOCK_PEGGING_PUB dependencies on FND_API

Line 230: RAISE fnd_api.g_exc_unexpected_error;

226: EXCEPTION
227: WHEN NO_DATA_FOUND THEN
228: NULL;
229: WHEN OTHERS THEN
230: RAISE fnd_api.g_exc_unexpected_error;
231: END;
232: END IF;
233:
234: -- Return the item default routing ID if a cached value exists

Line 262: RAISE fnd_api.g_exc_unexpected_error;

258: EXCEPTION
259: WHEN NO_DATA_FOUND THEN
260: NULL;
261: WHEN OTHERS THEN
262: RAISE fnd_api.g_exc_unexpected_error;
263: END;
264: END IF;
265:
266: -- Return the vendor default routing ID if a cached value exists

Line 293: RAISE fnd_api.g_exc_unexpected_error;

289: EXCEPTION
290: WHEN NO_DATA_FOUND THEN
291: NULL;
292: WHEN OTHERS THEN
293: RAISE fnd_api.g_exc_unexpected_error;
294: END;
295: END IF;
296:
297: -- Return the org default routing ID if a cached value exists

Line 566: RAISE FND_API.G_EXC_ERROR;

562: END IF;
563: -- Raise an exception. The caller will do the rollback, cleanups,
564: -- and decide where to goto next.
565: x_error_code := 'UOM';
566: RAISE FND_API.G_EXC_ERROR;
567: END IF;
568: -- Round the converted quantity to the standard precision
569: l_atd_wdd_qty := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
570: IF (l_debug = 1) THEN

Line 587: RAISE FND_API.G_EXC_ERROR;

583: END IF;
584: -- Raise an exception. The caller will do the rollback, cleanups,
585: -- and decide where to goto next.
586: x_error_code := 'UOM';
587: RAISE FND_API.G_EXC_ERROR;
588: END IF;
589: -- Round the converted quantity to the standard precision
590: l_atd_wdd_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
591: ELSE

Line 617: p_init_msg_list => fnd_api.g_false,

613: if l_simulation_mode = 'N' then
614:
615: WSH_INTERFACE_GRP.Delivery_Detail_Action
616: (p_api_version_number => 1.0,
617: p_init_msg_list => fnd_api.g_false,
618: p_commit => fnd_api.g_false,
619: x_return_status => x_return_status,
620: x_msg_count => x_msg_count,
621: x_msg_data => x_msg_data,

Line 618: p_commit => fnd_api.g_false,

614:
615: WSH_INTERFACE_GRP.Delivery_Detail_Action
616: (p_api_version_number => 1.0,
617: p_init_msg_list => fnd_api.g_false,
618: p_commit => fnd_api.g_false,
619: x_return_status => x_return_status,
620: x_msg_count => x_msg_count,
621: x_msg_data => x_msg_data,
622: p_detail_id_tab => l_detail_id_tab,

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

623: p_action_prms => l_action_prms,
624: x_action_out_rec => l_action_out_rec
625: );
626:
627: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
628: IF (l_debug = 1) THEN
629: print_debug(p_log_prefix || 'Error returned from Split Delivery_Detail_Action API: '
630: || x_return_status);
631: END IF;

Line 635: RAISE FND_API.G_EXC_ERROR;

631: END IF;
632: -- Raise an exception. The caller will do the rollback, cleanups,
633: -- and decide where to goto next.
634: x_error_code := 'DB';
635: RAISE FND_API.G_EXC_ERROR;
636: END IF;
637: IF (l_debug = 1) THEN
638: print_debug(p_log_prefix || 'Successfully split the WDD record');
639: END IF;

Line 779: x_return_status := fnd_api.g_ret_sts_error;

775: l_progress := '60';
776:
777: EXCEPTION
778: WHEN OTHERS THEN
779: x_return_status := fnd_api.g_ret_sts_error;
780: fnd_msg_pub.count_and_get(p_count => x_msg_count,
781: p_data => x_msg_data);
782: IF (l_debug = 1) THEN
783: print_debug(p_log_prefix || 'Exiting Crossdock_WDD - Execution error: ' ||

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_qty := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
857: IF (l_debug = 1) THEN

Line 874: RAISE FND_API.G_EXC_ERROR;

870: END IF;
871: -- Raise an exception. The caller will do the rollback, cleanups,
872: -- and decide where to goto next.
873: x_error_code := 'UOM';
874: RAISE FND_API.G_EXC_ERROR;
875: END IF;
876: -- Round the converted quantity to the standard precision
877: l_atd_rsv_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
878: ELSE

Line 916: p_init_msg_lst => fnd_api.g_false,

912: print_debug(p_log_prefix || 'Call the transfer_reservation API to split the RSV record');
913: END IF;
914: INV_RESERVATION_PVT.transfer_reservation
915: (p_api_version_number => 1.0,
916: p_init_msg_lst => fnd_api.g_false,
917: x_return_status => x_return_status,
918: x_msg_count => x_msg_count,
919: x_msg_data => x_msg_data,
920: p_original_rsv_rec => l_original_rsv_rec,

Line 923: p_validation_flag => fnd_api.g_true,

919: x_msg_data => x_msg_data,
920: p_original_rsv_rec => l_original_rsv_rec,
921: p_to_rsv_rec => l_to_rsv_rec,
922: p_original_serial_number => l_original_serial_number,
923: p_validation_flag => fnd_api.g_true,
924: x_reservation_id => l_split_rsv_id);
925:
926: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
927: IF (l_debug = 1) THEN

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

922: p_original_serial_number => l_original_serial_number,
923: p_validation_flag => fnd_api.g_true,
924: x_reservation_id => l_split_rsv_id);
925:
926: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
927: IF (l_debug = 1) THEN
928: print_debug(p_log_prefix || 'Error returned from transfer_reservation API: '
929: || x_return_status);
930: END IF;

Line 934: RAISE FND_API.G_EXC_ERROR;

930: END IF;
931: -- Raise an exception. The caller will do the rollback, cleanups,
932: -- and decide where to goto next.
933: x_error_code := 'DB';
934: RAISE FND_API.G_EXC_ERROR;
935: END IF;
936: IF (l_debug = 1) THEN
937: print_debug(p_log_prefix || 'Successfully split the RSV record');
938: END IF;

Line 978: p_init_msg_lst => fnd_api.g_false,

974: print_debug(p_log_prefix || 'Call the update_reservation API to crossdock the RSV record');
975: END IF;
976: INV_RESERVATION_PVT.update_reservation
977: (p_api_version_number => 1.0,
978: p_init_msg_lst => fnd_api.g_false,
979: x_return_status => x_return_status,
980: x_msg_count => x_msg_count,
981: x_msg_data => x_msg_data,
982: p_original_rsv_rec => l_original_rsv_rec,

Line 986: p_validation_flag => fnd_api.g_true,

982: p_original_rsv_rec => l_original_rsv_rec,
983: p_to_rsv_rec => l_to_rsv_rec,
984: p_original_serial_number => l_original_serial_number,
985: p_to_serial_number => l_to_serial_number,
986: p_validation_flag => fnd_api.g_true,
987: p_check_availability => fnd_api.g_false);
988:
989: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
990: IF (l_debug = 1) THEN

Line 987: p_check_availability => fnd_api.g_false);

983: p_to_rsv_rec => l_to_rsv_rec,
984: p_original_serial_number => l_original_serial_number,
985: p_to_serial_number => l_to_serial_number,
986: p_validation_flag => fnd_api.g_true,
987: p_check_availability => fnd_api.g_false);
988:
989: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
990: IF (l_debug = 1) THEN
991: print_debug(p_log_prefix || 'Error returned from update_reservation API: '

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

985: p_to_serial_number => l_to_serial_number,
986: p_validation_flag => fnd_api.g_true,
987: p_check_availability => fnd_api.g_false);
988:
989: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
990: IF (l_debug = 1) THEN
991: print_debug(p_log_prefix || 'Error returned from update_reservation API: '
992: || x_return_status);
993: END IF;

Line 997: RAISE FND_API.G_EXC_ERROR;

993: END IF;
994: -- Raise an exception. The caller will do the rollback, cleanups,
995: -- and decide where to goto next.
996: x_error_code := 'DB';
997: RAISE FND_API.G_EXC_ERROR;
998: END IF;
999: IF (l_debug = 1) THEN
1000: print_debug(p_log_prefix || 'Successfully updated and crossdocked the RSV record');
1001: END IF;

Line 1012: x_return_status := fnd_api.g_ret_sts_error;

1008: END IF; -- End crossdocking RSV record: Matches 'IF (l_rsv_txn_qty > l_atd_qty) THEN'
1009:
1010: EXCEPTION
1011: WHEN OTHERS THEN
1012: x_return_status := fnd_api.g_ret_sts_error;
1013: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1014: p_data => x_msg_data);
1015: IF (l_debug = 1) THEN
1016: print_debug(p_log_prefix || 'Exiting Crossdock_RSV - Execution error: ' ||

Line 1112: RAISE FND_API.G_EXC_ERROR;

1108: END IF;
1109: -- Raise an exception. The caller will do the rollback, cleanups,
1110: -- and decide where to goto next.
1111: x_error_code := 'UOM';
1112: RAISE FND_API.G_EXC_ERROR;
1113: END IF;
1114: -- Round the converted quantity to the standard precision
1115: l_atd_mol_qty2 := ROUND(l_conversion_rate * l_atd_qty, l_conversion_precision);
1116: ELSE

Line 1343: RAISE FND_API.G_EXC_ERROR;

1339: END IF;
1340: -- Raise an exception. The caller will do the rollback, cleanups,
1341: -- and decide where to goto next.
1342: x_error_code := 'DB';
1343: RAISE FND_API.G_EXC_ERROR;
1344: END; -- End inserting split MOL record into MTL_TXN_REQUEST_LINES
1345:
1346: -- Retrieve the split MOL line ID we have just inserted above.
1347: -- We cannot use the RETURNING clause since a sub-query was used for the insert.

Line 1364: RAISE FND_API.G_EXC_ERROR;

1360: END IF;
1361: -- Raise an exception. The caller will do the rollback, cleanups,
1362: -- and decide where to goto next.
1363: x_error_code := 'DB';
1364: RAISE FND_API.G_EXC_ERROR;
1365: END;
1366: IF (l_debug = 1) THEN
1367: print_debug(p_log_prefix || 'Successfully inserted/split the MOL record: ' ||
1368: l_split_mol_line_id);

Line 1386: RAISE FND_API.G_EXC_ERROR;

1382: END IF;
1383: -- Raise an exception. The caller will do the rollback, cleanups,
1384: -- and decide where to goto next.
1385: x_error_code := 'DB';
1386: RAISE FND_API.G_EXC_ERROR;
1387: END;
1388:
1389: -- Update the MOL qty values to indicate how much quantity from the original MOL
1390: -- is still available for crossdocking.

Line 1432: RAISE FND_API.G_EXC_ERROR;

1428: END IF;
1429: -- Raise an exception. The caller will do the rollback, cleanups,
1430: -- and decide where to goto next.
1431: x_error_code := 'DB';
1432: RAISE FND_API.G_EXC_ERROR;
1433: END;
1434:
1435: -- Update the MOL qty field to indicate how much quantity from the original MOL
1436: -- is still available for crossdocking.

Line 1484: x_return_status := fnd_api.g_ret_sts_error;

1480: END IF; -- End of logic to update WDD records with split MOL line
1481: x_new_mol_id := l_split_mol_line_id;
1482: EXCEPTION
1483: WHEN OTHERS THEN
1484: x_return_status := fnd_api.g_ret_sts_error;
1485: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1486: p_data => x_msg_data);
1487: IF (l_debug = 1) THEN
1488: print_debug(p_log_prefix || 'Exiting Crossdock_MOL - Execution error: ' ||

Line 1672: p_init_msg_lst => fnd_api.g_false,

1668: print_debug(p_log_prefix || 'Call the create_reservation API to create the crossdock peg');
1669: END IF;
1670: INV_RESERVATION_PVT.create_reservation
1671: (p_api_version_number => 1.0,
1672: p_init_msg_lst => fnd_api.g_false,
1673: x_return_status => x_return_status,
1674: x_msg_count => x_msg_count,
1675: x_msg_data => x_msg_data,
1676: p_rsv_rec => l_original_rsv_rec,

Line 1679: p_partial_reservation_flag => fnd_api.g_false,

1675: x_msg_data => x_msg_data,
1676: p_rsv_rec => l_original_rsv_rec,
1677: p_serial_number => l_original_serial_number,
1678: x_serial_number => l_to_serial_number,
1679: p_partial_reservation_flag => fnd_api.g_false,
1680: p_force_reservation_flag => fnd_api.g_false,
1681: p_validation_flag => fnd_api.g_true,
1682: x_quantity_reserved => l_quantity_reserved,
1683: x_secondary_quantity_reserved => l_quantity_reserved2,

Line 1680: p_force_reservation_flag => fnd_api.g_false,

1676: p_rsv_rec => l_original_rsv_rec,
1677: p_serial_number => l_original_serial_number,
1678: x_serial_number => l_to_serial_number,
1679: p_partial_reservation_flag => fnd_api.g_false,
1680: p_force_reservation_flag => fnd_api.g_false,
1681: p_validation_flag => fnd_api.g_true,
1682: x_quantity_reserved => l_quantity_reserved,
1683: x_secondary_quantity_reserved => l_quantity_reserved2,
1684: x_reservation_id => l_rsv_id

Line 1681: p_validation_flag => fnd_api.g_true,

1677: p_serial_number => l_original_serial_number,
1678: x_serial_number => l_to_serial_number,
1679: p_partial_reservation_flag => fnd_api.g_false,
1680: p_force_reservation_flag => fnd_api.g_false,
1681: p_validation_flag => fnd_api.g_true,
1682: x_quantity_reserved => l_quantity_reserved,
1683: x_secondary_quantity_reserved => l_quantity_reserved2,
1684: x_reservation_id => l_rsv_id
1685: );

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

1683: x_secondary_quantity_reserved => l_quantity_reserved2,
1684: x_reservation_id => l_rsv_id
1685: );
1686:
1687: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1688: IF (l_debug = 1) THEN
1689: print_debug(p_log_prefix || 'Error returned from create_reservation API: '
1690: || x_return_status);
1691: END IF;

Line 1694: RAISE FND_API.G_EXC_ERROR;

1690: || x_return_status);
1691: END IF;
1692: -- Raise an exception. The caller will do the rollback, cleanups,
1693: -- and decide where to goto next.
1694: RAISE FND_API.G_EXC_ERROR;
1695: END IF;
1696: l_progress := '20';
1697:
1698: EXCEPTION

Line 1700: x_return_status := fnd_api.g_ret_sts_error;

1696: l_progress := '20';
1697:
1698: EXCEPTION
1699: WHEN OTHERS THEN
1700: x_return_status := fnd_api.g_ret_sts_error;
1701: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1702: p_data => x_msg_data);
1703: IF (l_debug = 1) THEN
1704: print_debug(p_log_prefix || 'Exiting Create_RSV - Execution error: ' ||

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

2684:
2685: l_simulation_mode := p_simulation_mode;
2686:
2687: -- Standard Call to check for call compatibility
2688: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2689: IF (l_debug = 1) THEN
2690: print_debug('FND_API version not compatible!');
2691: END IF;
2692: RAISE fnd_api.g_exc_unexpected_error;

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

2686:
2687: -- Standard Call to check for call compatibility
2688: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2689: IF (l_debug = 1) THEN
2690: print_debug('FND_API version not compatible!');
2691: END IF;
2692: RAISE fnd_api.g_exc_unexpected_error;
2693: END IF;
2694:

Line 2692: RAISE fnd_api.g_exc_unexpected_error;

2688: IF NOT fnd_api.Compatible_API_Call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2689: IF (l_debug = 1) THEN
2690: print_debug('FND_API version not compatible!');
2691: END IF;
2692: RAISE fnd_api.g_exc_unexpected_error;
2693: END IF;
2694:
2695: -- Initialize message list to clear any existing messages
2696: IF fnd_api.To_Boolean(p_init_msg_list) THEN

Line 2696: IF fnd_api.To_Boolean(p_init_msg_list) THEN

2692: RAISE fnd_api.g_exc_unexpected_error;
2693: END IF;
2694:
2695: -- Initialize message list to clear any existing messages
2696: IF fnd_api.To_Boolean(p_init_msg_list) THEN
2697: fnd_msg_pub.initialize;
2698: END IF;
2699: l_progress := '20';
2700:

Line 2702: x_return_status := fnd_api.g_ret_sts_success;

2698: END IF;
2699: l_progress := '20';
2700:
2701: -- Initialize API return status to success
2702: x_return_status := fnd_api.g_ret_sts_success;
2703: l_progress := '30';
2704:
2705: -- Return if there are no records to crossdock in p_wsh_release_table.
2706: -- {{

Line 2773: RAISE fnd_api.g_exc_unexpected_error;

2769: p_request_number => NULL)) THEN
2770: IF (l_debug = 1) THEN
2771: print_debug('Error caching the WSH picking batch record');
2772: END IF;
2773: RAISE fnd_api.g_exc_unexpected_error;
2774: END IF;
2775: end if;
2776: l_progress := '50';
2777:

Line 2812: RAISE fnd_api.g_exc_unexpected_error;

2808: IF (NOT INV_CACHE.set_org_rec(l_organization_id)) THEN
2809: IF (l_debug = 1) THEN
2810: print_debug('Error caching the org record');
2811: END IF;
2812: RAISE fnd_api.g_exc_unexpected_error;
2813: END IF;
2814:
2815: end if; -- For SImulation Mode
2816: -- Set the PJM enabled flag.

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

2822: (x_return_status => x_return_status,
2823: x_msg_count => x_msg_count,
2824: x_msg_data => x_msg_data,
2825: p_organization_id => l_organization_id);
2826: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2827: IF (l_debug = 1) THEN
2828: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
2829: END IF;
2830: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2830: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2826: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2827: IF (l_debug = 1) THEN
2828: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
2829: END IF;
2830: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2831: END IF;
2832: l_progress := '80';
2833:
2834: -- Retrieve the org parameter for allowing cross project allocation for crossdocking.

Line 2864: RAISE fnd_api.g_exc_unexpected_error;

2860: IF (l_allocation_method = G_INVENTORY_ONLY) THEN
2861: IF (l_debug = 1) THEN
2862: print_debug('Allocation method of Inventory Only is invalid');
2863: END IF;
2864: RAISE fnd_api.g_exc_unexpected_error;
2865: END IF;
2866: l_progress := '100';
2867:
2868: -- Query for and cache the crossdock criteria record for the picking batch

Line 2879: RAISE fnd_api.g_exc_unexpected_error;

2875: IF (l_debug = 1) THEN
2876: print_debug('Error caching the crossdock criteria record: ' ||
2877: l_wpb_xdock_criteria_id);
2878: END IF;
2879: RAISE fnd_api.g_exc_unexpected_error;
2880: END IF;
2881: END IF;
2882: l_progress := '110';
2883: -- End of validations and initializations

Line 2980: --RAISE fnd_api.g_exc_unexpected_error;

2976: print_debug('1.1 - Error caching the item parameters: ' ||
2977: l_inventory_item_id);
2978: END IF;
2979: GOTO next_record;
2980: --RAISE fnd_api.g_exc_unexpected_error;
2981: END;
2982: END IF;
2983: -- Store the item's primary UOM code in a local variable
2984: l_primary_uom_code := l_item_params_tb(l_inventory_item_id).primary_uom_code;

Line 3092: --RAISE fnd_api.g_exc_unexpected_error;

3088: IF (l_debug = 1) THEN
3089: print_debug('1.3 - Error caching the UOM class: ' || l_demand_uom_code);
3090: END IF;
3091: --GOTO next_record;
3092: --RAISE fnd_api.g_exc_unexpected_error;
3093: -- Instead of skipping to the next record, just store a NULL value
3094: -- for the UOM class. The crossdock criteria retrieved will thus not
3095: -- make use of the UOM class as a filter.
3096: l_uom_class_tb(l_demand_uom_code) := NULL;

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

3110: x_msg_data => x_msg_data,
3111: x_api_is_implemented => l_api_is_implemented,
3112: x_crossdock_criteria_id => l_crossdock_criteria_id);
3113:
3114: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3115: IF (l_debug = 1) THEN
3116: print_debug('1.3 - Success returned from Get_Crossdock_Criteria API');
3117: END IF;
3118: ELSE

Line 3123: --RAISE fnd_api.g_exc_error;

3119: IF (l_debug = 1) THEN
3120: print_debug('1.3 - Failure returned from Get_Crossdock_Criteria API');
3121: END IF;
3122: GOTO next_record;
3123: --RAISE fnd_api.g_exc_error;
3124: END IF;
3125:
3126: -- If the custom API is not implemented, call the rules engine to determine the
3127: -- crossdock criteria for the current WDD record.

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

3151: x_return_type_id => l_crossdock_criteria_id,
3152: x_sequence_number => l_sequence_number,
3153: x_return_status => x_return_status);
3154:
3155: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3156: IF (l_debug = 1) THEN
3157: print_debug('1.3 - Success returned from cross_dock_search API');
3158: END IF;
3159: ELSE

Line 3164: --RAISE fnd_api.g_exc_error;

3160: IF (l_debug = 1) THEN
3161: print_debug('1.3 - Failure returned from cross_dock_search API');
3162: END IF;
3163: GOTO next_record;
3164: --RAISE fnd_api.g_exc_error;
3165: END IF;
3166: END IF;
3167:
3168: -- Query for and cache the crossdock criteria retrieved from the rules engine

Line 3176: --RAISE fnd_api.g_exc_unexpected_error;

3172: print_debug('1.3 - Error caching the crossdock criteria record: ' ||
3173: l_crossdock_criteria_id);
3174: END IF;
3175: GOTO next_record;
3176: --RAISE fnd_api.g_exc_unexpected_error;
3177: END IF;
3178: END IF;
3179:
3180: END IF; -- END IF matching 'IF (l_wpb_xdock_criteria_id IS NOT NULL) THEN'

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

3210: x_dock_mean_time => l_dock_mean_time,
3211: x_dock_end_time => l_dock_end_time,
3212: x_expected_time => l_demand_expected_time);
3213:
3214: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3215: IF (l_debug = 1) THEN
3216: print_debug('1.4 - Success returned from Get_Expected_Time API');
3217: END IF;
3218: ELSE

Line 3223: --RAISE fnd_api.g_exc_error;

3219: IF (l_debug = 1) THEN
3220: print_debug('1.4 - Failure returned from Get_Expected_Time API');
3221: END IF;
3222: GOTO next_record;
3223: --RAISE fnd_api.g_exc_error;
3224: END IF;
3225: -- Use this value to determine if a dock appointment for the demand line exists.
3226: -- There is a parameter on the crossdock criteria to decide if we should schedule
3227: -- demand anytime on the shipment date if no dock appointment exists.

Line 3384: --RAISE fnd_api.g_exc_unexpected_error;

3380: IF (l_debug = 1) THEN
3381: print_debug('2.1 - Exception retrieving the existing reservations');
3382: END IF;
3383: GOTO after_existing_rsvs;
3384: --RAISE fnd_api.g_exc_unexpected_error;
3385: END;
3386: l_progress := '170';
3387:
3388: -- Loop through the existing reservations and try to crossdock them

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

3517: x_dock_mean_time => l_dock_mean_time,
3518: x_dock_end_time => l_dock_end_time,
3519: x_expected_time => l_supply_expected_time);
3520:
3521: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3522: IF (l_debug = 1) THEN
3523: print_debug('2.2 - Success returned from Get_Expected_Time API');
3524: END IF;
3525: ELSE

Line 3530: --RAISE fnd_api.g_exc_error;

3526: IF (l_debug = 1) THEN
3527: print_debug('2.2 - Failure returned from Get_Expected_Time API');
3528: END IF;
3529: GOTO next_reservation;
3530: --RAISE fnd_api.g_exc_error;
3531: END IF;
3532: -- Use this value to determine if a dock appointment for the supply line exists.
3533: -- There is a parameter on the crossdock criteria to decide if we should schedule
3534: -- supply anytime on the expected receipt date if no dock appointment exists.

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

4002: x_msg_data => x_msg_data,
4003: x_error_code => l_error_code
4004: );
4005:
4006: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4007: IF (l_debug = 1) THEN
4008: print_debug('2.4 - Error returned from Crossdock_WDD API: '
4009: || x_return_status);
4010: END IF;

Line 4011: --RAISE fnd_api.g_exc_error;

4007: IF (l_debug = 1) THEN
4008: print_debug('2.4 - Error returned from Crossdock_WDD API: '
4009: || x_return_status);
4010: END IF;
4011: --RAISE fnd_api.g_exc_error;
4012: -- If an exception occurs while modifying a database record, rollback the changes
4013: -- and just go to the next WDD record or reservation to crossdock.
4014: ROLLBACK TO Existing_Reservation_sp;
4015: -- We need to also rollback changes done to local PLSQL data structures

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

4112: x_msg_data => x_msg_data,
4113: x_error_code => l_error_code
4114: );
4115:
4116: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4117: IF (l_debug = 1) THEN
4118: print_debug('2.4 - Error returned from Crossdock_RSV API: '
4119: || x_return_status);
4120: END IF;

Line 4121: --RAISE fnd_api.g_exc_error;

4117: IF (l_debug = 1) THEN
4118: print_debug('2.4 - Error returned from Crossdock_RSV API: '
4119: || x_return_status);
4120: END IF;
4121: --RAISE fnd_api.g_exc_error;
4122: -- If an exception occurs while modifying a database record, rollback the changes
4123: -- and just go to the next WDD record or reservation to crossdock.
4124: ROLLBACK TO Existing_Reservation_sp;
4125: -- We need to also rollback changes done to local PLSQL data structures

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

4198: x_error_code => l_error_code,
4199: x_new_mol_id => l_new_mol_id --9695544
4200: );
4201:
4202: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4203: IF (l_debug = 1) THEN
4204: print_debug('2.4 - Error returned from Crossdock_MOL API: '
4205: || x_return_status);
4206: END IF;

Line 4207: --RAISE fnd_api.g_exc_error;

4203: IF (l_debug = 1) THEN
4204: print_debug('2.4 - Error returned from Crossdock_MOL API: '
4205: || x_return_status);
4206: END IF;
4207: --RAISE fnd_api.g_exc_error;
4208: -- If an exception occurs while modifying a database record, rollback the changes
4209: -- and just go to the next WDD record or reservation to crossdock.
4210: ROLLBACK TO Existing_Reservation_sp;
4211: -- We need to also rollback changes done to local PLSQL data structures

Line 4318: p_init_msg_lst => fnd_api.g_false,

4314: print_debug('2.6 - Calculate the ATR qty on the demand line for crossdocking');
4315: END IF;
4316: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
4317: (p_api_version_number => 1.0,
4318: p_init_msg_lst => fnd_api.g_false,
4319: x_return_status => x_return_status,
4320: x_msg_count => x_msg_count,
4321: x_msg_data => x_msg_data,
4322: p_primary_uom_code => l_primary_uom_code,

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

4328: p_task_id => l_demand_task_id,
4329: x_qty_available_to_reserve => l_demand_atr_prim_qty,
4330: x_qty_available => l_demand_available_qty);
4331:
4332: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4333: IF (l_debug = 1) THEN
4334: print_debug('2.6 - Error returned from available_demand_to_reserve API: '
4335: || x_return_status);
4336: END IF;

Line 4338: --RAISE fnd_api.g_exc_error;

4334: print_debug('2.6 - Error returned from available_demand_to_reserve API: '
4335: || x_return_status);
4336: END IF;
4337: GOTO next_record;
4338: --RAISE fnd_api.g_exc_error;
4339: END IF;
4340: IF (l_debug = 1) THEN
4341: print_debug('2.6 - Available qty to reserve (primary) for demand: ' ||
4342: l_demand_atr_prim_qty || ' ' || l_primary_uom_code);

Line 4406: --RAISE fnd_api.g_exc_unexpected_error;

4402: IF (l_debug = 1) THEN
4403: print_debug('3.1 - Exception retrieving the eligible supply source types');
4404: END IF;
4405: GOTO next_record;
4406: --RAISE fnd_api.g_exc_unexpected_error;
4407: END;
4408: IF (l_debug = 1) THEN
4409: print_debug('3.1 - Successfully retrieved the eligible supply source types for criteria: '
4410: || l_crossdock_criteria_id);

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

4648: x_dock_mean_time => l_dock_mean_time_tb(j),
4649: x_dock_end_time => l_dock_end_time_tb(j),
4650: x_expected_time => l_expected_time_tb(j));
4651:
4652: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
4653: IF (l_debug = 1) THEN
4654: print_debug('3.3 - Success returned from Get_Expected_Time API');
4655: END IF;
4656: ELSE

Line 4663: --RAISE fnd_api.g_exc_error;

4659: END IF;
4660: -- Rollback any db changes that might have occurred (currently none).
4661: ROLLBACK TO Supply_Lines_sp;
4662: GOTO next_record;
4663: --RAISE fnd_api.g_exc_error;
4664: END IF;
4665: ELSE
4666: -- In Receiving supply types have an expected time of SYSDATE
4667: -- since it has already been received. Just set the dock expected times

Line 4737: --RAISE fnd_api.g_exc_error;

4733: WHEN OTHERS THEN
4734: IF (l_debug = 1) THEN
4735: print_debug('3.4 - Error inserting available supply lines into temp table');
4736: END IF;
4737: --RAISE fnd_api.g_exc_error;
4738: -- If an exception occurs while inserting supply line records, just
4739: -- rollback the changes and go to the next WDD record to crossdock.
4740: ROLLBACK TO Supply_Lines_sp;
4741: GOTO next_record;

Line 4906: p_init_msg_lst => fnd_api.g_false,

4902: print_debug('3.6 - Call the Available_supply_to_reserve API');
4903: END IF;
4904: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
4905: (p_api_version_number => 1.0,
4906: p_init_msg_lst => fnd_api.g_false,
4907: x_return_status => x_return_status,
4908: x_msg_count => x_msg_count,
4909: x_msg_data => x_msg_data,
4910: p_organization_id => l_organization_id,

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

4917: p_task_id => l_shopping_basket_tb(i).task_id,
4918: x_qty_available_to_reserve => l_supply_atr_prim_qty,
4919: x_qty_available => l_supply_available_qty);
4920:
4921: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4922: IF (l_debug = 1) THEN
4923: print_debug('3.6 - Error returned from available_supply_to_reserve API: '
4924: || x_return_status);
4925: END IF;

Line 4932: --RAISE fnd_api.g_exc_error;

4928: -- table can therefore be a sparsely populated table after running custom logic.
4929: l_shopping_basket_tb.DELETE(i);
4930: GOTO next_custom_supply;
4931: --GOTO next_record;
4932: --RAISE fnd_api.g_exc_error;
4933: END IF;
4934:
4935: -- If the supply is 'In Receiving', the ATR qty returned is for all of receiving.
4936: -- Since we're working on a specific MOL supply line, we need to use a LEAST

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

5000: x_msg_data => x_msg_data,
5001: x_api_is_implemented => l_api_is_implemented,
5002: x_sorted_order_tb => l_sorted_order_tb);
5003:
5004: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
5005: IF (l_debug = 1) THEN
5006: print_debug('3.6 - Success returned from Sort_Supply_Lines API');
5007: END IF;
5008: ELSE

Line 5014: --RAISE fnd_api.g_exc_error;

5010: print_debug('3.6 - Failure returned from Sort_Supply_Lines API');
5011: END IF;
5012: -- In case of exception, do not error out. Just use whatever order the
5013: -- supply lines are in when the shopping basket table was created.
5014: --RAISE fnd_api.g_exc_error;
5015: l_sorted_order_tb.DELETE;
5016: END IF;
5017: l_progress := '450';
5018:

Line 5408: p_init_msg_lst => fnd_api.g_false,

5404: print_debug('4.2 - Call the Available_supply_to_reserve API');
5405: END IF;
5406: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
5407: (p_api_version_number => 1.0,
5408: p_init_msg_lst => fnd_api.g_false,
5409: x_return_status => x_return_status,
5410: x_msg_count => x_msg_count,
5411: x_msg_data => x_msg_data,
5412: p_organization_id => l_organization_id,

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

5419: p_task_id => l_supply_task_id,
5420: x_qty_available_to_reserve => l_supply_atr_prim_qty,
5421: x_qty_available => l_supply_available_qty);
5422:
5423: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5424: IF (l_debug = 1) THEN
5425: print_debug('4.2 - Error returned from available_supply_to_reserve API: '
5426: || x_return_status);
5427: END IF;

Line 5431: --RAISE fnd_api.g_exc_error;

5427: END IF;
5428: -- Rollback any db changes that might have occurred (currently none).
5429: ROLLBACK TO Crossdock_Supply_sp;
5430: GOTO next_supply;
5431: --RAISE fnd_api.g_exc_error;
5432: END IF;
5433:
5434: -- If the supply is 'In Receiving', the ATR qty returned is for all of receiving.
5435: -- Since we're working on a specific MOL supply line, we need to use a LEAST

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

5695: x_msg_data => x_msg_data,
5696: x_error_code => l_error_code
5697: );
5698:
5699: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5700: IF (l_debug = 1) THEN
5701: print_debug('4.3 - Error returned from Crossdock_WDD API: '
5702: || x_return_status);
5703: END IF;

Line 5704: --RAISE fnd_api.g_exc_error;

5700: IF (l_debug = 1) THEN
5701: print_debug('4.3 - Error returned from Crossdock_WDD API: '
5702: || x_return_status);
5703: END IF;
5704: --RAISE fnd_api.g_exc_error;
5705: -- If an exception occurs while modifying a database record, rollback the changes
5706: -- and just go to the next WDD record or supply to crossdock.
5707: ROLLBACK TO Crossdock_Supply_sp;
5708: -- We need to also rollback changes done to local PLSQL data structures

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

5804: x_error_code => l_error_code,
5805: x_new_mol_id => l_new_mol_id --9695544
5806: );
5807:
5808: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5809: IF (l_debug = 1) THEN
5810: print_debug('4.3 - Error returned from Crossdock_MOL API: '
5811: || x_return_status);
5812: END IF;

Line 5813: --RAISE fnd_api.g_exc_error;

5809: IF (l_debug = 1) THEN
5810: print_debug('4.3 - Error returned from Crossdock_MOL API: '
5811: || x_return_status);
5812: END IF;
5813: --RAISE fnd_api.g_exc_error;
5814: -- If an exception occurs while modifying a database record, rollback the changes
5815: -- and just go to the next WDD record or supply to crossdock.
5816: ROLLBACK TO Crossdock_Supply_sp;
5817: -- We need to also rollback changes done to local PLSQL data structures

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

5929: x_msg_count => x_msg_count,
5930: x_msg_data => x_msg_data
5931: );
5932:
5933: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5934: IF (l_debug = 1) THEN
5935: print_debug('4.4 - Error returned from create_reservation API: '
5936: || x_return_status);
5937: END IF;

Line 5938: --RAISE fnd_api.g_exc_error;

5934: IF (l_debug = 1) THEN
5935: print_debug('4.4 - Error returned from create_reservation API: '
5936: || x_return_status);
5937: END IF;
5938: --RAISE fnd_api.g_exc_error;
5939: -- If an exception occurs while modifying a database record, rollback the changes
5940: -- and just go to the next WDD record to crossdock.
5941: ROLLBACK TO Crossdock_Supply_sp;
5942: -- We need to also rollback changes done to local PLSQL data structures

Line 6010: RAISE fnd_api.g_exc_error;

6006: END IF;
6007: -- If an exception occurs while performing this bulk update, raise an exception.
6008: -- This error should not occur but if it does, we should stop the crossdock pegging
6009: -- process.
6010: RAISE fnd_api.g_exc_error;
6011: END;
6012: IF (l_debug = 1) THEN
6013: print_debug('4.5 - Successfully updated the ATR qty for ' || l_supply_rowid_tb.COUNT
6014: || ' (non RCV or Int Req) supply lines ');

Line 6079: p_init_msg_list => fnd_api.g_false,

6075: l_in_rec.action_code := 'UPDATE';
6076:
6077: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
6078: (p_api_version_number => 1.0,
6079: p_init_msg_list => fnd_api.g_false,
6080: p_commit => fnd_api.g_false,
6081: x_return_status => x_return_status,
6082: x_msg_count => x_msg_count,
6083: x_msg_data => x_msg_data,

Line 6080: p_commit => fnd_api.g_false,

6076:
6077: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
6078: (p_api_version_number => 1.0,
6079: p_init_msg_list => fnd_api.g_false,
6080: p_commit => fnd_api.g_false,
6081: x_return_status => x_return_status,
6082: x_msg_count => x_msg_count,
6083: x_msg_data => x_msg_data,
6084: p_detail_info_tab => l_detail_info_tab,

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

6085: p_in_rec => l_in_rec,
6086: x_out_rec => l_out_rec
6087: );
6088:
6089: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6090: IF (l_debug = 1) THEN
6091: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
6092: || x_return_status);
6093: END IF;

Line 6094: RAISE FND_API.G_EXC_ERROR;

6090: IF (l_debug = 1) THEN
6091: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
6092: || x_return_status);
6093: END IF;
6094: RAISE FND_API.G_EXC_ERROR;
6095: ELSE
6096: IF (l_debug = 1) THEN
6097: print_debug('5.1 - Successfully updated the crossdocked WDD records');
6098: END IF;

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

6123: p_commit => 'N',
6124: p_organization_id => l_organization_id,
6125: p_lpn_id => l_lpn_index);
6126:
6127: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6128: IF (l_debug = 1) THEN
6129: print_debug('5.2 - Error returned from pre_generate API: ' || l_lpn_index
6130: || ': ' || x_return_status);
6131: END IF;

Line 6132: --RAISE fnd_api.g_exc_error;

6128: IF (l_debug = 1) THEN
6129: print_debug('5.2 - Error returned from pre_generate API: ' || l_lpn_index
6130: || ': ' || x_return_status);
6131: END IF;
6132: --RAISE fnd_api.g_exc_error;
6133: -- No need to throw an exception if the pre_generate API errors out.
6134: END IF;
6135:
6136: EXIT WHEN l_lpn_index = l_crossdocked_lpns_tb.LAST;

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

6251: (p_source_code => 'INV',
6252: p_changed_attributes => l_shipping_attr,
6253: x_return_status => x_return_status
6254: );
6255: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6256: IF (l_debug = 1) THEN
6257: print_debug('5.4 - Error returned from Update_Shipping_Attributes API: '
6258: || x_return_status);
6259: END IF;

Line 6260: RAISE FND_API.G_EXC_ERROR;

6256: IF (l_debug = 1) THEN
6257: print_debug('5.4 - Error returned from Update_Shipping_Attributes API: '
6258: || x_return_status);
6259: END IF;
6260: RAISE FND_API.G_EXC_ERROR;
6261: END IF;
6262: END IF;
6263:
6264: -- Loop through table p_del_detail_id. If that WDD is backordered (value exists in

Line 6299: IF fnd_api.To_Boolean(p_commit) THEN

6295: print_debug('5.5 - Cleared the temp table wms_xdock_pegging_gtmp');
6296: END IF;
6297:
6298: -- Standard call to commit
6299: IF fnd_api.To_Boolean(p_commit) THEN
6300: COMMIT;
6301: END IF;
6302: l_progress := '620';
6303:

Line 6315: x_return_status := fnd_api.g_ret_sts_success;

6311: -- allocation methods are taken care of when backordering unallocated WDD lines.
6312: IF (l_allocation_method = G_CROSSDOCK_ONLY AND l_unable_to_crossdock) THEN
6313: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
6314: ELSE
6315: x_return_status := fnd_api.g_ret_sts_success;
6316: END IF;
6317: l_progress := '630';
6318:
6319: end if; -- Simulation Mode

Line 6328: WHEN FND_API.G_EXC_ERROR THEN

6324: -- Stop the profiler
6325: -- dbms_profiler.stop_profiler;
6326:
6327: EXCEPTION
6328: WHEN FND_API.G_EXC_ERROR THEN
6329: ROLLBACK TO Planned_Cross_Dock_sp;
6330: x_return_status := fnd_api.g_ret_sts_error;
6331: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6332: p_data => x_msg_data);

Line 6330: x_return_status := fnd_api.g_ret_sts_error;

6326:
6327: EXCEPTION
6328: WHEN FND_API.G_EXC_ERROR THEN
6329: ROLLBACK TO Planned_Cross_Dock_sp;
6330: x_return_status := fnd_api.g_ret_sts_error;
6331: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6332: p_data => x_msg_data);
6333: IF (l_debug = 1) THEN
6334: print_debug('Exiting Planned_Cross_Dock - Execution error: ' ||

Line 6338: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6334: print_debug('Exiting Planned_Cross_Dock - Execution error: ' ||
6335: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
6336: END IF;
6337:
6338: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6339: ROLLBACK TO Planned_Cross_Dock_sp;
6340: x_return_status := fnd_api.g_ret_sts_unexp_error;
6341: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6342: p_data => x_msg_data);

Line 6340: x_return_status := fnd_api.g_ret_sts_unexp_error;

6336: END IF;
6337:
6338: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6339: ROLLBACK TO Planned_Cross_Dock_sp;
6340: x_return_status := fnd_api.g_ret_sts_unexp_error;
6341: fnd_msg_pub.count_and_get(p_count => x_msg_count,
6342: p_data => x_msg_data);
6343: IF (l_debug = 1) THEN
6344: print_debug('Exiting Planned_Cross_Dock - Unexpected error: ' ||

Line 6350: x_return_status := fnd_api.g_ret_sts_unexp_error;

6346: END IF;
6347:
6348: WHEN OTHERS THEN
6349: ROLLBACK TO Planned_Cross_Dock_sp;
6350: x_return_status := fnd_api.g_ret_sts_unexp_error;
6351: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
6352: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
6353: END IF;
6354: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 7101: x_return_status := fnd_api.g_ret_sts_success;

7097: fnd_msg_pub.initialize;
7098: l_progress := '20';
7099:
7100: -- Initialize API return status to success
7101: x_return_status := fnd_api.g_ret_sts_success;
7102: l_progress := '30';
7103:
7104: -- Initialize local versions of the following input parameters
7105: l_organization_id := p_organization_id;

Line 7137: RAISE fnd_api.g_exc_unexpected_error;

7133: IF (NOT INV_CACHE.set_org_rec(l_organization_id)) THEN
7134: IF (l_debug = 1) THEN
7135: print_debug('Error caching the org record');
7136: END IF;
7137: RAISE fnd_api.g_exc_unexpected_error;
7138: END IF;
7139: -- Set the PJM enabled flag.
7140: l_project_ref_enabled := INV_CACHE.org_rec.project_reference_enabled;
7141: l_progress := '50';

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

7145: (x_return_status => x_return_status,
7146: x_msg_count => x_msg_count,
7147: x_msg_data => x_msg_data,
7148: p_organization_id => l_organization_id);
7149: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
7150: IF (l_debug = 1) THEN
7151: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
7152: END IF;
7153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7149: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
7150: IF (l_debug = 1) THEN
7151: print_debug('Call to wms_install.check_install failed: ' || x_msg_data);
7152: END IF;
7153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7154: END IF;
7155: l_progress := '60';
7156:
7157: -- Retrieve the org parameter for allowing cross project allocation for crossdocking.

Line 7189: RAISE fnd_api.g_exc_unexpected_error;

7185: IF (l_debug = 1) THEN
7186: print_debug('Error caching the crossdock criteria record: ' ||
7187: l_crossdock_criteria_id);
7188: END IF;
7189: RAISE fnd_api.g_exc_unexpected_error;
7190: END IF;
7191: -- Validate that the crossdock criterion is of type 'Opportunistic'
7192: IF (g_crossdock_criteria_tb(l_crossdock_criteria_id).criterion_type <> G_CRT_TYPE_OPP) THEN
7193: IF (l_debug = 1) THEN

Line 7197: RAISE fnd_api.g_exc_unexpected_error;

7193: IF (l_debug = 1) THEN
7194: print_debug('Invalid crossdock criterion type: ' ||
7195: g_crossdock_criteria_tb(l_crossdock_criteria_id).criterion_type);
7196: END IF;
7197: RAISE fnd_api.g_exc_unexpected_error;
7198: END IF;
7199: l_progress := '80';
7200: -- End of validations and initializations
7201:

Line 7585: --RAISE fnd_api.g_exc_unexpected_error;

7581: IF (l_debug = 1) THEN
7582: print_debug('2.1 - Exception retrieving the existing reservations');
7583: END IF;
7584: GOTO after_existing_rsvs;
7585: --RAISE fnd_api.g_exc_unexpected_error;
7586: END;
7587: l_progress := '150';
7588:
7589: -- Loop through the existing reservations and try to crossdock them

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

7614: (p_salesorder_id => l_demand_so_header_id,
7615: x_oe_header_id => l_demand_header_id,
7616: x_return_status => x_return_status);
7617:
7618: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7619: IF (l_debug = 1) THEN
7620: print_debug('2.1 - Error returned from get_oeheader_for_salesorder API: '
7621: || x_return_status);
7622: END IF;

Line 7771: --RAISE fnd_api.g_exc_unexpected_error;

7767: IF (l_debug = 1) THEN
7768: print_debug('2.2 - Exception retrieving the reserved WDD demand lines');
7769: END IF;
7770: GOTO next_reservation;
7771: --RAISE fnd_api.g_exc_unexpected_error;
7772: END;
7773: l_progress := '180';
7774:
7775: -- Loop through the available WDD lines and try to crossdock the valid ones

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

7891: x_dock_mean_time => l_dock_mean_time,
7892: x_dock_end_time => l_dock_end_time,
7893: x_expected_time => l_demand_expected_time);
7894:
7895: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
7896: IF (l_debug = 1) THEN
7897: print_debug('2.3 - Success returned from Get_Expected_Time API');
7898: END IF;
7899: ELSE

Line 7904: --RAISE fnd_api.g_exc_error;

7900: IF (l_debug = 1) THEN
7901: print_debug('2.3 - Failure returned from Get_Expected_Time API');
7902: END IF;
7903: GOTO next_reserved_wdd;
7904: --RAISE fnd_api.g_exc_error;
7905: END IF;
7906:
7907: -- Do not crossdock the demand line on the reservation if an expected ship
7908: -- time cannot be determined.

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

8109: x_msg_data => x_msg_data,
8110: x_error_code => l_error_code
8111: );
8112:
8113: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8114: IF (l_debug = 1) THEN
8115: print_debug('2.4 - Error returned from Crossdock_WDD API: '
8116: || x_return_status);
8117: END IF;

Line 8118: --RAISE fnd_api.g_exc_error;

8114: IF (l_debug = 1) THEN
8115: print_debug('2.4 - Error returned from Crossdock_WDD API: '
8116: || x_return_status);
8117: END IF;
8118: --RAISE fnd_api.g_exc_error;
8119: -- If an exception occurs while modifying a database record, rollback the changes
8120: -- and just go to the next WDD record or reservation to crossdock.
8121: ROLLBACK TO Reserved_WDD_sp;
8122: -- We need to also rollback changes done to local PLSQL data structures

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

8172: x_msg_data => x_msg_data,
8173: x_error_code => l_error_code
8174: );
8175:
8176: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8177: IF (l_debug = 1) THEN
8178: print_debug('2.4 - Error returned from Crossdock_RSV API: '
8179: || x_return_status);
8180: END IF;

Line 8181: --RAISE fnd_api.g_exc_error;

8177: IF (l_debug = 1) THEN
8178: print_debug('2.4 - Error returned from Crossdock_RSV API: '
8179: || x_return_status);
8180: END IF;
8181: --RAISE fnd_api.g_exc_error;
8182: -- If an exception occurs while modifying a database record, rollback the changes
8183: -- and just go to the next WDD record or reservation to crossdock.
8184: ROLLBACK TO Reserved_WDD_sp;
8185: -- We need to also rollback changes done to local PLSQL data structures

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

8237: x_new_mol_id => l_new_mol_id, --9695544
8238: l_criterion_type => G_CRT_TYPE_OPP
8239: );
8240:
8241: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8242: IF (l_debug = 1) THEN
8243: print_debug('2.4 - Error returned from Crossdock_MOL API: '
8244: || x_return_status);
8245: END IF;

Line 8246: --RAISE fnd_api.g_exc_error;

8242: IF (l_debug = 1) THEN
8243: print_debug('2.4 - Error returned from Crossdock_MOL API: '
8244: || x_return_status);
8245: END IF;
8246: --RAISE fnd_api.g_exc_error;
8247: -- If an exception occurs while modifying a database record, rollback the changes
8248: -- and just go to the next WDD record or reservation to crossdock.
8249: ROLLBACK TO Reserved_WDD_sp;
8250: -- We need to also rollback changes done to local PLSQL data structures

Line 8315: p_init_msg_lst => fnd_api.g_false,

8311: IF (l_supply_type_id = 27) THEN
8312: -- RCV MOL
8313: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
8314: (p_api_version_number => 1.0,
8315: p_init_msg_lst => fnd_api.g_false,
8316: x_return_status => x_return_status,
8317: x_msg_count => x_msg_count,
8318: x_msg_data => x_msg_data,
8319: p_organization_id => l_organization_id,

Line 8333: p_init_msg_lst => fnd_api.g_false,

8329: ELSIF (l_wip_entity_type = 1) THEN
8330: -- WIP Discrete Job MOL
8331: INV_RESERVATION_AVAIL_PVT.Available_supply_to_reserve
8332: (p_api_version_number => 1.0,
8333: p_init_msg_lst => fnd_api.g_false,
8334: x_return_status => x_return_status,
8335: x_msg_count => x_msg_count,
8336: x_msg_data => x_msg_data,
8337: p_organization_id => l_organization_id,

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

8350: -- you cannot create reservations against WIP Flow jobs as supply in R12.
8351: l_supply_atr_prim_qty := l_mol_prim_qty;
8352: END IF;
8353:
8354: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8355: IF (l_debug = 1) THEN
8356: print_debug('2.5 - Error returned from available_supply_to_reserve API: '
8357: || x_return_status);
8358: END IF;

Line 8360: --RAISE fnd_api.g_exc_error;

8356: print_debug('2.5 - Error returned from available_supply_to_reserve API: '
8357: || x_return_status);
8358: END IF;
8359: GOTO end_crossdock;
8360: --RAISE fnd_api.g_exc_error;
8361: END IF;
8362:
8363: -- The ATR qty returned is for all of receiving. Since we are working on a specific
8364: -- MOL supply line, we need to use a LEAST to get the min qty value.

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

8641: x_dock_mean_time => l_dock_mean_time_tb(j),
8642: x_dock_end_time => l_dock_end_time_tb(j),
8643: x_expected_time => l_expected_time_tb(j));
8644:
8645: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8646: IF (l_debug = 1) THEN
8647: print_debug('3.2 - Success returned from Get_Expected_Time API');
8648: END IF;
8649: ELSE

Line 8984: p_init_msg_lst => fnd_api.g_false,

8980: print_debug('3.5 - Call the Available_demand_to_reserve API');
8981: END IF;
8982: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
8983: (p_api_version_number => 1.0,
8984: p_init_msg_lst => fnd_api.g_false,
8985: x_return_status => x_return_status,
8986: x_msg_count => x_msg_count,
8987: x_msg_data => x_msg_data,
8988: p_primary_uom_code => l_primary_uom_code,

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

8994: p_task_id => l_shopping_basket_tb(i).task_id,
8995: x_qty_available_to_reserve => l_demand_atr_prim_qty,
8996: x_qty_available => l_demand_available_qty);
8997:
8998: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8999: IF (l_debug = 1) THEN
9000: print_debug('3.5 - Error returned from available_demand_to_reserve API: '
9001: || x_return_status);
9002: END IF;

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

9061: x_msg_data => x_msg_data,
9062: x_api_is_implemented => l_api_is_implemented,
9063: x_sorted_order_tb => l_sorted_order_tb);
9064:
9065: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
9066: IF (l_debug = 1) THEN
9067: print_debug('3.5 - Success returned from Sort_Demand_Lines API');
9068: END IF;
9069: ELSE

Line 9310: p_init_msg_lst => fnd_api.g_false,

9306: print_debug('4.2 - Call the Available_demand_to_reserve API');
9307: END IF;
9308: INV_RESERVATION_AVAIL_PVT.Available_demand_to_reserve
9309: (p_api_version_number => 1.0,
9310: p_init_msg_lst => fnd_api.g_false,
9311: x_return_status => x_return_status,
9312: x_msg_count => x_msg_count,
9313: x_msg_data => x_msg_data,
9314: p_primary_uom_code => l_primary_uom_code,

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

9320: p_task_id => l_demand_task_id,
9321: x_qty_available_to_reserve => l_demand_atr_prim_qty,
9322: x_qty_available => l_demand_available_qty);
9323:
9324: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9325: IF (l_debug = 1) THEN
9326: print_debug('4.2 - Error returned from available_demand_to_reserve API: '
9327: || x_return_status);
9328: END IF;

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

9507: x_msg_data => x_msg_data,
9508: x_error_code => l_error_code
9509: );
9510:
9511: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9512: IF (l_debug = 1) THEN
9513: print_debug('4.3 - Error returned from Crossdock_WDD API: '
9514: || x_return_status);
9515: END IF;

Line 9516: --RAISE fnd_api.g_exc_error;

9512: IF (l_debug = 1) THEN
9513: print_debug('4.3 - Error returned from Crossdock_WDD API: '
9514: || x_return_status);
9515: END IF;
9516: --RAISE fnd_api.g_exc_error;
9517: -- If an exception occurs while modifying a database record, rollback the changes
9518: -- and just go to the next available demand to crossdock
9519: ROLLBACK TO Crossdock_Demand_sp;
9520: -- We need to also rollback changes done to local PLSQL data structures

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

9547: x_return_status => x_return_status,
9548: x_msg_data => x_msg_data
9549: );
9550:
9551: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS OR l_wip_qty_allocated = 0) THEN
9552: IF (l_debug = 1) THEN
9553: print_debug('4.3 - Error returned from wip_picking_pub.allocate_material API: '
9554: || x_return_status);
9555: END IF;

Line 9556: --RAISE fnd_api.g_exc_error;

9552: IF (l_debug = 1) THEN
9553: print_debug('4.3 - Error returned from wip_picking_pub.allocate_material API: '
9554: || x_return_status);
9555: END IF;
9556: --RAISE fnd_api.g_exc_error;
9557: -- If an exception occurs while modifying a database record, rollback the changes
9558: -- and just go to the next available demand to crossdock
9559: ROLLBACK TO Crossdock_Demand_sp;
9560: GOTO next_demand;

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

9608: x_new_mol_id => l_new_mol_id , --9695544
9609: l_criterion_type => G_CRT_TYPE_OPP
9610: );
9611:
9612: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9613: IF (l_debug = 1) THEN
9614: print_debug('4.3 - Error returned from Crossdock_MOL API: '
9615: || x_return_status);
9616: END IF;

Line 9617: --RAISE fnd_api.g_exc_error;

9613: IF (l_debug = 1) THEN
9614: print_debug('4.3 - Error returned from Crossdock_MOL API: '
9615: || x_return_status);
9616: END IF;
9617: --RAISE fnd_api.g_exc_error;
9618: -- If an exception occurs while modifying a database record, rollback the changes
9619: -- and just go to the next WDD record or supply to crossdock.
9620: ROLLBACK TO Crossdock_Demand_sp;
9621: -- We need to also rollback changes done to local PLSQL data structures

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

9685: x_msg_count => x_msg_count,
9686: x_msg_data => x_msg_data
9687: );
9688:
9689: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9690: IF (l_debug = 1) THEN
9691: print_debug('4.4 - Error returned from create_reservation API: '
9692: || x_return_status);
9693: END IF;

Line 9694: --RAISE fnd_api.g_exc_error;

9690: IF (l_debug = 1) THEN
9691: print_debug('4.4 - Error returned from create_reservation API: '
9692: || x_return_status);
9693: END IF;
9694: --RAISE fnd_api.g_exc_error;
9695: -- If an exception occurs while modifying a database record, rollback the changes
9696: -- and just go to the next WDD record to crossdock.
9697: ROLLBACK TO Crossdock_Demand_sp;
9698: -- We need to also rollback changes done to local PLSQL data structures

Line 9775: p_init_msg_list => fnd_api.g_false,

9771: l_in_rec.action_code := 'UPDATE';
9772:
9773: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
9774: (p_api_version_number => 1.0,
9775: p_init_msg_list => fnd_api.g_false,
9776: p_commit => fnd_api.g_false,
9777: x_return_status => x_return_status,
9778: x_msg_count => x_msg_count,
9779: x_msg_data => x_msg_data,

Line 9776: p_commit => fnd_api.g_false,

9772:
9773: WSH_INTERFACE_EXT_GRP.Create_Update_Delivery_Detail
9774: (p_api_version_number => 1.0,
9775: p_init_msg_list => fnd_api.g_false,
9776: p_commit => fnd_api.g_false,
9777: x_return_status => x_return_status,
9778: x_msg_count => x_msg_count,
9779: x_msg_data => x_msg_data,
9780: p_detail_info_tab => l_detail_info_tab,

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

9781: p_in_rec => l_in_rec,
9782: x_out_rec => l_out_rec
9783: );
9784:
9785: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9786: IF (l_debug = 1) THEN
9787: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
9788: || x_return_status);
9789: END IF;

Line 9790: RAISE FND_API.G_EXC_ERROR;

9786: IF (l_debug = 1) THEN
9787: print_debug('5.1 - Error returned from Create_Update_Delivery_Detail API: '
9788: || x_return_status);
9789: END IF;
9790: RAISE FND_API.G_EXC_ERROR;
9791: ELSE
9792: IF (l_debug = 1) THEN
9793: print_debug('5.1 - Successfully updated the crossdocked WDD records');
9794: END IF;

Line 9810: x_return_status := fnd_api.g_ret_sts_success;

9806: -- This variable is reused each time we call another API but we try to continue with the
9807: -- flow and raise an exception only when absolutely necessary. Since this is a planning
9808: -- and pegging API, if exceptions occur, we should just not peg anything instead of throwing
9809: -- errors.
9810: x_return_status := fnd_api.g_ret_sts_success;
9811: l_progress := '560';
9812:
9813: IF (l_debug = 1) THEN
9814: print_debug('***End of Opportunistic_Cross_Dock***');

Line 9821: WHEN FND_API.G_EXC_ERROR THEN

9817: -- Stop the profiler
9818: -- dbms_profiler.stop_profiler;
9819:
9820: EXCEPTION
9821: WHEN FND_API.G_EXC_ERROR THEN
9822: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9823: x_return_status := fnd_api.g_ret_sts_error;
9824: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9825: p_data => x_msg_data);

Line 9823: x_return_status := fnd_api.g_ret_sts_error;

9819:
9820: EXCEPTION
9821: WHEN FND_API.G_EXC_ERROR THEN
9822: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9823: x_return_status := fnd_api.g_ret_sts_error;
9824: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9825: p_data => x_msg_data);
9826: IF (l_debug = 1) THEN
9827: print_debug('Exiting Opportunistic_Cross_Dock - Execution error: ' ||

Line 9831: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

9827: print_debug('Exiting Opportunistic_Cross_Dock - Execution error: ' ||
9828: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
9829: END IF;
9830:
9831: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9832: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9833: x_return_status := fnd_api.g_ret_sts_unexp_error;
9834: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9835: p_data => x_msg_data);

Line 9833: x_return_status := fnd_api.g_ret_sts_unexp_error;

9829: END IF;
9830:
9831: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9832: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9833: x_return_status := fnd_api.g_ret_sts_unexp_error;
9834: fnd_msg_pub.count_and_get(p_count => x_msg_count,
9835: p_data => x_msg_data);
9836: IF (l_debug = 1) THEN
9837: print_debug('Exiting Opportunistic_Cross_Dock - Unexpected error: ' ||

Line 9843: x_return_status := fnd_api.g_ret_sts_unexp_error;

9839: END IF;
9840:
9841: WHEN OTHERS THEN
9842: ROLLBACK TO Opportunistic_Cross_Dock_sp;
9843: x_return_status := fnd_api.g_ret_sts_unexp_error;
9844: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
9845: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
9846: END IF;
9847: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 10176: x_return_status := fnd_api.g_ret_sts_success;

10172: fnd_msg_pub.initialize;
10173: l_progress := '20';
10174:
10175: -- Initialize API return status to success
10176: x_return_status := fnd_api.g_ret_sts_success;
10177: l_progress := '30';
10178:
10179: -- Validate p_supply_or_demand
10180: -- {{

Line 10186: RAISE fnd_api.g_exc_unexpected_error;

10182: IF (p_supply_or_demand NOT IN (G_SRC_TYPE_SUP, G_SRC_TYPE_DEM)) THEN
10183: IF (l_debug = 1) THEN
10184: print_debug('Invalid value for p_supply_or_demand: ' || p_supply_or_demand);
10185: END IF;
10186: RAISE fnd_api.g_exc_unexpected_error;
10187: END IF;
10188: l_progress := '40';
10189:
10190: -- Validate that source type matches supply or demand

Line 10199: RAISE fnd_api.g_exc_unexpected_error;

10195: IF (p_source_type_id NOT IN (1, 7, 25, 26)) THEN
10196: IF (l_debug = 1) THEN
10197: print_debug('Invalid supply source type: ' || p_source_type_id);
10198: END IF;
10199: RAISE fnd_api.g_exc_unexpected_error;
10200: END IF;
10201: ELSIF (p_supply_or_demand = G_SRC_TYPE_DEM) THEN
10202: -- Check that source type is a valid demand source
10203: -- {{

Line 10209: RAISE fnd_api.g_exc_unexpected_error;

10205: IF (p_source_type_id NOT IN (2, 8)) THEN
10206: IF (l_debug = 1) THEN
10207: print_debug('Invalid demand source type: ' || p_source_type_id);
10208: END IF;
10209: RAISE fnd_api.g_exc_unexpected_error;
10210: END IF;
10211: END IF;
10212: l_progress := '50';
10213:

Line 10219: RAISE fnd_api.g_exc_unexpected_error;

10215: IF (p_crossdock_criterion_id IS NOT NULL) THEN
10216: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN
10217: IF (l_debug = 1) THEN
10218: print_debug('Unable to set the crossdock criterion: ' || p_crossdock_criterion_id);
10219: RAISE fnd_api.g_exc_unexpected_error;
10220: END IF;
10221: END IF;
10222:
10223: -- Get the dock schedule method from the crossdock criterion

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

10256: x_dock_mean_time => x_dock_mean_time,
10257: x_dock_end_time => x_dock_end_time,
10258: x_expected_time => x_expected_time);
10259:
10260: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10261: IF (l_debug = 1) THEN
10262: print_debug('Success returned from Custom Get_Expected_Time API');
10263: END IF;
10264: ELSE

Line 10268: RAISE fnd_api.g_exc_error;

10264: ELSE
10265: IF (l_debug = 1) THEN
10266: print_debug('Failure returned from Custom Get_Expected_Time API');
10267: END IF;
10268: RAISE fnd_api.g_exc_error;
10269: END IF;
10270:
10271: -- If the custom API is implemented, just use the values retrieved from there.
10272: -- Skip all further processing and logic in this API.

Line 10297: RAISE fnd_api.g_exc_unexpected_error;

10293: IF (l_debug = 1) THEN
10294: print_debug('WDD cursor did not return any records!');
10295: END IF;
10296: CLOSE wdd_rec_cursor;
10297: RAISE fnd_api.g_exc_unexpected_error;
10298: END IF;
10299: CLOSE wdd_rec_cursor;
10300: ELSIF (p_source_type_id = 1) THEN
10301: -- Purchase Order

Line 10311: RAISE fnd_api.g_exc_unexpected_error;

10307: IF (l_debug = 1) THEN
10308: print_debug('PO cursor did not return any records!');
10309: END IF;
10310: CLOSE po_rec_cursor;
10311: RAISE fnd_api.g_exc_unexpected_error;
10312: END IF;
10313: CLOSE po_rec_cursor;
10314: ELSIF (p_source_type_id = 25) THEN
10315: -- ASN

Line 10325: RAISE fnd_api.g_exc_unexpected_error;

10321: IF (l_debug = 1) THEN
10322: print_debug('ASN cursor did not return any records!');
10323: END IF;
10324: CLOSE asn_rec_cursor;
10325: RAISE fnd_api.g_exc_unexpected_error;
10326: END IF;
10327: CLOSE asn_rec_cursor;
10328: ELSIF (p_source_type_id = 7) THEN
10329: -- Internal Requisition

Line 10339: RAISE fnd_api.g_exc_unexpected_error;

10335: IF (l_debug = 1) THEN
10336: print_debug('INTREQ cursor did not return any records!');
10337: END IF;
10338: CLOSE intreq_rec_cursor;
10339: RAISE fnd_api.g_exc_unexpected_error;
10340: END IF;
10341: CLOSE intreq_rec_cursor;
10342: ELSIF (p_source_type_id = 26) THEN
10343: -- In Transit Shipment

Line 10353: RAISE fnd_api.g_exc_unexpected_error;

10349: IF (l_debug = 1) THEN
10350: print_debug('INTSHIP cursor did not return any records!');
10351: END IF;
10352: CLOSE intship_rec_cursor;
10353: RAISE fnd_api.g_exc_unexpected_error;
10354: END IF;
10355: CLOSE intship_rec_cursor;
10356: END IF;
10357: l_progress := '70';

Line 10389: p_init_msg_list => fnd_api.g_false,

10385: l_progress := '90';
10386:
10387: wms_dock_appointments_pub.get_dock_appointment_range
10388: (p_api_version => 1.0,
10389: p_init_msg_list => fnd_api.g_false,
10390: x_return_status => x_return_status,
10391: x_msg_count => x_msg_count,
10392: x_msg_data => x_msg_data,
10393: x_dock_appt_list => l_dock_appt_list,

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

10411: END IF;
10412: l_progress := '100';
10413:
10414: -- Check to see if the get_dock_appointment_range API returned successfully
10415: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10416: IF (l_debug = 1) THEN
10417: print_debug('Success returned from get_dock_appointment_range API');
10418: END IF;
10419: ELSE

Line 10423: x_return_status := fnd_api.g_ret_sts_success;

10419: ELSE
10420: IF (l_debug = 1) THEN
10421: print_debug('Failure returned from get_dock_appointment_range API');
10422: END IF;
10423: x_return_status := fnd_api.g_ret_sts_success;
10424: -- do not thrown an error but just go to the next way to calculate time
10425: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10426: --FND_MSG_PUB.ADD;
10427: --RAISE fnd_api.g_exc_error;

Line 10427: --RAISE fnd_api.g_exc_error;

10423: x_return_status := fnd_api.g_ret_sts_success;
10424: -- do not thrown an error but just go to the next way to calculate time
10425: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10426: --FND_MSG_PUB.ADD;
10427: --RAISE fnd_api.g_exc_error;
10428: END IF;
10429: l_progress := '110';
10430: END IF;
10431:

Line 10449: p_init_msg_list => fnd_api.g_false,

10445: l_progress := '120';
10446:
10447: wms_dock_appointments_pub.get_dock_appointment_range
10448: (p_api_version => 1.0,
10449: p_init_msg_list => fnd_api.g_false,
10450: x_return_status => x_return_status,
10451: x_msg_count => x_msg_count,
10452: x_msg_data => x_msg_data,
10453: x_dock_appt_list => l_dock_appt_list,

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

10472: END IF;
10473: l_progress := '130';
10474:
10475: -- Check to see if the get_dock_appointment_range API returned successfully
10476: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10477: IF (l_debug = 1) THEN
10478: print_debug('Success returned from get_dock_appointment_range API');
10479: END IF;
10480: ELSE

Line 10484: x_return_status := fnd_api.g_ret_sts_success;

10480: ELSE
10481: IF (l_debug = 1) THEN
10482: print_debug('Failure returned from get_dock_appointment_range API');
10483: END IF;
10484: x_return_status := fnd_api.g_ret_sts_success;
10485: -- do not thrown an error but just go to the next way to calculate time
10486: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10487: --FND_MSG_PUB.ADD;
10488: --RAISE fnd_api.g_exc_error;

Line 10488: --RAISE fnd_api.g_exc_error;

10484: x_return_status := fnd_api.g_ret_sts_success;
10485: -- do not thrown an error but just go to the next way to calculate time
10486: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10487: --FND_MSG_PUB.ADD;
10488: --RAISE fnd_api.g_exc_error;
10489: END IF;
10490: l_progress := '140';
10491: END IF;
10492:

Line 10611: WHEN FND_API.G_EXC_ERROR THEN

10607: print_debug('***End of Get_Expected_Time***');
10608: END IF;
10609:
10610: EXCEPTION
10611: WHEN FND_API.G_EXC_ERROR THEN
10612: ROLLBACK TO Get_Expected_Time_sp;
10613: x_return_status := fnd_api.g_ret_sts_error;
10614: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10615: p_data => x_msg_data);

Line 10613: x_return_status := fnd_api.g_ret_sts_error;

10609:
10610: EXCEPTION
10611: WHEN FND_API.G_EXC_ERROR THEN
10612: ROLLBACK TO Get_Expected_Time_sp;
10613: x_return_status := fnd_api.g_ret_sts_error;
10614: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10615: p_data => x_msg_data);
10616: IF (l_debug = 1) THEN
10617: print_debug('Exiting Get_Expected_Time - Execution error: ' ||

Line 10621: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

10617: print_debug('Exiting Get_Expected_Time - Execution error: ' ||
10618: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
10619: END IF;
10620:
10621: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10622: ROLLBACK TO Get_Expected_Time_sp;
10623: x_return_status := fnd_api.g_ret_sts_unexp_error;
10624: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10625: p_data => x_msg_data);

Line 10623: x_return_status := fnd_api.g_ret_sts_unexp_error;

10619: END IF;
10620:
10621: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10622: ROLLBACK TO Get_Expected_Time_sp;
10623: x_return_status := fnd_api.g_ret_sts_unexp_error;
10624: fnd_msg_pub.count_and_get(p_count => x_msg_count,
10625: p_data => x_msg_data);
10626: IF (l_debug = 1) THEN
10627: print_debug('Exiting Get_Expected_Time - Unexpected error: ' ||

Line 10633: x_return_status := fnd_api.g_ret_sts_unexp_error;

10629: END IF;
10630:
10631: WHEN OTHERS THEN
10632: ROLLBACK TO Get_Expected_Time_sp;
10633: x_return_status := fnd_api.g_ret_sts_unexp_error;
10634: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
10635: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
10636: END IF;
10637: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 10750: x_return_status := fnd_api.g_ret_sts_success;

10746: fnd_msg_pub.initialize;
10747: l_progress := '20';
10748:
10749: -- Initialize API return status to success
10750: x_return_status := fnd_api.g_ret_sts_success;
10751: l_progress := '30';
10752:
10753: -- Query and cache the crossdock criterion record
10754: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN

Line 10757: RAISE fnd_api.g_exc_unexpected_error;

10753: -- Query and cache the crossdock criterion record
10754: IF (NOT set_crossdock_criteria(p_crossdock_criterion_id)) THEN
10755: IF (l_debug = 1) THEN
10756: print_debug('Unable to set the crossdock criterion: ' || p_crossdock_criterion_id);
10757: RAISE fnd_api.g_exc_unexpected_error;
10758: END IF;
10759: END IF;
10760: l_progress := '40';
10761:

Line 10770: RAISE fnd_api.g_exc_unexpected_error;

10766: IF (l_debug = 1) THEN
10767: print_debug('Invalid crossdock criterion type: ' ||
10768: g_crossdock_criteria_tb(p_crossdock_criterion_id).criterion_type);
10769: END IF;
10770: RAISE fnd_api.g_exc_unexpected_error;
10771: END IF;*/
10772: l_progress := '50';
10773:
10774: -- Get the dock schedule method from the crossdock criterion

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

10796: x_dock_start_time => x_dock_start_time,
10797: x_dock_end_time => x_dock_end_time,
10798: x_expected_time => x_expected_time);
10799:
10800: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10801: IF (l_debug = 1) THEN
10802: print_debug('Success returned from Custom Get_Expected_Delivery_Time API');
10803: END IF;
10804: ELSE

Line 10808: RAISE fnd_api.g_exc_error;

10804: ELSE
10805: IF (l_debug = 1) THEN
10806: print_debug('Failure returned from Custom Get_Expected_Delivery_Time API');
10807: END IF;
10808: RAISE fnd_api.g_exc_error;
10809: END IF;
10810:
10811: -- If the custom API is implemented, just use the values retrieved from there.
10812: -- Skip all further processing and logic in this API.

Line 10836: RAISE fnd_api.g_exc_unexpected_error;

10832: IF (l_debug = 1) THEN
10833: print_debug('Delivery cursor did not return any records!');
10834: END IF;
10835: CLOSE delivery_rec_cursor;
10836: RAISE fnd_api.g_exc_unexpected_error;
10837: END IF;
10838: CLOSE delivery_rec_cursor;
10839: l_progress := '70';
10840:

Line 10895: p_init_msg_list => fnd_api.g_false,

10891: l_progress := '90';
10892:
10893: wms_dock_appointments_pub.get_dock_appointment_range
10894: (p_api_version => 1.0,
10895: p_init_msg_list => fnd_api.g_false,
10896: x_return_status => x_return_status,
10897: x_msg_count => x_msg_count,
10898: x_msg_data => x_msg_data,
10899: x_dock_appt_list => l_dock_appt_list,

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

10917: END IF;
10918: l_progress := '100';
10919:
10920: -- Check to see if the get_dock_appointment_range API returned successfully
10921: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10922: IF (l_debug = 1) THEN
10923: print_debug('Success returned from get_dock_appointment_range API');
10924: END IF;
10925: ELSE

Line 10929: x_return_status := fnd_api.g_ret_sts_success;

10925: ELSE
10926: IF (l_debug = 1) THEN
10927: print_debug('Failure returned from get_dock_appointment_range API');
10928: END IF;
10929: x_return_status := fnd_api.g_ret_sts_success;
10930: -- do not thrown an error but just go to the next way to calculate time
10931: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10932: --FND_MSG_PUB.ADD;
10933: --RAISE fnd_api.g_exc_error;

Line 10933: --RAISE fnd_api.g_exc_error;

10929: x_return_status := fnd_api.g_ret_sts_success;
10930: -- do not thrown an error but just go to the next way to calculate time
10931: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10932: --FND_MSG_PUB.ADD;
10933: --RAISE fnd_api.g_exc_error;
10934: END IF;
10935: l_progress := '110';
10936: END IF;
10937:

Line 10954: p_init_msg_list => fnd_api.g_false,

10950: l_progress := '120';
10951:
10952: wms_dock_appointments_pub.get_dock_appointment_range
10953: (p_api_version => 1.0,
10954: p_init_msg_list => fnd_api.g_false,
10955: x_return_status => x_return_status,
10956: x_msg_count => x_msg_count,
10957: x_msg_data => x_msg_data,
10958: x_dock_appt_list => l_dock_appt_list,

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

10976: END IF;
10977: l_progress := '130';
10978:
10979: -- Check to see if the get_dock_appointment_range API returned successfully
10980: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
10981: IF (l_debug = 1) THEN
10982: print_debug('Success returned from get_dock_appointment_range API');
10983: END IF;
10984: ELSE

Line 10988: x_return_status := fnd_api.g_ret_sts_success;

10984: ELSE
10985: IF (l_debug = 1) THEN
10986: print_debug('Failure returned from get_dock_appointment_range API');
10987: END IF;
10988: x_return_status := fnd_api.g_ret_sts_success;
10989: -- do not thrown an error but just go to the next way to calculate time
10990: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10991: --FND_MSG_PUB.ADD;
10992: --RAISE fnd_api.g_exc_error;

Line 10992: --RAISE fnd_api.g_exc_error;

10988: x_return_status := fnd_api.g_ret_sts_success;
10989: -- do not thrown an error but just go to the next way to calculate time
10990: --FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_MO_ERROR');
10991: --FND_MSG_PUB.ADD;
10992: --RAISE fnd_api.g_exc_error;
10993: END IF;
10994: l_progress := '140';
10995: END IF;
10996:

Line 11122: WHEN FND_API.G_EXC_ERROR THEN

11118: print_debug('***End of Get_Expected_Delivery_Time***');
11119: END IF;
11120:
11121: EXCEPTION
11122: WHEN FND_API.G_EXC_ERROR THEN
11123: ROLLBACK TO Get_Expected_Delivery_Time_sp;
11124: x_return_status := fnd_api.g_ret_sts_error;
11125: fnd_msg_pub.count_and_get(p_count => x_msg_count,
11126: p_data => x_msg_data);

Line 11124: x_return_status := fnd_api.g_ret_sts_error;

11120:
11121: EXCEPTION
11122: WHEN FND_API.G_EXC_ERROR THEN
11123: ROLLBACK TO Get_Expected_Delivery_Time_sp;
11124: x_return_status := fnd_api.g_ret_sts_error;
11125: fnd_msg_pub.count_and_get(p_count => x_msg_count,
11126: p_data => x_msg_data);
11127: IF (l_debug = 1) THEN
11128: print_debug('Exiting Get_Expected_Delivery_Time - Execution error: ' ||

Line 11132: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

11128: print_debug('Exiting Get_Expected_Delivery_Time - Execution error: ' ||
11129: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'));
11130: END IF;
11131:
11132: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11133: ROLLBACK TO Get_Expected_Delivery_Time_sp;
11134: x_return_status := fnd_api.g_ret_sts_unexp_error;
11135: fnd_msg_pub.count_and_get(p_count => x_msg_count,
11136: p_data => x_msg_data);

Line 11134: x_return_status := fnd_api.g_ret_sts_unexp_error;

11130: END IF;
11131:
11132: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11133: ROLLBACK TO Get_Expected_Delivery_Time_sp;
11134: x_return_status := fnd_api.g_ret_sts_unexp_error;
11135: fnd_msg_pub.count_and_get(p_count => x_msg_count,
11136: p_data => x_msg_data);
11137: IF (l_debug = 1) THEN
11138: print_debug('Exiting Get_Expected_Delivery_Time - Unexpected error: ' ||

Line 11144: x_return_status := fnd_api.g_ret_sts_unexp_error;

11140: END IF;
11141:
11142: WHEN OTHERS THEN
11143: ROLLBACK TO Get_Expected_Delivery_Time_sp;
11144: x_return_status := fnd_api.g_ret_sts_unexp_error;
11145: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
11146: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
11147: END IF;
11148: fnd_msg_pub.count_and_get(p_count => x_msg_count,