561: ,x_lot_expiration_date => l_lot_expiration_date
562: ,x_return_status => l_return_status);
563:
564: inv_calculate_exp_date.purge_mmtt_tab;
565: IF l_return_status <> fnd_api.g_ret_sts_success THEN
566: IF g_debug = 1 THEN
567: print_debug('Program inv_calculate_exp_date.get_lot_expiration_date has failed with a Unexpected exception', 9);
568: END IF;
569: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
568: END IF;
569: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
570: FND_MESSAGE.SET_TOKEN('PROG_NAME','inv_calculate_exp_date.get_lot_expiration_date');
571: fnd_msg_pub.ADD;
572: RAISE fnd_api.g_exc_unexpected_error;
573: END IF;
574: IF g_debug = 1 THEN
575: print_debug('l_lot_expiration_date '||l_lot_expiration_date, 9);
576: END IF;
666:
667: EXCEPTION
668: WHEN NO_DATA_FOUND THEN
669: print_debug('In Set_Msi_Default_Attr, No data found ' || SQLERRM, 9);
670: WHEN fnd_api.g_exc_error THEN
671: print_debug('In Set_Msi_Default_Attr, g_exc_error ' || SQLERRM, 9);
672: WHEN fnd_api.g_exc_unexpected_error THEN
673: print_debug('In Set_Msi_Default_Attr, g_exc_unexpected_error ' || SQLERRM, 9);
674: WHEN OTHERS THEN
668: WHEN NO_DATA_FOUND THEN
669: print_debug('In Set_Msi_Default_Attr, No data found ' || SQLERRM, 9);
670: WHEN fnd_api.g_exc_error THEN
671: print_debug('In Set_Msi_Default_Attr, g_exc_error ' || SQLERRM, 9);
672: WHEN fnd_api.g_exc_unexpected_error THEN
673: print_debug('In Set_Msi_Default_Attr, g_exc_unexpected_error ' || SQLERRM, 9);
674: WHEN OTHERS THEN
675: print_debug('In Set_Msi_Default_Attr, Others ' || SQLERRM, 9);
676:
921: l_msg_count NUMBER ;
922: l_msg_data VARCHAR2(3000) ;
923: BEGIN
924:
925: x_return_status := fnd_api.G_RET_STS_SUCCESS;
926: l_api_version := 1.0;
927: l_init_msg_list := fnd_api.g_false;
928: l_commit := fnd_api.g_false;
929:
923: BEGIN
924:
925: x_return_status := fnd_api.G_RET_STS_SUCCESS;
926: l_api_version := 1.0;
927: l_init_msg_list := fnd_api.g_false;
928: l_commit := fnd_api.g_false;
929:
930: INV_LOT_API_PUB.validate_child_lot (
931: x_return_status => l_return_status
924:
925: x_return_status := fnd_api.G_RET_STS_SUCCESS;
926: l_api_version := 1.0;
927: l_init_msg_list := fnd_api.g_false;
928: l_commit := fnd_api.g_false;
929:
930: INV_LOT_API_PUB.validate_child_lot (
931: x_return_status => l_return_status
932: , x_msg_count => l_msg_count
939: , p_parent_lot_number => p_parent_lot_number
940: , p_child_lot_number => p_lot_number
941: ) ;
942:
943: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
944: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
945: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.VALIDATE_CHILD_LOT');
946: fnd_msg_pub.ADD;
947: RAISE fnd_api.g_exc_unexpected_error;
943: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
944: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
945: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.VALIDATE_CHILD_LOT');
946: fnd_msg_pub.ADD;
947: RAISE fnd_api.g_exc_unexpected_error;
948: END IF;
949:
950: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
951: RAISE fnd_api.g_exc_error;
946: fnd_msg_pub.ADD;
947: RAISE fnd_api.g_exc_unexpected_error;
948: END IF;
949:
950: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
951: RAISE fnd_api.g_exc_error;
952: END IF;
953:
954:
947: RAISE fnd_api.g_exc_unexpected_error;
948: END IF;
949:
950: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
951: RAISE fnd_api.g_exc_error;
952: END IF;
953:
954:
955:
954:
955:
956: EXCEPTION
957: WHEN NO_DATA_FOUND THEN
958: x_return_status := FND_API.G_RET_STS_ERROR;
959:
960: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
961: p_count => x_msg_count,
962: p_data => x_msg_data);
956: EXCEPTION
957: WHEN NO_DATA_FOUND THEN
958: x_return_status := FND_API.G_RET_STS_ERROR;
959:
960: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
961: p_count => x_msg_count,
962: p_data => x_msg_data);
963: if( x_msg_count > 1 ) then
964: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
960: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
961: p_count => x_msg_count,
962: p_data => x_msg_data);
963: if( x_msg_count > 1 ) then
964: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
965: end if;
966:
967: WHEN FND_API.G_EXC_ERROR THEN
968: x_return_status := FND_API.G_RET_STS_ERROR;
963: if( x_msg_count > 1 ) then
964: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
965: end if;
966:
967: WHEN FND_API.G_EXC_ERROR THEN
968: x_return_status := FND_API.G_RET_STS_ERROR;
969:
970: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
971: p_count => x_msg_count,
964: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
965: end if;
966:
967: WHEN FND_API.G_EXC_ERROR THEN
968: x_return_status := FND_API.G_RET_STS_ERROR;
969:
970: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
971: p_count => x_msg_count,
972: p_data => x_msg_data);
966:
967: WHEN FND_API.G_EXC_ERROR THEN
968: x_return_status := FND_API.G_RET_STS_ERROR;
969:
970: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
971: p_count => x_msg_count,
972: p_data => x_msg_data);
973: if( x_msg_count > 1 ) then
974: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
970: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
971: p_count => x_msg_count,
972: p_data => x_msg_data);
973: if( x_msg_count > 1 ) then
974: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
975: end if;
976:
977: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
973: if( x_msg_count > 1 ) then
974: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
975: end if;
976:
977: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
979:
980: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
981: p_count => x_msg_count,
974: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
975: end if;
976:
977: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
979:
980: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
981: p_count => x_msg_count,
982: p_data => x_msg_data);
976:
977: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
979:
980: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
981: p_count => x_msg_count,
982: p_data => x_msg_data);
983: if( x_msg_count > 1 ) then
984: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
980: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
981: p_count => x_msg_count,
982: p_data => x_msg_data);
983: if( x_msg_count > 1 ) then
984: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
985: end if;
986:
987:
988: WHEN OTHERS THEN
985: end if;
986:
987:
988: WHEN OTHERS THEN
989: x_return_status := fnd_api.g_ret_sts_error;
990:
991: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
992: p_count => x_msg_count,
993: p_data => x_msg_data);
987:
988: WHEN OTHERS THEN
989: x_return_status := fnd_api.g_ret_sts_error;
990:
991: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
992: p_count => x_msg_count,
993: p_data => x_msg_data);
994: if( x_msg_count > 1 ) then
995: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
991: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
992: p_count => x_msg_count,
993: p_data => x_msg_data);
994: if( x_msg_count > 1 ) then
995: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
996: end if;
997:
998: END validate_child_lot;
999:
1765: END IF;--l_lot_count = 0
1766:
1767: /* Bug#5349912 Begin Added the following code to copy all other lot converisons
1768: The below flag will be true only in case of Lot Split. In other cases the default is F */
1769: IF p_copy_other_conversions = fnd_api.g_true THEN
1770: MTL_LOT_UOM_CONV_PVT.copy_lot_uom_conversions (
1771: p_from_organization_id => l_lot_uom_conv_rec.organization_id
1772: , p_to_organization_id => l_lot_uom_conv_rec.organization_id
1773: , p_inventory_item_id => l_lot_uom_conv_rec.inventory_item_id
1774: , p_from_lot_number => p_source_lot
1775: , p_to_lot_number => l_lot_uom_conv_rec.lot_number
1776: , p_user_id => fnd_global.user_id
1777: , p_creation_date => SYSDATE
1778: , p_commit => fnd_api.g_true
1779: , x_return_status => l_return_status
1780: , x_msg_count => l_msg_count
1781: , x_msg_data => l_msg_data );
1782:
1784: FND_MSG_PUB.count_and_get
1785: ( p_count => x_msg_count
1786: ,p_data => x_msg_data
1787: );
1788: END IF; /* p_copy_other_conversions = fnd_api.g_true */
1789: END IF;
1790: --Bug#5349912 End
1791: END IF;
1792: END IF;