819: END IF;
820: EXCEPTION
821: WHEN FND_API.G_EXC_ERROR THEN
822: x_return_status := FND_API.G_RET_STS_ERROR;
823: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
824: , p_data => x_msg_data);
825: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
827: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
823: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
824: , p_data => x_msg_data);
825: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
827: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
828: , p_data => x_msg_data);
829: WHEN OTHERS THEN
830: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
831: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
827: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
828: , p_data => x_msg_data);
829: WHEN OTHERS THEN
830: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
831: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
832: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_RETURN_TO_STOCK');
833: END IF;
834: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
835: , p_data => x_msg_data);
828: , p_data => x_msg_data);
829: WHEN OTHERS THEN
830: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
831: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
832: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_RETURN_TO_STOCK');
833: END IF;
834: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
835: , p_data => x_msg_data);
836: END INV_RETURN_TO_STOCK;
830: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
831: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
832: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_RETURN_TO_STOCK');
833: END IF;
834: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
835: , p_data => x_msg_data);
836: END INV_RETURN_TO_STOCK;
837:
838:
1186: END IF;
1187: EXCEPTION
1188: WHEN FND_API.G_EXC_ERROR THEN
1189: x_return_status := FND_API.G_RET_STS_ERROR;
1190: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1191: , p_data => x_msg_data);
1192: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1193: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1194: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1190: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1191: , p_data => x_msg_data);
1192: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1193: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1194: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1195: , p_data => x_msg_data);
1196: WHEN OTHERS THEN
1197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1198: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1194: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1195: , p_data => x_msg_data);
1196: WHEN OTHERS THEN
1197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1198: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1199: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1202: , p_data => x_msg_data);
1195: , p_data => x_msg_data);
1196: WHEN OTHERS THEN
1197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1198: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1199: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1202: , p_data => x_msg_data);
1203:
1197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1198: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1199: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1202: , p_data => x_msg_data);
1203:
1204: END INV_LINE_RETURN_TO_STOCK;
1205:
1453: END IF;
1454: EXCEPTION
1455: WHEN FND_API.G_EXC_ERROR THEN
1456: x_return_status := FND_API.G_RET_STS_ERROR;
1457: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1458: , p_data => x_msg_data);
1459: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1460: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1461: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1457: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1458: , p_data => x_msg_data);
1459: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1460: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1461: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1462: , p_data => x_msg_data);
1463: WHEN OTHERS THEN
1464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1465: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1461: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1462: , p_data => x_msg_data);
1463: WHEN OTHERS THEN
1464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1465: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1466: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1467: END IF;
1468: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1469: , p_data => x_msg_data);
1462: , p_data => x_msg_data);
1463: WHEN OTHERS THEN
1464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1465: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1466: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1467: END IF;
1468: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1469: , p_data => x_msg_data);
1470:
1464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1465: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1466: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, 'INV_LINE_RETURN_TO_STOCK');
1467: END IF;
1468: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
1469: , p_data => x_msg_data);
1470:
1471: END INV_LINE_RETURN_TO_STOCK;
1472:
2558: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2559: BEGIN
2560: x_return_status := FND_API.G_RET_STS_SUCCESS;
2561: x_ret_code := 0;
2562: fnd_msg_pub.initialize;
2563:
2564: IF l_debug=1 THEN
2565: debug('INV_SHIPPING_TRANSACTION_PUB.CONFIRM_DELIVERY..delivery_id: ' || p_delivery_id, 'confirm_delivery');
2566: END IF;
2573: x_error_msg => l_error_msg);
2574: IF x_return_status = 'E' THEN
2575: FND_MESSAGE.SET_NAME('INV', 'WMS_WSH_SHIPSET_FORCED');
2576: FND_MESSAGE.SET_TOKEN('SHIP_SET_NAME', l_ship_set);
2577: FND_MSG_PUB.ADD;
2578: RAISE unspec_ship_set_exists;
2579: ELSIF x_return_status = 'U' THEN
2580: RAISE fnd_api.g_exc_unexpected_error;
2581: END IF;
2585: x_return_Status => x_return_status,
2586: x_error_msg => l_error_msg);
2587: IF x_return_status = 'E' THEN
2588: FND_MESSAGE.SET_NAME('INV', 'WMS_INCOMPLETE_DELI');
2589: FND_MSG_PUB.ADD;
2590: IF l_debug = 1 THEN
2591: debug('check_complete_delivery failed with status E','CONFIRM_DELIVERY');
2592: END IF;
2593: RAISE incomplete_delivery;
2639: x_return_status := fnd_api.g_ret_sts_error;
2640: x_ret_code := 1;
2641:
2642: -- Get message count and data
2643: fnd_msg_pub.count_and_get
2644: ( p_count => x_msg_count
2645: , p_data => x_msg_data
2646: );
2647:
2649: x_return_status := fnd_api.g_ret_sts_error;
2650: x_ret_code := 2;
2651:
2652: -- Get message count and data
2653: fnd_msg_pub.count_and_get
2654: ( p_count => x_msg_count
2655: , p_data => x_msg_data
2656: );
2657:
2678: l_error_msg VARCHAR2(2000) := NULL;
2679: unassign_lines_exc EXCEPTION;
2680: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2681: BEGIN
2682: fnd_msg_pub.initialize;
2683:
2684: INV_SHIPPING_TRANSACTION_PUB.UNASSIGN_DELIVERY_LINES(
2685: p_delivery_id => p_delivery_id,
2686: x_return_Status => x_return_status,
2719: WHEN OTHERS THEN
2720: x_return_status := fnd_api.g_ret_sts_unexp_error;
2721:
2722: -- Get message count and data
2723: fnd_msg_pub.count_and_get
2724: ( p_count => x_msg_count
2725: , p_data => x_msg_data
2726: );
2727:
2852:
2853: x_return_status := FND_API.G_RET_STS_SUCCESS;
2854: x_new_delivery_detail_id := l_new_delivery_line_id;
2855: x_new_transaction_temp_id := l_new_transaction_temp_id;
2856: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2857: EXCEPTION
2858: WHEN FND_API.G_EXC_ERROR THEN
2859: x_return_status := FND_API.G_RET_STS_ERROR;
2860: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2856: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2857: EXCEPTION
2858: WHEN FND_API.G_EXC_ERROR THEN
2859: x_return_status := FND_API.G_RET_STS_ERROR;
2860: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2861: END INV_SPLIT_DELIVERY_LINE;
2862:
2863:
2864: /**
3020:
3021: x_return_status := FND_API.G_RET_STS_SUCCESS;
3022: x_new_delivery_detail_id := l_new_delivery_line_id;
3023: x_new_transaction_temp_id := l_new_transaction_temp_id;
3024: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3025: EXCEPTION
3026: WHEN FND_API.G_EXC_ERROR THEN
3027: x_return_status := FND_API.G_RET_STS_ERROR;
3028: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3024: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3025: EXCEPTION
3026: WHEN FND_API.G_EXC_ERROR THEN
3027: x_return_status := FND_API.G_RET_STS_ERROR;
3028: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3029: END INV_SPLIT_DELIVERY_LINE;
3030:
3031: PROCEDURE INV_PROCESS_SERIALS(
3032: p_transaction_temp_id IN NUMBER,
3053: where transaction_temp_id = l_transaction_temp_id
3054: And delivery_detail_id = l_delivery_detail_id);
3055: end if;
3056: x_return_status := FND_API.G_RET_STS_SUCCESS;
3057: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3058:
3059: EXCEPTION
3060: when FND_API.G_EXC_ERROR THEN
3061: x_return_status := FND_API.G_RET_STS_ERROR;
3058:
3059: EXCEPTION
3060: when FND_API.G_EXC_ERROR THEN
3061: x_return_status := FND_API.G_RET_STS_ERROR;
3062: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3063: when others then
3064: x_return_status := FND_API.G_RET_STS_ERROR;
3065: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3066: END INV_PROCESS_SERIALS;
3061: x_return_status := FND_API.G_RET_STS_ERROR;
3062: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3063: when others then
3064: x_return_status := FND_API.G_RET_STS_ERROR;
3065: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3066: END INV_PROCESS_SERIALS;
3067:
3068:
3069: PROCEDURE get_enforce_ship(p_org_id IN NUMBER,