DBA Data[Home] [Help]

APPS.WMS_DIRECT_SHIP_PVT dependencies on FND_API

Line 105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;

101: g_del_grp_rls_fld_temp del_grp_rls_fld;
102: -- checked deliveries for lpn
103: g_checked_deliveries checked_deliveries;
104:
105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;
106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;
107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;
109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;

Line 106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;

102: -- checked deliveries for lpn
103: g_checked_deliveries checked_deliveries;
104:
105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;
106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;
107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;
109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;
110: G_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);

Line 107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;

103: g_checked_deliveries checked_deliveries;
104:
105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;
106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;
107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;
109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;
110: G_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
111:

Line 108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;

104:
105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;
106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;
107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;
109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;
110: G_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
111:
112: PROCEDURE DEBUG(p_message IN VARCHAR2,

Line 109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;

105: G_RET_STS_SUCCESS VARCHAR2(1) := FND_API.g_ret_sts_success;
106: G_RET_STS_ERROR VARCHAR2(1) := FND_API.g_ret_sts_error;
107: G_RET_STS_UNEXP_ERROR VARCHAR2(1) := FND_API.G_RET_STS_UNEXP_ERROR;
108: G_FALSE VARCHAR2(1) := FND_API.G_FALSE;
109: G_TRUE VARCHAR2(1) := FND_API.G_TRUE;
110: G_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
111:
112: PROCEDURE DEBUG(p_message IN VARCHAR2,
113: p_module IN VARCHAR2 ,

Line 474: x_return_Status := fnd_api.g_ret_sts_success;

470: debug('p_delivery_id : ' || p_delivery_id ,'Check_Delivery');
471: debug('p_org_id : ' || p_org_id ,'Check_Delivery');
472: debug('p_dock_door_id : ' || p_dock_door_id,'Check_Delivery');
473: END IF;
474: x_return_Status := fnd_api.g_ret_sts_success;
475: x_error_code := 0; -- everything is fine
476: -- This procedure does all validation for a Delivery before it can be CONFIRMED
477: -- x_error_code = 1 Missing Item Calling program should call Missing Item cursor
478: -- x_error_code = 2 Material Status does not allow Sales Order Issue transaction

Line 508: x_return_Status := fnd_api.g_ret_sts_error;

504: IF (l_debug = 1) THEN
505: debug('Lock delivery successful','Check_Delivery');
506: END IF;
507: EXCEPTION WHEN others THEN
508: x_return_Status := fnd_api.g_ret_sts_error;
509: fnd_message.set_name('WMS','WMS_DEL_LOCK_FAILURE');
510: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
511: /*Failed to aquire locks on wsh_new_deliveries for */
512: fnd_msg_pub.add;

Line 545: x_return_Status := fnd_api.g_ret_sts_error;

541: END IF;
542: fnd_msg_pub.count_and_get( p_count => x_msg_count,
543: p_data => x_msg_data
544: );
545: x_return_Status := fnd_api.g_ret_sts_error;
546: x_error_code := 1; -- not entire delivery is ready
547: rollback;
548: return;
549: ELSIF l_return_status <> 'S' THEN

Line 550: x_return_Status := fnd_api.g_ret_sts_unexp_error;

546: x_error_code := 1; -- not entire delivery is ready
547: rollback;
548: return;
549: ELSIF l_return_status <> 'S' THEN
550: x_return_Status := fnd_api.g_ret_sts_unexp_error;
551: rollback;
552: return;
553: END IF;
554:

Line 563: IF l_return_status = fnd_api.g_ret_sts_error THEN

559: INV_SHIPPING_TRANSACTION_PUB.CHECK_DELIVERY_STATUS
560: (p_delivery_id => p_delivery_id
561: ,x_return_Status => l_return_status
562: ,x_error_msg => x_error_msg);
563: IF l_return_status = fnd_api.g_ret_sts_error THEN
564: fnd_message.set_name('WMS','WMS_NO_ISSUE_TRX');
565: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
566: /*Material Status prevents the sales order issue transaction for one
567: or more items in the delivery */

Line 575: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

571: 'returned with Status E '||P_DELIVERY_ID,'Check_Delivery');
572: END IF;
573: x_error_code := 2; -- status doesn't allow ship confirm
574: RAISE incomplete_delivery;
575: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
576: fnd_message.set_name('WMS','WMS_NO_ISSUE_TRX');
577: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
578: /*Material Status prevents the sales order issue transaction for one or
579: more items in the delivery */

Line 582: RAISE fnd_api.g_exc_unexpected_error;

578: /*Material Status prevents the sales order issue transaction for one or
579: more items in the delivery */
580: FND_MSG_PUB.ADD;
581: x_error_code := 2;
582: RAISE fnd_api.g_exc_unexpected_error;
583: END IF;
584: IF (l_debug = 1) THEN
585: debug('INV_SHIPPING_TRANSACTION_PUB.CHECK_DELIVERY_STATUS was successful','Check_Delivery');
586: END IF;

Line 597: IF l_return_status = fnd_api.g_ret_sts_error THEN

593: x_ship_set => l_ship_set,
594: x_return_Status => l_return_status,
595: x_error_msg => l_error_msg,
596: p_direct_ship_flag => 'Y' );
597: IF l_return_status = fnd_api.g_ret_sts_error THEN
598: IF (l_debug = 1) THEN
599: debug('WMS_SHIPPING_TRANSACTION_PUB.ship_set_check returned with status' ||
600: ' E- shipset '||l_ship_set,'Check_Delivery');
601: END IF;

Line 606: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

602: FND_MESSAGE.SET_NAME('INV', 'WMS_WSH_SHIPSET_FORCED');
603: FND_MESSAGE.SET_TOKEN('SHIP_SET_NAME', l_ship_set);
604: FND_MSG_PUB.ADD;
605: RAISE unspec_ship_set_exists;
606: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
607: FND_MESSAGE.SET_NAME('INV', 'WMS_SHIPSET_FAILED');
608: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME', l_del_name);
609: /*Ship set validation for the delivery has failed*/
610: FND_MSG_PUB.ADD;

Line 614: RAISE fnd_api.g_exc_unexpected_error;

610: FND_MSG_PUB.ADD;
611: IF (l_debug = 1) THEN
612: debug('WMS_SHIPPING_TRANSACTION_PUB.ship_set_check returned with status U','Check_Delivery');
613: END IF;
614: RAISE fnd_api.g_exc_unexpected_error;
615: END IF;
616: IF (l_debug = 1) THEN
617: debug('Call to WMS_SHIPPING_TRANSACTION_PUB.SHIP_SET_CHECK was successful ','Check_Delivery');
618: END IF;

Line 639: l_return_status := fnd_api.g_ret_sts_error;

635: FND_MSG_PUB.ADD;
636: fnd_msg_pub.count_and_get( p_count => x_msg_count,
637: p_data => x_msg_data
638: );
639: l_return_status := fnd_api.g_ret_sts_error;
640: x_error_code := 4;
641: IF (l_debug = 1) THEN
642: debug('lpn is in other dock door lpn,dock_door and del_id are '
643: || x_outermost_lpn ||' - ' ||l_loaded_dock_door || ' - '

Line 661: IF l_return_status = fnd_api.g_ret_sts_error THEN

657: ,x_msg_count => l_msg_count
658: ,x_msg_data => l_msg_data
659: ,p_delivery_id => p_delivery_id
660: );
661: IF l_return_status = fnd_api.g_ret_sts_error THEN
662: IF (l_debug = 1) THEN
663: debug('Call to chk_del_for_direct_ship returned with Status E '||P_DELIVERY_ID,'Check_Delivery');
664: END IF;
665: RAISE delivery_lines_mix;

Line 666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

662: IF (l_debug = 1) THEN
663: debug('Call to chk_del_for_direct_ship returned with Status E '||P_DELIVERY_ID,'Check_Delivery');
664: END IF;
665: RAISE delivery_lines_mix;
666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
667: IF (l_debug = 1) THEN
668: debug('Call to chk_del_for_direct_ship returned with Status U '||P_DELIVERY_ID,'Check_Delivery');
669: END IF;
670: RAISE fnd_api.g_exc_unexpected_error;

Line 670: RAISE fnd_api.g_exc_unexpected_error;

666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
667: IF (l_debug = 1) THEN
668: debug('Call to chk_del_for_direct_ship returned with Status U '||P_DELIVERY_ID,'Check_Delivery');
669: END IF;
670: RAISE fnd_api.g_exc_unexpected_error;
671: END IF;
672: EXCEPTION
673: WHEN unspec_ship_set_exists THEN
674: x_return_status := fnd_api.g_ret_sts_error;

Line 674: x_return_status := fnd_api.g_ret_sts_error;

670: RAISE fnd_api.g_exc_unexpected_error;
671: END IF;
672: EXCEPTION
673: WHEN unspec_ship_set_exists THEN
674: x_return_status := fnd_api.g_ret_sts_error;
675: x_error_code := 3;
676: IF (l_debug = 1) THEN
677: debug('In exception unspec_ship_set_exists -Check_Deliveries - errorcode '
678: ||x_error_code,'Check_Delivery');

Line 686: x_return_status := fnd_api.g_ret_sts_error;

682: ( p_count => x_msg_count
683: , p_data => x_msg_data);
684:
685: WHEN incomplete_delivery THEN
686: x_return_status := fnd_api.g_ret_sts_error;
687: fnd_msg_pub.count_and_get( p_count => x_msg_count,
688: p_data => x_msg_data
689: );
690: x_error_code := 2;

Line 696: x_return_status := fnd_api.g_ret_sts_error;

692: debug('In exception incomplete_delivery -Check_Deliveries - errorcode '||x_error_code,'Check_Delivery');
693: END IF;
694:
695: WHEN no_ship_method_code THEN
696: x_return_status := fnd_api.g_ret_sts_error;
697: FND_MESSAGE.SET_NAME('WMS','WMS_SHIP_METHOD_CODE');
698: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME', l_del_name);
699: /* No Ship method code provided for the delivery DELIVERY_NAME .This is required */
700: FND_MSG_PUB.ADD;

Line 709: x_return_status := fnd_api.g_ret_sts_error;

705: debug('In exception no_ship_method_code -Check_Deliveries - errorcode '||x_error_code,'Check_Delivery');
706: END IF;
707: x_error_code := 6;
708: WHEN check_ord_line_split THEN
709: x_return_status := fnd_api.g_ret_sts_error;
710: x_error_code := 7;
711: fnd_msg_pub.count_and_get
712: ( p_count => x_msg_count
713: , p_data => x_msg_data

Line 716: x_return_status := fnd_api.g_ret_sts_error;

712: ( p_count => x_msg_count
713: , p_data => x_msg_data
714: );
715: WHEN delivery_lines_mix THEN
716: x_return_status := fnd_api.g_ret_sts_error;
717: x_error_code := 8;
718: FND_MESSAGE.SET_NAME('WMS','WMS_DEL_LINES_MIX');
719: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME', l_del_name);
720: /* The Delivery also has lines that were not staged through Direct Ship*/

Line 726: WHEN fnd_api.g_exc_unexpected_error THEN

722: fnd_msg_pub.count_and_get
723: ( p_count => x_msg_count
724: , p_data => x_msg_data
725: );
726: WHEN fnd_api.g_exc_unexpected_error THEN
727: x_return_status := fnd_api.g_ret_sts_unexp_error ;
728: -- Get message count and data
729: fnd_msg_pub.count_and_get
730: ( p_count => x_msg_count

Line 727: x_return_status := fnd_api.g_ret_sts_unexp_error ;

723: ( p_count => x_msg_count
724: , p_data => x_msg_data
725: );
726: WHEN fnd_api.g_exc_unexpected_error THEN
727: x_return_status := fnd_api.g_ret_sts_unexp_error ;
728: -- Get message count and data
729: fnd_msg_pub.count_and_get
730: ( p_count => x_msg_count
731: , p_data => x_msg_data

Line 738: x_return_status := fnd_api.g_ret_sts_unexp_error;

734: debug('In unexpected -Check_Deliveries - errorcode '||x_error_code,'Check_Delivery');
735: END IF;
736:
737: WHEN OTHERS THEN
738: x_return_status := fnd_api.g_ret_sts_unexp_error;
739: fnd_msg_pub.count_and_get
740: ( p_count => x_msg_count
741: , p_data => x_msg_data
742: );

Line 767: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;

763: ,p_freight_term_name IN VARCHAR2
764: ,p_intmed_shipto_loc_id IN NUMBER
765: )IS
766:
767: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
768: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
769: l_msg_count NUMBER;
770: l_msg_data VARCHAR2(20000);
771: l_fob_location_id NUMBER := P_fob_location_id;

Line 768: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;

764: ,p_intmed_shipto_loc_id IN NUMBER
765: )IS
766:
767: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
768: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
769: l_msg_count NUMBER;
770: l_msg_data VARCHAR2(20000);
771: l_fob_location_id NUMBER := P_fob_location_id;
772: l_intmed_shipto_loc_id NUMBER :=p_intmed_shipto_loc_id;

Line 798: x_return_status := fnd_api.g_ret_sts_success;

794: AND FREIGHT_COST_ID IS NULL
795: FOR UPDATE OF FREIGHT_COST_ID;
796: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
797: BEGIN
798: x_return_status := fnd_api.g_ret_sts_success;
799:
800: IF p_delivery_id IS NOT NULL THEN
801: SELECT status_code
802: INTO l_status_code

Line 854: , p_commit => FND_API.G_FALSE

850:
851: WSH_FREIGHT_COSTS_PUB.Create_Update_Freight_Costs (
852: p_api_version_number =>1.0
853: , p_init_msg_list =>l_init_msg_list
854: , p_commit => FND_API.G_FALSE
855: , x_return_status => l_return_status
856: , x_msg_count => l_msg_count
857: , x_msg_data => l_msg_data
858: , p_pub_freight_costs => l_freight_cost_rec

Line 863: IF( l_return_status IN(fnd_api.g_ret_sts_error)) THEN

859: , p_action_code => 'CREATE'
860: , x_freight_cost_id => l_freight_cost_id
861: );
862:
863: IF( l_return_status IN(fnd_api.g_ret_sts_error)) THEN
864: FND_MESSAGE.SET_NAME('WMS','WMS_CREATE_FREIGHT_FAIL');
865: FND_MESSAGE.SET_TOKEN('OBJ','Delivery');
866: FND_MESSAGE.SET_TOKEN('VAL',l_del_name);
867: /* Creation of freight cost for OBJ VAL has failed */

Line 872: raise FND_API.G_EXC_ERROR;

868: fnd_msg_pub.add;
869: IF (l_debug = 1) THEN
870: debug('Update of Freight Cost for Del is failed ','UPDATE_DELIVERY');
871: END IF;
872: raise FND_API.G_EXC_ERROR;
873: ELSIF (l_return_status = 'U' ) THEN
874: FND_MESSAGE.SET_TOKEN('OBJ','Delivery');
875: FND_MESSAGE.SET_TOKEN('VAL',l_del_name);
876: /* Creation of freight cost for has failed */

Line 881: raise fnd_api.g_exc_unexpected_error;

877: fnd_msg_pub.add;
878: IF (l_debug = 1) THEN
879: debug('Update of Freight Cost for Del is succ ','UPDATE_DELIVERY');
880: END IF;
881: raise fnd_api.g_exc_unexpected_error;
882: END IF;
883:
884: UPDATE WMS_FREIGHT_COST_TEMP
885: SET freight_cost_id = l_freight_cost_id,

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

955: ,p_delivery_name => l_delivery_name
956: ,x_delivery_id => l_delivery_id
957: ,x_name => l_name);
958:
959: IF( l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
960: IF (l_debug = 1) THEN
961: debug('Create _Update_Delivery has errored ','UPDATE_DELIVERY');
962: END IF;
963: FND_MESSAGE.SET_NAME('WMS','WMS_UPDATE_DELIVERY_FAILED');

Line 967: raise FND_API.G_EXC_UNEXPECTED_ERROR;

963: FND_MESSAGE.SET_NAME('WMS','WMS_UPDATE_DELIVERY_FAILED');
964: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
965: /* Updation of delivery has failed */
966: fnd_msg_pub.add;
967: raise FND_API.G_EXC_UNEXPECTED_ERROR;
968: ELSIF (l_return_status IN (fnd_api.g_ret_sts_error)) THEN
969: FND_MESSAGE.SET_NAME('WMS','UPDATE_DELIVERY_FAILED');
970: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
971: /* Updation of delivery has failed */

Line 968: ELSIF (l_return_status IN (fnd_api.g_ret_sts_error)) THEN

964: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
965: /* Updation of delivery has failed */
966: fnd_msg_pub.add;
967: raise FND_API.G_EXC_UNEXPECTED_ERROR;
968: ELSIF (l_return_status IN (fnd_api.g_ret_sts_error)) THEN
969: FND_MESSAGE.SET_NAME('WMS','UPDATE_DELIVERY_FAILED');
970: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
971: /* Updation of delivery has failed */
972: fnd_msg_pub.add;

Line 973: raise FND_API.G_EXC_ERROR;

969: FND_MESSAGE.SET_NAME('WMS','UPDATE_DELIVERY_FAILED');
970: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
971: /* Updation of delivery has failed */
972: fnd_msg_pub.add;
973: raise FND_API.G_EXC_ERROR;
974: END IF;
975: END IF;
976: IF (l_debug = 1) THEN
977: debug('Update delivery completed successfully');

Line 980: WHEN fnd_api.g_exc_error THEN

976: IF (l_debug = 1) THEN
977: debug('Update delivery completed successfully');
978: END IF;
979: EXCEPTION
980: WHEN fnd_api.g_exc_error THEN
981: x_return_status := fnd_api.g_ret_sts_error;
982: fnd_msg_pub.count_and_get( p_count => x_msg_count,
983: p_data => x_msg_data
984: );

Line 981: x_return_status := fnd_api.g_ret_sts_error;

977: debug('Update delivery completed successfully');
978: END IF;
979: EXCEPTION
980: WHEN fnd_api.g_exc_error THEN
981: x_return_status := fnd_api.g_ret_sts_error;
982: fnd_msg_pub.count_and_get( p_count => x_msg_count,
983: p_data => x_msg_data
984: );
985: ROLLBACK;

Line 991: WHEN fnd_api.g_exc_unexpected_error THEN

987: IF delivery_freight%ISOPEN THEN
988: CLOSE delivery_freight;
989: END IF;
990:
991: WHEN fnd_api.g_exc_unexpected_error THEN
992: x_return_status := fnd_api.g_ret_sts_unexp_error;
993: fnd_msg_pub.count_and_get( p_count => x_msg_count,
994: p_data => x_msg_data
995: );

Line 992: x_return_status := fnd_api.g_ret_sts_unexp_error;

988: CLOSE delivery_freight;
989: END IF;
990:
991: WHEN fnd_api.g_exc_unexpected_error THEN
992: x_return_status := fnd_api.g_ret_sts_unexp_error;
993: fnd_msg_pub.count_and_get( p_count => x_msg_count,
994: p_data => x_msg_data
995: );
996: ROLLBACK;

Line 1007: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1003: END IF;
1004:
1005: WHEN OTHERS THEN
1006: ROLLBACK;
1007: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1008: fnd_msg_pub.count_and_get( p_count => x_msg_count,
1009: p_data => x_msg_data
1010: );
1011: IF delivery_freight%ISOPEN THEN

Line 1104: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;

1100: ,p_intmed_shipto_loc_id IN NUMBER DEFAULT NULL
1101: ,p_org_id IN NUMBER DEFAULT NULL
1102: ,p_dock_door_id IN NUMBER DEFAULT NULL
1103: ) IS
1104: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1105: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1106: l_msg_count NUMBER;
1107: l_msg_data VARCHAR2(20000);
1108:

Line 1105: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;

1101: ,p_org_id IN NUMBER DEFAULT NULL
1102: ,p_dock_door_id IN NUMBER DEFAULT NULL
1103: ) IS
1104: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1105: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1106: l_msg_count NUMBER;
1107: l_msg_data VARCHAR2(20000);
1108:
1109: l_ship_set VARCHAR2(2000) := NULL;

Line 1162: x_return_status := FND_API.G_RET_STS_SUCCESS;

1158: FROM wsh_new_deliveries_ob_grp_v
1159: WHERE delivery_id = p_delivery_id;
1160:
1161: BEGIN
1162: x_return_status := FND_API.G_RET_STS_SUCCESS;
1163: x_ret_code := 0;
1164: IF (l_debug = 1) THEN
1165: debug('p_delivery_id : '||p_delivery_id,'ship_confirm');
1166: debug('p_net_weight : '||p_net_weight,'ship_confirm');

Line 1226: IF l_return_status = fnd_api.g_ret_sts_error THEN

1222: ,p_freight_term_code => p_freight_term_code
1223: ,p_freight_term_name => p_freight_term_name
1224: ,p_intmed_shipto_loc_id => p_intmed_shipto_loc_id
1225: );
1226: IF l_return_status = fnd_api.g_ret_sts_error THEN
1227: IF (l_debug = 1) THEN
1228: DEBUG('Update Delivery API failed with status E ','SHIP_CONFIRM');
1229: END IF;
1230: RAISE fnd_api.g_exc_error;

Line 1230: RAISE fnd_api.g_exc_error;

1226: IF l_return_status = fnd_api.g_ret_sts_error THEN
1227: IF (l_debug = 1) THEN
1228: DEBUG('Update Delivery API failed with status E ','SHIP_CONFIRM');
1229: END IF;
1230: RAISE fnd_api.g_exc_error;
1231: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1232: IF (l_debug = 1) THEN
1233: DEBUG('Update Delivery API failed with status U','SHIP_CONFIRM');
1234: END IF;

Line 1231: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1227: IF (l_debug = 1) THEN
1228: DEBUG('Update Delivery API failed with status E ','SHIP_CONFIRM');
1229: END IF;
1230: RAISE fnd_api.g_exc_error;
1231: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1232: IF (l_debug = 1) THEN
1233: DEBUG('Update Delivery API failed with status U','SHIP_CONFIRM');
1234: END IF;
1235: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1235: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1231: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1232: IF (l_debug = 1) THEN
1233: DEBUG('Update Delivery API failed with status U','SHIP_CONFIRM');
1234: END IF;
1235: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1236: END IF;
1237: END IF;
1238:
1239: -- Check for material status, shipset and missing item

Line 1263: x_return_status := FND_API.G_RET_STS_ERROR;

1259: ,p_delivery_id => p_delivery_id
1260: ,p_organization_id => p_org_id
1261: ,p_dock_door_id => p_dock_door_id);
1262: x_error_code := l_error_code;
1263: x_return_status := FND_API.G_RET_STS_ERROR;
1264: fnd_msg_pub.count_and_get( p_count => x_msg_count,
1265: p_data => x_msg_data);
1266: RETURN;
1267: ELSIF (l_error_code in (2,3,4,5,6,7,8) ) THEN

Line 1340: IF l_return_status = fnd_api.g_ret_sts_error THEN

1336: ,p_dock_door_id => p_dock_door_id
1337: ,p_delivery_id =>p_delivery_id /* bug 2741857 */
1338: ,p_direct_ship_flag => 'Y'
1339: );
1340: IF l_return_status = fnd_api.g_ret_sts_error THEN
1341: IF (l_debug = 1) THEN
1342: debug(' Ship_Confirm. Create Trip Failed','Ship_Confirm');
1343: END IF;
1344: fnd_message.set_name('WMS','WMS_CREATE_TRIP_FAIL');

Line 1348: RAISE fnd_api.g_exc_error;

1344: fnd_message.set_name('WMS','WMS_CREATE_TRIP_FAIL');
1345: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1346: /* Failed to create trip for the delivery DELIVERY_NAME */
1347: FND_MSG_PUB.ADD;
1348: RAISE fnd_api.g_exc_error;
1349: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1350: fnd_message.set_name('WMS','WMS_CREATE_TRIP_FAIL');
1351: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1352: FND_MSG_PUB.ADD;

Line 1349: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1345: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1346: /* Failed to create trip for the delivery DELIVERY_NAME */
1347: FND_MSG_PUB.ADD;
1348: RAISE fnd_api.g_exc_error;
1349: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1350: fnd_message.set_name('WMS','WMS_CREATE_TRIP_FAIL');
1351: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1352: FND_MSG_PUB.ADD;
1353: IF (l_debug = 1) THEN

Line 1356: RAISE fnd_api.g_exc_unexpected_error;

1352: FND_MSG_PUB.ADD;
1353: IF (l_debug = 1) THEN
1354: debug(' Ship_Confirm. Create Trip Failed Unexpected Error','Ship_Confirm');
1355: END IF;
1356: RAISE fnd_api.g_exc_unexpected_error;
1357: END IF;
1358: IF (l_debug = 1) THEN
1359: debug('before calling Ship Confirm','Ship Confirm');
1360: END IF;

Line 1383: IF l_return_status = fnd_api.g_ret_sts_error THEN

1379: debug('l_trip_id: ' || l_trip_id, 'Ship_Confirm');
1380: debug('l_trip_shipmethod_code: ' || l_trip_shipmethod_code, 'Ship_Confirm');
1381: debug('l_trip_shipmethod_meaning: ' || l_trip_shipmethod_meaning,'Ship_Confirm');
1382: END IF;
1383: IF l_return_status = fnd_api.g_ret_sts_error THEN
1384: RAISE fnd_api.g_exc_error;
1385: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1386: RAISE fnd_api.g_exc_unexpected_error;
1387: END IF;

Line 1384: RAISE fnd_api.g_exc_error;

1380: debug('l_trip_shipmethod_code: ' || l_trip_shipmethod_code, 'Ship_Confirm');
1381: debug('l_trip_shipmethod_meaning: ' || l_trip_shipmethod_meaning,'Ship_Confirm');
1382: END IF;
1383: IF l_return_status = fnd_api.g_ret_sts_error THEN
1384: RAISE fnd_api.g_exc_error;
1385: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1386: RAISE fnd_api.g_exc_unexpected_error;
1387: END IF;
1388:

Line 1385: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1381: debug('l_trip_shipmethod_meaning: ' || l_trip_shipmethod_meaning,'Ship_Confirm');
1382: END IF;
1383: IF l_return_status = fnd_api.g_ret_sts_error THEN
1384: RAISE fnd_api.g_exc_error;
1385: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1386: RAISE fnd_api.g_exc_unexpected_error;
1387: END IF;
1388:
1389: -- If everything is fine then confirm the delivery

Line 1386: RAISE fnd_api.g_exc_unexpected_error;

1382: END IF;
1383: IF l_return_status = fnd_api.g_ret_sts_error THEN
1384: RAISE fnd_api.g_exc_error;
1385: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1386: RAISE fnd_api.g_exc_unexpected_error;
1387: END IF;
1388:
1389: -- If everything is fine then confirm the delivery
1390:

Line 1417: IF (l_return_status=fnd_api.g_ret_sts_success) THEN

1413:
1414: IF (l_debug = 1) THEN
1415: debug('after calling Ship confirm','Ship confirm');
1416: END IF;
1417: IF (l_return_status=fnd_api.g_ret_sts_success) THEN
1418: l_count:=0;
1419:
1420: FOR i in 1..WSH_INTEGRATION.G_MSG_TABLE.COUNT LOOP
1421: IF (WSH_INTEGRATION.G_MSG_TABLE(i).MESSAGE_TYPE = 'W' ) THEN

Line 1432: p_commit => FND_API.g_false,

1428: END IF;
1429: WMS_SHIPPING_MESSAGES.PROCESS_SHIPPING_WARNING_MSGS(x_return_status => l_return_status ,
1430: x_msg_count => l_msg_count ,
1431: x_msg_data => l_msg_data,
1432: p_commit => FND_API.g_false,
1433: x_shipping_msg_tab => l_msg_table);
1434:
1435: FOR i in 1..l_msg_table.count LOOP
1436: IF ( l_msg_table(i).MESSAGE_TYPE = 'E' ) THEN

Line 1438: l_return_status:=fnd_api.g_ret_sts_error;

1434:
1435: FOR i in 1..l_msg_table.count LOOP
1436: IF ( l_msg_table(i).MESSAGE_TYPE = 'E' ) THEN
1437: --l_error_exists := TRUE;
1438: l_return_status:=fnd_api.g_ret_sts_error;
1439: FOR j in 1..WSH_INTEGRATION.G_MSG_TABLE.COUNT LOOP
1440: IF (l_msg_table(i).message_name = WSH_INTEGRATION.G_MSG_TABLE(j).MESSAGE_NAME) THEN
1441: WSH_INTEGRATION.G_MSG_TABLE(j).MESSAGE_TYPE := 'E';
1442: END IF;

Line 1448: IF( l_return_status IN (fnd_api.g_ret_sts_error)) THEN

1444: END IF;
1445: END LOOP;
1446: l_msg_table.delete;
1447: END IF;
1448: IF( l_return_status IN (fnd_api.g_ret_sts_error)) THEN
1449: FND_MESSAGE.SET_NAME('WMS','WMS_CONFIRM_DEL_FAIL');
1450: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1451: -- Ship Confirm of delivey failed
1452: FND_MSG_PUB.ADD;

Line 1456: raise FND_API.G_EXC_ERROR;

1452: FND_MSG_PUB.ADD;
1453: IF (l_debug = 1) THEN
1454: debug(' Ship_Confirm. Confirm Delivery is failing from WSH_DELIVERY_PUB','Ship_Confirm');
1455: END IF;
1456: raise FND_API.G_EXC_ERROR;
1457:
1458: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1459: FND_MESSAGE.SET_NAME('WMS','WMS_CONFIRM_DEL_FAIL');
1460: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);

Line 1458: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1454: debug(' Ship_Confirm. Confirm Delivery is failing from WSH_DELIVERY_PUB','Ship_Confirm');
1455: END IF;
1456: raise FND_API.G_EXC_ERROR;
1457:
1458: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1459: FND_MESSAGE.SET_NAME('WMS','WMS_CONFIRM_DEL_FAIL');
1460: FND_MESSAGE.SET_TOKEN('DELIVERY_NAME',l_del_name);
1461: /* cONFIRM DELIVERY FAILED*/
1462: FND_MSG_PUB.ADD;

Line 1466: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1462: FND_MSG_PUB.ADD;
1463: IF (l_debug = 1) THEN
1464: debug(' Ship_Confirm. Confirm Delivery is failing from WSH_DELIVERY_PUB, Unexpected error','Ship_Confirm');
1465: END IF;
1466: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1467: END IF;
1468:
1469: --Ship confirm successful. Display only Interface Trip stop message from shipping
1470: process_mobile_msg;

Line 1473: WHEN fnd_api.g_exc_error THEN

1469: --Ship confirm successful. Display only Interface Trip stop message from shipping
1470: process_mobile_msg;
1471: x_msg_count := fnd_msg_pub.count_msg;
1472: EXCEPTION
1473: WHEN fnd_api.g_exc_error THEN
1474: x_return_status := fnd_api.g_ret_sts_error;
1475: IF (l_debug = 1) THEN
1476: debug('In Exception (expected error) - E ','Ship_Confirm');
1477: END IF;

Line 1474: x_return_status := fnd_api.g_ret_sts_error;

1470: process_mobile_msg;
1471: x_msg_count := fnd_msg_pub.count_msg;
1472: EXCEPTION
1473: WHEN fnd_api.g_exc_error THEN
1474: x_return_status := fnd_api.g_ret_sts_error;
1475: IF (l_debug = 1) THEN
1476: debug('In Exception (expected error) - E ','Ship_Confirm');
1477: END IF;
1478: fnd_msg_pub.count_and_get

Line 1482: WHEN fnd_api.g_exc_unexpected_error THEN

1478: fnd_msg_pub.count_and_get
1479: ( p_count => x_msg_count,
1480: p_data => x_msg_data
1481: );
1482: WHEN fnd_api.g_exc_unexpected_error THEN
1483: x_return_status := fnd_api.g_ret_sts_unexp_error;
1484: IF (l_debug = 1) THEN
1485: debug('In Exception (unexpected error) - U ','Ship_Confirm');
1486: END IF;

Line 1483: x_return_status := fnd_api.g_ret_sts_unexp_error;

1479: ( p_count => x_msg_count,
1480: p_data => x_msg_data
1481: );
1482: WHEN fnd_api.g_exc_unexpected_error THEN
1483: x_return_status := fnd_api.g_ret_sts_unexp_error;
1484: IF (l_debug = 1) THEN
1485: debug('In Exception (unexpected error) - U ','Ship_Confirm');
1486: END IF;
1487: fnd_msg_pub.count_and_get

Line 1492: x_return_status := fnd_api.g_ret_sts_unexp_error;

1488: ( p_count => x_msg_count,
1489: p_data => x_msg_data
1490: );
1491: WHEN OTHERS THEN
1492: x_return_status := fnd_api.g_ret_sts_unexp_error;
1493: IF (l_debug = 1) THEN
1494: debug('In Exception (others)' ||SQLERRM,'Ship_Confirm');
1495: END IF;
1496: fnd_msg_pub.count_and_get

Line 1523: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;

1519: ,p_freight_term_name IN VARCHAR2
1520: ,p_intmed_shipto_loc_id IN NUMBER
1521: ,p_org_id IN NUMBER
1522: ,p_dock_door_id IN NUMBER)IS
1523: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1524: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1525: l_msg_count NUMBER;
1526: l_msg_data VARCHAR2(20000);
1527: l_rowid ROWID;

Line 1524: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;

1520: ,p_intmed_shipto_loc_id IN NUMBER
1521: ,p_org_id IN NUMBER
1522: ,p_dock_door_id IN NUMBER)IS
1523: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1524: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1525: l_msg_count NUMBER;
1526: l_msg_data VARCHAR2(20000);
1527: l_rowid ROWID;
1528: l_delivery_id NUMBER;

Line 1565: x_return_status:= FND_API.G_RET_STS_SUCCESS;

1561: -- delivery loaded on the dock.
1562: IF (l_debug = 1) THEN
1563: debug('Confirm All Deliveries: Begin delivery_id'||to_char(p_delivery_id),'CONFIRM_ALL_DELIVERIES');
1564: END IF;
1565: x_return_status:= FND_API.G_RET_STS_SUCCESS;
1566: IF (l_debug = 1) THEN
1567: debug('The value OF p_delivery_id is '||p_delivery_id,'Confirm_All_Delivery');
1568: debug('The value OF p_net_weight is '||p_net_weight,'Confirm_All_Delivery');
1569: debug('The value OF p_gross_weight is '||p_gross_weight,'Confirm_All_Delivery');

Line 1612: IF l_return_status = fnd_api.g_ret_sts_error THEN

1608: );
1609: IF (l_debug = 1) THEN
1610: debug('Return Status from Update_Delivery: '||l_return_status, ' Confirm_All_Deliveries');
1611: END IF;
1612: IF l_return_status = fnd_api.g_ret_sts_error THEN
1613: IF (l_debug = 1) THEN
1614: debug('Update Delivery API failed with status E ','Confirm_All_deliveries');
1615: END IF;
1616: RAISE fnd_api.g_exc_error;

Line 1616: RAISE fnd_api.g_exc_error;

1612: IF l_return_status = fnd_api.g_ret_sts_error THEN
1613: IF (l_debug = 1) THEN
1614: debug('Update Delivery API failed with status E ','Confirm_All_deliveries');
1615: END IF;
1616: RAISE fnd_api.g_exc_error;
1617: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1618: IF (l_debug = 1) THEN
1619: debug('Update Delivery API failed with status U','Confirm_All_Deliveries');
1620: END IF;

Line 1617: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1613: IF (l_debug = 1) THEN
1614: debug('Update Delivery API failed with status E ','Confirm_All_deliveries');
1615: END IF;
1616: RAISE fnd_api.g_exc_error;
1617: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1618: IF (l_debug = 1) THEN
1619: debug('Update Delivery API failed with status U','Confirm_All_Deliveries');
1620: END IF;
1621: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1621: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1617: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1618: IF (l_debug = 1) THEN
1619: debug('Update Delivery API failed with status U','Confirm_All_Deliveries');
1620: END IF;
1621: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1622: END IF;
1623: END IF;
1624: /* bug # 2994098 */
1625: -- If a delivery is ship confirmed from STF without closing the trip

Line 1677: IF l_return_status = fnd_api.g_ret_sts_error THEN

1673: IF (l_debug = 1) THEN
1674: debug('Return Status - Error_code from Ship_Confirm 1: '||l_return_status
1675: ||' - '||l_error_code, ' Confirm_All_Deliveries');
1676: END IF;
1677: IF l_return_status = fnd_api.g_ret_sts_error THEN
1678: IF (l_debug = 1) THEN
1679: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1680: END IF;
1681: RAISE fnd_api.g_exc_error;

Line 1681: RAISE fnd_api.g_exc_error;

1677: IF l_return_status = fnd_api.g_ret_sts_error THEN
1678: IF (l_debug = 1) THEN
1679: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1680: END IF;
1681: RAISE fnd_api.g_exc_error;
1682: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1683: IF (l_debug = 1) THEN
1684: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1685: END IF;

Line 1682: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1678: IF (l_debug = 1) THEN
1679: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1680: END IF;
1681: RAISE fnd_api.g_exc_error;
1682: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1683: IF (l_debug = 1) THEN
1684: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1685: END IF;
1686: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1686: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1682: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1683: IF (l_debug = 1) THEN
1684: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1685: END IF;
1686: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1687: END IF;
1688: END IF;
1689: IF ((p_org_id IS NOT NULL) AND (p_dock_door_id IS NOT NULL)) THEN
1690: IF (l_debug = 1) THEN

Line 1717: IF l_return_status = fnd_api.g_ret_sts_error THEN

1713: IF (l_debug = 1) THEN
1714: debug('Return Status - Error_code from Ship_Confirm 2: '||l_return_status
1715: ||' - '||l_error_code, ' Confirm_All_Deliveries');
1716: END IF;
1717: IF l_return_status = fnd_api.g_ret_sts_error THEN
1718: IF (l_debug = 1) THEN
1719: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1720: END IF;
1721: RAISE fnd_api.g_exc_error;

Line 1721: RAISE fnd_api.g_exc_error;

1717: IF l_return_status = fnd_api.g_ret_sts_error THEN
1718: IF (l_debug = 1) THEN
1719: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1720: END IF;
1721: RAISE fnd_api.g_exc_error;
1722: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1723: IF (l_debug = 1) THEN
1724: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1725: END IF;

Line 1722: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

1718: IF (l_debug = 1) THEN
1719: debug('Ship Confirm API failed with status E ','Confirm_All_deliveries');
1720: END IF;
1721: RAISE fnd_api.g_exc_error;
1722: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1723: IF (l_debug = 1) THEN
1724: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1725: END IF;
1726: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1726: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1722: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1723: IF (l_debug = 1) THEN
1724: debug('Ship Confirm API failed with status U','Confirm_All_Deliveries');
1725: END IF;
1726: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1727: END IF;
1728: END LOOP;
1729: close loaded_deliveries;
1730: END IF;

Line 1733: WHEN fnd_api.g_exc_error THEN

1729: close loaded_deliveries;
1730: END IF;
1731:
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: IF loaded_deliveries%isopen THEN
1736: CLOSE loaded_deliveries;
1737: END IF ;

Line 1734: x_return_status := fnd_api.g_ret_sts_error;

1730: END IF;
1731:
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: IF loaded_deliveries%isopen THEN
1736: CLOSE loaded_deliveries;
1737: END IF ;
1738: IF (l_debug = 1) THEN

Line 1745: WHEN fnd_api.g_exc_unexpected_error THEN

1741: fnd_msg_pub.count_and_get
1742: ( p_count => x_msg_count,
1743: p_data => x_msg_data
1744: );
1745: WHEN fnd_api.g_exc_unexpected_error THEN
1746: x_return_status := fnd_api.g_ret_sts_unexp_error;
1747: IF loaded_deliveries%isopen THEN
1748: CLOSE loaded_deliveries;
1749: END IF ;

Line 1746: x_return_status := fnd_api.g_ret_sts_unexp_error;

1742: ( p_count => x_msg_count,
1743: p_data => x_msg_data
1744: );
1745: WHEN fnd_api.g_exc_unexpected_error THEN
1746: x_return_status := fnd_api.g_ret_sts_unexp_error;
1747: IF loaded_deliveries%isopen THEN
1748: CLOSE loaded_deliveries;
1749: END IF ;
1750: IF (l_debug = 1) THEN

Line 1758: x_return_status := fnd_api.g_ret_sts_unexp_error;

1754: ( p_count => x_msg_count,
1755: p_data => x_msg_data
1756: );
1757: WHEN OTHERS THEN
1758: x_return_status := fnd_api.g_ret_sts_unexp_error;
1759: IF loaded_deliveries%isopen THEN
1760: CLOSE loaded_deliveries;
1761: END IF ;
1762: IF (l_debug = 1) THEN

Line 1795: x_return_status:= fnd_api.g_ret_sts_success;

1791: l_out_trip_name VARCHAR2(30);
1792:
1793: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1794: BEGIN
1795: x_return_status:= fnd_api.g_ret_sts_success;
1796: wms_globals.g_ship_confirm_method := 'DIRECT';
1797: IF (l_debug = 1) THEN
1798: debug('Begin Create Trip ','CREATE_TRIP');
1799: debug('p_organization_id : ' || p_organization_id,'CREATE_TRIP');

Line 1858: p_init_msg_list => FND_API.G_TRUE,

1854: debug('The value of l_chk_trip_id is '||l_chk_trip_id,'create_trip');
1855: END IF;
1856: WSH_DELIVERIES_PUB.Delivery_Action
1857: ( p_api_version_number => 1.0,
1858: p_init_msg_list => FND_API.G_TRUE,
1859: x_return_status => l_return_status,
1860: x_msg_count => l_msg_count,
1861: x_msg_data => l_msg_data,
1862: p_action_code => 'ASSIGN-TRIP',

Line 1867: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN

1863: p_delivery_id => l_del_tab(i),
1864: p_asg_trip_id => l_chk_trip_id ,
1865: x_trip_id => l_out_trip_id,
1866: X_TRIP_NAME => l_out_trip_name );
1867: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN
1868: IF (l_debug = 1) THEN
1869: debug('UPDATE WSTT with the trip_id assigned','CREATE_TRIP');
1870: END IF;
1871: UPDATE WMS_SHIPPING_TRANSACTION_TEMP

Line 1874: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN

1870: END IF;
1871: UPDATE WMS_SHIPPING_TRANSACTION_TEMP
1872: SET trip_id = l_chk_trip_id
1873: WHERE delivery_id = l_del_tab(i);
1874: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1875: l_auto_trip_del(l_auto_trip_index) := l_del_tab(i);
1876: l_auto_trip_index := l_auto_trip_index +1;
1877: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1878: IF (l_debug = 1) THEN

Line 1877: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1873: WHERE delivery_id = l_del_tab(i);
1874: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1875: l_auto_trip_del(l_auto_trip_index) := l_del_tab(i);
1876: l_auto_trip_index := l_auto_trip_index +1;
1877: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1878: IF (l_debug = 1) THEN
1879: debug('Return unexpected error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP',
1880: 'WMS_DIRECT_SHIP_PVT.Create_Trip');
1881: END IF;

Line 1882: RAISE fnd_api.g_exc_unexpected_error;

1878: IF (l_debug = 1) THEN
1879: debug('Return unexpected error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP',
1880: 'WMS_DIRECT_SHIP_PVT.Create_Trip');
1881: END IF;
1882: RAISE fnd_api.g_exc_unexpected_error;
1883: END IF;
1884: END LOOP;
1885: ELSIF l_del_tab.COUNT >0 THEN
1886: IF (l_debug = 1) THEN

Line 1893: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN

1889: WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP(p_del_rows => l_del_tab,
1890: x_trip_id => l_trip_id,
1891: x_trip_name => l_trip_name,
1892: x_return_status => l_return_status);
1893: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN
1894: IF (l_debug = 1) THEN
1895: debug('UPDATE WSTT with the trip created','CREATE_TRIP');
1896: END IF;
1897: FOR k in 1..l_del_tab.COUNT LOOP

Line 1902: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN

1898: UPDATE WMS_SHIPPING_TRANSACTION_TEMP
1899: SET trip_id = l_trip_id
1900: WHERE delivery_id = l_del_tab(k);
1901: END LOOP;
1902: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1903: IF (l_debug = 1) THEN
1904: debug('Return error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP','WMS_DIRECT_SHIP_PVT.Create_Trip');
1905: END IF;
1906: RAISE fnd_api.g_exc_error;

Line 1906: RAISE fnd_api.g_exc_error;

1902: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1903: IF (l_debug = 1) THEN
1904: debug('Return error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP','WMS_DIRECT_SHIP_PVT.Create_Trip');
1905: END IF;
1906: RAISE fnd_api.g_exc_error;
1907: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1908: IF (l_debug = 1) THEN
1909: debug('Return unexpected error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP',
1910: 'WMS_DIRECT_SHIP_PVT.Create_Trip');

Line 1907: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1903: IF (l_debug = 1) THEN
1904: debug('Return error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP','WMS_DIRECT_SHIP_PVT.Create_Trip');
1905: END IF;
1906: RAISE fnd_api.g_exc_error;
1907: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1908: IF (l_debug = 1) THEN
1909: debug('Return unexpected error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP',
1910: 'WMS_DIRECT_SHIP_PVT.Create_Trip');
1911: END IF;

Line 1912: RAISE fnd_api.g_exc_unexpected_error;

1908: IF (l_debug = 1) THEN
1909: debug('Return unexpected error from WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP',
1910: 'WMS_DIRECT_SHIP_PVT.Create_Trip');
1911: END IF;
1912: RAISE fnd_api.g_exc_unexpected_error;
1913: END IF;
1914: END IF;
1915:
1916: IF l_auto_trip_del.count >0 THEN

Line 1925: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN

1921: WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP(p_del_rows => l_auto_trip_del,
1922: x_trip_id => l_trip_id,
1923: x_trip_name => l_trip_name,
1924: x_return_status => l_return_status);
1925: IF l_return_status IN (fnd_api.g_ret_sts_success) THEN
1926: IF (l_debug = 1) THEN
1927: debug('UPDATE WSTT with the trip for failed assignments','CREATE_TRIP');
1928: END IF;
1929:

Line 1936: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN

1932: SET trip_id = l_trip_id
1933: WHERE delivery_id = l_auto_trip_del(j);
1934: END LOOP;
1935:
1936: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1937: IF (l_debug = 1) THEN
1938: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status E ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1939: END IF;
1940: RAISE fnd_api.g_exc_error;

Line 1940: RAISE fnd_api.g_exc_error;

1936: ELSIF l_return_status IN (fnd_api.g_ret_sts_error) THEN
1937: IF (l_debug = 1) THEN
1938: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status E ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1939: END IF;
1940: RAISE fnd_api.g_exc_error;
1941: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1942: IF (l_debug = 1) THEN
1943: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status U ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1944: END IF;

Line 1941: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1937: IF (l_debug = 1) THEN
1938: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status E ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1939: END IF;
1940: RAISE fnd_api.g_exc_error;
1941: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1942: IF (l_debug = 1) THEN
1943: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status U ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1944: END IF;
1945: RAISE fnd_api.g_exc_unexpected_error;

Line 1945: RAISE fnd_api.g_exc_unexpected_error;

1941: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1942: IF (l_debug = 1) THEN
1943: debug('The API WSH_TRIPS_ACTIONS.AUTOCREATE_TRIP returned status U ','WMS_DIRECT_SHIP_PVT.Create_Trip');
1944: END IF;
1945: RAISE fnd_api.g_exc_unexpected_error;
1946: END IF;
1947: END IF;
1948:
1949: wms_globals.g_ship_confirm_method := null;

Line 1951: WHEN fnd_api.g_exc_error THEN

1947: END IF;
1948:
1949: wms_globals.g_ship_confirm_method := null;
1950: EXCEPTION
1951: WHEN fnd_api.g_exc_error THEN
1952: x_return_status := fnd_api.g_ret_sts_error;
1953: wms_globals.g_ship_confirm_method := NULL;
1954: IF (l_debug = 1) THEN
1955: debug('In Exception (expected error) - E ','CREATE_TRIP');

Line 1952: x_return_status := fnd_api.g_ret_sts_error;

1948:
1949: wms_globals.g_ship_confirm_method := null;
1950: EXCEPTION
1951: WHEN fnd_api.g_exc_error THEN
1952: x_return_status := fnd_api.g_ret_sts_error;
1953: wms_globals.g_ship_confirm_method := NULL;
1954: IF (l_debug = 1) THEN
1955: debug('In Exception (expected error) - E ','CREATE_TRIP');
1956: END IF;

Line 1961: WHEN fnd_api.g_exc_unexpected_error THEN

1957: fnd_msg_pub.count_and_get
1958: ( p_count => l_msg_count,
1959: p_data => l_msg_data
1960: );
1961: WHEN fnd_api.g_exc_unexpected_error THEN
1962: x_return_status := fnd_api.g_ret_sts_unexp_error;
1963: wms_globals.g_ship_confirm_method := NULL;
1964: IF (l_debug = 1) THEN
1965: debug('In Exception (unexpected error) - U ','Create_Trip');

Line 1962: x_return_status := fnd_api.g_ret_sts_unexp_error;

1958: ( p_count => l_msg_count,
1959: p_data => l_msg_data
1960: );
1961: WHEN fnd_api.g_exc_unexpected_error THEN
1962: x_return_status := fnd_api.g_ret_sts_unexp_error;
1963: wms_globals.g_ship_confirm_method := NULL;
1964: IF (l_debug = 1) THEN
1965: debug('In Exception (unexpected error) - U ','Create_Trip');
1966: END IF;

Line 1993: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;

1989: ,p_dock_door_id IN NUMBER DEFAULT NULL
1990: ,p_ship_method_code IN VARCHAR2 DEFAULT NULL)
1991: IS
1992:
1993: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1994: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1995: l_msg_count NUMBER;
1996: l_msg_data VARCHAR2(20000);
1997:

Line 1994: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;

1990: ,p_ship_method_code IN VARCHAR2 DEFAULT NULL)
1991: IS
1992:
1993: l_init_msg_list VARCHAR2(1) :=FND_API.G_TRUE;
1994: l_return_status VARCHAR2(1) :=FND_API.G_RET_STS_SUCCESS;
1995: l_msg_count NUMBER;
1996: l_msg_data VARCHAR2(20000);
1997:
1998: l_freight_cost_rec WSH_FREIGHT_COSTS_PUB.PubFreightCostRecType;

Line 2061: l_return_status := fnd_api.g_ret_sts_success;

2057: IF p_dock_door_id <> 0 THEN
2058: l_dock_door_id := p_dock_door_id;
2059: END IF;
2060:
2061: l_return_status := fnd_api.g_ret_sts_success;
2062: IF (l_debug = 1) THEN
2063: debug('In the procedure update trip_stop','trip_Stop');
2064: END IF;
2065:

Line 2112: , p_commit => FND_API.G_FALSE

2108: --patchst J. Shipping API cleanup
2109: WSH_FREIGHT_COSTS_PUB.Create_Update_Freight_Costs
2110: (p_api_version_number =>1.0
2111: , p_init_msg_list =>l_init_msg_list
2112: , p_commit => FND_API.G_FALSE
2113: , x_return_status => l_return_status
2114: , x_msg_count => l_msg_count
2115: , x_msg_data => l_msg_DATA
2116: , p_pub_freight_costs => l_freight_cost_rec

Line 2120: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

2116: , p_pub_freight_costs => l_freight_cost_rec
2117: , p_action_code => 'CREATE'
2118: , x_freight_cost_id => l_freight_cost_id
2119: );
2120: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2121: FND_MESSAGE.SET_NAME('WMS','WMS_CREATE_FREIGHT_FAIL');
2122: FND_MESSAGE.SET_TOKEN('OBJ','Trip');
2123: FND_MESSAGE.SET_TOKEN('VAL',l_name);
2124: /* Creation of freight cost for has failed */

Line 2130: RAISE fnd_api.g_exc_error;

2126: FND_MSG_PUB.ADD;
2127: IF (l_debug = 1) THEN
2128: debug('Create_Update Freight Cost API failed with status E ','Update Trip Stop');
2129: END IF;
2130: RAISE fnd_api.g_exc_error;
2131: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2132: FND_MESSAGE.SET_NAME('WMS','CREATE_FREIGHT_FAIL');
2133: FND_MSG_PUB.ADD;
2134: IF (l_debug = 1) THEN

Line 2131: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2127: IF (l_debug = 1) THEN
2128: debug('Create_Update Freight Cost API failed with status E ','Update Trip Stop');
2129: END IF;
2130: RAISE fnd_api.g_exc_error;
2131: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2132: FND_MESSAGE.SET_NAME('WMS','CREATE_FREIGHT_FAIL');
2133: FND_MSG_PUB.ADD;
2134: IF (l_debug = 1) THEN
2135: debug('Update Freight Cost failed with status U','Update TripStop');

Line 2137: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2133: FND_MSG_PUB.ADD;
2134: IF (l_debug = 1) THEN
2135: debug('Update Freight Cost failed with status U','Update TripStop');
2136: END IF;
2137: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2138: END IF;
2139: --\Shipping API cleanup
2140:
2141: UPDATE WMS_FREIGHT_COST_TEMP

Line 2183: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

2179: ,p_stop_info => l_stop_info
2180: ,p_trip_id => l_trip_id
2181: ,x_stop_id => l_stop_id);
2182:
2183: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2184: FND_MESSAGE.SET_NAME('WMS','WMS_UPD_STOP_FAIL');
2185: FND_MESSAGE.SET_TOKEN('TRIP_NAME',l_name);
2186: -- Failed to Create/update Trip Stop for the trip
2187: fnd_msg_pub.ADD;

Line 2191: RAISE fnd_api.g_exc_error;

2187: fnd_msg_pub.ADD;
2188: IF (l_debug = 1) THEN
2189: debug('Create_Update_Stop API failed with status E ','Update Trip Stop');
2190: END IF;
2191: RAISE fnd_api.g_exc_error;
2192: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2193: FND_MESSAGE.SET_NAME('WMS','WMS_UPD_STOP_FAIL');
2194: FND_MESSAGE.SET_TOKEN('TRIP_NAME',l_name);
2195: -- Failed to Create/update Trip Stop for the trip

Line 2192: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2188: IF (l_debug = 1) THEN
2189: debug('Create_Update_Stop API failed with status E ','Update Trip Stop');
2190: END IF;
2191: RAISE fnd_api.g_exc_error;
2192: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2193: FND_MESSAGE.SET_NAME('WMS','WMS_UPD_STOP_FAIL');
2194: FND_MESSAGE.SET_TOKEN('TRIP_NAME',l_name);
2195: -- Failed to Create/update Trip Stop for the trip
2196: fnd_msg_pub.ADD;

Line 2200: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2196: fnd_msg_pub.ADD;
2197: IF (l_debug = 1) THEN
2198: debug('Create_Update_Stop failed with status U','Update TripStop');
2199: END IF;
2200: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2201: END IF;
2202: --\Shipping API cleanup
2203: END IF; -- Update Stop
2204:

Line 2234: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

2230: ,p_action_code => 'UPDATE'
2231: ,p_trip_info => p_trip_info
2232: ,x_trip_id => l_trip_id
2233: ,x_trip_name => l_trip_name);
2234: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2235: IF (l_debug = 1) THEN
2236: debug('Create_Update_Trip API failed with status E ','Update Trip Stop');
2237: END IF;
2238: RAISE fnd_api.g_exc_error;

Line 2238: RAISE fnd_api.g_exc_error;

2234: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2235: IF (l_debug = 1) THEN
2236: debug('Create_Update_Trip API failed with status E ','Update Trip Stop');
2237: END IF;
2238: RAISE fnd_api.g_exc_error;
2239: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2240: IF (l_debug = 1) THEN
2241: debug('Create_Update_Trip failed with status U','Update TripStop');
2242: END IF;

Line 2239: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2235: IF (l_debug = 1) THEN
2236: debug('Create_Update_Trip API failed with status E ','Update Trip Stop');
2237: END IF;
2238: RAISE fnd_api.g_exc_error;
2239: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2240: IF (l_debug = 1) THEN
2241: debug('Create_Update_Trip failed with status U','Update TripStop');
2242: END IF;
2243: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2243: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2239: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2240: IF (l_debug = 1) THEN
2241: debug('Create_Update_Trip failed with status U','Update TripStop');
2242: END IF;
2243: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2244: END IF;
2245:
2246: -- Update Trip
2247:

Line 2251: WHEN fnd_api.g_exc_error THEN

2247:
2248: COMMIT;
2249:
2250: EXCEPTION
2251: WHEN fnd_api.g_exc_error THEN
2252: x_return_status := fnd_api.g_ret_sts_error;
2253: IF (l_debug = 1) THEN
2254: debug('In exception (E) ','Update_Trip_Stop');
2255: END IF;

Line 2252: x_return_status := fnd_api.g_ret_sts_error;

2248: COMMIT;
2249:
2250: EXCEPTION
2251: WHEN fnd_api.g_exc_error THEN
2252: x_return_status := fnd_api.g_ret_sts_error;
2253: IF (l_debug = 1) THEN
2254: debug('In exception (E) ','Update_Trip_Stop');
2255: END IF;
2256: ROLLBACK;

Line 2265: WHEN fnd_api.g_exc_unexpected_error THEN

2261: ( p_count => x_msg_count,
2262: p_data => x_msg_data
2263: );
2264:
2265: WHEN fnd_api.g_exc_unexpected_error THEN
2266: x_return_status := fnd_api.g_ret_sts_unexp_error;
2267: IF (l_debug = 1) THEN
2268: debug('Update of Trip Stop has failed :Unexpected Error','Update_Trip_Stop');
2269: END IF;

Line 2266: x_return_status := fnd_api.g_ret_sts_unexp_error;

2262: p_data => x_msg_data
2263: );
2264:
2265: WHEN fnd_api.g_exc_unexpected_error THEN
2266: x_return_status := fnd_api.g_ret_sts_unexp_error;
2267: IF (l_debug = 1) THEN
2268: debug('Update of Trip Stop has failed :Unexpected Error','Update_Trip_Stop');
2269: END IF;
2270: ROLLBACK;

Line 2281: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2277: );
2278:
2279: WHEN OTHERS THEN
2280: ROLLBACK;
2281: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2282: IF (l_debug = 1) THEN
2283: debug('Update of Trip has failed : Unexpected Error '||SQLERRM,'Update_trip_Stop');
2284: END IF;
2285: IF trip_freight%ISOPEN THEN

Line 2324: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;

2320: AND wdl.pick_up_stop_id = wts.stop_id;
2321:
2322: l_del_cur del_cur%ROWTYPE;
2323: l_stop_cur stop_cur%ROWTYPE;
2324: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
2325: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2326: l_msg_count NUMBER;
2327: l_msg_data VARCHAR2(20000);
2328: l_report_set_id NUMBER;

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

2321:
2322: l_del_cur del_cur%ROWTYPE;
2323: l_stop_cur stop_cur%ROWTYPE;
2324: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
2325: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2326: l_msg_count NUMBER;
2327: l_msg_data VARCHAR2(20000);
2328: l_report_set_id NUMBER;
2329: l_trip_id wsh_util_core.id_tab_type;

Line 2340: x_return_status := fnd_api.g_ret_sts_success;

2336: l_num NUMBER;
2337: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
2338:
2339: BEGIN
2340: x_return_status := fnd_api.g_ret_sts_success;
2341:
2342: IF (l_debug = 1) THEN
2343: debug('Begin print_shipping_document ','print_shipping_document');
2344: debug('p_trip_id : ' || p_trip_id , 'print_shipping_document');

Line 2369: IF l_return_status = fnd_api.g_ret_sts_error THEN

2365: , p_dock_door_id => p_dock_door_id
2366: , p_ship_method_code => p_ship_method_code
2367: );
2368:
2369: IF l_return_status = fnd_api.g_ret_sts_error THEN
2370: IF (l_debug = 1) THEN
2371: DEBUG('Update tripstop API failed with status E ', 'Print_shipping_dcouments');
2372: END IF;
2373:

Line 2374: RAISE fnd_api.g_exc_error;

2370: IF (l_debug = 1) THEN
2371: DEBUG('Update tripstop API failed with status E ', 'Print_shipping_dcouments');
2372: END IF;
2373:
2374: RAISE fnd_api.g_exc_error;
2375: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2376: IF (l_debug = 1) THEN
2377: DEBUG('Update tripstop API failed with status U ', 'Print_shipping_dcouments');
2378: END IF;

Line 2375: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2371: DEBUG('Update tripstop API failed with status E ', 'Print_shipping_dcouments');
2372: END IF;
2373:
2374: RAISE fnd_api.g_exc_error;
2375: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2376: IF (l_debug = 1) THEN
2377: DEBUG('Update tripstop API failed with status U ', 'Print_shipping_dcouments');
2378: END IF;
2379:

Line 2380: RAISE fnd_api.g_exc_unexpected_error;

2376: IF (l_debug = 1) THEN
2377: DEBUG('Update tripstop API failed with status U ', 'Print_shipping_dcouments');
2378: END IF;
2379:
2380: RAISE fnd_api.g_exc_unexpected_error;
2381: END IF;
2382:
2383: IF p_document_set_id = 0 THEN
2384: l_report_set_id := NULL;

Line 2448: l_dummy := fnd_msg_pub.get(i, fnd_api.g_true);

2444: IF l_count2 > l_count1 THEN
2445: l_count1 := l_count1 + 2;
2446:
2447: FOR i IN REVERSE l_count1 .. l_count2 LOOP
2448: l_dummy := fnd_msg_pub.get(i, fnd_api.g_true);
2449:
2450: IF (l_debug = 1) THEN
2451: DEBUG('Messages are' || l_dummy, 'Print_Shipping_document');
2452: END IF;

Line 2458: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

2454: fnd_msg_pub.delete_msg(i);
2455: END LOOP;
2456: END IF;
2457:
2458: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2459: fnd_message.set_name('WMS', 'WMS_PRINT_DOC_SET_FAIL');
2460: /* Failed to print the documents set */
2461: fnd_msg_pub.ADD;
2462:

Line 2466: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2462:
2463: IF (l_debug = 1) THEN
2464: DEBUG('Print Document_sets API failed with status E ', 'Print_shipping_dcouments');
2465: END IF;
2466: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2467: fnd_message.set_name('WMS', 'WMS_PRINT_DOC_SET_FAIL');
2468: /* Failed to print the documents set */
2469: fnd_msg_pub.ADD;
2470:

Line 2478: WHEN fnd_api.g_exc_error THEN

2474: END IF;
2475:
2476: END IF; -- Print report set
2477: EXCEPTION
2478: WHEN fnd_api.g_exc_error THEN
2479: x_return_status := fnd_api.g_ret_sts_error;
2480:
2481: IF (l_debug = 1) THEN
2482: DEBUG('Print Document has failed :Error', 'Print_shipping_dcouments');

Line 2479: x_return_status := fnd_api.g_ret_sts_error;

2475:
2476: END IF; -- Print report set
2477: EXCEPTION
2478: WHEN fnd_api.g_exc_error THEN
2479: x_return_status := fnd_api.g_ret_sts_error;
2480:
2481: IF (l_debug = 1) THEN
2482: DEBUG('Print Document has failed :Error', 'Print_shipping_dcouments');
2483: END IF;

Line 2488: WHEN fnd_api.g_exc_unexpected_error THEN

2484:
2485: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2486: ROLLBACK;
2487: -- Think of some messages here.
2488: WHEN fnd_api.g_exc_unexpected_error THEN
2489: IF (l_debug = 1) THEN
2490: DEBUG('Print Document has failed with status U', 'Print_shipping_dcouments');
2491: END IF;
2492:

Line 2493: x_return_status := fnd_api.g_ret_sts_unexp_error;

2489: IF (l_debug = 1) THEN
2490: DEBUG('Print Document has failed with status U', 'Print_shipping_dcouments');
2491: END IF;
2492:
2493: x_return_status := fnd_api.g_ret_sts_unexp_error;
2494: ROLLBACK;
2495: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2496:
2497: -- Think of some messages here.

Line 2503: x_return_status := fnd_api.g_ret_sts_unexp_error;

2499: DEBUG('Print Document has failed :Unexpected Error', 'Print_shipping_dcouments');
2500: END IF;
2501: WHEN OTHERS THEN
2502: ROLLBACK;
2503: x_return_status := fnd_api.g_ret_sts_unexp_error;
2504:
2505: IF (l_debug = 1) THEN
2506: DEBUG('Print Document has failed : Unexpected Error', 'Print_shipping_dcouments');
2507: END IF;

Line 2534: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;

2530: , p_org_id IN NUMBER DEFAULT NULL
2531: , p_dock_door_id IN NUMBER DEFAULT NULL
2532: , p_ship_method_code IN VARCHAR2 DEFAULT NULL
2533: ) IS
2534: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
2535: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2536: l_msg_count NUMBER;
2537: l_msg_data VARCHAR2(20000);
2538: l_stop_id NUMBER;

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

2531: , p_dock_door_id IN NUMBER DEFAULT NULL
2532: , p_ship_method_code IN VARCHAR2 DEFAULT NULL
2533: ) IS
2534: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
2535: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2536: l_msg_count NUMBER;
2537: l_msg_data VARCHAR2(20000);
2538: l_stop_id NUMBER;
2539: l_trip_name VARCHAR2(30);

Line 2591: x_return_status := fnd_api.g_ret_sts_success;

2587: DEBUG('p_dock_door_id : ' || p_dock_door_id, 'close_trip');
2588: DEBUG('p_ship_method_code : ' || p_ship_method_code, 'close_trip');
2589: END IF;
2590:
2591: x_return_status := fnd_api.g_ret_sts_success;
2592: fnd_msg_pub.initialize;
2593:
2594: IF (l_debug = 1) THEN
2595: DEBUG('Begin Close Trip ', 'CLOSE_TRIP');

Line 2609: RAISE fnd_api.g_exc_error;

2605: IF (l_debug = 1) THEN
2606: DEBUG('The value for trip_id passed is zero. Exiting out ', 'close_trip');
2607: END IF;
2608:
2609: RAISE fnd_api.g_exc_error;
2610: ELSE
2611: BEGIN
2612: SELECT NAME
2613: INTO l_name

Line 2659: IF l_return_status = fnd_api.g_ret_sts_error THEN

2655: , p_dock_door_id => p_dock_door_id
2656: , p_ship_method_code => p_ship_method_code
2657: );
2658:
2659: IF l_return_status = fnd_api.g_ret_sts_error THEN
2660: IF (l_debug = 1) THEN
2661: DEBUG('Print shipping documents API failed with status E ', 'Close_Trip');
2662: END IF;
2663:

Line 2664: RAISE fnd_api.g_exc_error;

2660: IF (l_debug = 1) THEN
2661: DEBUG('Print shipping documents API failed with status E ', 'Close_Trip');
2662: END IF;
2663:
2664: RAISE fnd_api.g_exc_error;
2665: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2666: IF (l_debug = 1) THEN
2667: DEBUG('Print shipping documents API failed with status U', 'Close_Trip');
2668: END IF;

Line 2665: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2661: DEBUG('Print shipping documents API failed with status E ', 'Close_Trip');
2662: END IF;
2663:
2664: RAISE fnd_api.g_exc_error;
2665: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2666: IF (l_debug = 1) THEN
2667: DEBUG('Print shipping documents API failed with status U', 'Close_Trip');
2668: END IF;
2669:

Line 2670: RAISE fnd_api.g_exc_unexpected_error;

2666: IF (l_debug = 1) THEN
2667: DEBUG('Print shipping documents API failed with status U', 'Close_Trip');
2668: END IF;
2669:
2670: RAISE fnd_api.g_exc_unexpected_error;
2671: END IF;
2672:
2673: -- Check if there is an LPN loaded on a different Dock Door for the Trip. If so throw an error
2674: -- Error code in this case is

Line 2697: x_return_status := fnd_api.g_ret_sts_error;

2693: fnd_message.set_token('TRIP', l_trip_name);
2694: fnd_message.set_token('DOCK', l_loaded_dock_door);
2695: /*Close Trip failed */
2696: fnd_msg_pub.ADD;
2697: x_return_status := fnd_api.g_ret_sts_error;
2698: CLOSE lpn_in_other_dock;
2699: RETURN;
2700: END IF;
2701:

Line 2740: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

2736: , p_trip_id => p_trip_id
2737: , p_defer_interface_flag => 'N'
2738: );
2739:
2740: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
2741: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2742: fnd_message.set_token('TRIP_NAME', l_name);
2743: /*Failed to close the trip TRIP_NAME*/
2744: fnd_msg_pub.ADD;

Line 2750: RAISE fnd_api.g_exc_error;

2746: IF (l_debug = 1) THEN
2747: DEBUG('Stop_Action API failed with status E ', 'Close_Trip');
2748: END IF;
2749:
2750: RAISE fnd_api.g_exc_error;
2751: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2753: fnd_message.set_token('TRIP_NAME', l_name);
2754: /*Failed to close the trip TRIP_NAME*/

Line 2751: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2747: DEBUG('Stop_Action API failed with status E ', 'Close_Trip');
2748: END IF;
2749:
2750: RAISE fnd_api.g_exc_error;
2751: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2753: fnd_message.set_token('TRIP_NAME', l_name);
2754: /*Failed to close the trip TRIP_NAME*/
2755: fnd_msg_pub.ADD;

Line 2761: RAISE fnd_api.g_exc_unexpected_error;

2757: IF (l_debug = 1) THEN
2758: DEBUG('Stop_Action API failed with status U', 'Close_Trip');
2759: END IF;
2760:
2761: RAISE fnd_api.g_exc_unexpected_error;
2762: END IF;
2763:
2764: OPEN delivery_details;
2765: l_del_index := 1;

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

2772: END LOOP;
2773:
2774: wms_shipping_transaction_pub.print_label(l_delivery_details_tab, l_return_status);
2775:
2776: IF x_return_status <>(fnd_api.g_ret_sts_success) THEN
2777: fnd_message.set_name('INV', 'INV_RCV_CRT_PRINT_LAB_FAIL');
2778:
2779: IF (l_debug = 1) THEN
2780: DEBUG('Label Printing failed ', 'Close Trip');

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

2799: , p_outermost_lpn_id => NULL
2800: , p_trip_id => l_trip_id
2801: );
2802:
2803: IF l_return_status =(fnd_api.g_ret_sts_error) THEN
2804: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2805: /*Failed while running cleanup program */
2806: fnd_msg_pub.ADD;
2807:

Line 2812: RAISE fnd_api.g_exc_error;

2808: IF (l_debug = 1) THEN
2809: DEBUG('CLEANUP_TEMP_RECS API failed with status E ', 'Close_Trip');
2810: END IF;
2811:
2812: RAISE fnd_api.g_exc_error;
2813: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2814: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2815: /*Failed while running cleanup program */
2816: fnd_msg_pub.ADD;

Line 2813: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2809: DEBUG('CLEANUP_TEMP_RECS API failed with status E ', 'Close_Trip');
2810: END IF;
2811:
2812: RAISE fnd_api.g_exc_error;
2813: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2814: fnd_message.set_name('WMS', 'WMS_CLOSE_TRIP_FAIL');
2815: /*Failed while running cleanup program */
2816: fnd_msg_pub.ADD;
2817:

Line 2822: RAISE fnd_api.g_exc_unexpected_error;

2818: IF (l_debug = 1) THEN
2819: DEBUG('CLEANUP_TEMP_RECS API failed with status U', 'Close_Trip');
2820: END IF;
2821:
2822: RAISE fnd_api.g_exc_unexpected_error;
2823: END IF;
2824: END LOOP;
2825:
2826: CLOSE closed_trips;

Line 2830: x_return_status := fnd_api.g_ret_sts_error;

2826: CLOSE closed_trips;
2827: -- Call clean up API at this time. This API will create
2828: EXCEPTION
2829: WHEN no_ship_method_code THEN
2830: x_return_status := fnd_api.g_ret_sts_error;
2831: fnd_message.set_name('WMS', 'WMS_SHIP_METHOD_CODE');
2832: fnd_message.set_token('TRIP_NAME', l_name);
2833: /* No Ship method code provided for the Trip .This is required */
2834: fnd_msg_pub.ADD;

Line 2837: WHEN fnd_api.g_exc_error THEN

2833: /* No Ship method code provided for the Trip .This is required */
2834: fnd_msg_pub.ADD;
2835: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2836: DEBUG('In exception no_ship_method_code - - errorcode ', 'Close Trip');
2837: WHEN fnd_api.g_exc_error THEN
2838: x_return_status := fnd_api.g_ret_sts_error;
2839: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2840: ROLLBACK;
2841:

Line 2838: x_return_status := fnd_api.g_ret_sts_error;

2834: fnd_msg_pub.ADD;
2835: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2836: DEBUG('In exception no_ship_method_code - - errorcode ', 'Close Trip');
2837: WHEN fnd_api.g_exc_error THEN
2838: x_return_status := fnd_api.g_ret_sts_error;
2839: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2840: ROLLBACK;
2841:
2842: -- Think of some messages here.

Line 2846: WHEN fnd_api.g_exc_unexpected_error THEN

2842: -- Think of some messages here.
2843: IF (l_debug = 1) THEN
2844: DEBUG('Close Trip has failed :Error', 'Close_Trip');
2845: END IF;
2846: WHEN fnd_api.g_exc_unexpected_error THEN
2847: x_return_status := fnd_api.g_ret_sts_unexp_error;
2848: ROLLBACK;
2849:
2850: -- Think of some messages here.

Line 2847: x_return_status := fnd_api.g_ret_sts_unexp_error;

2843: IF (l_debug = 1) THEN
2844: DEBUG('Close Trip has failed :Error', 'Close_Trip');
2845: END IF;
2846: WHEN fnd_api.g_exc_unexpected_error THEN
2847: x_return_status := fnd_api.g_ret_sts_unexp_error;
2848: ROLLBACK;
2849:
2850: -- Think of some messages here.
2851: IF (l_debug = 1) THEN

Line 2858: x_return_status := fnd_api.g_ret_sts_unexp_error;

2854:
2855: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2856: WHEN OTHERS THEN
2857: ROLLBACK;
2858: x_return_status := fnd_api.g_ret_sts_unexp_error;
2859:
2860: IF (l_debug = 1) THEN
2861: DEBUG('Close Trip has failed : Unexpected Error', 'Close_Trip');
2862: END IF;

Line 2929: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;

2925:
2926: l_del_lpn del_lpn%ROWTYPE;
2927: l_del_det_id NUMBER;
2928: l_status_code VARCHAR2(2);
2929: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
2930: l_del_id NUMBER;
2931: l_trip_id NUMBER;
2932: l_trip_name VARCHAR2(30);
2933: l_delivery_detail_id NUMBER;

Line 2980: x_return_status := fnd_api.g_ret_sts_success;

2976: where outermost_lpn_id = p_outermost_lpn_id;
2977:
2978:
2979: BEGIN
2980: x_return_status := fnd_api.g_ret_sts_success;
2981:
2982: IF (l_debug = 1) THEN
2983: DEBUG('p_org_id: ' || p_org_id, 'UNLOAD_TRUCK');
2984: DEBUG('p_outermost_lpn_id: ' || p_outermost_lpn_id, 'UNLOAD_TRUCK');

Line 3009: p_commit => fnd_api.g_false,

3005: END IF;
3006: wsh_freight_costs_pub.delete_freight_costs
3007: (p_api_version_number => 1.0,
3008: p_init_msg_list => l_init_msg_list,
3009: p_commit => fnd_api.g_false,
3010: x_return_status => l_return_status,
3011: x_msg_count => l_msg_count,
3012: x_msg_data => l_msg_data,
3013: p_pub_freight_costs => l_freight_costs);

Line 3062: IF (l_return_status IN(fnd_api.g_ret_sts_error)) THEN

3058: IF (l_debug = 1) THEN
3059: DEBUG('The value of return status of delivery_actions is ' || l_return_status, 'unload_truck');
3060: END IF;
3061:
3062: IF (l_return_status IN(fnd_api.g_ret_sts_error)) THEN
3063: IF (l_debug = 1) THEN
3064: DEBUG('Reopening of delivery failed ' || l_del_id, 'UNLOAD_TRUCK');
3065: END IF;
3066:

Line 3067: RAISE fnd_api.g_exc_error;

3063: IF (l_debug = 1) THEN
3064: DEBUG('Reopening of delivery failed ' || l_del_id, 'UNLOAD_TRUCK');
3065: END IF;
3066:
3067: RAISE fnd_api.g_exc_error;
3068: ELSIF(l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3069: IF (l_debug = 1) THEN
3070: DEBUG(' Reopening of delivery failed with Unexpected error' || l_del_id, 'UNLOAD_TRUCK');
3071: END IF;

Line 3068: ELSIF(l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3064: DEBUG('Reopening of delivery failed ' || l_del_id, 'UNLOAD_TRUCK');
3065: END IF;
3066:
3067: RAISE fnd_api.g_exc_error;
3068: ELSIF(l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3069: IF (l_debug = 1) THEN
3070: DEBUG(' Reopening of delivery failed with Unexpected error' || l_del_id, 'UNLOAD_TRUCK');
3071: END IF;
3072:

Line 3073: RAISE fnd_api.g_exc_unexpected_error;

3069: IF (l_debug = 1) THEN
3070: DEBUG(' Reopening of delivery failed with Unexpected error' || l_del_id, 'UNLOAD_TRUCK');
3071: END IF;
3072:
3073: RAISE fnd_api.g_exc_unexpected_error;
3074: END IF;
3075: END IF;
3076: EXCEPTION
3077: WHEN NO_DATA_FOUND THEN

Line 3203: , p_commit_flag => fnd_api.g_false

3199: , p_shipped_quantity => 0
3200: , x_msg_data => x_msg_data
3201: , x_msg_count => x_msg_count
3202: , x_return_status => l_return_status
3203: , p_commit_flag => fnd_api.g_false
3204: ,p_relieve_rsv => l_relieve_rsv /*added 3396821*/
3205: );
3206:
3207: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 3207: IF l_return_status = fnd_api.g_ret_sts_error THEN

3203: , p_commit_flag => fnd_api.g_false
3204: ,p_relieve_rsv => l_relieve_rsv /*added 3396821*/
3205: );
3206:
3207: IF l_return_status = fnd_api.g_ret_sts_error THEN
3208: fnd_message.set_name('WMS', 'WMS_RET_LINE_TO_STOCK');
3209: /* Failed to unload the delivery line */
3210: fnd_msg_pub.ADD;
3211:

Line 3216: RAISE fnd_api.g_exc_error;

3212: IF (l_debug = 1) THEN
3213: DEBUG('inv_line_return_to_stock API failed with status E ', 'Unload_Truck');
3214: END IF;
3215:
3216: RAISE fnd_api.g_exc_error;
3217: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3218: IF (l_debug = 1) THEN
3219: DEBUG('inv_line_return_to_stock API failed with status U', 'Unload_Truck');
3220: END IF;

Line 3217: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3213: DEBUG('inv_line_return_to_stock API failed with status E ', 'Unload_Truck');
3214: END IF;
3215:
3216: RAISE fnd_api.g_exc_error;
3217: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3218: IF (l_debug = 1) THEN
3219: DEBUG('inv_line_return_to_stock API failed with status U', 'Unload_Truck');
3220: END IF;
3221:

Line 3225: RAISE fnd_api.g_exc_unexpected_error;

3221:
3222: fnd_message.set_name('WMS', 'WMS_RET_LINE_TO_STOCK');
3223: /* Failed to unload the delivery line */
3224: fnd_msg_pub.ADD;
3225: RAISE fnd_api.g_exc_unexpected_error;
3226: END IF;
3227:
3228: IF (l_debug = 1) THEN
3229: DEBUG('inv_line_return_to_stock successful for iteration #:' || counter, 'Unload_truck');

Line 3265: , p_init_msg_list => fnd_api.g_true

3261: END IF;
3262:
3263: WMS_CONTAINER_PVT.Modify_LPNs(
3264: p_api_version => 1.0
3265: , p_init_msg_list => fnd_api.g_true
3266: , p_commit => fnd_api.g_false
3267: , x_return_status => l_return_status
3268: , x_msg_count => x_msg_count
3269: , x_msg_data => x_msg_data

Line 3266: , p_commit => fnd_api.g_false

3262:
3263: WMS_CONTAINER_PVT.Modify_LPNs(
3264: p_api_version => 1.0
3265: , p_init_msg_list => fnd_api.g_true
3266: , p_commit => fnd_api.g_false
3267: , x_return_status => l_return_status
3268: , x_msg_count => x_msg_count
3269: , x_msg_data => x_msg_data
3270: , p_caller => 'WMS_DIRECTSHIP'

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

3269: , x_msg_data => x_msg_data
3270: , p_caller => 'WMS_DIRECTSHIP'
3271: , p_lpn_table => l_lpn_tbl
3272: );
3273: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3274: IF (l_debug = 1) THEN
3275: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3276: END IF;
3277: RAISE fnd_api.g_exc_error;

Line 3277: RAISE fnd_api.g_exc_error;

3273: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3274: IF (l_debug = 1) THEN
3275: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3276: END IF;
3277: RAISE fnd_api.g_exc_error;
3278: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3279: IF (l_debug = 1) THEN
3280: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3281: END IF;

Line 3278: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3274: IF (l_debug = 1) THEN
3275: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3276: END IF;
3277: RAISE fnd_api.g_exc_error;
3278: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3279: IF (l_debug = 1) THEN
3280: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3281: END IF;
3282: RAISE fnd_api.g_exc_unexpected_error;

Line 3282: RAISE fnd_api.g_exc_unexpected_error;

3278: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3279: IF (l_debug = 1) THEN
3280: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3281: END IF;
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_success THEN
3284: null;
3285: END IF;
3286: -- End of Release 12 change

Line 3283: ELSIF l_return_status = fnd_api.g_ret_sts_success THEN

3279: IF (l_debug = 1) THEN
3280: DEBUG('return error from WMS_CONTAINER_PVT.Modify_LPNs', 'Unload_Truck');
3281: END IF;
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_success THEN
3284: null;
3285: END IF;
3286: -- End of Release 12 change
3287:

Line 3298: IF l_return_status = fnd_api.g_ret_sts_error THEN

3294: , p_outermost_lpn_id => p_outermost_lpn_id
3295: , p_trip_id => NULL
3296: );
3297:
3298: IF l_return_status = fnd_api.g_ret_sts_error THEN
3299: fnd_message.set_name('WMS', 'WMS_CLEANUP_TEMP');
3300: /*Failed in cleanup program*/
3301: fnd_msg_pub.ADD;
3302:

Line 3307: RAISE fnd_api.g_exc_error;

3303: IF (l_debug = 1) THEN
3304: DEBUG('CLEANUP_TEMP_RECS API failed with status E ', 'Unload_truck');
3305: END IF;
3306:
3307: RAISE fnd_api.g_exc_error;
3308: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3309: fnd_message.set_name('WMS', 'WMS_CLEANUP_TEMP');
3310: /*Failed in cleanup program*/
3311: fnd_msg_pub.ADD;

Line 3308: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3304: DEBUG('CLEANUP_TEMP_RECS API failed with status E ', 'Unload_truck');
3305: END IF;
3306:
3307: RAISE fnd_api.g_exc_error;
3308: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3309: fnd_message.set_name('WMS', 'WMS_CLEANUP_TEMP');
3310: /*Failed in cleanup program*/
3311: fnd_msg_pub.ADD;
3312:

Line 3317: RAISE fnd_api.g_exc_unexpected_error;

3313: IF (l_debug = 1) THEN
3314: DEBUG('CLEANUP_TEMP_RECS failed with status U', 'Unload_truck');
3315: END IF;
3316:
3317: RAISE fnd_api.g_exc_unexpected_error;
3318: END IF;
3319:
3320: IF (l_debug = 1) THEN
3321: DEBUG('UNLOAD_TRUCK Completed successfully', 'Unload Truck');

Line 3327: WHEN fnd_api.g_exc_error THEN

3323:
3324: -- Commit if no errors
3325: COMMIT;
3326: EXCEPTION
3327: WHEN fnd_api.g_exc_error THEN
3328: x_return_status := fnd_api.g_ret_sts_error;
3329: ROLLBACK;
3330: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3331:

Line 3328: x_return_status := fnd_api.g_ret_sts_error;

3324: -- Commit if no errors
3325: COMMIT;
3326: EXCEPTION
3327: WHEN fnd_api.g_exc_error THEN
3328: x_return_status := fnd_api.g_ret_sts_error;
3329: ROLLBACK;
3330: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3331:
3332: IF (l_debug = 1) THEN

Line 3335: WHEN fnd_api.g_exc_unexpected_error THEN

3331:
3332: IF (l_debug = 1) THEN
3333: DEBUG('Execution Error in Unload_Truck:' || SUBSTR(SQLERRM, 1, 240), 'Unload_Truck');
3334: END IF;
3335: WHEN fnd_api.g_exc_unexpected_error THEN
3336: x_return_status := fnd_api.g_ret_sts_unexp_error;
3337: ROLLBACK;
3338: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3339:

Line 3336: x_return_status := fnd_api.g_ret_sts_unexp_error;

3332: IF (l_debug = 1) THEN
3333: DEBUG('Execution Error in Unload_Truck:' || SUBSTR(SQLERRM, 1, 240), 'Unload_Truck');
3334: END IF;
3335: WHEN fnd_api.g_exc_unexpected_error THEN
3336: x_return_status := fnd_api.g_ret_sts_unexp_error;
3337: ROLLBACK;
3338: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3339:
3340: IF (l_debug = 1) THEN

Line 3345: x_return_status := fnd_api.g_ret_sts_unexp_error;

3341: DEBUG('Unexpected Error in Unload_Truck:' || SUBSTR(SQLERRM, 1, 240), 'Unload_Truck');
3342: END IF;
3343: WHEN OTHERS THEN
3344: --x_error_code := 9999;
3345: x_return_status := fnd_api.g_ret_sts_unexp_error;
3346: ROLLBACK;
3347:
3348: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3349: fnd_msg_pub.add_exc_msg('WMS_DIRECT_SHIP_PVT', 'UNLOAD_TRUCK');

Line 3383: x_return_status := fnd_api.g_ret_sts_success;

3379:
3380: l_outermost_lpn_id NUMBER;
3381: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3382: BEGIN
3383: x_return_status := fnd_api.g_ret_sts_success;
3384:
3385: IF p_trip_id IS NOT NULL THEN
3386: BEGIN
3387: --Delete the records for the LPN

Line 3461: x_return_status := fnd_api.g_ret_sts_unexp_error;

3457: END IF;
3458: EXCEPTION
3459: WHEN OTHERS THEN
3460: --x_error_code := 9999;
3461: x_return_status := fnd_api.g_ret_sts_unexp_error;
3462: ROLLBACK;
3463:
3464: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3465: fnd_msg_pub.add_exc_msg('WMS_DIRECT_SHIP_PVT', 'CLEANUP_TEMP');

Line 3550: x_return_status := fnd_api.g_ret_sts_success;

3546: l_trx_status_enabled NUMBER;
3547: l_lpn_status VARCHAR2(1) := 'Y';
3548: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3549: BEGIN
3550: x_return_status := fnd_api.g_ret_sts_success;
3551:
3552: SELECT status_control_flag
3553: INTO l_trx_status_enabled
3554: FROM mtl_transaction_types

Line 3577: x_return_status := fnd_api.g_ret_sts_error;

3573: , p_object_type => 'A'
3574: );
3575:
3576: IF l_lpn_status <> 'Y' THEN
3577: x_return_status := fnd_api.g_ret_sts_error;
3578: EXIT;
3579: END IF;
3580: END LOOP;
3581:

Line 3585: x_return_status := fnd_api.g_ret_sts_unexp_error;

3581:
3582: CLOSE lpn_contents;
3583: EXCEPTION
3584: WHEN OTHERS THEN
3585: x_return_status := fnd_api.g_ret_sts_unexp_error;
3586:
3587: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3588: fnd_msg_pub.add_exc_msg('WMS_DIRECT_SHIP_PVT', 'validate_status_lpn_contents');
3589: END IF;

Line 3620: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;

3616:
3617: l_freight_cost_rec wsh_freight_costs_pub.pubfreightcostrectype;
3618: l_delivery_detail delivery_detail%ROWTYPE;
3619: l_lpn_freight lpn_freight%ROWTYPE;
3620: l_init_msg_list VARCHAR2(1) := fnd_api.g_true;
3621: l_return_status VARCHAR2(1);
3622: l_msg_count NUMBER;
3623: l_msg_data VARCHAR2(20000);
3624: l_freight_cost_id NUMBER;

Line 3627: x_return_status := fnd_api.g_ret_sts_success;

3623: l_msg_data VARCHAR2(20000);
3624: l_freight_cost_id NUMBER;
3625: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3626: BEGIN
3627: x_return_status := fnd_api.g_ret_sts_success;
3628: SAVEPOINT freight_cost;
3629: OPEN delivery_detail;
3630:
3631: LOOP

Line 3651: , p_commit => fnd_api.g_false

3647: l_freight_cost_rec.action_code := 'CREATE';
3648: wsh_freight_costs_pub.create_update_freight_costs(
3649: p_api_version_number => 1.0
3650: , p_init_msg_list => l_init_msg_list
3651: , p_commit => fnd_api.g_false
3652: , x_return_status => l_return_status
3653: , x_msg_count => l_msg_count
3654: , x_msg_data => l_msg_data
3655: , p_pub_freight_costs => l_freight_cost_rec

Line 3660: IF l_return_status = fnd_api.g_ret_sts_error THEN

3656: , p_action_code => 'CREATE'
3657: , x_freight_cost_id => l_freight_cost_id
3658: );
3659:
3660: IF l_return_status = fnd_api.g_ret_sts_error THEN
3661: IF (l_debug = 1) THEN
3662: DEBUG('Create_Update_Freight_Costs API completed status E ', 'update_freight_cost');
3663: END IF;
3664:

Line 3665: RAISE fnd_api.g_exc_error;

3661: IF (l_debug = 1) THEN
3662: DEBUG('Create_Update_Freight_Costs API completed status E ', 'update_freight_cost');
3663: END IF;
3664:
3665: RAISE fnd_api.g_exc_error;
3666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3667: IF (l_debug = 1) THEN
3668: DEBUG('Create_Update_Freight_Costs API completed status U ', 'update_freight_cost');
3669: END IF;

Line 3666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3662: DEBUG('Create_Update_Freight_Costs API completed status E ', 'update_freight_cost');
3663: END IF;
3664:
3665: RAISE fnd_api.g_exc_error;
3666: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3667: IF (l_debug = 1) THEN
3668: DEBUG('Create_Update_Freight_Costs API completed status U ', 'update_freight_cost');
3669: END IF;
3670:

Line 3671: RAISE fnd_api.g_exc_unexpected_error;

3667: IF (l_debug = 1) THEN
3668: DEBUG('Create_Update_Freight_Costs API completed status U ', 'update_freight_cost');
3669: END IF;
3670:
3671: RAISE fnd_api.g_exc_unexpected_error;
3672: END IF;
3673:
3674: UPDATE wms_freight_cost_temp
3675: SET freight_cost_id = l_freight_cost_id

Line 3687: WHEN fnd_api.g_exc_error THEN

3683: IF (l_debug = 1) THEN
3684: DEBUG('Update_Freight cost Update was successful', 'update_freight_cost');
3685: END IF;
3686: EXCEPTION
3687: WHEN fnd_api.g_exc_error THEN
3688: IF (l_debug = 1) THEN
3689: DEBUG('Update_Freight cost API failed with status (E)', 'update_freight_cost');
3690: END IF;
3691:

Line 3700: x_return_status := fnd_api.g_ret_sts_error;

3696: IF delivery_detail%ISOPEN THEN
3697: CLOSE delivery_detail;
3698: END IF;
3699:
3700: x_return_status := fnd_api.g_ret_sts_error;
3701: ROLLBACK TO freight_cost;
3702: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3703: WHEN fnd_api.g_exc_unexpected_error THEN
3704: IF lpn_freight%ISOPEN THEN

Line 3703: WHEN fnd_api.g_exc_unexpected_error THEN

3699:
3700: x_return_status := fnd_api.g_ret_sts_error;
3701: ROLLBACK TO freight_cost;
3702: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3703: WHEN fnd_api.g_exc_unexpected_error THEN
3704: IF lpn_freight%ISOPEN THEN
3705: CLOSE lpn_freight;
3706: END IF;
3707:

Line 3712: x_return_status := fnd_api.g_ret_sts_unexp_error;

3708: IF delivery_detail%ISOPEN THEN
3709: CLOSE delivery_detail;
3710: END IF;
3711:
3712: x_return_status := fnd_api.g_ret_sts_unexp_error;
3713:
3714: IF (l_debug = 1) THEN
3715: DEBUG('Update_Freight cost API failed with status (U)', 'update_freight_cost');
3716: END IF;

Line 3729: x_return_status := fnd_api.g_ret_sts_unexp_error;

3725: IF delivery_detail%ISOPEN THEN
3726: CLOSE delivery_detail;
3727: END IF;
3728:
3729: x_return_status := fnd_api.g_ret_sts_unexp_error;
3730:
3731: IF (l_debug = 1) THEN
3732: DEBUG('Update_Freight cost API failed with status (U)', 'update_freight_cost');
3733: END IF;

Line 3945: --x_return_status := fnd_api.g_ret_sts_success;

3941: l_serial_number_str VARCHAR2(3000);
3942: l_cur_group_mark_id NUMBER;
3943: l_cur_reservation_id NUMBER;
3944: BEGIN
3945: --x_return_status := fnd_api.g_ret_sts_success;
3946:
3947: IF (l_debug = 1) THEN
3948: DEBUG('p_organization_id : ' || p_organization_id, 'EXPLODE_DELIVERY_DETAILS');
3949: DEBUG(' p_lpn_id : ' || p_lpn_id , 'EXPLODE_DELIVERY_DETAILS');

Line 4503: RAISE fnd_api.g_exc_error;

4499: IF (l_debug = 1) THEN
4500: DEBUG('inv_mark_serial ended with errors (E) ', 'EXPLODE_DELIVERY_DETAILS');
4501: END IF;
4502:
4503: RAISE fnd_api.g_exc_error;
4504: END IF; */
4505:
4506: /* 5506223: Because of the above, using direct update to MSN to set the
4507: * group_mark_id */

Line 4526: RAISE fnd_api.g_exc_error;

4522: DEBUG( 'p_organization_id : '|| p_organization_id ,
4523: 'EXPLODE_DELIVERY_DETAILS');
4524: END IF;
4525:
4526: RAISE fnd_api.g_exc_error;
4527: END IF;
4528: END ;
4529: IF (l_debug = 1) THEN
4530: DEBUG( 'inserting serials ' || l_serial_numbers_table(n) || ' into msnt WITH temp_id ='

Line 4548: RAISE fnd_api.g_exc_error;

4544: IF (l_debug = 1) THEN
4545: DEBUG('insert_ser_trx ended with errors ' || l_proc_msg, 'EXPLODE_DELIVERY_DETAILS');
4546: END IF;
4547:
4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550:
4551: IF (l_debug = 1) THEN
4552: DEBUG('l_running_quantity (while_loop)= ' || l_running_quantity, 'EXPLODE_DELIVERY_DETAILS');

Line 4560: WHEN fnd_api.g_exc_error THEN

4556: n := n + 1;
4557: END LOOP;
4558: END IF; -- Serial Control Code If
4559: EXCEPTION
4560: WHEN fnd_api.g_exc_error THEN
4561: x_return_status := fnd_api.g_ret_sts_error;
4562: ROLLBACK;
4563: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4564: WHEN fnd_api.g_exc_unexpected_error THEN

Line 4561: x_return_status := fnd_api.g_ret_sts_error;

4557: END LOOP;
4558: END IF; -- Serial Control Code If
4559: EXCEPTION
4560: WHEN fnd_api.g_exc_error THEN
4561: x_return_status := fnd_api.g_ret_sts_error;
4562: ROLLBACK;
4563: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4564: WHEN fnd_api.g_exc_unexpected_error THEN
4565: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4564: WHEN fnd_api.g_exc_unexpected_error THEN

4560: WHEN fnd_api.g_exc_error THEN
4561: x_return_status := fnd_api.g_ret_sts_error;
4562: ROLLBACK;
4563: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4564: WHEN fnd_api.g_exc_unexpected_error THEN
4565: x_return_status := fnd_api.g_ret_sts_unexp_error;
4566: ROLLBACK;
4567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4568: WHEN OTHERS THEN

Line 4565: x_return_status := fnd_api.g_ret_sts_unexp_error;

4561: x_return_status := fnd_api.g_ret_sts_error;
4562: ROLLBACK;
4563: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4564: WHEN fnd_api.g_exc_unexpected_error THEN
4565: x_return_status := fnd_api.g_ret_sts_unexp_error;
4566: ROLLBACK;
4567: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4568: WHEN OTHERS THEN
4569: x_return_status := wsh_util_core.g_ret_sts_unexp_error;

Line 4612: l_commit VARCHAR2(1) := fnd_api.g_false;

4608: l_shipped_qty NUMBER;
4609: l_primary_uom_code VARCHAR2(3);
4610: l_lot_control_code NUMBER;
4611: l_serial_number_control_code NUMBER;
4612: l_commit VARCHAR2(1) := fnd_api.g_false;
4613: l_new_delivery_detail_id NUMBER;
4614: l_dummy_num_var NUMBER;
4615: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
4616: l_trip_id NUMBER;

Line 4615: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;

4611: l_serial_number_control_code NUMBER;
4612: l_commit VARCHAR2(1) := fnd_api.g_false;
4613: l_new_delivery_detail_id NUMBER;
4614: l_dummy_num_var NUMBER;
4615: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
4616: l_trip_id NUMBER;
4617: BEGIN
4618: x_return_status := fnd_api.g_ret_sts_success;
4619: /*Query Reservations for LPN to be staged*/

Line 4618: x_return_status := fnd_api.g_ret_sts_success;

4614: l_dummy_num_var NUMBER;
4615: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
4616: l_trip_id NUMBER;
4617: BEGIN
4618: x_return_status := fnd_api.g_ret_sts_success;
4619: /*Query Reservations for LPN to be staged*/
4620:
4621: IF (l_debug = 1) THEN
4622: DEBUG('Inside Overship_Staged_Lines ', 'Overship Staged Lines');

Line 4644: , p_init_msg_lst => fnd_api.g_false

4640: END IF;
4641:
4642: inv_reservation_pub.query_reservation(
4643: p_api_version_number => 1.0
4644: , p_init_msg_lst => fnd_api.g_false
4645: , x_return_status => l_return_status
4646: , x_msg_count => l_msg_count
4647: , x_msg_data => l_msg_data
4648: , p_query_input => l_reservation_record

Line 4649: , p_lock_records => fnd_api.g_false

4645: , x_return_status => l_return_status
4646: , x_msg_count => l_msg_count
4647: , x_msg_data => l_msg_data
4648: , p_query_input => l_reservation_record
4649: , p_lock_records => fnd_api.g_false
4650: , x_mtl_reservation_tbl => l_mtl_reservation_tbl
4651: , x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count
4652: , x_error_code => l_error_code
4653: );

Line 4661: IF l_return_status = fnd_api.g_ret_sts_error THEN

4657: 'records retrived'||l_mtl_reservation_tbl_count, 'Overship Staged Lines');
4658: END IF;
4659:
4660:
4661: IF l_return_status = fnd_api.g_ret_sts_error THEN
4662: IF (l_debug = 1) THEN
4663: DEBUG('Validation error during query of Reservations ' || p_source_header_id ||
4664: ' ' || p_source_line_id, 'Overship Staged Lines');
4665: END IF;

Line 4667: RAISE fnd_api.g_exc_error;

4663: DEBUG('Validation error during query of Reservations ' || p_source_header_id ||
4664: ' ' || p_source_line_id, 'Overship Staged Lines');
4665: END IF;
4666:
4667: RAISE fnd_api.g_exc_error;
4668: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4669: IF (l_debug = 1) THEN
4670: DEBUG('Unexpected error during query of Reservations ' || p_source_header_id ||
4671: ' ' || p_source_line_id, 'Overship Staged Lines');

Line 4668: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4664: ' ' || p_source_line_id, 'Overship Staged Lines');
4665: END IF;
4666:
4667: RAISE fnd_api.g_exc_error;
4668: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4669: IF (l_debug = 1) THEN
4670: DEBUG('Unexpected error during query of Reservations ' || p_source_header_id ||
4671: ' ' || p_source_line_id, 'Overship Staged Lines');
4672: END IF;

Line 4674: RAISE fnd_api.g_exc_unexpected_error;

4670: DEBUG('Unexpected error during query of Reservations ' || p_source_header_id ||
4671: ' ' || p_source_line_id, 'Overship Staged Lines');
4672: END IF;
4673:
4674: RAISE fnd_api.g_exc_unexpected_error;
4675: END IF;
4676:
4677: /*Now we have all reservations for the LPN for this sales order and line
4678: which donot have any open WDDs left, This means we need to split a staged WDD*/

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

4740: IF (l_debug = 1) THEN
4741: DEBUG('After calling Update_shipping_attributes', 'Overship Staged Lines');
4742: END IF;
4743:
4744: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4745: IF (l_debug = 1) THEN
4746: DEBUG('Return error from update shipping attributes 2', 'Overship Staged Lines');
4747: END IF;
4748:

Line 4749: RAISE fnd_api.g_exc_error;

4745: IF (l_debug = 1) THEN
4746: DEBUG('Return error from update shipping attributes 2', 'Overship Staged Lines');
4747: END IF;
4748:
4749: RAISE fnd_api.g_exc_error;
4750: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4751: IF (l_debug = 1) THEN
4752: DEBUG('Return unexpected error from update shipping attributes', 'Overship Staged Lines');
4753: END IF;

Line 4750: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4746: DEBUG('Return error from update shipping attributes 2', 'Overship Staged Lines');
4747: END IF;
4748:
4749: RAISE fnd_api.g_exc_error;
4750: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4751: IF (l_debug = 1) THEN
4752: DEBUG('Return unexpected error from update shipping attributes', 'Overship Staged Lines');
4753: END IF;
4754:

Line 4755: RAISE fnd_api.g_exc_unexpected_error;

4751: IF (l_debug = 1) THEN
4752: DEBUG('Return unexpected error from update shipping attributes', 'Overship Staged Lines');
4753: END IF;
4754:
4755: RAISE fnd_api.g_exc_unexpected_error;
4756: ELSIF l_return_status = 'S' THEN
4757: IF (l_debug = 1) THEN
4758: DEBUG('Shipping attributes updated successfully','Overship Staged Lines');
4759: END IF;

Line 4767: p_init_msg_list => fnd_api.g_false,

4763: DEBUG('Before Split Line'||l_delivery_Detail_id,'Overship Staged Lines');
4764:
4765: WSH_DELIVERY_DETAILS_PUB.split_line
4766: (p_api_version => 1.0,
4767: p_init_msg_list => fnd_api.g_false,
4768: p_commit => fnd_api.g_false,
4769: x_return_status => l_return_status,
4770: x_msg_count => l_msg_count,
4771: x_msg_data => l_msg_data,

Line 4768: p_commit => fnd_api.g_false,

4764:
4765: WSH_DELIVERY_DETAILS_PUB.split_line
4766: (p_api_version => 1.0,
4767: p_init_msg_list => fnd_api.g_false,
4768: p_commit => fnd_api.g_false,
4769: x_return_status => l_return_status,
4770: x_msg_count => l_msg_count,
4771: x_msg_data => l_msg_data,
4772: p_from_detail_id => l_delivery_detail_id,

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

4775: x_split_quantity2=> l_dummy_num_var);
4776:
4777: DEBUG('After Split Line'||l_new_delivery_Detail_id,'Overship Staged Lines');
4778:
4779: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4780: IF (l_debug = 1) THEN
4781: DEBUG('Return error from split_delivery_details ', 'Overship Staged Lines');
4782: END IF;
4783:

Line 4784: RAISE fnd_api.g_exc_error;

4780: IF (l_debug = 1) THEN
4781: DEBUG('Return error from split_delivery_details ', 'Overship Staged Lines');
4782: END IF;
4783:
4784: RAISE fnd_api.g_exc_error;
4785: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4786: IF (l_debug = 1) THEN
4787: DEBUG('Return unexpected error from split_delivery_details', 'Overship Staged Lines');
4788: END IF;

Line 4785: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4781: DEBUG('Return error from split_delivery_details ', 'Overship Staged Lines');
4782: END IF;
4783:
4784: RAISE fnd_api.g_exc_error;
4785: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4786: IF (l_debug = 1) THEN
4787: DEBUG('Return unexpected error from split_delivery_details', 'Overship Staged Lines');
4788: END IF;
4789:

Line 4790: RAISE fnd_api.g_exc_unexpected_error;

4786: IF (l_debug = 1) THEN
4787: DEBUG('Return unexpected error from split_delivery_details', 'Overship Staged Lines');
4788: END IF;
4789:
4790: RAISE fnd_api.g_exc_unexpected_error;
4791: END IF;
4792:
4793: /*Unassign from old container*/
4794:

Line 4801: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

4797: X_RETURN_STATUS => l_return_status);
4798:
4799: DEBUG('After Unassign'|| l_return_status, 'Overship Staged Lines');
4800:
4801: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
4802: IF (l_debug = 1) THEN
4803: DEBUG('Error Unassign_Detail_from_Cont'|| l_return_status, 'Overship Staged Lines');
4804: END IF;
4805: FND_MESSAGE.SET_NAME('INV', 'INV_UNASSIGN_DEL_FAILURE');

Line 4807: RAISE FND_API.G_EXC_ERROR;

4803: DEBUG('Error Unassign_Detail_from_Cont'|| l_return_status, 'Overship Staged Lines');
4804: END IF;
4805: FND_MESSAGE.SET_NAME('INV', 'INV_UNASSIGN_DEL_FAILURE');
4806: FND_MSG_PUB.ADD;
4807: RAISE FND_API.G_EXC_ERROR;
4808: END IF;
4809:
4810:
4811:

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

4857: IF (l_debug = 1) THEN
4858: DEBUG('After update shipping attributes', 'Overship Staged Lines');
4859: END IF;
4860:
4861: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4862: IF (l_debug = 1) THEN
4863: DEBUG('Return error from update shipping attributes', 'Overship Staged Lines');
4864: END IF;
4865:

Line 4866: RAISE fnd_api.g_exc_error;

4862: IF (l_debug = 1) THEN
4863: DEBUG('Return error from update shipping attributes', 'Overship Staged Lines');
4864: END IF;
4865:
4866: RAISE fnd_api.g_exc_error;
4867: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4868: IF (l_debug = 1) THEN
4869: DEBUG('Return unexpected error from update shipping attributes','Overship Staged Lines');
4870: END IF;

Line 4867: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4863: DEBUG('Return error from update shipping attributes', 'Overship Staged Lines');
4864: END IF;
4865:
4866: RAISE fnd_api.g_exc_error;
4867: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4868: IF (l_debug = 1) THEN
4869: DEBUG('Return unexpected error from update shipping attributes','Overship Staged Lines');
4870: END IF;
4871:

Line 4872: RAISE fnd_api.g_exc_unexpected_error;

4868: IF (l_debug = 1) THEN
4869: DEBUG('Return unexpected error from update shipping attributes','Overship Staged Lines');
4870: END IF;
4871:
4872: RAISE fnd_api.g_exc_unexpected_error;
4873: END IF;
4874:
4875: SELECT wds.ORGANIZATION_ID
4876: ,WDS.DOCK_DOOR_ID

Line 5127: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN

5123: , p_org_id => p_organization_id
5124: , p_outermost_lpn_id => l_outer_lpn.lpn_id
5125: );
5126:
5127: IF l_return_status IN(fnd_api.g_ret_sts_error) THEN
5128: IF (l_debug = 1) THEN
5129: DEBUG('create_update_containers API failed with status E ', 'STAGE_LPN');
5130: END IF;
5131:

Line 5132: RAISE fnd_api.g_exc_error;

5128: IF (l_debug = 1) THEN
5129: DEBUG('create_update_containers API failed with status E ', 'STAGE_LPN');
5130: END IF;
5131:
5132: RAISE fnd_api.g_exc_error;
5133: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5134: IF (l_debug = 1) THEN
5135: DEBUG('create_update_containers failed with status U', 'STAGE_LPN');
5136: END IF;

Line 5133: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5129: DEBUG('create_update_containers API failed with status E ', 'STAGE_LPN');
5130: END IF;
5131:
5132: RAISE fnd_api.g_exc_error;
5133: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5134: IF (l_debug = 1) THEN
5135: DEBUG('create_update_containers failed with status U', 'STAGE_LPN');
5136: END IF;
5137:

Line 5138: RAISE fnd_api.g_exc_unexpected_error;

5134: IF (l_debug = 1) THEN
5135: DEBUG('create_update_containers failed with status U', 'STAGE_LPN');
5136: END IF;
5137:
5138: RAISE fnd_api.g_exc_unexpected_error;
5139: END IF;
5140:
5141: SELECT delivery_detail_id
5142: INTO l_cont_instance_id

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

5166: , p_organization_id => p_organization_id
5167: , p_outermost_lpn_id => l_outer_lpn.lpn_id
5168: , p_action_code => 'PACK');
5169:
5170: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5171: IF (l_debug = 1) THEN
5172: DEBUG('container nesting API failed for outermost_lpn_id ' || l_outer_lpn.lpn_id, 'stage_lpns');
5173: END IF;
5174:

Line 5175: RAISE fnd_api.g_exc_error;

5171: IF (l_debug = 1) THEN
5172: DEBUG('container nesting API failed for outermost_lpn_id ' || l_outer_lpn.lpn_id, 'stage_lpns');
5173: END IF;
5174:
5175: RAISE fnd_api.g_exc_error;
5176: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5177: IF (l_debug = 1) THEN
5178: DEBUG('container nesting API failed with unexpected errors for outermost_lpn_id '
5179: || l_outer_lpn.lpn_id, 'stage_lpns');

Line 5176: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5172: DEBUG('container nesting API failed for outermost_lpn_id ' || l_outer_lpn.lpn_id, 'stage_lpns');
5173: END IF;
5174:
5175: RAISE fnd_api.g_exc_error;
5176: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5177: IF (l_debug = 1) THEN
5178: DEBUG('container nesting API failed with unexpected errors for outermost_lpn_id '
5179: || l_outer_lpn.lpn_id, 'stage_lpns');
5180: END IF;

Line 5182: RAISE fnd_api.g_exc_unexpected_error;

5178: DEBUG('container nesting API failed with unexpected errors for outermost_lpn_id '
5179: || l_outer_lpn.lpn_id, 'stage_lpns');
5180: END IF;
5181:
5182: RAISE fnd_api.g_exc_unexpected_error;
5183: END IF;
5184:
5185: IF (l_debug = 1) THEN
5186: DEBUG('Container nesting completed', 'xxxx');

Line 5260: , p_init_msg_lst => fnd_api.g_false

5256: END IF;
5257:
5258: inv_reservation_pub.query_reservation
5259: (p_api_version_number => 1.0
5260: , p_init_msg_lst => fnd_api.g_false
5261: , x_return_status => l_return_status
5262: , x_msg_count => l_msg_count
5263: , x_msg_data => l_msg_data
5264: , p_query_input => l_reservation_record

Line 5265: , p_lock_records => fnd_api.g_false

5261: , x_return_status => l_return_status
5262: , x_msg_count => l_msg_count
5263: , x_msg_data => l_msg_data
5264: , p_query_input => l_reservation_record
5265: , p_lock_records => fnd_api.g_false
5266: , x_mtl_reservation_tbl => l_reservation_tbl
5267: , x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count
5268: , x_error_code => l_error_code);
5269:

Line 5270: IF l_return_status = fnd_api.g_ret_sts_error THEN

5266: , x_mtl_reservation_tbl => l_reservation_tbl
5267: , x_mtl_reservation_tbl_count => l_mtl_reservation_tbl_count
5268: , x_error_code => l_error_code);
5269:
5270: IF l_return_status = fnd_api.g_ret_sts_error THEN
5271: IF (l_debug = 1) THEN
5272: DEBUG('Validation error during query of Reservations ' || l_header_id
5273: || ' ' || l_line_id, 'STAGE_LPNS');
5274: END IF;

Line 5276: RAISE fnd_api.g_exc_error;

5272: DEBUG('Validation error during query of Reservations ' || l_header_id
5273: || ' ' || l_line_id, 'STAGE_LPNS');
5274: END IF;
5275:
5276: RAISE fnd_api.g_exc_error;
5277: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5278: IF (l_debug = 1) THEN
5279: DEBUG('Unexpected error during query of Reservations ' || l_header_id || ' '
5280: || l_line_id, 'STAGE_LPNS');

Line 5277: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5273: || ' ' || l_line_id, 'STAGE_LPNS');
5274: END IF;
5275:
5276: RAISE fnd_api.g_exc_error;
5277: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5278: IF (l_debug = 1) THEN
5279: DEBUG('Unexpected error during query of Reservations ' || l_header_id || ' '
5280: || l_line_id, 'STAGE_LPNS');
5281: END IF;

Line 5283: RAISE fnd_api.g_exc_unexpected_error;

5279: DEBUG('Unexpected error during query of Reservations ' || l_header_id || ' '
5280: || l_line_id, 'STAGE_LPNS');
5281: END IF;
5282:
5283: RAISE fnd_api.g_exc_unexpected_error;
5284: END IF;
5285:
5286: FOR i IN 1..l_mtl_reservation_tbl_count LOOP
5287:

Line 5665: IF l_return_status = fnd_api.g_ret_sts_error THEN

5661: , p_transaction_temp_id => l_delivery_detail_tab(i).transaction_temp_id
5662: , p_reservation_id => l_mtl_reservation_tbl(j).reservation_id
5663: , p_last_action => l_shipping_attr(1).action_flag);
5664:
5665: IF l_return_status = fnd_api.g_ret_sts_error THEN
5666: IF (l_debug = 1) THEN
5667: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5668: END IF;
5669:

Line 5670: RAISE fnd_api.g_exc_error;

5666: IF (l_debug = 1) THEN
5667: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5668: END IF;
5669:
5670: RAISE fnd_api.g_exc_error;
5671: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5672: IF (l_debug = 1) THEN
5673: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5674: END IF;

Line 5671: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5667: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5668: END IF;
5669:
5670: RAISE fnd_api.g_exc_error;
5671: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5672: IF (l_debug = 1) THEN
5673: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5674: END IF;
5675:

Line 5676: RAISE fnd_api.g_exc_unexpected_error;

5672: IF (l_debug = 1) THEN
5673: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5674: END IF;
5675:
5676: RAISE fnd_api.g_exc_unexpected_error;
5677: END IF;
5678: ELSIF(l_serial_number_control_code = 6) THEN -- Serial in MSNT
5679: IF (l_debug = 1) THEN
5680: DEBUG('The serial number control code is 6', 'stage_lpns');

Line 5702: IF l_return_status = fnd_api.g_ret_sts_error THEN

5698: , p_transaction_temp_id => l_delivery_detail_tab(i).transaction_temp_id
5699: , p_reservation_id => l_mtl_reservation_tbl(j).reservation_id
5700: , p_last_action => l_shipping_attr(1).action_flag);
5701:
5702: IF l_return_status = fnd_api.g_ret_sts_error THEN
5703: IF (l_debug = 1) THEN
5704: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5705: END IF;
5706:

Line 5707: RAISE fnd_api.g_exc_error;

5703: IF (l_debug = 1) THEN
5704: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5705: END IF;
5706:
5707: RAISE fnd_api.g_exc_error;
5708: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5709: IF (l_debug = 1) THEN
5710: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5711: END IF;

Line 5708: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5704: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status E', 'STAGE_LPNS');
5705: END IF;
5706:
5707: RAISE fnd_api.g_exc_error;
5708: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5709: IF (l_debug = 1) THEN
5710: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5711: END IF;
5712:

Line 5713: RAISE fnd_api.g_exc_unexpected_error;

5709: IF (l_debug = 1) THEN
5710: DEBUG('CALL TO EXPLODE_DELIVERY_DETAILS api returns status U', 'STAGE_LPNS');
5711: END IF;
5712:
5713: RAISE fnd_api.g_exc_unexpected_error;
5714: END IF;
5715: END IF;
5716:
5717: l_invpcinrectype.transaction_temp_id := l_delivery_detail_tab(i).transaction_temp_id;

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

5758: , x_msg_count => l_msg_data
5759: , x_msg_data => l_msg_count
5760: );
5761:
5762: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5763: IF (l_debug = 1) THEN
5764: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
5765: END IF;
5766:

Line 5767: RAISE fnd_api.g_exc_error;

5763: IF (l_debug = 1) THEN
5764: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
5765: END IF;
5766:
5767: RAISE fnd_api.g_exc_error;
5768: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5769: IF (l_debug = 1) THEN
5770: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
5771: END IF;

Line 5768: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5764: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
5765: END IF;
5766:
5767: RAISE fnd_api.g_exc_error;
5768: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5769: IF (l_debug = 1) THEN
5770: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
5771: END IF;
5772:

Line 5773: RAISE fnd_api.g_exc_unexpected_error;

5769: IF (l_debug = 1) THEN
5770: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
5771: END IF;
5772:
5773: RAISE fnd_api.g_exc_unexpected_error;
5774: END IF;
5775: ELSE
5776: BEGIN
5777: SELECT fm_serial_number

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

5821: IF (l_debug = 1) THEN
5822: DEBUG('after update shipping attributes', 'stage_lpns');
5823: END IF;
5824:
5825: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5826: IF (l_debug = 1) THEN
5827: DEBUG('return error from update shipping attributes 3', 'STAGE_LPN');
5828: END IF;
5829:

Line 5830: RAISE fnd_api.g_exc_error;

5826: IF (l_debug = 1) THEN
5827: DEBUG('return error from update shipping attributes 3', 'STAGE_LPN');
5828: END IF;
5829:
5830: RAISE fnd_api.g_exc_error;
5831: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5832: IF (l_debug = 1) THEN
5833: DEBUG('return unexpected error from update shipping attributes', 'STAGE_LPN');
5834: END IF;

Line 5831: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5827: DEBUG('return error from update shipping attributes 3', 'STAGE_LPN');
5828: END IF;
5829:
5830: RAISE fnd_api.g_exc_error;
5831: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5832: IF (l_debug = 1) THEN
5833: DEBUG('return unexpected error from update shipping attributes', 'STAGE_LPN');
5834: END IF;
5835:

Line 5836: RAISE fnd_api.g_exc_unexpected_error;

5832: IF (l_debug = 1) THEN
5833: DEBUG('return unexpected error from update shipping attributes', 'STAGE_LPN');
5834: END IF;
5835:
5836: RAISE fnd_api.g_exc_unexpected_error;
5837: END IF;
5838:
5839: --EXIT; -- commented in P-I to split on extra reservations
5840: l_delivery_detail_tab(i).requested_quantity := 0;

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

5935: , p_reservation_id => l_mtl_reservation_tbl(j).reservation_id
5936: , p_last_action => l_shipping_attr(1).action_flag
5937: );
5938:
5939: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5940: IF (l_debug = 1) THEN
5941: DEBUG('return error from update shipping attributes 3', 'stage_lpns');
5942: END IF;
5943:

Line 5944: RAISE fnd_api.g_exc_error;

5940: IF (l_debug = 1) THEN
5941: DEBUG('return error from update shipping attributes 3', 'stage_lpns');
5942: END IF;
5943:
5944: RAISE fnd_api.g_exc_error;
5945: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5946: IF (l_debug = 1) THEN
5947: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
5948: END IF;

Line 5945: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5941: DEBUG('return error from update shipping attributes 3', 'stage_lpns');
5942: END IF;
5943:
5944: RAISE fnd_api.g_exc_error;
5945: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5946: IF (l_debug = 1) THEN
5947: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
5948: END IF;
5949:

Line 5950: RAISE fnd_api.g_exc_unexpected_error;

5946: IF (l_debug = 1) THEN
5947: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
5948: END IF;
5949:
5950: RAISE fnd_api.g_exc_unexpected_error;
5951: END IF;
5952: ELSIF(l_serial_number_control_code = 6) THEN -- Serial in MSNT
5953: IF (l_debug = 1) THEN
5954: DEBUG('The serial number control code is 6', 'stage_lpns');

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

5973: , p_reservation_id => l_mtl_reservation_tbl(j).reservation_id
5974: , p_last_action => l_shipping_attr(1).action_flag
5975: );
5976:
5977: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5978: IF (l_debug = 1) THEN
5979: DEBUG('return error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5980: END IF;
5981:

Line 5982: RAISE fnd_api.g_exc_error;

5978: IF (l_debug = 1) THEN
5979: DEBUG('return error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5980: END IF;
5981:
5982: RAISE fnd_api.g_exc_error;
5983: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: IF (l_debug = 1) THEN
5985: DEBUG('return unexpected error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5986: END IF;

Line 5983: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5979: DEBUG('return error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5980: END IF;
5981:
5982: RAISE fnd_api.g_exc_error;
5983: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: IF (l_debug = 1) THEN
5985: DEBUG('return unexpected error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5986: END IF;
5987:

Line 5988: RAISE fnd_api.g_exc_unexpected_error;

5984: IF (l_debug = 1) THEN
5985: DEBUG('return unexpected error from EXPLODE_DELIVERY_DETAILS 3', 'stage_lpns');
5986: END IF;
5987:
5988: RAISE fnd_api.g_exc_unexpected_error;
5989: END IF;
5990: END IF; -- Serial Control Code
5991:
5992: /*******************************************

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

6024: , x_return_status => l_return_status
6025: , x_msg_count => l_msg_data
6026: , x_msg_data => l_msg_count );
6027:
6028: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6029: IF (l_debug = 1) THEN
6030: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6031: END IF;
6032:

Line 6033: RAISE fnd_api.g_exc_error;

6029: IF (l_debug = 1) THEN
6030: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6031: END IF;
6032:
6033: RAISE fnd_api.g_exc_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6035: IF (l_debug = 1) THEN
6036: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6037: END IF;

Line 6034: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6030: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6031: END IF;
6032:
6033: RAISE fnd_api.g_exc_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6035: IF (l_debug = 1) THEN
6036: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6037: END IF;
6038:

Line 6039: RAISE fnd_api.g_exc_unexpected_error;

6035: IF (l_debug = 1) THEN
6036: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6037: END IF;
6038:
6039: RAISE fnd_api.g_exc_unexpected_error;
6040: END IF;
6041: ELSE
6042: BEGIN
6043: SELECT fm_serial_number

Line 6071: p_init_msg_list => fnd_api.g_false,

6067: l_delivery_detail_tab(i).requested_quantity := l_delivery_detail_tab(i).requested_quantity - l_rsv_qty;
6068: /* 4440809
6069: WSH_DELIVERY_DETAILS_PUB.split_line
6070: (p_api_version => 1.0,
6071: p_init_msg_list => fnd_api.g_false,
6072: p_commit => fnd_api.g_false,
6073: x_return_status => l_return_status,
6074: x_msg_count => l_msg_count,
6075: x_msg_data => l_msg_data,

Line 6072: p_commit => fnd_api.g_false,

6068: /* 4440809
6069: WSH_DELIVERY_DETAILS_PUB.split_line
6070: (p_api_version => 1.0,
6071: p_init_msg_list => fnd_api.g_false,
6072: p_commit => fnd_api.g_false,
6073: x_return_status => l_return_status,
6074: x_msg_count => l_msg_count,
6075: x_msg_data => l_msg_data,
6076: p_from_detail_id => l_delivery_detail_tab(i).delivery_detail_id,

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

6077: x_new_detail_id => l_new_delivery_detail_id,
6078: x_split_quantity => l_delivery_detail_tab(i).requested_quantity,
6079: x_split_quantity2 => l_dummy_num_var);
6080:
6081: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6082: IF (l_debug = 1) THEN
6083: DEBUG('return error from split_delivery_details ', 'stage_lpns');
6084: END IF;
6085:

Line 6086: RAISE fnd_api.g_exc_error;

6082: IF (l_debug = 1) THEN
6083: DEBUG('return error from split_delivery_details ', 'stage_lpns');
6084: END IF;
6085:
6086: RAISE fnd_api.g_exc_error;
6087: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6088: IF (l_debug = 1) THEN
6089: DEBUG('return unexpected error from split_delivery_details', 'stage_lpns');
6090: END IF;

Line 6087: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6083: DEBUG('return error from split_delivery_details ', 'stage_lpns');
6084: END IF;
6085:
6086: RAISE fnd_api.g_exc_error;
6087: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6088: IF (l_debug = 1) THEN
6089: DEBUG('return unexpected error from split_delivery_details', 'stage_lpns');
6090: END IF;
6091:

Line 6092: RAISE fnd_api.g_exc_unexpected_error;

6088: IF (l_debug = 1) THEN
6089: DEBUG('return unexpected error from split_delivery_details', 'stage_lpns');
6090: END IF;
6091:
6092: RAISE fnd_api.g_exc_unexpected_error;
6093: END IF;
6094: --\Shipping API cleanup
6095:
6096: IF (l_debug = 1) THEN

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

6113: , x_msg_count => l_msg_data
6114: , x_msg_data => l_msg_count
6115: );
6116:
6117: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6118: IF (l_debug = 1) THEN
6119: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6120: END IF;
6121:

Line 6122: RAISE fnd_api.g_exc_error;

6118: IF (l_debug = 1) THEN
6119: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6120: END IF;
6121:
6122: RAISE fnd_api.g_exc_error;
6123: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6124: IF (l_debug = 1) THEN
6125: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6126: END IF;

Line 6123: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6119: DEBUG('return error E from Set_Inv_PC_Attributes', 'STAGE_LPN');
6120: END IF;
6121:
6122: RAISE fnd_api.g_exc_error;
6123: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6124: IF (l_debug = 1) THEN
6125: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6126: END IF;
6127:

Line 6128: RAISE fnd_api.g_exc_unexpected_error;

6124: IF (l_debug = 1) THEN
6125: DEBUG('return error U from Set_Inv_PC_Attributes', 'STAGE_LPN');
6126: END IF;
6127:
6128: RAISE fnd_api.g_exc_unexpected_error;
6129: END IF;
6130: ELSE
6131: BEGIN
6132: SELECT fm_serial_number

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

6177: IF (l_debug = 1) THEN
6178: DEBUG('after update shipping attributes', 'stage_lpns');
6179: END IF;
6180:
6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6182: IF (l_debug = 1) THEN
6183: DEBUG('return error from update shipping attributes 2', 'stage_lpns');
6184: END IF;
6185:

Line 6186: RAISE fnd_api.g_exc_error;

6182: IF (l_debug = 1) THEN
6183: DEBUG('return error from update shipping attributes 2', 'stage_lpns');
6184: END IF;
6185:
6186: RAISE fnd_api.g_exc_error;
6187: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6188: IF (l_debug = 1) THEN
6189: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
6190: END IF;

Line 6187: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6183: DEBUG('return error from update shipping attributes 2', 'stage_lpns');
6184: END IF;
6185:
6186: RAISE fnd_api.g_exc_error;
6187: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6188: IF (l_debug = 1) THEN
6189: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
6190: END IF;
6191:

Line 6192: RAISE fnd_api.g_exc_unexpected_error;

6188: IF (l_debug = 1) THEN
6189: DEBUG('return unexpected error from update shipping attributes', 'stage_lpns');
6190: END IF;
6191:
6192: RAISE fnd_api.g_exc_unexpected_error;
6193: END IF;
6194:
6195: --Since we have split the WDD line, we need to process
6196: --this newly split line also.

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

6233: l_shipping_attr(1).released_status := 'Y';
6234: wsh_interface.update_shipping_attributes(p_source_code => 'INV', p_changed_attributes => l_shipping_attr
6235: , x_return_status => l_return_status);
6236:
6237: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6238: IF (l_debug = 1) THEN
6239: DEBUG('Non-Reservable: return error from update shipping attributes', 'stage_lpns');
6240: END IF;
6241:

Line 6242: RAISE fnd_api.g_exc_error;

6238: IF (l_debug = 1) THEN
6239: DEBUG('Non-Reservable: return error from update shipping attributes', 'stage_lpns');
6240: END IF;
6241:
6242: RAISE fnd_api.g_exc_error;
6243: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6244: IF (l_debug = 1) THEN
6245: DEBUG('Non-Reservable: return unexpected error from update shipping attributes', 'stage_lpns');
6246: END IF;

Line 6243: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6239: DEBUG('Non-Reservable: return error from update shipping attributes', 'stage_lpns');
6240: END IF;
6241:
6242: RAISE fnd_api.g_exc_error;
6243: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6244: IF (l_debug = 1) THEN
6245: DEBUG('Non-Reservable: return unexpected error from update shipping attributes', 'stage_lpns');
6246: END IF;
6247:

Line 6248: RAISE fnd_api.g_exc_unexpected_error;

6244: IF (l_debug = 1) THEN
6245: DEBUG('Non-Reservable: return unexpected error from update shipping attributes', 'stage_lpns');
6246: END IF;
6247:
6248: RAISE fnd_api.g_exc_unexpected_error;
6249: END IF;
6250: END LOOP; -- Non-Reservable delivery_details
6251: END IF; -- Reservable
6252: END LOOP; -- STAGE_LINE;

Line 6281: x_return_status := fnd_api.g_ret_sts_error;

6277: , p_direct_ship_flag => 'Y'
6278: );
6279:
6280: IF l_return = 1 THEN
6281: x_return_status := fnd_api.g_ret_sts_error;
6282: RAISE fnd_api.g_exc_error;
6283: END IF;
6284:
6285: SELECT COUNT(*)

Line 6282: RAISE fnd_api.g_exc_error;

6278: );
6279:
6280: IF l_return = 1 THEN
6281: x_return_status := fnd_api.g_ret_sts_error;
6282: RAISE fnd_api.g_exc_error;
6283: END IF;
6284:
6285: SELECT COUNT(*)
6286: INTO l_trip_id

Line 6331: x_return_status := fnd_api.g_ret_sts_success;

6327: IF (l_debug = 1) THEN
6328: DEBUG('return success from create_delivery ', 'stage_lpns');
6329: END IF;
6330:
6331: x_return_status := fnd_api.g_ret_sts_success;
6332: ELSIF l_return_status IN('E') THEN
6333: IF (l_debug = 1) THEN
6334: DEBUG('return error from create_delivery', 'stage_lpns');
6335: END IF;

Line 6337: x_return_status := fnd_api.g_ret_sts_error;

6333: IF (l_debug = 1) THEN
6334: DEBUG('return error from create_delivery', 'stage_lpns');
6335: END IF;
6336:
6337: x_return_status := fnd_api.g_ret_sts_error;
6338: RAISE fnd_api.g_exc_error;
6339: ELSE
6340: IF (l_debug = 1) THEN
6341: DEBUG('return unexpected error from create_delivery', 'stage_lpns');

Line 6338: RAISE fnd_api.g_exc_error;

6334: DEBUG('return error from create_delivery', 'stage_lpns');
6335: END IF;
6336:
6337: x_return_status := fnd_api.g_ret_sts_error;
6338: RAISE fnd_api.g_exc_error;
6339: ELSE
6340: IF (l_debug = 1) THEN
6341: DEBUG('return unexpected error from create_delivery', 'stage_lpns');
6342: END IF;

Line 6344: x_return_status := fnd_api.g_ret_sts_unexp_error;

6340: IF (l_debug = 1) THEN
6341: DEBUG('return unexpected error from create_delivery', 'stage_lpns');
6342: END IF;
6343:
6344: x_return_status := fnd_api.g_ret_sts_unexp_error;
6345: RAISE fnd_api.g_exc_unexpected_error;
6346: END IF;
6347:
6348: ---

Line 6345: RAISE fnd_api.g_exc_unexpected_error;

6341: DEBUG('return unexpected error from create_delivery', 'stage_lpns');
6342: END IF;
6343:
6344: x_return_status := fnd_api.g_ret_sts_unexp_error;
6345: RAISE fnd_api.g_exc_unexpected_error;
6346: END IF;
6347:
6348: ---
6349: IF g_wms_current_release_level >= g_j_release_level THEN

Line 6359: p_init_msg_list => fnd_api.g_false,

6355: l_delivery_id_tab(1) := l_delivery_id;
6356:
6357: wsh_interface_ext_grp.delivery_action
6358: (p_api_version_number => 1.0,
6359: p_init_msg_list => fnd_api.g_false,
6360: p_commit => fnd_api.g_false,
6361: p_action_prms => l_action_prms,
6362: p_delivery_id_tab => l_delivery_id_tab,
6363: x_delivery_out_rec => l_delivery_out_rec,

Line 6360: p_commit => fnd_api.g_false,

6356:
6357: wsh_interface_ext_grp.delivery_action
6358: (p_api_version_number => 1.0,
6359: p_init_msg_list => fnd_api.g_false,
6360: p_commit => fnd_api.g_false,
6361: p_action_prms => l_action_prms,
6362: p_delivery_id_tab => l_delivery_id_tab,
6363: x_delivery_out_rec => l_delivery_out_rec,
6364: x_return_status => l_return_status,

Line 6407: p_init_msg_list => fnd_api.g_false,

6403: IF l_ignore_for_planning = 'N' AND l_tms_interface_flag = 'CR' THEN
6404: l_action_prms.action_code := 'IGNORE_PLAN';
6405: wsh_interface_ext_grp.delivery_action
6406: (p_api_version_number => 1.0,
6407: p_init_msg_list => fnd_api.g_false,
6408: p_commit => fnd_api.g_false,
6409: p_action_prms => l_action_prms,
6410: p_delivery_id_tab => l_delivery_id_tab,
6411: x_delivery_out_rec => l_delivery_out_rec,

Line 6408: p_commit => fnd_api.g_false,

6404: l_action_prms.action_code := 'IGNORE_PLAN';
6405: wsh_interface_ext_grp.delivery_action
6406: (p_api_version_number => 1.0,
6407: p_init_msg_list => fnd_api.g_false,
6408: p_commit => fnd_api.g_false,
6409: p_action_prms => l_action_prms,
6410: p_delivery_id_tab => l_delivery_id_tab,
6411: x_delivery_out_rec => l_delivery_out_rec,
6412: x_return_status => l_return_status,

Line 6420: IF l_return_status = fnd_api.g_ret_sts_error THEN

6416: IF (l_debug = 1) THEN
6417: debug('Called wsh_interface_ext_grp.delivery_action with action_code IGNORE_PLAN and return status: ' || l_return_status, 'stage_lpns');
6418: END IF;
6419:
6420: IF l_return_status = fnd_api.g_ret_sts_error THEN
6421: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6424: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';

Line 6422: RAISE fnd_api.g_exc_error;

6418: END IF;
6419:
6420: IF l_return_status = fnd_api.g_ret_sts_error THEN
6421: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6424: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: END IF;

Line 6423: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6419:
6420: IF l_return_status = fnd_api.g_ret_sts_error THEN
6421: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6424: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: END IF;
6427: END IF;

Line 6425: RAISE fnd_api.g_exc_unexpected_error;

6421: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6424: x_msg_data := 'WMS_DELIVERY_ACTION_FAIL';
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: END IF;
6427: END IF;
6428:
6429: END IF; --g-log changes

Line 6444: WHEN fnd_api.g_exc_error THEN

6440: DEBUG('Exiting Stage LPNs..: ' , 'STAGE_LPN');
6441: END IF;
6442: --COMMIT;
6443: EXCEPTION
6444: WHEN fnd_api.g_exc_error THEN
6445: x_return_status := fnd_api.g_ret_sts_error;
6446:
6447: IF (l_debug = 1) THEN
6448: DEBUG('In exception type E', 'stage_lpns');

Line 6445: x_return_status := fnd_api.g_ret_sts_error;

6441: END IF;
6442: --COMMIT;
6443: EXCEPTION
6444: WHEN fnd_api.g_exc_error THEN
6445: x_return_status := fnd_api.g_ret_sts_error;
6446:
6447: IF (l_debug = 1) THEN
6448: DEBUG('In exception type E', 'stage_lpns');
6449: END IF;

Line 6453: WHEN fnd_api.g_exc_unexpected_error THEN

6449: END IF;
6450: -- ROLLBACK;
6451: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6452:
6453: WHEN fnd_api.g_exc_unexpected_error THEN
6454: x_return_status := fnd_api.g_ret_sts_unexp_error;
6455:
6456: IF (l_debug = 1) THEN
6457: DEBUG('In exception type U', 'stage_lpns');

Line 6454: x_return_status := fnd_api.g_ret_sts_unexp_error;

6450: -- ROLLBACK;
6451: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6452:
6453: WHEN fnd_api.g_exc_unexpected_error THEN
6454: x_return_status := fnd_api.g_ret_sts_unexp_error;
6455:
6456: IF (l_debug = 1) THEN
6457: DEBUG('In exception type U', 'stage_lpns');
6458: END IF;

Line 6517: x_return_status := fnd_api.g_ret_sts_success;

6513: no_ship_method_code EXCEPTION;
6514:
6515: BEGIN
6516: --SAVEPOINT closetruck;
6517: x_return_status := fnd_api.g_ret_sts_success;
6518:
6519: IF (l_debug = 1) THEN
6520: inv_trx_util_pub.TRACE('In close truck program ', 'close_truck', 9);
6521: inv_trx_util_pub.TRACE('p_dock_door_id : ' || p_dock_door_id , 'close_truck', 9);

Line 6551: IF l_return_status = fnd_api.g_ret_sts_error THEN

6547: , p_org_id => p_org_id
6548: , p_dock_door_id => p_dock_door_id
6549: );
6550:
6551: IF l_return_status = fnd_api.g_ret_sts_error THEN
6552: IF (l_debug = 1) THEN
6553: inv_trx_util_pub.TRACE('Confirm All deliveries API failed with status E ', 'close_truck', 9);
6554: END IF;
6555:

Line 6560: RAISE fnd_api.g_exc_error;

6556: IF (l_debug = 1) THEN
6557: DEBUG('Confirm All deliveries API failed with status E close_truck');
6558: END IF;
6559:
6560: RAISE fnd_api.g_exc_error;
6561: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6562: IF (l_debug = 1) THEN
6563: inv_trx_util_pub.TRACE('Confirm All deliveries failed with status U', 'close_truck', 9);
6564: END IF;

Line 6561: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6557: DEBUG('Confirm All deliveries API failed with status E close_truck');
6558: END IF;
6559:
6560: RAISE fnd_api.g_exc_error;
6561: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6562: IF (l_debug = 1) THEN
6563: inv_trx_util_pub.TRACE('Confirm All deliveries failed with status U', 'close_truck', 9);
6564: END IF;
6565:

Line 6570: RAISE fnd_api.g_exc_unexpected_error;

6566: IF (l_debug = 1) THEN
6567: DEBUG('Confirm All deliveries failed with status U close_truck');
6568: END IF;
6569:
6570: RAISE fnd_api.g_exc_unexpected_error;
6571: END IF;
6572:
6573: IF (l_debug = 1) THEN
6574: inv_trx_util_pub.TRACE('Confirm All deliveries successfully completed ', 'close_truck', 9);

Line 6652: IF l_return_status = fnd_api.g_ret_sts_error THEN

6648: IF (l_debug = 1) THEN
6649: DEBUG('After call to Close Trip API close_truck');
6650: END IF;
6651:
6652: IF l_return_status = fnd_api.g_ret_sts_error THEN
6653: IF (l_debug = 1) THEN
6654: DEBUG('Close trip API failed with status E ', 'close_truck');
6655: END IF;
6656:

Line 6657: RAISE fnd_api.g_exc_error;

6653: IF (l_debug = 1) THEN
6654: DEBUG('Close trip API failed with status E ', 'close_truck');
6655: END IF;
6656:
6657: RAISE fnd_api.g_exc_error;
6658: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6659: IF (l_debug = 1) THEN
6660: DEBUG('Close trip failed with status U', 'close_truck');
6661: END IF;

Line 6658: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6654: DEBUG('Close trip API failed with status E ', 'close_truck');
6655: END IF;
6656:
6657: RAISE fnd_api.g_exc_error;
6658: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6659: IF (l_debug = 1) THEN
6660: DEBUG('Close trip failed with status U', 'close_truck');
6661: END IF;
6662:

Line 6663: RAISE fnd_api.g_exc_unexpected_error;

6659: IF (l_debug = 1) THEN
6660: DEBUG('Close trip failed with status U', 'close_truck');
6661: END IF;
6662:
6663: RAISE fnd_api.g_exc_unexpected_error;
6664: END IF;
6665:
6666: IF (l_debug = 1) THEN
6667: DEBUG('Close trip API completed successfully ', 'close_truck');

Line 6679: x_return_status := fnd_api.g_ret_sts_error;

6675: DEBUG('End of close truck ', 'close_truck', 9);
6676: END IF;
6677: EXCEPTION
6678: WHEN no_ship_method_code THEN
6679: x_return_status := fnd_api.g_ret_sts_error;
6680: fnd_message.set_name('WMS', 'WMS_SHIP_METHOD_CODE');
6681: fnd_message.set_token('TRIP_NAME', l_trip_name);
6682: /* No Ship method code provided for the Trip .This is required */
6683: fnd_msg_pub.ADD;

Line 6688: WHEN fnd_api.g_exc_error THEN

6684: /*fnd_msg_pub.count_and_get( p_count => x_msg_count,
6685: p_data => x_msg_data
6686: );*/
6687: DEBUG('In exception no_ship_method_code ', 'Close Trip');
6688: WHEN fnd_api.g_exc_error THEN
6689: x_return_status := fnd_api.g_ret_sts_error;
6690: ROLLBACK; --TO closetruck;
6691: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6692: WHEN fnd_api.g_exc_unexpected_error THEN

Line 6689: x_return_status := fnd_api.g_ret_sts_error;

6685: p_data => x_msg_data
6686: );*/
6687: DEBUG('In exception no_ship_method_code ', 'Close Trip');
6688: WHEN fnd_api.g_exc_error THEN
6689: x_return_status := fnd_api.g_ret_sts_error;
6690: ROLLBACK; --TO closetruck;
6691: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6692: WHEN fnd_api.g_exc_unexpected_error THEN
6693: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 6692: WHEN fnd_api.g_exc_unexpected_error THEN

6688: WHEN fnd_api.g_exc_error THEN
6689: x_return_status := fnd_api.g_ret_sts_error;
6690: ROLLBACK; --TO closetruck;
6691: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6692: WHEN fnd_api.g_exc_unexpected_error THEN
6693: x_return_status := fnd_api.g_ret_sts_unexp_error;
6694: ROLLBACK; --TO closetruck;
6695: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6696: WHEN OTHERS THEN

Line 6693: x_return_status := fnd_api.g_ret_sts_unexp_error;

6689: x_return_status := fnd_api.g_ret_sts_error;
6690: ROLLBACK; --TO closetruck;
6691: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6692: WHEN fnd_api.g_exc_unexpected_error THEN
6693: x_return_status := fnd_api.g_ret_sts_unexp_error;
6694: ROLLBACK; --TO closetruck;
6695: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6696: WHEN OTHERS THEN
6697: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 6697: x_return_status := fnd_api.g_ret_sts_unexp_error;

6693: x_return_status := fnd_api.g_ret_sts_unexp_error;
6694: ROLLBACK; --TO closetruck;
6695: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6696: WHEN OTHERS THEN
6697: x_return_status := fnd_api.g_ret_sts_unexp_error;
6698: ROLLBACK; --TO closetruck;
6699: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6700: END;
6701:

Line 6740: x_return_status := fnd_api.g_ret_sts_success;

6736: l_order_source_id NUMBER;
6737: l_demand_source_type_id NUMBER;
6738: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
6739: BEGIN
6740: x_return_status := fnd_api.g_ret_sts_success;
6741:
6742: IF (l_debug = 1) THEN
6743: DEBUG('The value of lpn_id is ' || p_lpn_id, 'GET_LPN_AVAILABLE_QUANTITY');
6744: DEBUG('The value of p_inventory_item_id is ' || p_inventory_item_id, 'GET_LPN_AVAILABLE_QUANTITY');

Line 6797: , p_init_msg_lst => fnd_api.g_false

6793: /* Bug 2440408: All the Trees in the cache have to be cleared so that trees are rebuild */
6794: inv_quantity_tree_pub.clear_quantity_cache;
6795: inv_quantity_tree_pub.query_quantities(
6796: p_api_version_number => 1.0
6797: , p_init_msg_lst => fnd_api.g_false
6798: , x_return_status => x_return_status
6799: , x_msg_count => x_msg_count
6800: , x_msg_data => x_msg_data
6801: , p_organization_id => p_organization_id

Line 6828: IF x_return_status <> fnd_api.g_ret_sts_success THEN

6824: DEBUG('The value of x_att is ' || x_att, 'GET_LPN_AVAILABLE_QUANTITY');
6825: END IF;
6826:
6827: -- If the qty tree returns and error raise an exception.
6828: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6829: IF (l_debug = 1) THEN
6830: inv_log_util.TRACE('Qty Tree Failed' || l_msg_data, 'INV_VMI_VALIDATIONS', 9);
6831: END IF;
6832:

Line 6833: RAISE fnd_api.g_exc_unexpected_error;

6829: IF (l_debug = 1) THEN
6830: inv_log_util.TRACE('Qty Tree Failed' || l_msg_data, 'INV_VMI_VALIDATIONS', 9);
6831: END IF;
6832:
6833: RAISE fnd_api.g_exc_unexpected_error;
6834: END IF;
6835:
6836: IF (x_att > 0) THEN
6837: IF (l_debug = 1) THEN

Line 6841: x_return_status := fnd_api.g_ret_sts_success;

6837: IF (l_debug = 1) THEN
6838: DEBUG('The value of x_att is - in if ' || x_att, 'GET_LPN_AVAILABLE_QUANTITY');
6839: END IF;
6840:
6841: x_return_status := fnd_api.g_ret_sts_success;
6842: EXIT;
6843: END IF;
6844: END LOOP;
6845:

Line 6846: x_return_status := fnd_api.g_ret_sts_success;

6842: EXIT;
6843: END IF;
6844: END LOOP;
6845:
6846: x_return_status := fnd_api.g_ret_sts_success;
6847: EXCEPTION
6848: WHEN OTHERS THEN
6849: IF (l_debug = 1) THEN
6850: inv_log_util.TRACE('When others Exception in get_available_vmi_quantity', 'GET_LPN_AVAILABLE_QUANTITY', 9);

Line 6854: x_return_status := fnd_api.g_ret_sts_unexp_error;

6850: inv_log_util.TRACE('When others Exception in get_available_vmi_quantity', 'GET_LPN_AVAILABLE_QUANTITY', 9);
6851: END IF;
6852:
6853: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6854: x_return_status := fnd_api.g_ret_sts_unexp_error;
6855: RETURN;
6856: END get_lpn_available_quantity;
6857:
6858: PROCEDURE create_update_containers(

Line 6920: x_return_status := fnd_api.g_ret_sts_success;

6916: l_OUT_rec WSH_GLBL_VAR_STRCT_GRP.detailOutRecType;
6917:
6918:
6919: BEGIN
6920: x_return_status := fnd_api.g_ret_sts_success;
6921:
6922: /* Release 12(K), changed to use l_lpn_cur as type of WMS_Data_Type_Definitions_PUB.LPNRecordType; */
6923: OPEN lpn_details;
6924: LOOP

Line 6999: , p_init_msg_list => fnd_api.g_false

6995: l_IN_rec.action_code := 'UPDATE_NULL';
6996:
6997: WSH_WMS_LPN_GRP.Create_Update_Containers (
6998: p_api_version => 1.0
6999: , p_init_msg_list => fnd_api.g_false
7000: , p_commit => fnd_api.g_false
7001: , x_return_status => x_return_status
7002: , x_msg_count => x_msg_count
7003: , x_msg_data => x_msg_data

Line 7000: , p_commit => fnd_api.g_false

6996:
6997: WSH_WMS_LPN_GRP.Create_Update_Containers (
6998: p_api_version => 1.0
6999: , p_init_msg_list => fnd_api.g_false
7000: , p_commit => fnd_api.g_false
7001: , x_return_status => x_return_status
7002: , x_msg_count => x_msg_count
7003: , x_msg_data => x_msg_data
7004: , p_detail_info_tab => wsh_update_tbl

Line 7009: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN

7005: , p_IN_rec => l_IN_rec
7006: , x_OUT_rec => l_OUT_rec );
7007:
7008:
7009: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN
7010: IF (l_debug = 1) THEN
7011: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7012: END IF;
7013:

Line 7014: RAISE fnd_api.g_exc_error;

7010: IF (l_debug = 1) THEN
7011: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7012: END IF;
7013:
7014: RAISE fnd_api.g_exc_error;
7015: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7016: IF (l_debug = 1) THEN
7017: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7018: END IF;

Line 7015: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN

7011: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7012: END IF;
7013:
7014: RAISE fnd_api.g_exc_error;
7015: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7016: IF (l_debug = 1) THEN
7017: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7018: END IF;
7019:

Line 7020: RAISE fnd_api.g_exc_unexpected_error;

7016: IF (l_debug = 1) THEN
7017: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7018: END IF;
7019:
7020: RAISE fnd_api.g_exc_unexpected_error;
7021: ELSE
7022: l_count := 0;
7023: IF (l_debug = 1) THEN
7024: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns success, AF Container exists, set lpn_id to NULL', 'create_update_containers');

Line 7077: , p_init_msg_list => fnd_api.g_false

7073: l_IN_rec.action_code := 'CREATE';
7074:
7075: WSH_WMS_LPN_GRP.Create_Update_Containers (
7076: p_api_version => 1.0
7077: , p_init_msg_list => fnd_api.g_false
7078: , p_commit => fnd_api.g_false
7079: , x_return_status => x_return_status
7080: , x_msg_count => x_msg_count
7081: , x_msg_data => x_msg_data

Line 7078: , p_commit => fnd_api.g_false

7074:
7075: WSH_WMS_LPN_GRP.Create_Update_Containers (
7076: p_api_version => 1.0
7077: , p_init_msg_list => fnd_api.g_false
7078: , p_commit => fnd_api.g_false
7079: , x_return_status => x_return_status
7080: , x_msg_count => x_msg_count
7081: , x_msg_data => x_msg_data
7082: , p_detail_info_tab => wsh_create_tbl

Line 7087: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN

7083: , p_IN_rec => l_IN_rec
7084: , x_OUT_rec => l_OUT_rec );
7085:
7086:
7087: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN
7088: IF (l_debug = 1) THEN
7089: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7090: END IF;
7091:

Line 7092: RAISE fnd_api.g_exc_error;

7088: IF (l_debug = 1) THEN
7089: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7090: END IF;
7091:
7092: RAISE fnd_api.g_exc_error;
7093: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7094: IF (l_debug = 1) THEN
7095: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7096: END IF;

Line 7093: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN

7089: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns error', 'create_update_containers');
7090: END IF;
7091:
7092: RAISE fnd_api.g_exc_error;
7093: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7094: IF (l_debug = 1) THEN
7095: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7096: END IF;
7097:

Line 7098: RAISE fnd_api.g_exc_unexpected_error;

7094: IF (l_debug = 1) THEN
7095: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns unexpected error', 'create_update_containers');
7096: END IF;
7097:
7098: RAISE fnd_api.g_exc_unexpected_error;
7099: ELSE
7100: IF (l_debug = 1) THEN
7101: DEBUG('WSH_WMS_LPN_GRP.Create_Update_Containers returns success', 'create_update_containers');
7102: END IF;

Line 7110: WHEN fnd_api.g_exc_error THEN

7106: IF (l_debug = 1) THEN
7107: DEBUG('The API return status is ' || x_return_status, 'create_update_containers');
7108: END IF;
7109: EXCEPTION
7110: WHEN fnd_api.g_exc_error THEN
7111: x_return_status := fnd_api.g_ret_sts_error;
7112: ROLLBACK;
7113: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7114:

Line 7111: x_return_status := fnd_api.g_ret_sts_error;

7107: DEBUG('The API return status is ' || x_return_status, 'create_update_containers');
7108: END IF;
7109: EXCEPTION
7110: WHEN fnd_api.g_exc_error THEN
7111: x_return_status := fnd_api.g_ret_sts_error;
7112: ROLLBACK;
7113: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7114:
7115: IF (l_debug = 1) THEN

Line 7118: WHEN fnd_api.g_exc_unexpected_error THEN

7114:
7115: IF (l_debug = 1) THEN
7116: DEBUG('Execution Error in Create_Update_Container:' || SUBSTR(SQLERRM, 1, 240), 9);
7117: END IF;
7118: WHEN fnd_api.g_exc_unexpected_error THEN
7119: x_return_status := fnd_api.g_ret_sts_unexp_error;
7120: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7121:
7122: IF (l_debug = 1) THEN

Line 7119: x_return_status := fnd_api.g_ret_sts_unexp_error;

7115: IF (l_debug = 1) THEN
7116: DEBUG('Execution Error in Create_Update_Container:' || SUBSTR(SQLERRM, 1, 240), 9);
7117: END IF;
7118: WHEN fnd_api.g_exc_unexpected_error THEN
7119: x_return_status := fnd_api.g_ret_sts_unexp_error;
7120: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7121:
7122: IF (l_debug = 1) THEN
7123: DEBUG('Unexpected Error in Create_Update_Container:' || SUBSTR(SQLERRM, 1, 240), 'create_update_containers');

Line 7130: x_return_status := fnd_api.g_ret_sts_unexp_error;

7126: --x_error_code := 9999;
7127: IF l_debug = 1 THEN
7128: debug('Others exception raised: ' || SUBSTR(SQLERRM, 1, 240),'create_update_containers');
7129: END IF;
7130: x_return_status := fnd_api.g_ret_sts_unexp_error;
7131: ROLLBACK;
7132:
7133: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7134: fnd_msg_pub.add_exc_msg('WMS_DIRECT_SHIP_PVT', 'create_update_containers');

Line 7188: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;

7184: l_extra_qty NUMBER;
7185: l_lpn_qty NUMBER;
7186: l_lpn_item_count NUMBER;
7187: l_delivery_item_count NUMBER;
7188: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
7189: l_commit VARCHAR2(1) := fnd_api.g_false;
7190: l_return_status VARCHAR2(1);
7191: l_msg_data VARCHAR2(20000);
7192: l_msg_count NUMBER;

Line 7189: l_commit VARCHAR2(1) := fnd_api.g_false;

7185: l_lpn_qty NUMBER;
7186: l_lpn_item_count NUMBER;
7187: l_delivery_item_count NUMBER;
7188: l_init_msg_list VARCHAR2(1) := fnd_api.g_false;
7189: l_commit VARCHAR2(1) := fnd_api.g_false;
7190: l_return_status VARCHAR2(1);
7191: l_msg_data VARCHAR2(20000);
7192: l_msg_count NUMBER;
7193: x_error_code NUMBER;

Line 7196: x_return_status := fnd_api.g_ret_sts_success;

7192: l_msg_count NUMBER;
7193: x_error_code NUMBER;
7194: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7195: BEGIN
7196: x_return_status := fnd_api.g_ret_sts_success;
7197:
7198: BEGIN
7199: --Query to get the total no. of distinct items in the lpn to be shipped
7200:

Line 7227: RAISE fnd_api.g_exc_error;

7223: DEBUG('LPN contains items not belonging to the delivery.', 'Update_shipped_Quantity');
7224: DEBUG('Cannot ship', 'Update_shipped_Quantity');
7225: END IF;
7226:
7227: RAISE fnd_api.g_exc_error;
7228: END IF;
7229: EXCEPTION
7230: WHEN fnd_api.g_exc_error THEN
7231: -- Log a message for item count mismatch

Line 7230: WHEN fnd_api.g_exc_error THEN

7226:
7227: RAISE fnd_api.g_exc_error;
7228: END IF;
7229: EXCEPTION
7230: WHEN fnd_api.g_exc_error THEN
7231: -- Log a message for item count mismatch
7232: x_return_status := fnd_api.g_ret_sts_error;
7233: x_error_code := 10;
7234:

Line 7232: x_return_status := fnd_api.g_ret_sts_error;

7228: END IF;
7229: EXCEPTION
7230: WHEN fnd_api.g_exc_error THEN
7231: -- Log a message for item count mismatch
7232: x_return_status := fnd_api.g_ret_sts_error;
7233: x_error_code := 10;
7234:
7235: IF (l_debug = 1) THEN
7236: DEBUG('LPN has more items than Delivery Details', 'Update_Shipped_Quantity');

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

7290: IF (l_debug = 1) THEN
7291: DEBUG('after calling Update_shipping_attributes', 'Update_shipped_Quantity');
7292: END IF;
7293:
7294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
7295: IF (l_debug = 1) THEN
7296: DEBUG('return error from update shipping attributes 2', 'Update_shipped_Quantity');
7297: END IF;
7298:

Line 7299: RAISE fnd_api.g_exc_error;

7295: IF (l_debug = 1) THEN
7296: DEBUG('return error from update shipping attributes 2', 'Update_shipped_Quantity');
7297: END IF;
7298:
7299: RAISE fnd_api.g_exc_error;
7300: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7301: IF (l_debug = 1) THEN
7302: DEBUG('return unexpected error from update shipping attributes', 'Update_shipped_Quantity');
7303: END IF;

Line 7300: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7296: DEBUG('return error from update shipping attributes 2', 'Update_shipped_Quantity');
7297: END IF;
7298:
7299: RAISE fnd_api.g_exc_error;
7300: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7301: IF (l_debug = 1) THEN
7302: DEBUG('return unexpected error from update shipping attributes', 'Update_shipped_Quantity');
7303: END IF;
7304:

Line 7305: RAISE fnd_api.g_exc_unexpected_error;

7301: IF (l_debug = 1) THEN
7302: DEBUG('return unexpected error from update shipping attributes', 'Update_shipped_Quantity');
7303: END IF;
7304:
7305: RAISE fnd_api.g_exc_unexpected_error;
7306: ELSIF l_return_status = 'S' THEN
7307: IF (l_debug = 1) THEN
7308: DEBUG('Shipping attributes updated successfully');
7309: END IF;

Line 7311: x_return_status := fnd_api.g_ret_sts_success;

7307: IF (l_debug = 1) THEN
7308: DEBUG('Shipping attributes updated successfully');
7309: END IF;
7310:
7311: x_return_status := fnd_api.g_ret_sts_success;
7312: END IF;
7313: END IF; -- end if l_lpn_qty > l_del_qty
7314: END LOOP;
7315:

Line 7318: WHEN fnd_api.g_exc_error THEN

7314: END LOOP;
7315:
7316: CLOSE delivery_item_qty;
7317: EXCEPTION
7318: WHEN fnd_api.g_exc_error THEN
7319: x_return_status := fnd_api.g_ret_sts_error;
7320: x_error_code := 10;
7321: ROLLBACK;
7322: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 7319: x_return_status := fnd_api.g_ret_sts_error;

7315:
7316: CLOSE delivery_item_qty;
7317: EXCEPTION
7318: WHEN fnd_api.g_exc_error THEN
7319: x_return_status := fnd_api.g_ret_sts_error;
7320: x_error_code := 10;
7321: ROLLBACK;
7322: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7323:

Line 7328: WHEN fnd_api.g_exc_unexpected_error THEN

7324: IF (l_debug = 1) THEN
7325: DEBUG('Execution Error in Update_shipped_Quantity', 'Update_shipped_Quantity');
7326: DEBUG('Could not update shipping attributes', 'Update_shipped_Quantity');
7327: END IF;
7328: WHEN fnd_api.g_exc_unexpected_error THEN
7329: x_return_status := fnd_api.g_ret_sts_unexp_error;
7330: x_error_code := 20;
7331: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7332:

Line 7329: x_return_status := fnd_api.g_ret_sts_unexp_error;

7325: DEBUG('Execution Error in Update_shipped_Quantity', 'Update_shipped_Quantity');
7326: DEBUG('Could not update shipping attributes', 'Update_shipped_Quantity');
7327: END IF;
7328: WHEN fnd_api.g_exc_unexpected_error THEN
7329: x_return_status := fnd_api.g_ret_sts_unexp_error;
7330: x_error_code := 20;
7331: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7332:
7333: IF (l_debug = 1) THEN

Line 7339: x_return_status := fnd_api.g_ret_sts_unexp_error;

7335: DEBUG('Could not update shipping attributes', 'Update_shipped_Quantity');
7336: END IF;
7337: WHEN OTHERS THEN
7338: x_error_code := 30;
7339: x_return_status := fnd_api.g_ret_sts_unexp_error;
7340: ROLLBACK;
7341: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7342:
7343: IF (l_debug = 1) THEN

Line 7409: x_return_status := fnd_api.g_ret_sts_success;

7405: l_wsh_defaults WSH_GLBL_VAR_STRCT_GRP.dd_default_parameters_rec_type;
7406: l_wsh_action_out_rec WSH_GLBL_VAR_STRCT_GRP.dd_action_out_rec_type;
7407:
7408: BEGIN
7409: x_return_status := fnd_api.g_ret_sts_success;
7410:
7411: IF l_debug = 1 THEN
7412: debug('Entered container_nesting with p_action_code: ' ||p_action_code,
7413: 'Container_Nesting');

Line 7425: RAISE fnd_api.g_exc_unexpected_error;

7421: IF l_debug = 1 THEN
7422: debug('Invalid p_action_code passed in','Container_Nesting');
7423: END IF;
7424:
7425: RAISE fnd_api.g_exc_unexpected_error;
7426: END IF;
7427:
7428: --Loop through containers that have nested container
7429: OPEN lpn_hierarchy;

Line 7524: p_init_msg_list => fnd_api.g_false,

7520: END IF;
7521:
7522: WSH_WMS_LPN_GRP.Delivery_Detail_Action(
7523: p_api_version_number => 1.0,
7524: p_init_msg_list => fnd_api.g_false,
7525: p_commit => fnd_api.g_false,
7526: x_return_status => x_return_status,
7527: x_msg_count => x_msg_count,
7528: x_msg_data => x_msg_data,

Line 7525: p_commit => fnd_api.g_false,

7521:
7522: WSH_WMS_LPN_GRP.Delivery_Detail_Action(
7523: p_api_version_number => 1.0,
7524: p_init_msg_list => fnd_api.g_false,
7525: p_commit => fnd_api.g_false,
7526: x_return_status => x_return_status,
7527: x_msg_count => x_msg_count,
7528: x_msg_data => x_msg_data,
7529: p_lpn_id_tbl => l_wsh_lpn_id_tbl,

Line 7536: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN

7532: x_defaults => l_wsh_defaults,
7533: x_action_out_rec => l_wsh_action_out_rec
7534: );
7535:
7536: IF (x_return_status IN(fnd_api.g_ret_sts_error)) THEN
7537: --debug('WSH_Container_Grp.Container_Actions returns an exec. error','Pack_Lpns);
7538: IF (l_debug = 1) THEN
7539: DEBUG('Exec. error in packing' || SUBSTR(SQLERRM, 1, 240) || ' ret st:' || x_return_status, 'Container_Nesting');
7540: END IF;

Line 7542: RAISE fnd_api.g_exc_error;

7538: IF (l_debug = 1) THEN
7539: DEBUG('Exec. error in packing' || SUBSTR(SQLERRM, 1, 240) || ' ret st:' || x_return_status, 'Container_Nesting');
7540: END IF;
7541:
7542: RAISE fnd_api.g_exc_error;
7543: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7544: --debug('WSH_Container_Grp.Container_Actions returns an unexp. error','Pack_Lpns);
7545: IF (l_debug = 1) THEN
7546: DEBUG('Unexp. error in packing', 'Container_Nesting');

Line 7543: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN

7539: DEBUG('Exec. error in packing' || SUBSTR(SQLERRM, 1, 240) || ' ret st:' || x_return_status, 'Container_Nesting');
7540: END IF;
7541:
7542: RAISE fnd_api.g_exc_error;
7543: ELSIF(x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
7544: --debug('WSH_Container_Grp.Container_Actions returns an unexp. error','Pack_Lpns);
7545: IF (l_debug = 1) THEN
7546: DEBUG('Unexp. error in packing', 'Container_Nesting');
7547: END IF;

Line 7549: RAISE fnd_api.g_exc_unexpected_error;

7545: IF (l_debug = 1) THEN
7546: DEBUG('Unexp. error in packing', 'Container_Nesting');
7547: END IF;
7548:
7549: RAISE fnd_api.g_exc_unexpected_error;
7550: ELSE
7551: IF (l_debug = 1) THEN
7552: DEBUG('Nesting is success. Outermost LPN ID: ' || p_outermost_lpn_id, 'Container_Nesting');
7553: END IF;

Line 7587: RAISE fnd_api.g_exc_unexpected_error;

7583: IF (l_debug = 1) THEN
7584: DEBUG('Unpack other exception..delivery not assign to LPN? ','Container_Nesting');
7585: debug(SQLERRM, 'Container_Nesting');
7586: END IF;
7587: RAISE fnd_api.g_exc_unexpected_error;
7588: END;
7589:
7590: IF l_delivery_planned_flag NOT IN ('Y','F') THEN
7591: DEBUG('Delivery not planned. Just unassign the outer LPN lines','Container_Nesting');

Line 7596: p_validation_level => fnd_api.g_valid_level_full,

7592: wsh_container_grp.container_actions
7593: (p_api_version => 1.0,
7594: p_init_msg_list => G_TRUE,
7595: p_commit => G_FALSE,
7596: p_validation_level => fnd_api.g_valid_level_full,
7597: x_return_status => x_return_status,
7598: x_msg_count => x_msg_count,
7599: x_msg_data => x_msg_data,
7600: p_detail_tab => l_par_del_det_tab,

Line 7611: RAISE fnd_api.g_exc_unexpected_error;

7607: THEN
7608: debug('Unassign from delivery failed' , 'Container_Nesting');
7609: debug('wsh_container_grp.container_actions returned ' ||
7610: x_return_status,'Container_Nesting');
7611: RAISE fnd_api.g_exc_unexpected_error;
7612: END IF;
7613: ELSE
7614: DEBUG('Delivery is planned.','Container_Nesting');
7615: IF l_delivery_planned_flag = 'F' THEN

Line 7631: RAISE fnd_api.g_exc_unexpected_error;

7627: EXCEPTION
7628: WHEN OTHERS THEN
7629: debug('Cannot find trip ID?','Container_Nesting');
7630: debug(SQLERRM,'Container_Nesting');
7631: RAISE fnd_api.g_exc_unexpected_error;
7632: END;
7633:
7634: wsh_interface_ext_grp.trip_action
7635: (p_api_version_number => 1.0,

Line 7636: p_init_msg_list => fnd_api.g_false,

7632: END;
7633:
7634: wsh_interface_ext_grp.trip_action
7635: (p_api_version_number => 1.0,
7636: p_init_msg_list => fnd_api.g_false,
7637: p_commit => fnd_api.g_false,
7638: p_action_prms => l_trip_action_prms,
7639: p_entity_id_tab => l_trip_id_tab,
7640: x_trip_out_rec => l_trip_out_rec,

Line 7637: p_commit => fnd_api.g_false,

7633:
7634: wsh_interface_ext_grp.trip_action
7635: (p_api_version_number => 1.0,
7636: p_init_msg_list => fnd_api.g_false,
7637: p_commit => fnd_api.g_false,
7638: p_action_prms => l_trip_action_prms,
7639: p_entity_id_tab => l_trip_id_tab,
7640: x_trip_out_rec => l_trip_out_rec,
7641: x_return_status => x_return_status,

Line 7649: RAISE fnd_api.g_exc_unexpected_error;

7645:
7646: IF x_return_status IN (G_RET_STS_ERROR,G_RET_STS_UNEXP_ERROR) THEN
7647: DEBUG('Unfirming trip failed!','Container_Nesting');
7648: debug('msg_data: ' || x_msg_data,'Container_Nesting');
7649: RAISE fnd_api.g_exc_unexpected_error;
7650: END IF;
7651: END IF;
7652:
7653: l_action_prms.caller := 'WMS';

Line 7661: p_init_msg_list => fnd_api.g_false,

7657:
7658: DEBUG('Unfirm delivery','Container_Nesting');
7659: wsh_interface_ext_grp.delivery_action
7660: (p_api_version_number => 1.0,
7661: p_init_msg_list => fnd_api.g_false,
7662: p_commit => fnd_api.g_false,
7663: p_action_prms => l_action_prms,
7664: p_delivery_id_tab => l_delivery_id_tab,
7665: x_delivery_out_rec => l_delivery_out_rec,

Line 7662: p_commit => fnd_api.g_false,

7658: DEBUG('Unfirm delivery','Container_Nesting');
7659: wsh_interface_ext_grp.delivery_action
7660: (p_api_version_number => 1.0,
7661: p_init_msg_list => fnd_api.g_false,
7662: p_commit => fnd_api.g_false,
7663: p_action_prms => l_action_prms,
7664: p_delivery_id_tab => l_delivery_id_tab,
7665: x_delivery_out_rec => l_delivery_out_rec,
7666: x_return_status => x_return_status,

Line 7673: RAISE fnd_api.g_exc_unexpected_error;

7669:
7670: IF x_return_status IN (G_RET_STS_ERROR,G_RET_STS_UNEXP_ERROR) THEN
7671: DEBUG('Unfirming delivery failed!','Container_Nesting');
7672: debug('msg_data: ' || x_msg_data,'Container_Nesting');
7673: RAISE fnd_api.g_exc_unexpected_error;
7674: END IF;
7675:
7676: DEBUG('Unassign the lines from delivery','Container_Nesting');
7677: wsh_container_grp.container_actions

Line 7681: p_validation_level => fnd_api.g_valid_level_full,

7677: wsh_container_grp.container_actions
7678: (p_api_version => 1.0,
7679: p_init_msg_list => G_TRUE,
7680: p_commit => G_FALSE,
7681: p_validation_level => fnd_api.g_valid_level_full,
7682: x_return_status => x_return_status,
7683: x_msg_count => x_msg_count,
7684: x_msg_data => x_msg_data,
7685: p_detail_tab => l_par_del_det_tab,

Line 7692: RAISE fnd_api.g_exc_unexpected_error;

7688:
7689: IF x_return_status IN (G_RET_STS_ERROR,G_RET_STS_UNEXP_ERROR) THEN
7690: DEBUG('Unassigning from delivery failed!','Container_Nesting');
7691: debug('msg_data: ' || x_msg_data,'Container_Nesting');
7692: RAISE fnd_api.g_exc_unexpected_error;
7693: END IF;
7694:
7695: IF l_delivery_planned_flag = 'Y' THEN
7696:

Line 7701: p_init_msg_list => fnd_api.g_false,

7697: l_action_prms.action_code := 'PLAN';
7698: DEBUG('Planned flag is Y need to firm back the delivery','Container_Nesting');
7699: wsh_interface_ext_grp.delivery_action
7700: (p_api_version_number => 1.0,
7701: p_init_msg_list => fnd_api.g_false,
7702: p_commit => fnd_api.g_false,
7703: p_action_prms => l_action_prms,
7704: p_delivery_id_tab => l_delivery_id_tab,
7705: x_delivery_out_rec => l_delivery_out_rec,

Line 7702: p_commit => fnd_api.g_false,

7698: DEBUG('Planned flag is Y need to firm back the delivery','Container_Nesting');
7699: wsh_interface_ext_grp.delivery_action
7700: (p_api_version_number => 1.0,
7701: p_init_msg_list => fnd_api.g_false,
7702: p_commit => fnd_api.g_false,
7703: p_action_prms => l_action_prms,
7704: p_delivery_id_tab => l_delivery_id_tab,
7705: x_delivery_out_rec => l_delivery_out_rec,
7706: x_return_status => x_return_status,

Line 7713: RAISE fnd_api.g_exc_unexpected_error;

7709:
7710: IF x_return_status IN (G_RET_STS_ERROR,G_RET_STS_UNEXP_ERROR) THEN
7711: DEBUG('Firming delivery failed!','Container_Nesting');
7712: debug('msg_data: ' || x_msg_data,'Container_Nesting');
7713: RAISE fnd_api.g_exc_unexpected_error;
7714: END IF;
7715:
7716: else
7717: debug('Planned flag is F. Firm back the trip: ' || l_trip_id_tab(1),'Container_Nesting');

Line 7722: p_init_msg_list => fnd_api.g_false,

7718: l_trip_action_prms.action_code := 'FIRM';
7719:
7720: wsh_interface_ext_grp.trip_action
7721: (p_api_version_number => 1.0,
7722: p_init_msg_list => fnd_api.g_false,
7723: p_commit => fnd_api.g_false,
7724: p_action_prms => l_trip_action_prms,
7725: p_entity_id_tab => l_trip_id_tab,
7726: x_trip_out_rec => l_trip_out_rec,

Line 7723: p_commit => fnd_api.g_false,

7719:
7720: wsh_interface_ext_grp.trip_action
7721: (p_api_version_number => 1.0,
7722: p_init_msg_list => fnd_api.g_false,
7723: p_commit => fnd_api.g_false,
7724: p_action_prms => l_trip_action_prms,
7725: p_entity_id_tab => l_trip_id_tab,
7726: x_trip_out_rec => l_trip_out_rec,
7727: x_return_status => x_return_status,

Line 7735: RAISE fnd_api.g_exc_unexpected_error;

7731:
7732: IF x_return_status IN (G_RET_STS_ERROR,G_RET_STS_UNEXP_ERROR) THEN
7733: DEBUG('Firming trip failed!','Container_Nesting');
7734: debug('msg_data: ' || x_msg_data,'Container_Nesting');
7735: RAISE fnd_api.g_exc_unexpected_error;
7736: END IF;
7737: END IF;
7738: END IF;
7739: END IF;--p_action_code = 'UNPACK'

Line 7742: WHEN fnd_api.g_exc_error THEN

7738: END IF;
7739: END IF;--p_action_code = 'UNPACK'
7740:
7741: EXCEPTION
7742: WHEN fnd_api.g_exc_error THEN
7743: x_return_status := fnd_api.g_ret_sts_error;
7744: ROLLBACK;
7745: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7746:

Line 7743: x_return_status := fnd_api.g_ret_sts_error;

7739: END IF;--p_action_code = 'UNPACK'
7740:
7741: EXCEPTION
7742: WHEN fnd_api.g_exc_error THEN
7743: x_return_status := fnd_api.g_ret_sts_error;
7744: ROLLBACK;
7745: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7746:
7747: IF container_details%ISOPEN THEN

Line 7758: WHEN fnd_api.g_exc_unexpected_error THEN

7754:
7755: IF (l_debug = 1) THEN
7756: DEBUG('Execution Error in lpn_hiearchy:' || x_msg_data || '-' || SUBSTR(SQLERRM, 1, 240), 'Container_Nesting');
7757: END IF;
7758: WHEN fnd_api.g_exc_unexpected_error THEN
7759: x_return_status := fnd_api.g_ret_sts_unexp_error;
7760: ROLLBACK;
7761: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7762:

Line 7759: x_return_status := fnd_api.g_ret_sts_unexp_error;

7755: IF (l_debug = 1) THEN
7756: DEBUG('Execution Error in lpn_hiearchy:' || x_msg_data || '-' || SUBSTR(SQLERRM, 1, 240), 'Container_Nesting');
7757: END IF;
7758: WHEN fnd_api.g_exc_unexpected_error THEN
7759: x_return_status := fnd_api.g_ret_sts_unexp_error;
7760: ROLLBACK;
7761: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7762:
7763: IF (l_debug = 1) THEN

Line 7775: x_return_status := fnd_api.g_ret_sts_unexp_error;

7771: IF lpn_hierarchy%ISOPEN THEN
7772: CLOSE lpn_hierarchy;
7773: END IF;
7774: WHEN OTHERS THEN
7775: x_return_status := fnd_api.g_ret_sts_unexp_error;
7776: ROLLBACK;
7777: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7778:
7779: --debug('Unexpected Error in pack_lpns:' || substr(SQLERRM,1,240),9);

Line 7813: x_return_status := fnd_api.g_ret_sts_success;

7809: l_count_del_assign NUMBER;
7810: lpn_name VARCHAR2(30);
7811: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7812: BEGIN
7813: x_return_status := fnd_api.g_ret_sts_success;
7814: x_error_code := NULL;
7815: OPEN lpn_cur;
7816:
7817: LOOP

Line 7844: RAISE fnd_api.g_exc_error;

7840: fnd_message.set_name('WMS', 'WMS_ORDER_LINE_SPLIT');
7841: fnd_message.set_token('CONTAINER_NAME', lpn_name);
7842: fnd_msg_pub.ADD;
7843: x_error_code := 7;
7844: RAISE fnd_api.g_exc_error;
7845:
7846: --dbms_output.put_line('Contents of the container '||lpn_name||' are split in order management');
7847: IF (l_debug = 1) THEN
7848: DEBUG('Contents of the container ' || lpn_name || ' are split in order management', 'CHECK_ORDER_LINE_SPLIT');

Line 7855: WHEN fnd_api.g_exc_error THEN

7851: END LOOP;
7852:
7853: CLOSE lpn_cur;
7854: EXCEPTION
7855: WHEN fnd_api.g_exc_error THEN
7856: x_return_status := fnd_api.g_ret_sts_error;
7857:
7858: IF lpn_cur%ISOPEN THEN
7859: CLOSE lpn_cur;

Line 7856: x_return_status := fnd_api.g_ret_sts_error;

7852:
7853: CLOSE lpn_cur;
7854: EXCEPTION
7855: WHEN fnd_api.g_exc_error THEN
7856: x_return_status := fnd_api.g_ret_sts_error;
7857:
7858: IF lpn_cur%ISOPEN THEN
7859: CLOSE lpn_cur;
7860: END IF;

Line 7867: WHEN fnd_api.g_exc_unexpected_error THEN

7863: DEBUG('In Exception (expected error) - E ', 'CHECK_ORDER_LINE_SPLIT');
7864: END IF;
7865:
7866: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7867: WHEN fnd_api.g_exc_unexpected_error THEN
7868: x_return_status := fnd_api.g_ret_sts_unexp_error;
7869:
7870: IF lpn_cur%ISOPEN THEN
7871: CLOSE lpn_cur;

Line 7868: x_return_status := fnd_api.g_ret_sts_unexp_error;

7864: END IF;
7865:
7866: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7867: WHEN fnd_api.g_exc_unexpected_error THEN
7868: x_return_status := fnd_api.g_ret_sts_unexp_error;
7869:
7870: IF lpn_cur%ISOPEN THEN
7871: CLOSE lpn_cur;
7872: END IF;

Line 7880: x_return_status := fnd_api.g_ret_sts_unexp_error;

7876: END IF;
7877:
7878: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7879: WHEN OTHERS THEN
7880: x_return_status := fnd_api.g_ret_sts_unexp_error;
7881:
7882: IF lpn_cur%ISOPEN THEN
7883: CLOSE lpn_cur;
7884: END IF;

Line 7904: x_return_status := fnd_api.g_ret_sts_success;

7900: l_count NUMBER;
7901: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7902: BEGIN
7903: x_missing_count := 0;
7904: x_return_status := fnd_api.g_ret_sts_success;
7905:
7906: SELECT COUNT(*)
7907: INTO l_count
7908: FROM wsh_delivery_details_ob_grp_v wdd, wsh_delivery_assignments_v wda, mtl_system_items_kfv msik

Line 7928: x_return_status := fnd_api.g_ret_sts_unexp_error;

7924: EXCEPTION
7925: WHEN NO_DATA_FOUND THEN
7926: l_count := 0;
7927: WHEN OTHERS THEN
7928: x_return_status := fnd_api.g_ret_sts_unexp_error;
7929:
7930: IF (l_debug = 1) THEN
7931: DEBUG('Unexp-Error in missing item procedure ', 'CHECK_MISSING_ITEM_CUR');
7932: END IF;

Line 7971: x_return_status := fnd_api.g_ret_sts_success;

7967: AND direct_ship_flag = 'Y'));
7968:
7969: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7970: BEGIN
7971: x_return_status := fnd_api.g_ret_sts_success;
7972:
7973: BEGIN
7974: SELECT NVL(SUM(DECODE(direct_ship_flag, 'Y', 1)), 0) l_flag_y
7975: , NVL(SUM(DECODE(direct_ship_flag, 'N', 1)), 0) l_flag_n

Line 7993: RAISE fnd_api.g_exc_error;

7989: IF (l_debug = 1) THEN
7990: DEBUG('Records in wstt for direct ship flag =N', 'chk_del_for_direct_ship');
7991: END IF;
7992:
7993: RAISE fnd_api.g_exc_error;
7994: END IF;
7995: --DBMS_OUTPUT.PUT_LINE('tHERE ARE NO LINES WITH DIRECT_FLAG =N');
7996: EXCEPTION
7997: WHEN NO_DATA_FOUND THEN

Line 8043: RAISE fnd_api.g_exc_error;

8039: );
8040: DEBUG('Check failed', 'chk_del_for_direct_ship');
8041: END IF;
8042:
8043: RAISE fnd_api.g_exc_error;
8044: END IF;
8045: END LOOP;
8046: EXCEPTION
8047: WHEN NO_DATA_FOUND THEN

Line 8056: WHEN fnd_api.g_exc_error THEN

8052: NULL;
8053: END;
8054: END;
8055: EXCEPTION
8056: WHEN fnd_api.g_exc_error THEN
8057: x_return_status := fnd_api.g_ret_sts_error;
8058: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8059: WHEN fnd_api.g_exc_unexpected_error THEN
8060: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 8057: x_return_status := fnd_api.g_ret_sts_error;

8053: END;
8054: END;
8055: EXCEPTION
8056: WHEN fnd_api.g_exc_error THEN
8057: x_return_status := fnd_api.g_ret_sts_error;
8058: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8059: WHEN fnd_api.g_exc_unexpected_error THEN
8060: x_return_status := fnd_api.g_ret_sts_unexp_error;
8061: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 8059: WHEN fnd_api.g_exc_unexpected_error THEN

8055: EXCEPTION
8056: WHEN fnd_api.g_exc_error THEN
8057: x_return_status := fnd_api.g_ret_sts_error;
8058: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8059: WHEN fnd_api.g_exc_unexpected_error THEN
8060: x_return_status := fnd_api.g_ret_sts_unexp_error;
8061: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8062: WHEN OTHERS THEN
8063: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 8060: x_return_status := fnd_api.g_ret_sts_unexp_error;

8056: WHEN fnd_api.g_exc_error THEN
8057: x_return_status := fnd_api.g_ret_sts_error;
8058: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8059: WHEN fnd_api.g_exc_unexpected_error THEN
8060: x_return_status := fnd_api.g_ret_sts_unexp_error;
8061: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8062: WHEN OTHERS THEN
8063: x_return_status := fnd_api.g_ret_sts_unexp_error;
8064: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 8063: x_return_status := fnd_api.g_ret_sts_unexp_error;

8059: WHEN fnd_api.g_exc_unexpected_error THEN
8060: x_return_status := fnd_api.g_ret_sts_unexp_error;
8061: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8062: WHEN OTHERS THEN
8063: x_return_status := fnd_api.g_ret_sts_unexp_error;
8064: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8065: END chk_del_for_direct_ship;
8066:
8067:

Line 8105: IF l_return_status = fnd_api.g_ret_sts_error THEN

8101: DEBUG('l_max_quantity_allowed='||l_max_quantity_allowed,'Get_qty_to_pick');
8102: DEBUG('l_avail_req_quantity='||l_avail_req_quantity,'Get_qty_to_pick');
8103: DEBUG('l_return_status='||l_return_status,'Get_qty_to_pick');
8104: END IF;
8105: IF l_return_status = fnd_api.g_ret_sts_error THEN
8106: IF (l_debug = 1) THEN
8107: DEBUG('Check_Quantity_To_Pick API failed , ERROR ', 'Get_qty_to_pick');
8108: END IF;
8109: RAISE fnd_api.g_exc_error;

Line 8109: RAISE fnd_api.g_exc_error;

8105: IF l_return_status = fnd_api.g_ret_sts_error THEN
8106: IF (l_debug = 1) THEN
8107: DEBUG('Check_Quantity_To_Pick API failed , ERROR ', 'Get_qty_to_pick');
8108: END IF;
8109: RAISE fnd_api.g_exc_error;
8110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8111: IF (l_debug = 1) THEN
8112: DEBUG('Check_Quantity_To_Pick API failed,UNEXPECTED ERROR', 'Get_qty_to_pick');
8113: END IF;

Line 8110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8106: IF (l_debug = 1) THEN
8107: DEBUG('Check_Quantity_To_Pick API failed , ERROR ', 'Get_qty_to_pick');
8108: END IF;
8109: RAISE fnd_api.g_exc_error;
8110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8111: IF (l_debug = 1) THEN
8112: DEBUG('Check_Quantity_To_Pick API failed,UNEXPECTED ERROR', 'Get_qty_to_pick');
8113: END IF;
8114: RAISE fnd_api.g_exc_unexpected_error;

Line 8114: RAISE fnd_api.g_exc_unexpected_error;

8110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8111: IF (l_debug = 1) THEN
8112: DEBUG('Check_Quantity_To_Pick API failed,UNEXPECTED ERROR', 'Get_qty_to_pick');
8113: END IF;
8114: RAISE fnd_api.g_exc_unexpected_error;
8115: END IF;
8116:
8117: BEGIN
8118:

Line 8160: RAISE fnd_api.g_exc_unexpected_error;

8156: WHEN OTHERS THEN
8157: IF (l_debug = 1) THEN
8158: DEBUG(' OTHERS EXCEPTION !!! ' ,'Get_qty_to_pick');
8159: END IF;
8160: RAISE fnd_api.g_exc_unexpected_error;
8161: return -1;
8162: END;
8163:
8164: return ( nvl(l_max_quantity_allowed,0) + nvl(l_staged_qty,0) - nvl(l_total_resvd_qty,0) );

Line 8299: x_return_status := fnd_api.g_ret_sts_success;

8295: IF (l_debug = 1) THEN
8296: DEBUG('Process_LPN called with parameters : p_lpn_id = ' || p_lpn_id || ' : p_org_id = ' || p_org_id, 'Process_LPN');
8297: END IF;
8298:
8299: x_return_status := fnd_api.g_ret_sts_success;
8300: x_ct_wt_enabled := 0;
8301: --clear all cached data structures
8302: g_lpn_contents_tab.DELETE;
8303: g_lpn_contents_lookup_tab.DELETE;

Line 8346: RAISE fnd_api.g_exc_error;

8342: IF (l_debug = 1) THEN
8343: DEBUG('Exception getting reservable type of sub', 'Process_LPN');
8344: END IF;
8345:
8346: RAISE fnd_api.g_exc_error;
8347: END;
8348:
8349: IF l_sub_reservable_type <> 1 THEN
8350: IF (l_debug = 1) THEN

Line 8354: x_return_status := fnd_api.g_ret_sts_error;

8350: IF (l_debug = 1) THEN
8351: DEBUG('LPN containes non reservable items', 'Process_LPN');
8352: END IF;
8353:
8354: x_return_status := fnd_api.g_ret_sts_error;
8355: fnd_message.set_name('WMS', 'WMS_SUB_NON_RESERVABLE');
8356: fnd_msg_pub.ADD;
8357: RETURN;
8358: ELSE

Line 8430: x_return_status := fnd_api.g_ret_sts_error;

8426: IF (l_debug = 1) THEN
8427: DEBUG('LPN containes non reservable items', 'Process_LPN');
8428: END IF;
8429:
8430: x_return_status := fnd_api.g_ret_sts_error;
8431: fnd_message.set_name('WMS', 'WMS_ITEM_NON_RESERVABLE');
8432: fnd_msg_pub.ADD;
8433: RETURN;
8434: END IF;

Line 8514: x_return_status := fnd_api.g_ret_sts_error;

8510: DEBUG('G_total_lpn_quantity =' || g_total_lpn_quantity, 'Process_LPN');
8511: END IF;
8512:
8513: IF g_lpn_contents_tab.COUNT = 0 THEN
8514: x_return_status := fnd_api.g_ret_sts_error;
8515: fnd_message.set_name('WMS', 'WMS_EMPTY_LPN');
8516: fnd_msg_pub.ADD;
8517:
8518: IF (l_debug = 1) THEN

Line 8537: IF l_return_status = fnd_api.g_ret_sts_error THEN

8533:
8534: wms_direct_ship_pvt.validate_status_lpn_contents(x_return_status => l_return_status, x_msg_count => l_msg_count
8535: , x_msg_data => l_msg_data, p_lpn_id => p_lpn_id, p_org_id => p_org_id);
8536:
8537: IF l_return_status = fnd_api.g_ret_sts_error THEN
8538: IF (l_debug = 1) THEN
8539: DEBUG('Validate Status LPN Contents procedure failed with error status E ', 'Process_LPN');
8540: END IF;
8541:

Line 8542: x_return_status := fnd_api.g_ret_sts_error;

8538: IF (l_debug = 1) THEN
8539: DEBUG('Validate Status LPN Contents procedure failed with error status E ', 'Process_LPN');
8540: END IF;
8541:
8542: x_return_status := fnd_api.g_ret_sts_error;
8543: fnd_message.set_name('WMS', 'WMS_INVALID_MAT_STATUS');
8544: fnd_msg_pub.ADD;
8545: RETURN;
8546: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8546: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8542: x_return_status := fnd_api.g_ret_sts_error;
8543: fnd_message.set_name('WMS', 'WMS_INVALID_MAT_STATUS');
8544: fnd_msg_pub.ADD;
8545: RETURN;
8546: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8547: IF (l_debug = 1) THEN
8548: DEBUG('Validate Status LPN Contents procedure failed with error status U ', 'Process_LPN');
8549: END IF;
8550:

Line 8551: x_return_status := fnd_api.g_ret_sts_error;

8547: IF (l_debug = 1) THEN
8548: DEBUG('Validate Status LPN Contents procedure failed with error status U ', 'Process_LPN');
8549: END IF;
8550:
8551: x_return_status := fnd_api.g_ret_sts_error;
8552: fnd_message.set_name('WMS', 'WMS_INVALID_MAT_STATUS');
8553: fnd_msg_pub.ADD;
8554: RETURN;
8555: END IF;

Line 8587: x_return_status := fnd_api.g_ret_sts_error;

8583: IF (l_debug = 1) THEN
8584: DEBUG('Exception getting PJM Parameters ', 'Process_LPN');
8585: END IF;
8586:
8587: x_return_status := fnd_api.g_ret_sts_error;
8588: RAISE fnd_api.g_exc_error;
8589: END;
8590:
8591: x_cross_project_allowed := g_cross_project_allowed;

Line 8588: RAISE fnd_api.g_exc_error;

8584: DEBUG('Exception getting PJM Parameters ', 'Process_LPN');
8585: END IF;
8586:
8587: x_return_status := fnd_api.g_ret_sts_error;
8588: RAISE fnd_api.g_exc_error;
8589: END;
8590:
8591: x_cross_project_allowed := g_cross_project_allowed;
8592: x_cross_unit_allowed := g_cross_unit_allowed;

Line 8618: x_return_status := fnd_api.g_ret_sts_error;

8614: IF (l_debug = 1) THEN
8615: DEBUG('Exception getting Project and Task Ids ', 'Process_LPN');
8616: END IF;
8617:
8618: x_return_status := fnd_api.g_ret_sts_error;
8619: RAISE fnd_api.g_exc_error;
8620: END; -- get project and task id
8621:
8622: x_project_id := g_project_id;

Line 8619: RAISE fnd_api.g_exc_error;

8615: DEBUG('Exception getting Project and Task Ids ', 'Process_LPN');
8616: END IF;
8617:
8618: x_return_status := fnd_api.g_ret_sts_error;
8619: RAISE fnd_api.g_exc_error;
8620: END; -- get project and task id
8621:
8622: x_project_id := g_project_id;
8623: x_task_id := g_task_id;

Line 8663: x_return_status := fnd_api.g_ret_sts_error;

8659: IF (l_debug = 1) THEN
8660: DEBUG('No data found for delivery grouping flags', 'Process_LPN');
8661: END IF;
8662:
8663: x_return_status := fnd_api.g_ret_sts_error;
8664: RAISE fnd_api.g_exc_error;
8665: WHEN OTHERS THEN
8666: IF (l_debug = 1) THEN
8667: DEBUG('Exception getting delivery grouping rule flags', 'Process_LPN');

Line 8664: RAISE fnd_api.g_exc_error;

8660: DEBUG('No data found for delivery grouping flags', 'Process_LPN');
8661: END IF;
8662:
8663: x_return_status := fnd_api.g_ret_sts_error;
8664: RAISE fnd_api.g_exc_error;
8665: WHEN OTHERS THEN
8666: IF (l_debug = 1) THEN
8667: DEBUG('Exception getting delivery grouping rule flags', 'Process_LPN');
8668: END IF;

Line 8670: x_return_status := fnd_api.g_ret_sts_error;

8666: IF (l_debug = 1) THEN
8667: DEBUG('Exception getting delivery grouping rule flags', 'Process_LPN');
8668: END IF;
8669:
8670: x_return_status := fnd_api.g_ret_sts_error;
8671: RAISE fnd_api.g_exc_error;
8672: END;
8673:
8674: -- start process lines reserved against this lpn

Line 8671: RAISE fnd_api.g_exc_error;

8667: DEBUG('Exception getting delivery grouping rule flags', 'Process_LPN');
8668: END IF;
8669:
8670: x_return_status := fnd_api.g_ret_sts_error;
8671: RAISE fnd_api.g_exc_error;
8672: END;
8673:
8674: -- start process lines reserved against this lpn
8675: IF (l_debug = 1) THEN

Line 8693: , p_init_msg_lst => fnd_api.g_false

8689: l_qry_reservation_record.supply_source_type_id := inv_reservation_global.g_source_type_inv;
8690: l_mtl_reservation_tab.DELETE;
8691: inv_reservation_pub.query_reservation(
8692: p_api_version_number => 1.0
8693: , p_init_msg_lst => fnd_api.g_false
8694: , x_return_status => l_return_status
8695: , x_msg_count => l_msg_count
8696: , x_msg_data => l_msg_data
8697: , p_query_input => l_qry_reservation_record

Line 8698: , p_lock_records => fnd_api.g_false

8694: , x_return_status => l_return_status
8695: , x_msg_count => l_msg_count
8696: , x_msg_data => l_msg_data
8697: , p_query_input => l_qry_reservation_record
8698: , p_lock_records => fnd_api.g_false
8699: , x_mtl_reservation_tbl => l_mtl_reservation_tab
8700: , x_mtl_reservation_tbl_count => l_mtl_reservation_tab_count
8701: , x_error_code => l_error_code
8702: );

Line 8704: IF l_return_status = fnd_api.g_ret_sts_error THEN

8700: , x_mtl_reservation_tbl_count => l_mtl_reservation_tab_count
8701: , x_error_code => l_error_code
8702: );
8703:
8704: IF l_return_status = fnd_api.g_ret_sts_error THEN
8705: IF (l_debug = 1) THEN
8706: DEBUG('Reservation query api failed', 'Process_LPN');
8707: END IF;
8708:

Line 8709: RAISE fnd_api.g_exc_error;

8705: IF (l_debug = 1) THEN
8706: DEBUG('Reservation query api failed', 'Process_LPN');
8707: END IF;
8708:
8709: RAISE fnd_api.g_exc_error;
8710: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8711: IF (l_debug = 1) THEN
8712: DEBUG('Reservation query api failed', 'Process_LPN');
8713: END IF;

Line 8710: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8706: DEBUG('Reservation query api failed', 'Process_LPN');
8707: END IF;
8708:
8709: RAISE fnd_api.g_exc_error;
8710: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8711: IF (l_debug = 1) THEN
8712: DEBUG('Reservation query api failed', 'Process_LPN');
8713: END IF;
8714:

Line 8715: RAISE fnd_api.g_exc_unexpected_error;

8711: IF (l_debug = 1) THEN
8712: DEBUG('Reservation query api failed', 'Process_LPN');
8713: END IF;
8714:
8715: RAISE fnd_api.g_exc_unexpected_error;
8716: END IF;
8717:
8718: IF (l_debug = 1) THEN
8719: DEBUG('Reservation records found = ' || l_mtl_reservation_tab.COUNT, 'Process_LPN');

Line 8755: x_return_status := fnd_api.g_ret_sts_error;

8751: IF (l_debug = 1) THEN
8752: DEBUG('No data found for line', 'Process_LPN');
8753: END IF;
8754:
8755: x_return_status := fnd_api.g_ret_sts_error;
8756: RAISE fnd_api.g_exc_error;
8757: WHEN OTHERS THEN
8758: IF (l_debug = 1) THEN
8759: DEBUG('Exception getting data for line ', 'Process_LPN');

Line 8756: RAISE fnd_api.g_exc_error;

8752: DEBUG('No data found for line', 'Process_LPN');
8753: END IF;
8754:
8755: x_return_status := fnd_api.g_ret_sts_error;
8756: RAISE fnd_api.g_exc_error;
8757: WHEN OTHERS THEN
8758: IF (l_debug = 1) THEN
8759: DEBUG('Exception getting data for line ', 'Process_LPN');
8760: END IF;

Line 8762: x_return_status := fnd_api.g_ret_sts_error;

8758: IF (l_debug = 1) THEN
8759: DEBUG('Exception getting data for line ', 'Process_LPN');
8760: END IF;
8761:
8762: x_return_status := fnd_api.g_ret_sts_error;
8763: RAISE fnd_api.g_exc_error;
8764: END;
8765:
8766: IF (l_debug = 1) THEN

Line 8763: RAISE fnd_api.g_exc_error;

8759: DEBUG('Exception getting data for line ', 'Process_LPN');
8760: END IF;
8761:
8762: x_return_status := fnd_api.g_ret_sts_error;
8763: RAISE fnd_api.g_exc_error;
8764: END;
8765:
8766: IF (l_debug = 1) THEN
8767: DEBUG('Processing line: ', 'Process_LPN');

Line 8788: x_return_status:=FND_API.G_RET_STS_ERROR;

8784: /*IF l_order_line_rec.flow_status_code NOT IN ('AWAITING_SHIPPING', THEN
8785: IF (l_debug = 1) THEN
8786: DEBUG('Order Line not booked','Process_LPN');
8787: END IF;
8788: x_return_status:=FND_API.G_RET_STS_ERROR;
8789: FND_MESSAGE.SET_NAME('WMS','WMS_LINE_NOT_BOOKED');
8790: FND_MSG_PUB.ADD;
8791: RETURN;
8792: END IF;*/

Line 8813: x_return_status := fnd_api.g_ret_sts_error;

8809: IF (l_debug = 1) THEN
8810: DEBUG('Order Line not booked', 'Process_LPN');
8811: END IF;
8812:
8813: x_return_status := fnd_api.g_ret_sts_error;
8814: fnd_message.set_name('WMS', 'WMS_LINE_NOT_BOOKED');
8815: fnd_msg_pub.ADD;
8816: RETURN;
8817: END;

Line 8831: x_return_status := fnd_api.g_ret_sts_error;

8827: IF (l_debug = 1) THEN
8828: DEBUG('Validation of PJM parameters failed', 'Process_LPN');
8829: END IF;
8830:
8831: x_return_status := fnd_api.g_ret_sts_error;
8832: fnd_message.set_name('WMS', 'WMS_PJM_VALIDATION_FAILED');
8833: fnd_msg_pub.ADD;
8834: RETURN;
8835: END IF;

Line 8864: x_return_status := fnd_api.g_ret_sts_error;

8860: IF (l_debug = 1) THEN
8861: DEBUG('LPN quantity is less then the reserved quantity', 'Process_LPN');
8862: END IF;
8863:
8864: x_return_status := fnd_api.g_ret_sts_error;
8865: fnd_message.set_name('WMS', 'WMS_PJM_VALIDATION_FAILED');
8866: fnd_msg_pub.ADD;
8867: RETURN;
8868: END IF;

Line 8878: x_return_status := fnd_api.g_ret_sts_error;

8874: IF (l_debug = 1) THEN
8875: DEBUG('Delivery grouping failed', 'Process_LPN');
8876: END IF;
8877:
8878: x_return_status := fnd_api.g_ret_sts_error;
8879: fnd_message.set_name('WMS', 'WMS_DEL_GRP_FAILED');
8880: fnd_msg_pub.ADD;
8881: RETURN;
8882: END IF;

Line 8891: x_return_status := fnd_api.g_ret_sts_error;

8887: IF (l_debug = 1) THEN
8888: DEBUG('Checl del for direct ship failed', 'Process_LPN');
8889: END IF;
8890:
8891: x_return_status := fnd_api.g_ret_sts_error;
8892: fnd_message.set_name('WMS', 'WMS_DEL_LINES_MIX');
8893: fnd_msg_pub.ADD;
8894: RETURN;
8895: END IF;

Line 8921: IF l_return_status = fnd_api.g_ret_sts_error THEN

8917: , x_msg_count => l_msg_count
8918: , x_msg_data => l_msg_data
8919: );
8920:
8921: IF l_return_status = fnd_api.g_ret_sts_error THEN
8922: IF (l_debug = 1) THEN
8923: DEBUG('Check Holds Failed', 'Process_LPN');
8924: END IF;
8925:

Line 8926: x_return_status := fnd_api.g_ret_sts_error;

8922: IF (l_debug = 1) THEN
8923: DEBUG('Check Holds Failed', 'Process_LPN');
8924: END IF;
8925:
8926: x_return_status := fnd_api.g_ret_sts_error;
8927: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
8928: fnd_msg_pub.ADD;
8929: RETURN;
8930: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 8930: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

8926: x_return_status := fnd_api.g_ret_sts_error;
8927: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
8928: fnd_msg_pub.ADD;
8929: RETURN;
8930: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
8931: IF (l_debug = 1) THEN
8932: DEBUG('Check holds Failed :Unexpected', 'Process_LPN');
8933: END IF;
8934:

Line 8935: x_return_status := fnd_api.g_ret_sts_error;

8931: IF (l_debug = 1) THEN
8932: DEBUG('Check holds Failed :Unexpected', 'Process_LPN');
8933: END IF;
8934:
8935: x_return_status := fnd_api.g_ret_sts_error;
8936: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
8937: fnd_msg_pub.ADD;
8938: RETURN;
8939: ELSE

Line 8980: , p_init_msg_lst => fnd_api.g_false

8976: l_new_upd_resv_rec.staged_flag :='Y';
8977:
8978: inv_reservation_pub.update_reservation(
8979: p_api_version_number => 1.0
8980: , p_init_msg_lst => fnd_api.g_false
8981: , x_return_status => l_return_status
8982: , x_msg_count => l_msg_count
8983: , x_msg_data => l_msg_data
8984: , p_original_rsv_rec => l_old_upd_resv_rec

Line 8988: , p_validation_flag => fnd_api.g_true

8984: , p_original_rsv_rec => l_old_upd_resv_rec
8985: , p_to_rsv_rec => l_new_upd_resv_rec
8986: , p_original_serial_number => l_upd_dummy_sn
8987: , p_to_serial_number => l_upd_dummy_sn
8988: , p_validation_flag => fnd_api.g_true
8989: );
8990: ELSE
8991: inv_staged_reservation_util.update_staged_flag(
8992: x_return_status => l_return_status,

Line 9000: IF l_return_status = fnd_api.g_ret_sts_error THEN

8996: p_staged_flag => 'Y'
8997: );
8998: END IF;
8999:
9000: IF l_return_status = fnd_api.g_ret_sts_error THEN
9001: IF (l_debug = 1) THEN
9002: DEBUG('Update reservation failed for reservation_id ' || l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9003: END IF;
9004: RAISE fnd_api.g_exc_error;

Line 9004: RAISE fnd_api.g_exc_error;

9000: IF l_return_status = fnd_api.g_ret_sts_error THEN
9001: IF (l_debug = 1) THEN
9002: DEBUG('Update reservation failed for reservation_id ' || l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9003: END IF;
9004: RAISE fnd_api.g_exc_error;
9005: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9006: IF (l_debug = 1) THEN
9007: DEBUG('Update reservation failed for reservation_id with status U' ||l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9008: END IF;

Line 9005: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9001: IF (l_debug = 1) THEN
9002: DEBUG('Update reservation failed for reservation_id ' || l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9003: END IF;
9004: RAISE fnd_api.g_exc_error;
9005: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9006: IF (l_debug = 1) THEN
9007: DEBUG('Update reservation failed for reservation_id with status U' ||l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9008: END IF;
9009: RAISE fnd_api.g_exc_unexpected_error;

Line 9009: RAISE fnd_api.g_exc_unexpected_error;

9005: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9006: IF (l_debug = 1) THEN
9007: DEBUG('Update reservation failed for reservation_id with status U' ||l_old_upd_resv_rec.reservation_id, 'Process_LPN');
9008: END IF;
9009: RAISE fnd_api.g_exc_unexpected_error;
9010: END IF;
9011:
9012: ELSE
9013: EXIT;

Line 9089: x_return_status := fnd_api.g_ret_sts_error;

9085: IF (l_debug = 1) THEN
9086: DEBUG('End item unit validation failed', 'Process_LPN');
9087: END IF;
9088:
9089: x_return_status := fnd_api.g_ret_sts_error;
9090: fnd_message.set_name('WMS', 'WMS_PJM_VALIDATION_FAILED');
9091: fnd_msg_pub.ADD;
9092: RETURN;
9093: END IF;

Line 9149: x_return_status := fnd_api.g_ret_sts_error;

9145: IF (l_debug = 1) THEN
9146: DEBUG('Unable to get transaction_temp_id', 'Process_LPN');
9147: END IF;
9148:
9149: x_return_status := fnd_api.g_ret_sts_error;
9150: RAISE fnd_api.g_exc_error;
9151: END;
9152: ELSE
9153: l_trx_temp_id := NULL;

Line 9150: RAISE fnd_api.g_exc_error;

9146: DEBUG('Unable to get transaction_temp_id', 'Process_LPN');
9147: END IF;
9148:
9149: x_return_status := fnd_api.g_ret_sts_error;
9150: RAISE fnd_api.g_exc_error;
9151: END;
9152: ELSE
9153: l_trx_temp_id := NULL;
9154: END IF;

Line 9208: x_return_status := fnd_api.g_ret_sts_unexp_error;

9204: IF (l_debug = 1) THEN
9205: DEBUG('Unexpected error occured: ' || SQLERRM, 'Process_LPN');
9206: END IF;
9207:
9208: x_return_status := fnd_api.g_ret_sts_unexp_error;
9209: fnd_message.set_name('WMS', 'WMS_ERROR_LOADING_LPN');
9210: fnd_msg_pub.ADD;
9211: END process_lpn;
9212:

Line 9329: x_return_status := fnd_api.g_ret_sts_error;

9325: IF (l_debug = 1) THEN
9326: DEBUG('Line item not found in LPN', 'Process_Line');
9327: END IF;
9328:
9329: x_return_status := fnd_api.g_ret_sts_error;
9330: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_AVAILABLE');
9331: fnd_msg_pub.ADD;
9332: RETURN;
9333: END IF;

Line 9342: x_return_status := fnd_api.g_ret_sts_error;

9338: IF (l_debug = 1) THEN
9339: DEBUG('End item unit validation failed', 'Process_Line');
9340: END IF;
9341:
9342: x_return_status := fnd_api.g_ret_sts_error;
9343: fnd_message.set_name('WMS', 'WMS_PJM_VALIDATION_FAILED');
9344: fnd_msg_pub.ADD;
9345: RETURN;
9346: END IF;

Line 9354: x_return_status := fnd_api.g_ret_sts_error;

9350: IF (l_debug = 1) THEN
9351: DEBUG('Checl del for direct ship failed', 'Process_Line');
9352: END IF;
9353:
9354: x_return_status := fnd_api.g_ret_sts_error;
9355: fnd_message.set_name('WMS', 'WMS_DEL_LINES_MIX');
9356: fnd_msg_pub.ADD;
9357: RETURN;
9358: END IF;

Line 9369: IF l_return_status = fnd_api.g_ret_sts_error THEN

9365: , x_msg_count => l_msg_count
9366: , x_msg_data => l_msg_data
9367: );
9368:
9369: IF l_return_status = fnd_api.g_ret_sts_error THEN
9370: IF (l_debug = 1) THEN
9371: DEBUG('Check Holds Failed', 'Process_Line');
9372: END IF;
9373:

Line 9374: x_return_status := fnd_api.g_ret_sts_error;

9370: IF (l_debug = 1) THEN
9371: DEBUG('Check Holds Failed', 'Process_Line');
9372: END IF;
9373:
9374: x_return_status := fnd_api.g_ret_sts_error;
9375: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
9376: fnd_msg_pub.ADD;
9377: RETURN;
9378: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 9378: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9374: x_return_status := fnd_api.g_ret_sts_error;
9375: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
9376: fnd_msg_pub.ADD;
9377: RETURN;
9378: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9379: IF (l_debug = 1) THEN
9380: DEBUG('Check Holds Failed', 'Process_Line');
9381: END IF;
9382:

Line 9383: x_return_status := fnd_api.g_ret_sts_error;

9379: IF (l_debug = 1) THEN
9380: DEBUG('Check Holds Failed', 'Process_Line');
9381: END IF;
9382:
9383: x_return_status := fnd_api.g_ret_sts_error;
9384: fnd_message.set_name('WMS', 'WMS_HOLD_APPLIED');
9385: fnd_msg_pub.ADD;
9386: RETURN;
9387: ELSE

Line 9415: RAISE fnd_api.g_exc_error;

9411: IF (l_debug = 1) THEN
9412: DEBUG('Exception getting l_demand_source_type_id ', 'Process_Line');
9413: END IF;
9414:
9415: RAISE fnd_api.g_exc_error;
9416: END;
9417:
9418: --Bug#5262108. This to decide if it is overship or not.
9419: --If no WDD is present to be staged, the qty will be zero to

Line 9437: , p_init_msg_lst => fnd_api.g_false

9433: END IF;
9434:
9435: inv_reservation_pub.query_reservation(
9436: p_api_version_number => 1.0
9437: , p_init_msg_lst => fnd_api.g_false
9438: , x_return_status => l_return_status
9439: , x_msg_count => l_msg_count
9440: , x_msg_data => l_msg_data
9441: , p_query_input => l_qry_reservation_record

Line 9442: , p_lock_records => fnd_api.g_false

9438: , x_return_status => l_return_status
9439: , x_msg_count => l_msg_count
9440: , x_msg_data => l_msg_data
9441: , p_query_input => l_qry_reservation_record
9442: , p_lock_records => fnd_api.g_false
9443: , x_mtl_reservation_tbl => l_mtl_reservation_tab_temp
9444: , x_mtl_reservation_tbl_count => l_mtl_resv_tab_count_temp
9445: , x_error_code => l_error_code
9446: );

Line 9448: IF l_return_status = fnd_api.g_ret_sts_error THEN

9444: , x_mtl_reservation_tbl_count => l_mtl_resv_tab_count_temp
9445: , x_error_code => l_error_code
9446: );
9447:
9448: IF l_return_status = fnd_api.g_ret_sts_error THEN
9449: IF (l_debug = 1) THEN
9450: DEBUG('Query reservation failed', 'Process_Line');
9451: END IF;
9452:

Line 9453: RAISE fnd_api.g_exc_error;

9449: IF (l_debug = 1) THEN
9450: DEBUG('Query reservation failed', 'Process_Line');
9451: END IF;
9452:
9453: RAISE fnd_api.g_exc_error;
9454: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9455: IF (l_debug = 1) THEN
9456: DEBUG('Query reservation failed', 'Process_Line');
9457: END IF;

Line 9454: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9450: DEBUG('Query reservation failed', 'Process_Line');
9451: END IF;
9452:
9453: RAISE fnd_api.g_exc_error;
9454: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9455: IF (l_debug = 1) THEN
9456: DEBUG('Query reservation failed', 'Process_Line');
9457: END IF;
9458:

Line 9459: RAISE fnd_api.g_exc_unexpected_error;

9455: IF (l_debug = 1) THEN
9456: DEBUG('Query reservation failed', 'Process_Line');
9457: END IF;
9458:
9459: RAISE fnd_api.g_exc_unexpected_error;
9460: END IF;
9461:
9462: IF (l_debug = 1) THEN
9463: DEBUG('After call to query reservation', 'Prpcess_Line');

Line 9591: , p_init_msg_lst => fnd_api.g_false

9587: , x_qs => l_qs
9588: , x_att => l_transactable_qty
9589: , x_atr => l_atr
9590: , p_api_version_number => 1.0
9591: , p_init_msg_lst => fnd_api.g_false
9592: , p_organization_id => p_org_id
9593: , p_inventory_item_id => p_inventory_item_id
9594: , p_tree_mode => inv_quantity_tree_pub.g_transaction_mode --inv_quantity_tree_pub.g_reservation_mode Changed bug 4128854
9595: , p_is_revision_control => l_lpn_cont_rec.revision_control

Line 9608: IF l_return_status = fnd_api.g_ret_sts_error THEN

9604: , p_locator_id => l_lpn_cont_rec.locator_id
9605: , p_lpn_id => l_lpn_cont_rec.lpn_id
9606: );
9607:
9608: IF l_return_status = fnd_api.g_ret_sts_error THEN
9609: IF (l_debug = 1) THEN
9610: DEBUG(
9611: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of '
9612: || p_order_header_id

Line 9619: RAISE fnd_api.g_exc_error;

9615: , 'Process_Line'
9616: );
9617: END IF;
9618:
9619: RAISE fnd_api.g_exc_error;
9620: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9621: IF (l_debug = 1) THEN
9622: DEBUG(
9623: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of '

Line 9620: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9616: );
9617: END IF;
9618:
9619: RAISE fnd_api.g_exc_error;
9620: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9621: IF (l_debug = 1) THEN
9622: DEBUG(
9623: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of '
9624: || p_order_header_id

Line 9631: RAISE fnd_api.g_exc_unexpected_error;

9627: , 'Process_Line'
9628: );
9629: END IF;
9630:
9631: RAISE fnd_api.g_exc_unexpected_error;
9632: END IF;
9633:
9634: IF (l_debug = 1) THEN
9635: DEBUG('Query tree Return status is ' || l_return_status, 'Process_Line');

Line 9674: , p_init_msg_lst => fnd_api.g_true

9670: END IF;
9671:
9672: inv_reservation_pub.transfer_reservation(
9673: p_api_version_number => 1.0
9674: , p_init_msg_lst => fnd_api.g_true
9675: , x_return_status => l_return_status
9676: , x_msg_count => l_msg_count
9677: , x_msg_data => l_msg_data
9678: , p_is_transfer_supply => fnd_api.g_true

Line 9678: , p_is_transfer_supply => fnd_api.g_true

9674: , p_init_msg_lst => fnd_api.g_true
9675: , x_return_status => l_return_status
9676: , x_msg_count => l_msg_count
9677: , x_msg_data => l_msg_data
9678: , p_is_transfer_supply => fnd_api.g_true
9679: , p_original_rsv_rec => l_old_resv_rec
9680: , p_to_rsv_rec => l_new_resv_rec
9681: , p_original_serial_number => l_dummy_sn -- no serial contorl
9682: , p_to_serial_number => l_dummy_sn -- no serial control

Line 9683: , p_validation_flag => fnd_api.g_true

9679: , p_original_rsv_rec => l_old_resv_rec
9680: , p_to_rsv_rec => l_new_resv_rec
9681: , p_original_serial_number => l_dummy_sn -- no serial contorl
9682: , p_to_serial_number => l_dummy_sn -- no serial control
9683: , p_validation_flag => fnd_api.g_true
9684: , x_to_reservation_id => l_new_rsv_id
9685: , p_over_reservation_flag => 3
9686: );
9687:

Line 9688: IF l_return_status = fnd_api.g_ret_sts_error THEN

9684: , x_to_reservation_id => l_new_rsv_id
9685: , p_over_reservation_flag => 3
9686: );
9687:
9688: IF l_return_status = fnd_api.g_ret_sts_error THEN
9689: IF (l_debug = 1) THEN
9690: DEBUG(
9691: 'Unexpected error during transfer of Reservations, Line_id ' || p_order_line_id || ' LPN_ID= ' || l_lpn_cont_rec.lpn_id
9692: , 'Process_Line'

Line 9696: RAISE fnd_api.g_exc_error;

9692: , 'Process_Line'
9693: );
9694: END IF;
9695:
9696: RAISE fnd_api.g_exc_error;
9697: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9698: IF (l_debug = 1) THEN
9699: DEBUG(
9700: 'Unexpected error during transfer of Reservations, Line_id ' || p_order_line_id || ' LPN_ID= ' || l_lpn_cont_rec.lpn_id

Line 9697: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9693: );
9694: END IF;
9695:
9696: RAISE fnd_api.g_exc_error;
9697: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9698: IF (l_debug = 1) THEN
9699: DEBUG(
9700: 'Unexpected error during transfer of Reservations, Line_id ' || p_order_line_id || ' LPN_ID= ' || l_lpn_cont_rec.lpn_id
9701: , 'Process_Line'

Line 9705: RAISE fnd_api.g_exc_unexpected_error;

9701: , 'Process_Line'
9702: );
9703: END IF;
9704:
9705: RAISE fnd_api.g_exc_unexpected_error;
9706: END IF;
9707:
9708: IF (l_debug = 1) THEN
9709: DEBUG('Transfer reservation successful, reservation_id= ' || l_new_rsv_id, 'Process_Line');

Line 9821: , p_init_msg_lst => fnd_api.g_false

9817: , x_qs => l_qs
9818: , x_att => l_transactable_qty
9819: , x_atr => l_atr
9820: , p_api_version_number => 1.0
9821: , p_init_msg_lst => fnd_api.g_false
9822: , p_organization_id => p_org_id
9823: , p_inventory_item_id => p_inventory_item_id
9824: , p_tree_mode => inv_quantity_tree_pub.g_reservation_mode
9825: , p_is_revision_control => l_lpn_cont_rec.revision_control

Line 9838: IF l_return_status = fnd_api.g_ret_sts_error THEN

9834: , p_locator_id => l_lpn_cont_rec.locator_id
9835: , p_lpn_id => l_lpn_cont_rec.lpn_id
9836: );
9837:
9838: IF l_return_status = fnd_api.g_ret_sts_error THEN
9839: IF (l_debug = 1) THEN
9840: DEBUG(
9841: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of ' || p_order_header_id || ' '
9842: || p_order_line_id

Line 9847: RAISE fnd_api.g_exc_error;

9843: , 'Process_Line'
9844: );
9845: END IF;
9846:
9847: RAISE fnd_api.g_exc_error;
9848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9849: IF (l_debug = 1) THEN
9850: DEBUG(
9851: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of ' || p_order_header_id || ' '

Line 9848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9844: );
9845: END IF;
9846:
9847: RAISE fnd_api.g_exc_error;
9848: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9849: IF (l_debug = 1) THEN
9850: DEBUG(
9851: 'Validation failed for inv_quantity_tree_pub.query_quantities for combination of ' || p_order_header_id || ' '
9852: || p_order_line_id

Line 9857: RAISE fnd_api.g_exc_unexpected_error;

9853: , 'Process_Line'
9854: );
9855: END IF;
9856:
9857: RAISE fnd_api.g_exc_unexpected_error;
9858: END IF;
9859:
9860: IF (l_debug = 1) THEN
9861: DEBUG('Query tree Return status is ' || l_return_status, 'Process_Line');

Line 9924: , p_init_msg_lst => fnd_api.g_false

9920: END IF;
9921:
9922: inv_reservation_pub.update_reservation(
9923: p_api_version_number => 1.0
9924: , p_init_msg_lst => fnd_api.g_false
9925: , x_return_status => l_return_status
9926: , x_msg_count => l_msg_count
9927: , x_msg_data => l_msg_data
9928: , p_original_rsv_rec => l_old_upd_resv_rec

Line 9932: , p_validation_flag => fnd_api.g_true

9928: , p_original_rsv_rec => l_old_upd_resv_rec
9929: , p_to_rsv_rec => l_upd_resv_rec
9930: , p_original_serial_number => l_upd_dummy_sn
9931: , p_to_serial_number => l_upd_dummy_sn
9932: , p_validation_flag => fnd_api.g_true
9933: , p_over_reservation_flag => 3
9934: );
9935:
9936: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 9936: IF l_return_status = fnd_api.g_ret_sts_error THEN

9932: , p_validation_flag => fnd_api.g_true
9933: , p_over_reservation_flag => 3
9934: );
9935:
9936: IF l_return_status = fnd_api.g_ret_sts_error THEN
9937: IF (l_debug = 1) THEN
9938: DEBUG('Update reservation failed for reservation_id ' || l_reservation_id, 'Process_Line');
9939: END IF;
9940:

Line 9941: RAISE fnd_api.g_exc_error;

9937: IF (l_debug = 1) THEN
9938: DEBUG('Update reservation failed for reservation_id ' || l_reservation_id, 'Process_Line');
9939: END IF;
9940:
9941: RAISE fnd_api.g_exc_error;
9942: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9943: IF (l_debug = 1) THEN
9944: DEBUG('Update reservation failed for reservation_id with status U' || l_reservation_id, 'Process_Line');
9945: END IF;

Line 9942: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9938: DEBUG('Update reservation failed for reservation_id ' || l_reservation_id, 'Process_Line');
9939: END IF;
9940:
9941: RAISE fnd_api.g_exc_error;
9942: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9943: IF (l_debug = 1) THEN
9944: DEBUG('Update reservation failed for reservation_id with status U' || l_reservation_id, 'Process_Line');
9945: END IF;
9946:

Line 9947: RAISE fnd_api.g_exc_unexpected_error;

9943: IF (l_debug = 1) THEN
9944: DEBUG('Update reservation failed for reservation_id with status U' || l_reservation_id, 'Process_Line');
9945: END IF;
9946:
9947: RAISE fnd_api.g_exc_unexpected_error;
9948: END IF;
9949:
9950: IF (l_debug = 1) THEN
9951: DEBUG('Update reservation is successful ', 'Process_Line');

Line 10022: , p_init_msg_lst => fnd_api.g_false

10018: , x_serial_number => l_dummy_sn
10019: , x_quantity_reserved => l_quantity_reserved_tmp
10020: , x_reservation_id => l_reservation_id
10021: , p_api_version_number => 1.0
10022: , p_init_msg_lst => fnd_api.g_false
10023: , p_rsv_rec => l_reservation_record
10024: , p_partial_reservation_flag => fnd_api.g_true
10025: , p_force_reservation_flag => fnd_api.g_true
10026: , p_serial_number => l_dummy_sn

Line 10024: , p_partial_reservation_flag => fnd_api.g_true

10020: , x_reservation_id => l_reservation_id
10021: , p_api_version_number => 1.0
10022: , p_init_msg_lst => fnd_api.g_false
10023: , p_rsv_rec => l_reservation_record
10024: , p_partial_reservation_flag => fnd_api.g_true
10025: , p_force_reservation_flag => fnd_api.g_true
10026: , p_serial_number => l_dummy_sn
10027: , p_validation_flag => fnd_api.g_true
10028: , p_over_reservation_flag => 3

Line 10025: , p_force_reservation_flag => fnd_api.g_true

10021: , p_api_version_number => 1.0
10022: , p_init_msg_lst => fnd_api.g_false
10023: , p_rsv_rec => l_reservation_record
10024: , p_partial_reservation_flag => fnd_api.g_true
10025: , p_force_reservation_flag => fnd_api.g_true
10026: , p_serial_number => l_dummy_sn
10027: , p_validation_flag => fnd_api.g_true
10028: , p_over_reservation_flag => 3
10029: );

Line 10027: , p_validation_flag => fnd_api.g_true

10023: , p_rsv_rec => l_reservation_record
10024: , p_partial_reservation_flag => fnd_api.g_true
10025: , p_force_reservation_flag => fnd_api.g_true
10026: , p_serial_number => l_dummy_sn
10027: , p_validation_flag => fnd_api.g_true
10028: , p_over_reservation_flag => 3
10029: );
10030:
10031: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 10031: IF l_return_status = fnd_api.g_ret_sts_error THEN

10027: , p_validation_flag => fnd_api.g_true
10028: , p_over_reservation_flag => 3
10029: );
10030:
10031: IF l_return_status = fnd_api.g_ret_sts_error THEN
10032: IF (l_debug = 1) THEN
10033: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10034: END IF;
10035:

Line 10036: RAISE fnd_api.g_exc_error;

10032: IF (l_debug = 1) THEN
10033: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10034: END IF;
10035:
10036: RAISE fnd_api.g_exc_error;
10037: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10038: IF (l_debug = 1) THEN
10039: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10040: END IF;

Line 10037: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10033: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10034: END IF;
10035:
10036: RAISE fnd_api.g_exc_error;
10037: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10038: IF (l_debug = 1) THEN
10039: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10040: END IF;
10041:

Line 10042: RAISE fnd_api.g_exc_unexpected_error;

10038: IF (l_debug = 1) THEN
10039: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Process_Line');
10040: END IF;
10041:
10042: RAISE fnd_api.g_exc_unexpected_error;
10043: END IF;
10044:
10045: IF (l_debug = 1) THEN
10046: DEBUG('Res qty created : '|| l_reservation_record.primary_reservation_quantity , 'Process_Line');

Line 10127: x_return_status := fnd_api.g_ret_sts_error;

10123: IF (l_debug = 1) THEN
10124: DEBUG('Error getting transaction_temp_id', 'Process_Line');
10125: END IF;
10126:
10127: x_return_status := fnd_api.g_ret_sts_error;
10128: RAISE fnd_api.g_exc_error;
10129: END;
10130: ELSE
10131: l_trx_temp_id := NULL;

Line 10128: RAISE fnd_api.g_exc_error;

10124: DEBUG('Error getting transaction_temp_id', 'Process_Line');
10125: END IF;
10126:
10127: x_return_status := fnd_api.g_ret_sts_error;
10128: RAISE fnd_api.g_exc_error;
10129: END;
10130: ELSE
10131: l_trx_temp_id := NULL;
10132: END IF;

Line 10243: x_return_status := fnd_api.g_ret_sts_success;

10239: end if;
10240: Bug #5262108 . Commented upto here */
10241: END IF; --l_processed_quantity
10242:
10243: x_return_status := fnd_api.g_ret_sts_success;
10244: EXCEPTION
10245: WHEN OTHERS THEN
10246: IF (l_debug = 1) THEN
10247: DEBUG('Unexpected error occured', 'Process_Line');

Line 10250: x_return_status := fnd_api.g_ret_sts_unexp_error;

10246: IF (l_debug = 1) THEN
10247: DEBUG('Unexpected error occured', 'Process_Line');
10248: END IF;
10249:
10250: x_return_status := fnd_api.g_ret_sts_unexp_error;
10251: fnd_message.set_name('WMS', 'WMS_ERROR_LOADING_LINE');
10252: fnd_msg_pub.ADD;
10253: END process_line;
10254:

Line 10310: RAISE fnd_api.g_exc_error;

10306: IF (l_debug = 1) THEN
10307: DEBUG('Record not found in wdd for line_id=' || p_line_id, 'Validate_Del_Grp_Rules');
10308: END IF;
10309:
10310: RAISE fnd_api.g_exc_error;
10311: END IF;
10312:
10313: IF p_line_processed = 0 THEN
10314: -- loading first line no need to do comparision

Line 10359: RAISE fnd_api.g_exc_error;

10355: IF (l_debug = 1) THEN
10356: DEBUG('Exception occured', 'Validate_Del_Grp_Rules');
10357: END IF;
10358:
10359: RAISE fnd_api.g_exc_error;
10360: END validate_del_grp_rules;
10361:
10362: /*
10363: This method checks that there should be no record for this lpn in wstt (delivery)

Line 10410: IF l_return_status = fnd_api.g_ret_sts_error THEN

10406: , x_msg_data => l_msg_data
10407: , p_delivery_id => l_del_cur_rec.delivery_id
10408: );
10409:
10410: IF l_return_status = fnd_api.g_ret_sts_error THEN
10411: -- ACTION
10412: IF (l_debug = 1) THEN
10413: DEBUG('Delivery grouping failed', 'Validate_Del_For_DS');
10414: END IF;

Line 10417: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10413: DEBUG('Delivery grouping failed', 'Validate_Del_For_DS');
10414: END IF;
10415:
10416: l_result := FALSE;
10417: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10418: IF (l_debug = 1) THEN
10419: DEBUG('Delivery grouping failed with exception', 'Validate_Del_For_DS');
10420: END IF;
10421:

Line 10442: RAISE fnd_api.g_exc_error;

10438: IF (l_debug = 1) THEN
10439: DEBUG('Exception occured', 'Validate_Del_For_DS');
10440: END IF;
10441:
10442: RAISE fnd_api.g_exc_error;
10443: END validate_del_for_ds;
10444:
10445: /*
10446: This procedure perform the following processing for a lpn.

Line 10533: , p_init_msg_lst => fnd_api.g_false

10529: END IF;
10530:
10531: inv_reservation_pub.query_reservation(
10532: p_api_version_number => 1.0
10533: , p_init_msg_lst => fnd_api.g_false
10534: , x_return_status => l_return_status
10535: , x_msg_count => l_msg_count
10536: , x_msg_data => l_msg_data
10537: , p_query_input => l_qry_reservation_record

Line 10538: , p_lock_records => fnd_api.g_false

10534: , x_return_status => l_return_status
10535: , x_msg_count => l_msg_count
10536: , x_msg_data => l_msg_data
10537: , p_query_input => l_qry_reservation_record
10538: , p_lock_records => fnd_api.g_false
10539: , x_mtl_reservation_tbl => l_mtl_reservation_tab
10540: , x_mtl_reservation_tbl_count => l_mtl_reservation_tab_count
10541: , x_error_code => l_error_code
10542: );

Line 10544: IF l_return_status = fnd_api.g_ret_sts_error THEN

10540: , x_mtl_reservation_tbl_count => l_mtl_reservation_tab_count
10541: , x_error_code => l_error_code
10542: );
10543:
10544: IF l_return_status = fnd_api.g_ret_sts_error THEN
10545: IF (l_debug = 1) THEN
10546: DEBUG('Query reservation failed', 'Load_LPN');
10547: END IF;
10548:

Line 10549: RAISE fnd_api.g_exc_error;

10545: IF (l_debug = 1) THEN
10546: DEBUG('Query reservation failed', 'Load_LPN');
10547: END IF;
10548:
10549: RAISE fnd_api.g_exc_error;
10550: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10551: IF (l_debug = 1) THEN
10552: DEBUG('Query reservation failed', 'Load_LPN');
10553: END IF;

Line 10550: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10546: DEBUG('Query reservation failed', 'Load_LPN');
10547: END IF;
10548:
10549: RAISE fnd_api.g_exc_error;
10550: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10551: IF (l_debug = 1) THEN
10552: DEBUG('Query reservation failed', 'Load_LPN');
10553: END IF;
10554:

Line 10555: RAISE fnd_api.g_exc_unexpected_error;

10551: IF (l_debug = 1) THEN
10552: DEBUG('Query reservation failed', 'Load_LPN');
10553: END IF;
10554:
10555: RAISE fnd_api.g_exc_unexpected_error;
10556: END IF;
10557:
10558: IF (l_debug = 1) THEN
10559: DEBUG('After call to query reservation', 'Load_LPN');

Line 10574: IF l_return_status = fnd_api.g_ret_sts_error THEN

10570: , p_reservation_id => l_mtl_reservation_tab(l_rec).reservation_id
10571: , p_staged_flag => 'Y'
10572: );
10573:
10574: IF l_return_status = fnd_api.g_ret_sts_error THEN
10575: IF (l_debug = 1) THEN
10576: DEBUG('Update_staged_flag failed with error', 'Load_LPN');
10577: END IF;
10578:

Line 10579: RAISE fnd_api.g_exc_error;

10575: IF (l_debug = 1) THEN
10576: DEBUG('Update_staged_flag failed with error', 'Load_LPN');
10577: END IF;
10578:
10579: RAISE fnd_api.g_exc_error;
10580: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10581: IF (l_debug = 1) THEN
10582: DEBUG('Update_staged_flag failed with exception', 'Load_LPN');
10583: END IF;

Line 10580: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10576: DEBUG('Update_staged_flag failed with error', 'Load_LPN');
10577: END IF;
10578:
10579: RAISE fnd_api.g_exc_error;
10580: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10581: IF (l_debug = 1) THEN
10582: DEBUG('Update_staged_flag failed with exception', 'Load_LPN');
10583: END IF;
10584:

Line 10585: RAISE fnd_api.g_exc_unexpected_error;

10581: IF (l_debug = 1) THEN
10582: DEBUG('Update_staged_flag failed with exception', 'Load_LPN');
10583: END IF;
10584:
10585: RAISE fnd_api.g_exc_unexpected_error;
10586: END IF;
10587:
10588: IF (l_debug = 1) THEN
10589: DEBUG(

Line 10621: IF l_return_status = fnd_api.g_ret_sts_error THEN

10617: , p_organization_id => p_org_id
10618: , p_dock_door_id => p_dock_door_id
10619: );
10620:
10621: IF l_return_status = fnd_api.g_ret_sts_error THEN
10622: x_msg_data := l_msg_data;
10623: IF (l_debug = 1) THEN
10624: DEBUG('Stage LPN API failed with status E ', 'Load_LPN');
10625: END IF;

Line 10627: RAISE fnd_api.g_exc_error;

10623: IF (l_debug = 1) THEN
10624: DEBUG('Stage LPN API failed with status E ', 'Load_LPN');
10625: END IF;
10626:
10627: RAISE fnd_api.g_exc_error;
10628: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10629: x_msg_data := l_msg_data;
10630: IF (l_debug = 1) THEN
10631: DEBUG('Stage LPN API failed with status U', 'Load_LPN');

Line 10628: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10624: DEBUG('Stage LPN API failed with status E ', 'Load_LPN');
10625: END IF;
10626:
10627: RAISE fnd_api.g_exc_error;
10628: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10629: x_msg_data := l_msg_data;
10630: IF (l_debug = 1) THEN
10631: DEBUG('Stage LPN API failed with status U', 'Load_LPN');
10632: END IF;

Line 10634: RAISE fnd_api.g_exc_unexpected_error;

10630: IF (l_debug = 1) THEN
10631: DEBUG('Stage LPN API failed with status U', 'Load_LPN');
10632: END IF;
10633:
10634: RAISE fnd_api.g_exc_unexpected_error;
10635: END IF;
10636:
10637: IF (l_debug = 1) THEN
10638: DEBUG('Staging LPNs completed', 'Load_LPN');

Line 10649: IF l_return_status = fnd_api.g_ret_sts_error THEN

10645:
10646: wms_direct_ship_pvt.update_freight_cost(x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data
10647: , p_lpn_id => p_lpn_id);
10648:
10649: IF l_return_status = fnd_api.g_ret_sts_error THEN
10650: IF (l_debug = 1) THEN
10651: DEBUG('Update Freight Cost API failed with status E ', 'Load_LPN');
10652: END IF;
10653:

Line 10654: RAISE fnd_api.g_exc_error;

10650: IF (l_debug = 1) THEN
10651: DEBUG('Update Freight Cost API failed with status E ', 'Load_LPN');
10652: END IF;
10653:
10654: RAISE fnd_api.g_exc_error;
10655: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10656: IF (l_debug = 1) THEN
10657: DEBUG('Update Freight Cost failed with status U', 'Load_LPN');
10658: END IF;

Line 10655: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10651: DEBUG('Update Freight Cost API failed with status E ', 'Load_LPN');
10652: END IF;
10653:
10654: RAISE fnd_api.g_exc_error;
10655: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10656: IF (l_debug = 1) THEN
10657: DEBUG('Update Freight Cost failed with status U', 'Load_LPN');
10658: END IF;
10659:

Line 10660: RAISE fnd_api.g_exc_unexpected_error;

10656: IF (l_debug = 1) THEN
10657: DEBUG('Update Freight Cost failed with status U', 'Load_LPN');
10658: END IF;
10659:
10660: RAISE fnd_api.g_exc_unexpected_error;
10661: END IF;
10662:
10663: IF (l_debug = 1) THEN
10664: DEBUG('Update freight cost completed', 'Load_LPN');

Line 10668: x_return_status := fnd_api.g_ret_sts_success;

10664: DEBUG('Update freight cost completed', 'Load_LPN');
10665: DEBUG('LPN loaded successfully', 'Load_LPN');
10666: END IF;
10667:
10668: x_return_status := fnd_api.g_ret_sts_success;
10669: EXCEPTION
10670: WHEN OTHERS THEN
10671: IF (l_debug = 1) THEN
10672: DEBUG('Exception loading lpn', 'Load_LPN');

Line 10675: x_return_status := fnd_api.g_ret_sts_unexp_error;

10671: IF (l_debug = 1) THEN
10672: DEBUG('Exception loading lpn', 'Load_LPN');
10673: END IF;
10674:
10675: x_return_status := fnd_api.g_ret_sts_unexp_error;
10676: fnd_message.set_name('WMS', 'WMS_ERROR_LOADING_LPN');
10677: fnd_msg_pub.ADD;
10678: END load_lpn;
10679:

Line 10779: x_return_status := fnd_api.g_ret_sts_success;

10775: DEBUG('p_dock_door_id=' || p_dock_door_id, 'Perform_Overship_Distribution');
10776: DEBUG('lpn_content_record count=' || g_lpn_contents_tab.COUNT, 'Perform_Overship_Distribution');
10777: END IF;
10778:
10779: x_return_status := fnd_api.g_ret_sts_success;
10780:
10781: -- clear cash
10782: IF l_lpn_cont_qty_used.COUNT > 0 THEN
10783: l_lpn_cont_qty_used.DELETE;

Line 10806: , p_init_msg_lst => fnd_api.g_false

10802: END IF;
10803:
10804: inv_reservation_pub.query_reservation(
10805: p_api_version_number => 1.0
10806: , p_init_msg_lst => fnd_api.g_false
10807: , x_return_status => l_return_status
10808: , x_msg_count => l_msg_count
10809: , x_msg_data => l_msg_data
10810: , p_query_input => l_qry_reservation_record

Line 10811: , p_lock_records => fnd_api.g_false

10807: , x_return_status => l_return_status
10808: , x_msg_count => l_msg_count
10809: , x_msg_data => l_msg_data
10810: , p_query_input => l_qry_reservation_record
10811: , p_lock_records => fnd_api.g_false
10812: , x_mtl_reservation_tbl => l_mtl_reservation_tab
10813: , x_mtl_reservation_tbl_count => l_mtl_resv_tab_count
10814: , x_error_code => l_error_code
10815: );

Line 10817: IF l_return_status = fnd_api.g_ret_sts_error THEN

10813: , x_mtl_reservation_tbl_count => l_mtl_resv_tab_count
10814: , x_error_code => l_error_code
10815: );
10816:
10817: IF l_return_status = fnd_api.g_ret_sts_error THEN
10818: IF (l_debug = 1) THEN
10819: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10820: END IF;
10821:

Line 10822: RAISE fnd_api.g_exc_error;

10818: IF (l_debug = 1) THEN
10819: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10820: END IF;
10821:
10822: RAISE fnd_api.g_exc_error;
10823: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10824: IF (l_debug = 1) THEN
10825: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10826: END IF;

Line 10823: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10819: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10820: END IF;
10821:
10822: RAISE fnd_api.g_exc_error;
10823: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10824: IF (l_debug = 1) THEN
10825: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10826: END IF;
10827:

Line 10828: RAISE fnd_api.g_exc_unexpected_error;

10824: IF (l_debug = 1) THEN
10825: DEBUG('Query reservation failed', 'Perform_Overship_Distribution');
10826: END IF;
10827:
10828: RAISE fnd_api.g_exc_unexpected_error;
10829: END IF;
10830:
10831: IF (l_debug = 1) THEN
10832: DEBUG('After call to query reservation', 'Perform_Overship_Distribution');

Line 10880: RAISE fnd_api.g_exc_error;

10876: IF (l_debug = 1) THEN
10877: DEBUG('No data found for line=' || l_order_line_id, 'Perform_Overship_Distribution');
10878: END IF;
10879:
10880: RAISE fnd_api.g_exc_error;
10881: END;
10882:
10883: /* Commented for bug 5262108
10884: -- get tolerance quantity

Line 10923: IF l_return_status = fnd_api.g_ret_sts_error THEN

10919: END IF;
10920:
10921: --End bug 5262108
10922:
10923: IF l_return_status = fnd_api.g_ret_sts_error THEN
10924: IF (l_debug = 1) THEN
10925: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10926: END IF;
10927:

Line 10928: RAISE fnd_api.g_exc_error;

10924: IF (l_debug = 1) THEN
10925: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10926: END IF;
10927:
10928: RAISE fnd_api.g_exc_error;
10929: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10930: IF (l_debug = 1) THEN
10931: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10932: END IF;

Line 10929: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10925: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10926: END IF;
10927:
10928: RAISE fnd_api.g_exc_error;
10929: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10930: IF (l_debug = 1) THEN
10931: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10932: END IF;
10933:

Line 10934: RAISE fnd_api.g_exc_unexpected_error;

10930: IF (l_debug = 1) THEN
10931: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
10932: END IF;
10933:
10934: RAISE fnd_api.g_exc_unexpected_error;
10935: END IF;
10936:
10937:
10938: -- commented for 5262108 l_max_shippable_quantity := l_minmaxoutrectype.max_remaining_quantity; --Removed trunc bug3994915

Line 10962: RAISE fnd_api.g_exc_unexpected_error;

10958: IF (l_debug = 1) THEN
10959: DEBUG('Exception getting total reserved quantity for line = ' || l_order_line_id, 'Perform_Overship_Distribution');
10960: END IF;
10961:
10962: RAISE fnd_api.g_exc_unexpected_error;
10963: END;
10964:
10965: DEBUG('DRH 1 ' || l_order_header_id);
10966: --

Line 10990: RAISE fnd_api.g_exc_unexpected_error;

10986: IF (l_debug = 1) THEN
10987: DEBUG('Exception getting l_demand_source_type_id ', 'Perform_Overship_Distribution');
10988: END IF;
10989:
10990: RAISE fnd_api.g_exc_unexpected_error;
10991: END;
10992:
10993: -- clear quantity tree cache
10994: inv_quantity_tree_pub.clear_quantity_cache;

Line 11019: , p_init_msg_lst => fnd_api.g_false

11015: , x_qs => l_qs
11016: , x_att => l_transactable_qty
11017: , x_atr => l_atr
11018: , p_api_version_number => 1.0
11019: , p_init_msg_lst => fnd_api.g_false
11020: , p_organization_id => p_org_id
11021: , p_inventory_item_id => l_lpn_cont_rec.inventory_item_id
11022: , p_tree_mode => inv_quantity_tree_pub.g_transaction_mode
11023: , p_is_revision_control => l_lpn_cont_rec.revision_control

Line 11036: IF l_return_status = fnd_api.g_ret_sts_error THEN

11032: , p_locator_id => l_lpn_cont_rec.locator_id
11033: , p_lpn_id => l_lpn_cont_rec.lpn_id
11034: );
11035:
11036: IF l_return_status = fnd_api.g_ret_sts_error THEN
11037: IF (l_debug = 1) THEN
11038: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11039: END IF;
11040:

Line 11041: RAISE fnd_api.g_exc_error;

11037: IF (l_debug = 1) THEN
11038: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11039: END IF;
11040:
11041: RAISE fnd_api.g_exc_error;
11042: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11043: IF (l_debug = 1) THEN
11044: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11045: END IF;

Line 11042: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11038: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11039: END IF;
11040:
11041: RAISE fnd_api.g_exc_error;
11042: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11043: IF (l_debug = 1) THEN
11044: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11045: END IF;
11046:

Line 11047: RAISE fnd_api.g_exc_unexpected_error;

11043: IF (l_debug = 1) THEN
11044: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11045: END IF;
11046:
11047: RAISE fnd_api.g_exc_unexpected_error;
11048: END IF;
11049:
11050: IF (l_debug = 1) THEN
11051: DEBUG('Query tree Return status is ' || l_return_status, 'Perform_Overship_Distribution');

Line 11092: , p_init_msg_lst => fnd_api.g_false

11088: END IF;
11089:
11090: inv_reservation_pub.update_reservation(
11091: p_api_version_number => 1.0
11092: , p_init_msg_lst => fnd_api.g_false
11093: , x_return_status => l_return_status
11094: , x_msg_count => l_msg_count
11095: , x_msg_data => l_msg_data
11096: , p_original_rsv_rec => l_old_upd_resv_rec

Line 11100: , p_validation_flag => fnd_api.g_true

11096: , p_original_rsv_rec => l_old_upd_resv_rec
11097: , p_to_rsv_rec => l_upd_resv_rec
11098: , p_original_serial_number => l_upd_dummy_sn
11099: , p_to_serial_number => l_upd_dummy_sn
11100: , p_validation_flag => fnd_api.g_true
11101: , p_over_reservation_flag => 3
11102: );
11103:
11104: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 11104: IF l_return_status = fnd_api.g_ret_sts_error THEN

11100: , p_validation_flag => fnd_api.g_true
11101: , p_over_reservation_flag => 3
11102: );
11103:
11104: IF l_return_status = fnd_api.g_ret_sts_error THEN
11105: IF (l_debug = 1) THEN
11106: DEBUG('Update reservation failed ', 'Perform_Overship_Distribution');
11107: END IF;
11108:

Line 11109: RAISE fnd_api.g_exc_error;

11105: IF (l_debug = 1) THEN
11106: DEBUG('Update reservation failed ', 'Perform_Overship_Distribution');
11107: END IF;
11108:
11109: RAISE fnd_api.g_exc_error;
11110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11111: IF (l_debug = 1) THEN
11112: DEBUG('Update reservation failed', 'Perform_Overship_Distribution');
11113: END IF;

Line 11110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11106: DEBUG('Update reservation failed ', 'Perform_Overship_Distribution');
11107: END IF;
11108:
11109: RAISE fnd_api.g_exc_error;
11110: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11111: IF (l_debug = 1) THEN
11112: DEBUG('Update reservation failed', 'Perform_Overship_Distribution');
11113: END IF;
11114:

Line 11115: RAISE fnd_api.g_exc_unexpected_error;

11111: IF (l_debug = 1) THEN
11112: DEBUG('Update reservation failed', 'Perform_Overship_Distribution');
11113: END IF;
11114:
11115: RAISE fnd_api.g_exc_unexpected_error;
11116: END IF;
11117:
11118: IF (l_debug = 1) THEN
11119: DEBUG('Update reservation is successful ', 'Perform_Overship_Distribution');

Line 11151: RAISE fnd_api.g_exc_unexpected_error;

11147: IF (l_debug = 1) THEN
11148: DEBUG('Exception updating WDS', 'Perform_Overship_Distribution');
11149: END IF;
11150:
11151: RAISE fnd_api.g_exc_unexpected_error;
11152: END;
11153: END IF; -- l_qty_overship >0
11154: -- if all quantity consumed exit to lpn_content loop
11155:

Line 11213: RAISE fnd_api.g_exc_unexpected_error;

11209: IF (l_debug = 1) THEN
11210: DEBUG('Exception getting total reserved quantity for line = ' || l_order_line_id, 'Perform_Overship_Distribution');
11211: END IF;
11212:
11213: RAISE fnd_api.g_exc_unexpected_error;
11214: END;
11215:
11216: /*Commented for bug 6071394
11217: -- get max shippble quantity

Line 11248: IF l_return_status = fnd_api.g_ret_sts_error THEN

11244: END IF;
11245: --End bug 4908571
11246:
11247:
11248: IF l_return_status = fnd_api.g_ret_sts_error THEN
11249: IF (l_debug = 1) THEN
11250: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11251: END IF;
11252:

Line 11253: RAISE fnd_api.g_exc_error;

11249: IF (l_debug = 1) THEN
11250: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11251: END IF;
11252:
11253: RAISE fnd_api.g_exc_error;
11254: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11255: IF (l_debug = 1) THEN
11256: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11257: END IF;

Line 11254: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11250: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11251: END IF;
11252:
11253: RAISE fnd_api.g_exc_error;
11254: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11255: IF (l_debug = 1) THEN
11256: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11257: END IF;
11258:

Line 11259: RAISE fnd_api.g_exc_unexpected_error;

11255: IF (l_debug = 1) THEN
11256: DEBUG('Tolerance API failed', 'Perform_Overship_Distribution');
11257: END IF;
11258:
11259: RAISE fnd_api.g_exc_unexpected_error;
11260: END IF;
11261:
11262: -- get demand source type
11263: BEGIN

Line 11284: RAISE fnd_api.g_exc_unexpected_error;

11280: IF (l_debug = 1) THEN
11281: DEBUG('Exception getting l_demand_source_type_id ', 'Perform_Overship_Distribution');
11282: END IF;
11283:
11284: RAISE fnd_api.g_exc_unexpected_error;
11285: END;
11286:
11287: -- clear quantity tree cache
11288: inv_quantity_tree_pub.clear_quantity_cache;

Line 11313: , p_init_msg_lst => fnd_api.g_false

11309: , x_qs => l_qs
11310: , x_att => l_transactable_qty
11311: , x_atr => l_atr
11312: , p_api_version_number => 1.0
11313: , p_init_msg_lst => fnd_api.g_false
11314: , p_organization_id => p_org_id
11315: , p_inventory_item_id => l_lpn_cont_rec.inventory_item_id
11316: , p_tree_mode => inv_quantity_tree_pub.g_transaction_mode
11317: , p_is_revision_control => l_lpn_cont_rec.revision_control

Line 11330: IF l_return_status = fnd_api.g_ret_sts_error THEN

11326: , p_locator_id => l_lpn_cont_rec.locator_id
11327: , p_lpn_id => l_lpn_cont_rec.lpn_id
11328: );
11329:
11330: IF l_return_status = fnd_api.g_ret_sts_error THEN
11331: IF (l_debug = 1) THEN
11332: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11333: END IF;
11334:

Line 11335: RAISE fnd_api.g_exc_error;

11331: IF (l_debug = 1) THEN
11332: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11333: END IF;
11334:
11335: RAISE fnd_api.g_exc_error;
11336: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11337: IF (l_debug = 1) THEN
11338: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11339: END IF;

Line 11336: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11332: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11333: END IF;
11334:
11335: RAISE fnd_api.g_exc_error;
11336: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11337: IF (l_debug = 1) THEN
11338: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11339: END IF;
11340:

Line 11341: RAISE fnd_api.g_exc_unexpected_error;

11337: IF (l_debug = 1) THEN
11338: DEBUG('Validation failed for inv_quantity_tree_pub.query_quantities', 'Perform_Overship_Distribution');
11339: END IF;
11340:
11341: RAISE fnd_api.g_exc_unexpected_error;
11342: END IF;
11343:
11344: IF (l_debug = 1) THEN
11345: DEBUG('Query tree Return status is ' || l_return_status, 'Perform_Overship_Distribution');

Line 11444: , p_init_msg_lst => fnd_api.g_false

11440: , x_serial_number => l_dummy_sn
11441: , x_quantity_reserved => l_quantity_reserved_tmp
11442: , x_reservation_id => l_reservation_id
11443: , p_api_version_number => 1.0
11444: , p_init_msg_lst => fnd_api.g_false
11445: , p_rsv_rec => l_reservation_record
11446: , p_partial_reservation_flag => fnd_api.g_true
11447: , p_force_reservation_flag => fnd_api.g_true
11448: , p_serial_number => l_dummy_sn

Line 11446: , p_partial_reservation_flag => fnd_api.g_true

11442: , x_reservation_id => l_reservation_id
11443: , p_api_version_number => 1.0
11444: , p_init_msg_lst => fnd_api.g_false
11445: , p_rsv_rec => l_reservation_record
11446: , p_partial_reservation_flag => fnd_api.g_true
11447: , p_force_reservation_flag => fnd_api.g_true
11448: , p_serial_number => l_dummy_sn
11449: , p_validation_flag => fnd_api.g_true
11450: , p_over_reservation_flag => 3

Line 11447: , p_force_reservation_flag => fnd_api.g_true

11443: , p_api_version_number => 1.0
11444: , p_init_msg_lst => fnd_api.g_false
11445: , p_rsv_rec => l_reservation_record
11446: , p_partial_reservation_flag => fnd_api.g_true
11447: , p_force_reservation_flag => fnd_api.g_true
11448: , p_serial_number => l_dummy_sn
11449: , p_validation_flag => fnd_api.g_true
11450: , p_over_reservation_flag => 3
11451: );

Line 11449: , p_validation_flag => fnd_api.g_true

11445: , p_rsv_rec => l_reservation_record
11446: , p_partial_reservation_flag => fnd_api.g_true
11447: , p_force_reservation_flag => fnd_api.g_true
11448: , p_serial_number => l_dummy_sn
11449: , p_validation_flag => fnd_api.g_true
11450: , p_over_reservation_flag => 3
11451: );
11452:
11453: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 11453: IF l_return_status = fnd_api.g_ret_sts_error THEN

11449: , p_validation_flag => fnd_api.g_true
11450: , p_over_reservation_flag => 3
11451: );
11452:
11453: IF l_return_status = fnd_api.g_ret_sts_error THEN
11454: IF (l_debug = 1) THEN
11455: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Perform_Overship_Distribution');
11456: END IF;
11457:

Line 11458: RAISE fnd_api.g_exc_error;

11454: IF (l_debug = 1) THEN
11455: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Perform_Overship_Distribution');
11456: END IF;
11457:
11458: RAISE fnd_api.g_exc_error;
11459: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11460: IF (l_debug = 1) THEN
11461: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id
11462: , 'Perform_Overship_Distribution');

Line 11459: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11455: DEBUG('Create reservation failed for lpn_id= ' || l_lpn_cont_rec.lpn_id, 'Perform_Overship_Distribution');
11456: END IF;
11457:
11458: RAISE fnd_api.g_exc_error;
11459: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11460: IF (l_debug = 1) THEN
11461: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id
11462: , 'Perform_Overship_Distribution');
11463: END IF;

Line 11465: RAISE fnd_api.g_exc_unexpected_error;

11461: DEBUG('Unexpected error during create of Reservations lpn_id= ' || l_lpn_cont_rec.lpn_id
11462: , 'Perform_Overship_Distribution');
11463: END IF;
11464:
11465: RAISE fnd_api.g_exc_unexpected_error;
11466: END IF;
11467:
11468: IF (l_debug = 1) THEN
11469: DEBUG('Create reservations is successful ' || l_reservation_id, 'Perform_Overship_Distribution');

Line 11503: RAISE fnd_api.g_exc_unexpected_error;

11499: IF (l_debug = 1) THEN
11500: DEBUG('Exception updating WDS', 'Perform_Overship_Distribution');
11501: END IF;
11502:
11503: RAISE fnd_api.g_exc_unexpected_error;
11504: END;
11505: END IF; -- l_qty_overship>0
11506: END IF; -- l_transactable_qty>0
11507:

Line 11528: x_return_status := fnd_api.g_ret_sts_error;

11524: IF (l_debug = 1) THEN
11525: DEBUG('Lpn cannot be loaded, unused quantity found', 'Perform_Overship_Distribution');
11526: END IF;
11527:
11528: x_return_status := fnd_api.g_ret_sts_error;
11529:
11530: -- bug#2830138
11531: -- revert back the changes to lpn_contents from backup
11532: IF l_lpn_cont_qty_used.COUNT > 0 THEN

Line 11559: x_return_status := fnd_api.g_ret_sts_success;

11555: DEBUG('l_index= ' || l_index, 'Perform_Overship_Distribution');
11556: END IF;
11557: END LOOP; -- g_lpn_contents_tab
11558:
11559: x_return_status := fnd_api.g_ret_sts_success;
11560: EXCEPTION
11561: WHEN OTHERS THEN
11562: IF (l_debug = 1) THEN
11563: DEBUG('Exception occured', 'Perform_Overship_Distribution');

Line 11566: x_return_status := fnd_api.g_ret_sts_unexp_error;

11562: IF (l_debug = 1) THEN
11563: DEBUG('Exception occured', 'Perform_Overship_Distribution');
11564: END IF;
11565:
11566: x_return_status := fnd_api.g_ret_sts_unexp_error;
11567: fnd_message.set_name('WMS', 'WMS_ERROR_LOADING_LPN');
11568: fnd_msg_pub.ADD;
11569: END perform_overship_distribution;
11570:

Line 11594: x_return_status := fnd_api.g_ret_sts_success;

11590: DEBUG('header id:' || p_order_header_id, 'Check_holds');
11591: DEBUG('line id:' || p_order_line_id, 'Check_Holds');
11592: END IF;
11593:
11594: x_return_status := fnd_api.g_ret_sts_success;
11595:
11596: SELECT delivery_detail_id
11597: INTO l_delivery_detail_id
11598: FROM wsh_delivery_details_ob_grp_v

Line 11610: IF l_return_status = fnd_api.g_ret_sts_error THEN

11606:
11607: wsh_details_validations.check_credit_holds(p_detail_id => l_delivery_detail_id, p_activity_type => 'PICK', p_source_code => 'OE'
11608: , x_return_status => l_return_status);
11609:
11610: IF l_return_status = fnd_api.g_ret_sts_error THEN
11611: IF (l_debug = 1) THEN
11612: DEBUG('Credit Check holds API failed with status E ', 'Check_holds');
11613: END IF;
11614:

Line 11615: RAISE fnd_api.g_exc_error;

11611: IF (l_debug = 1) THEN
11612: DEBUG('Credit Check holds API failed with status E ', 'Check_holds');
11613: END IF;
11614:
11615: RAISE fnd_api.g_exc_error;
11616: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11617: IF (l_debug = 1) THEN
11618: DEBUG('Check Credit Holds API failed with status U', 'Check_holds');
11619: END IF;

Line 11616: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

11612: DEBUG('Credit Check holds API failed with status E ', 'Check_holds');
11613: END IF;
11614:
11615: RAISE fnd_api.g_exc_error;
11616: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
11617: IF (l_debug = 1) THEN
11618: DEBUG('Check Credit Holds API failed with status U', 'Check_holds');
11619: END IF;
11620:

Line 11621: RAISE fnd_api.g_exc_unexpected_error;

11617: IF (l_debug = 1) THEN
11618: DEBUG('Check Credit Holds API failed with status U', 'Check_holds');
11619: END IF;
11620:
11621: RAISE fnd_api.g_exc_unexpected_error;
11622: END IF;
11623: EXCEPTION
11624: WHEN fnd_api.g_exc_error THEN
11625: x_return_status := fnd_api.g_ret_sts_error;

Line 11624: WHEN fnd_api.g_exc_error THEN

11620:
11621: RAISE fnd_api.g_exc_unexpected_error;
11622: END IF;
11623: EXCEPTION
11624: WHEN fnd_api.g_exc_error THEN
11625: x_return_status := fnd_api.g_ret_sts_error;
11626:
11627: IF (l_debug = 1) THEN
11628: DEBUG('fnd_api.g_exe_error ' || SQLERRM, 'Check_holds');

Line 11625: x_return_status := fnd_api.g_ret_sts_error;

11621: RAISE fnd_api.g_exc_unexpected_error;
11622: END IF;
11623: EXCEPTION
11624: WHEN fnd_api.g_exc_error THEN
11625: x_return_status := fnd_api.g_ret_sts_error;
11626:
11627: IF (l_debug = 1) THEN
11628: DEBUG('fnd_api.g_exe_error ' || SQLERRM, 'Check_holds');
11629: END IF;

Line 11628: DEBUG('fnd_api.g_exe_error ' || SQLERRM, 'Check_holds');

11624: WHEN fnd_api.g_exc_error THEN
11625: x_return_status := fnd_api.g_ret_sts_error;
11626:
11627: IF (l_debug = 1) THEN
11628: DEBUG('fnd_api.g_exe_error ' || SQLERRM, 'Check_holds');
11629: END IF;
11630:
11631: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11632: WHEN fnd_api.g_exc_unexpected_error THEN

Line 11632: WHEN fnd_api.g_exc_unexpected_error THEN

11628: DEBUG('fnd_api.g_exe_error ' || SQLERRM, 'Check_holds');
11629: END IF;
11630:
11631: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11632: WHEN fnd_api.g_exc_unexpected_error THEN
11633: x_return_status := fnd_api.g_ret_sts_unexp_error;
11634:
11635: IF (l_debug = 1) THEN
11636: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');

Line 11633: x_return_status := fnd_api.g_ret_sts_unexp_error;

11629: END IF;
11630:
11631: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11632: WHEN fnd_api.g_exc_unexpected_error THEN
11633: x_return_status := fnd_api.g_ret_sts_unexp_error;
11634:
11635: IF (l_debug = 1) THEN
11636: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');
11637: END IF;

Line 11636: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');

11632: WHEN fnd_api.g_exc_unexpected_error THEN
11633: x_return_status := fnd_api.g_ret_sts_unexp_error;
11634:
11635: IF (l_debug = 1) THEN
11636: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');
11637: END IF;
11638:
11639: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11640: WHEN OTHERS THEN

Line 11641: x_return_status := fnd_api.g_ret_sts_unexp_error;

11637: END IF;
11638:
11639: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11640: WHEN OTHERS THEN
11641: x_return_status := fnd_api.g_ret_sts_unexp_error;
11642:
11643: IF (l_debug = 1) THEN
11644: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');
11645: END IF;

Line 11644: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');

11640: WHEN OTHERS THEN
11641: x_return_status := fnd_api.g_ret_sts_unexp_error;
11642:
11643: IF (l_debug = 1) THEN
11644: DEBUG('FND_API.G_UNEXPECTED_ERR' || SQLERRM, 'check_holds');
11645: END IF;
11646:
11647: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11648: END check_holds;

Line 11714: RAISE fnd_api.g_exc_unexpected_error;

11710: IF (l_debug = 1) THEN
11711: DEBUG('Exception occured', 'Cleanup_Orphan_Rec');
11712: END IF;
11713:
11714: RAISE fnd_api.g_exc_unexpected_error;
11715: END cleanup_orphan_rec;
11716:
11717: /*
11718: This function finds out if there is any record in lpn contents having