684: END IF;
685:
686: -- Initialize message list if p_init_msg_list is set to TRUE.
687: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
688: Fnd_Msg_Pub.initialize;
689: END IF;
690:
691: -- Initialize API return status to success
692: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
716: FETCH c_id_exists INTO l_dummy;
717: IF c_id_exists%NOTFOUND THEN
718: CLOSE c_id_exists;
719: Fnd_Message.SET_NAME('AHL','AHL_RPT_CNTR_NOT_EXT');
720: Fnd_Msg_Pub.ADD;
721: RAISE Fnd_Api.G_EXC_ERROR;
722: END IF;
723: CLOSE c_id_exists;
724: --Update the table with the new counter values
737: OPEN c_check_for_dup('REM_%');
738: FETCH c_check_for_dup INTO l_dummy;
739: IF c_check_for_dup%FOUND THEN
740: Fnd_Message.SET_NAME('AHL','AHL_RPT_REM_DUP_CNTR');
741: Fnd_Msg_Pub.ADD;
742: RAISE Fnd_Api.G_EXC_ERROR;
743: END IF;
744: CLOSE c_check_for_dup;
745:
747: OPEN c_check_for_dup('SINCE_REP_%');
748: FETCH c_check_for_dup INTO l_dummy;
749: IF c_check_for_dup%FOUND THEN
750: Fnd_Message.SET_NAME('AHL','AHL_RPT_SINCEREP_DUP_CNTR');
751: Fnd_Msg_Pub.ADD;
752: RAISE Fnd_Api.G_EXC_ERROR;
753: END IF;
754: CLOSE c_check_for_dup;
755:
757: OPEN c_check_for_dup('SPECLIMIT_%');
758: FETCH c_check_for_dup INTO l_dummy;
759: IF c_check_for_dup%FOUND THEN
760: Fnd_Message.SET_NAME('AHL','AHL_RPT_SPECLIMIT_DUP_CNTR');
761: Fnd_Msg_Pub.ADD;
762: RAISE Fnd_Api.G_EXC_ERROR;
763: END IF;
764: CLOSE c_check_for_dup;
765:
768: OPEN c_check_for_dup('PROGRAM_SUBTYPE%');
769: FETCH c_check_for_dup INTO l_dummy;
770: IF c_check_for_dup%FOUND THEN
771: Fnd_Message.SET_NAME('AHL','AHL_RPT_PST_DUP');
772: Fnd_Msg_Pub.ADD;
773: RAISE Fnd_Api.G_EXC_ERROR;
774: END IF;
775: CLOSE c_check_for_dup;
776:
789: EXCEPTION
790: WHEN Fnd_Api.g_exc_error THEN
791: ROLLBACK TO Insert_Rem_Counters;
792: x_return_status := Fnd_Api.g_ret_sts_error;
793: Fnd_Msg_Pub.count_and_get (
794: p_encoded => Fnd_Api.g_false,
795: p_count => x_msg_count,
796: p_data => x_msg_data
797: );
797: );
798: WHEN Fnd_Api.g_exc_unexpected_error THEN
799: ROLLBACK TO Insert_Rem_Counters;
800: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
801: Fnd_Msg_Pub.count_and_get (
802: p_encoded => Fnd_Api.g_false,
803: p_count => x_msg_count,
804: p_data => x_msg_data
805: );
805: );
806: WHEN OTHERS THEN
807: ROLLBACK TO Insert_Rem_Counters;
808: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
809: IF Fnd_Msg_Pub.check_msg_level (Fnd_Msg_Pub.g_msg_lvl_unexp_error)
810: THEN
811: Fnd_Msg_Pub.add_exc_msg (G_PKG_NAME, l_api_name);
812: END IF;
813: Fnd_Msg_Pub.count_and_get (
807: ROLLBACK TO Insert_Rem_Counters;
808: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
809: IF Fnd_Msg_Pub.check_msg_level (Fnd_Msg_Pub.g_msg_lvl_unexp_error)
810: THEN
811: Fnd_Msg_Pub.add_exc_msg (G_PKG_NAME, l_api_name);
812: END IF;
813: Fnd_Msg_Pub.count_and_get (
814: p_encoded => Fnd_Api.g_false,
815: p_count => x_msg_count,
809: IF Fnd_Msg_Pub.check_msg_level (Fnd_Msg_Pub.g_msg_lvl_unexp_error)
810: THEN
811: Fnd_Msg_Pub.add_exc_msg (G_PKG_NAME, l_api_name);
812: END IF;
813: Fnd_Msg_Pub.count_and_get (
814: p_encoded => Fnd_Api.g_false,
815: p_count => x_msg_count,
816: p_data => x_msg_data
817: );