98: -- changed by sudarsana 11 feb 2002
99: OR (rsc_rec.end_date_active < to_date(to_char(nvl(p_new_end_date, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR')))
100: THEN
101: fnd_message.set_name ('JTF', 'JTF_RS_RES_DATE_ERR');
102: FND_MSG_PUB.add;
103: l_valid := FALSE;
104: END IF;
105:
106: for grp_mem_rec in grp_mem_cur
119:
120: if NOT(l_grp_valid)
121: then
122: fnd_message.set_name ('JTF', 'JTF_RS_RES_UPD_DT_ERR');
123: FND_MSG_PUB.add;
124: exit;
125: end if;
126: end loop; --end of grp_mem_cur
127:
141:
142: if NOT(l_team_valid)
143: then
144: fnd_message.set_name ('JTF', 'JTF_RS_RES_UPD_DT_ERR');
145: FND_MSG_PUB.add;
146: exit;
147: end if;
148: end loop; --end of grp_mem_cur
149:
501:
502: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
503: IF FND_API.To_boolean(P_INIT_MSG_LIST)
504: THEN
505: FND_MSG_PUB.Initialize;
506: END IF;
507:
508: --dbms_output.put_line ('Debug Message 10');
509:
531: p_count => L_count,
532: P_return_code => l_return_code);
533: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
534: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
535: FND_MSG_PUB.add;
536: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
537: RAISE FND_API.G_EXC_ERROR;
538: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
539: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
558: p_count => L_count,
559: P_return_code => l_return_code);
560: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
561: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
562: FND_MSG_PUB.add;
563: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
564: RAISE FND_API.G_EXC_ERROR;
565: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
566: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
585: p_count => L_count,
586: P_return_code => l_return_code);
587: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
588: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
589: FND_MSG_PUB.add;
590: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
591: RAISE FND_API.G_EXC_ERROR;
592: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
593: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
604: --check start date null
605: IF(l_start_date_active is NULL)
606: THEN
607: fnd_message.set_name ('JTF', 'JTF_RS_DATE_RANGE_ERR');
608: FND_MSG_PUB.add;
609: RAISE fnd_api.g_exc_error;
610: END IF;
611:
612:
613: --check start date less than end date
614: IF(l_start_date_active > l_end_date_active)
615: THEN
616: fnd_message.set_name ('JTF', 'JTF_RS_DATE_RANGE_ERR');
617: FND_MSG_PUB.add;
618: RAISE fnd_api.g_exc_error;
619: END IF;
620:
621: IF(l_role_resource_type = 'RS_TEAM' or
628: l_role_type_valid);
629:
630: if (l_role_type_valid = false) then
631: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_TYPE_INACTIVE');
632: FND_MSG_PUB.add;
633: RAISE fnd_api.g_exc_error;
634: end if;
635: END IF;
636:
680:
681: IF(l_date_invalid)
682: THEN
683: fnd_message.set_name ('JTF', 'JTF_RS_OVERLAP_DATE_ERR');
684: FND_MSG_PUB.add;
685: RAISE fnd_api.g_exc_error;
686: END IF;
687: --end of overlapping date range check
688:
726:
727: ELSE
728: l_role_valid := FALSE;
729: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_OR_DATE_ERR');
730: FND_MSG_PUB.add;
731: RAISE fnd_api.g_exc_error;
732: END IF;
733: close res_role_cur;
734: ELSIF((l_role_resource_type = 'RS_TEAM_MEMBER') AND
750:
751: ELSE
752: l_role_valid := FALSE;
753: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_OR_DATE_ERR');
754: FND_MSG_PUB.add;
755: RAISE fnd_api.g_exc_error;
756: END IF;
757: close grp_role_cur;
758: END IF;
771: IF((trunc(team_rec.start_date_active) > trunc(l_start_date_active))
772: OR to_date(to_char(nvl(team_rec.end_date_active, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR') < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR'))
773: THEN
774: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
775: FND_MSG_PUB.add;
776: RAISE fnd_api.g_exc_error;
777: END IF;
778:
779: IF(team_rec.end_date_active is not null AND l_end_date_active is null)
778:
779: IF(team_rec.end_date_active is not null AND l_end_date_active is null)
780: THEN
781: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
782: FND_MSG_PUB.add;
783: RAISE fnd_api.g_exc_error;
784: END IF;
785:
786: --dbms_output.put_line ('Debug Message 17');
796: IF((trunc(group_rec.start_date_active) > trunc(l_start_date_active))
797: OR to_date(to_char(nvl(group_rec.end_date_active, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR') < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR'))
798: THEN
799: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
800: FND_MSG_PUB.add;
801: RAISE fnd_api.g_exc_error;
802: END IF;
803:
804:
804:
805: IF(group_rec.end_date_active is not null AND l_end_date_active is null)
806: THEN
807: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
808: FND_MSG_PUB.add;
809: RAISE fnd_api.g_exc_error;
810: END IF;
811:
812: --exclusive flag validation
817: fetch c_exclusive_group_check_cur into c_exclusive_group_check_rec;
818: IF(c_exclusive_group_check_cur%FOUND)
819: THEN
820: fnd_message.set_name ('JTF', 'JTF_RS_RES_USAGE_ERR');
821: FND_MSG_PUB.add;
822: RAISE fnd_api.g_exc_error;
823: END IF;
824:
825: close c_exclusive_group_check_cur;
834: -- changed by sudarsana 11 feb 2002
835: OR (rsc_rec.end_date_active < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date), 'DD-MM-RRRR'), 'DD-MM-RRRR')))
836: THEN
837: fnd_message.set_name ('JTF', 'JTF_RS_RES_DATE_ERR');
838: FND_MSG_PUB.add;
839: RAISE fnd_api.g_exc_error;
840: END IF;
841: ELSIF(l_role_resource_type = 'RS_GROUP')
842: --check against group start and end dates
850: OR (to_date(to_char(nvl(group_dt_rec.end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR')
851: < (to_date(to_char(nvl(l_end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))))
852: THEN
853: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DT_ERR');
854: FND_MSG_PUB.add;
855: RAISE fnd_api.g_exc_error;
856: END IF;
857: ELSIF(l_role_resource_type = 'RS_TEAM')
858: --check against team start and end dates
866: OR (to_date(to_char(nvl(team_dt_rec.end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR')
867: < (to_date(to_char(nvl(l_end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))))
868: THEN
869: fnd_message.set_name ('JTF', 'JTF_RS_TEAM_DT_ERR');
870: FND_MSG_PUB.add;
871: RAISE fnd_api.g_exc_error;
872: END IF;
873: END IF;
874:
1005: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
1006: fnd_message.set_token('P_SQLCODE',SQLCODE);
1007: fnd_message.set_token('P_SQLERRM',SQLERRM);
1008: fnd_message.set_token('P_API_NAME', l_api_name);
1009: FND_MSG_PUB.add;
1010: RAISE fnd_api.g_exc_unexpected_error;
1011:
1012:
1013: end;
1025:
1026: fnd_message.set_name ('JTF', 'JTF_RS_CONC_START');
1027: fnd_message.set_token('P_NAME',g_name);
1028: fnd_message.set_token('P_ID',l_request);
1029: FND_MSG_PUB.add;
1030:
1031: exception when others then
1032: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
1033: fnd_message.set_token('P_SQLCODE',SQLCODE);
1032: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
1033: fnd_message.set_token('P_SQLCODE',SQLCODE);
1034: fnd_message.set_token('P_SQLERRM',SQLERRM);
1035: fnd_message.set_token('P_API_NAME', l_api_name);
1036: FND_MSG_PUB.add;
1037: RAISE fnd_api.g_exc_unexpected_error;
1038: end;
1039:
1040: else
1074: p_count => L_count,
1075: P_return_code => l_return_code);
1076: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1077: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
1078: FND_MSG_PUB.add;
1079: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1080: RAISE FND_API.G_EXC_ERROR;
1081: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1082: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1103: p_count => L_count,
1104: P_return_code => l_return_code);
1105: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1106: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
1107: FND_MSG_PUB.add;
1108: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1109: RAISE FND_API.G_EXC_ERROR;
1110: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1111: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1130: p_count => L_count,
1131: P_return_code => l_return_code);
1132: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1133: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1134: FND_MSG_PUB.add;
1135: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1136: RAISE FND_API.G_EXC_ERROR;
1137: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1138: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1205: COMMIT WORK;
1206: END IF;
1207:
1208:
1209: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1210:
1211: /* Calling publish API to raise create resource role relation event. */
1212: /* added by baianand on 04/09/2003 */
1213:
1235: EXCEPTION
1236: WHEN fnd_api.g_exc_error THEN
1237: ROLLBACK TO ROLE_RELATE_SP;
1238: x_return_status := fnd_api.g_ret_sts_error;
1239: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
1240: p_data => x_msg_data);
1241: WHEN fnd_api.g_exc_unexpected_error THEN
1242: ROLLBACK TO ROLE_RELATE_SP;
1243: x_return_status := fnd_api.g_ret_sts_unexp_error;
1240: p_data => x_msg_data);
1241: WHEN fnd_api.g_exc_unexpected_error THEN
1242: ROLLBACK TO ROLE_RELATE_SP;
1243: x_return_status := fnd_api.g_ret_sts_unexp_error;
1244: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
1245: p_data => x_msg_data);
1246: WHEN OTHERS THEN
1247: ROLLBACK TO ROLE_RELATE_SP;
1248: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
1248: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
1249: fnd_message.set_token('P_SQLCODE',SQLCODE);
1250: fnd_message.set_token('P_SQLERRM',SQLERRM);
1251: fnd_message.set_token('P_API_NAME', l_api_name);
1252: FND_MSG_PUB.add;
1253: x_return_status := fnd_api.g_ret_sts_unexp_error;
1254: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
1255: p_data => x_msg_data);
1256:
1250: fnd_message.set_token('P_SQLERRM',SQLERRM);
1251: fnd_message.set_token('P_API_NAME', l_api_name);
1252: FND_MSG_PUB.add;
1253: x_return_status := fnd_api.g_ret_sts_unexp_error;
1254: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
1255: p_data => x_msg_data);
1256:
1257: END create_resource_role_relate;
1258:
1645:
1646: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1647: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1648: THEN
1649: FND_MSG_PUB.Initialize;
1650: END IF;
1651:
1652:
1653: --GET USER ID AND SYSDATE
1669: p_count => L_count,
1670: P_return_code => l_return_code);
1671: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1672: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1673: FND_MSG_PUB.add;
1674: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1675: RAISE FND_API.G_EXC_ERROR;
1676: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1677: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1696: p_count => L_count,
1697: P_return_code => l_return_code);
1698: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1699: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1700: FND_MSG_PUB.add;
1701: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1702: RAISE FND_API.G_EXC_ERROR;
1703: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1704: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1723: p_count => L_count,
1724: P_return_code => l_return_code);
1725: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
1726: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1727: FND_MSG_PUB.add;
1728: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
1729: RAISE FND_API.G_EXC_ERROR;
1730: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
1731: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1871: --check start date null
1872: IF(l_start_date_active is NULL)
1873: THEN
1874: fnd_message.set_name ('JTF', 'JTF_RS_DATE_RANGE_ERR');
1875: FND_MSG_PUB.add;
1876: RAISE fnd_api.g_exc_error;
1877: END IF;
1878:
1879:
1882: IF(l_start_date_active > l_end_date_active)
1883: THEN
1884:
1885: fnd_message.set_name ('JTF', 'JTF_RS_DATE_RANGE_ERR');
1886: FND_MSG_PUB.add;
1887: RAISE fnd_api.g_exc_error;
1888: END IF;
1889:
1890:
1898: l_role_type_valid);
1899:
1900: if (l_role_type_valid = false) then
1901: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_TYPE_INACTIVE');
1902: FND_MSG_PUB.add;
1903: RAISE fnd_api.g_exc_error;
1904: end if;
1905: END IF;
1906:
1953: CLOSE check_date_cur;
1954: IF(l_date_invalid)
1955: THEN
1956: fnd_message.set_name ('JTF', 'JTF_RS_DATE_RANGE_ERR');
1957: FND_MSG_PUB.add;
1958: RAISE fnd_api.g_exc_error;
1959: END IF;
1960:
1961: --end of overlapping date range check
2002: ELSE
2003:
2004: l_role_valid := FALSE;
2005: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_OR_DATE_ERR');
2006: FND_MSG_PUB.add;
2007: RAISE fnd_api.g_exc_error;
2008: END IF;
2009: close res_role_cur;
2010: ELSIF((l_role_resource_type = 'RS_TEAM_MEMBER') AND
2025:
2026: ELSE
2027: l_role_valid := FALSE;
2028: fnd_message.set_name ('JTF', 'JTF_RS_ROLE_OR_DATE_ERR');
2029: FND_MSG_PUB.add;
2030: RAISE fnd_api.g_exc_error;
2031: END IF;
2032: close grp_role_cur;
2033:
2044: IF((trunc(team_rec.start_date_active) > trunc(l_start_date_active))
2045: OR to_date(to_char(nvl(team_rec.end_date_active, fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR') < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))
2046: THEN
2047: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
2048: FND_MSG_PUB.add;
2049: RAISE fnd_api.g_exc_error;
2050: END IF;
2051:
2052: IF(team_rec.end_date_active is not null AND l_end_date_active is null)
2051:
2052: IF(team_rec.end_date_active is not null AND l_end_date_active is null)
2053: THEN
2054: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
2055: FND_MSG_PUB.add;
2056: RAISE fnd_api.g_exc_error;
2057: END IF;
2058:
2059: ELSIF(l_role_resource_type = 'RS_GROUP_MEMBER')
2066: OR to_date(to_char(nvl(group_rec.end_date_active, fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR') < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))
2067: THEN
2068:
2069: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
2070: FND_MSG_PUB.add;
2071: RAISE fnd_api.g_exc_error;
2072: END IF;
2073:
2074:
2075:
2076: IF(group_rec.end_date_active is not null AND l_end_date_active is null)
2077: THEN
2078: fnd_message.set_name ('JTF', 'JTF_RS_TM_GRP_DT_ERR');
2079: FND_MSG_PUB.add;
2080: RAISE fnd_api.g_exc_error;
2081: END IF;
2082:
2083: --exclusive flag validation
2088: fetch c_exclusive_group_check_cur into c_exclusive_group_check_rec;
2089: IF(c_exclusive_group_check_cur%FOUND)
2090: THEN
2091: fnd_message.set_name ('JTF', 'JTF_RS_RES_USAGE_ERR');
2092: FND_MSG_PUB.add;
2093: RAISE fnd_api.g_exc_error;
2094: END IF;
2095:
2096: close c_exclusive_group_check_cur;
2106: OR (rsc_rec.end_date_active < to_date(to_char(nvl(l_end_date_active, fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR')))
2107: -- OR (rsc_rec.end_date_active < l_end_date_active))
2108: THEN
2109: fnd_message.set_name ('JTF', 'JTF_RS_RES_DATE_ERR');
2110: FND_MSG_PUB.add;
2111: RAISE fnd_api.g_exc_error;
2112: END IF;
2113:
2114: ELSIF(l_role_resource_type = 'RS_GROUP')
2122: OR (to_date(to_char(nvl(group_dt_rec.end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR')
2123: < (to_date(to_char(nvl(l_end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))))
2124: THEN
2125: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DT_ERR');
2126: FND_MSG_PUB.add;
2127: RAISE fnd_api.g_exc_error;
2128: END IF;
2129: ELSIF(l_role_resource_type = 'RS_TEAM')
2130: THEN
2137: OR (to_date(to_char(nvl(team_dt_rec.end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR')
2138: < (to_date(to_char(nvl(l_end_date_active,fnd_api.g_miss_date),'DD-MM-RRRR'),'DD-MM-RRRR'))))
2139: THEN
2140: fnd_message.set_name ('JTF', 'JTF_RS_TEAM_DT_ERR');
2141: FND_MSG_PUB.add;
2142: RAISE fnd_api.g_exc_error;
2143: END IF;
2144: END IF;
2145:
2157: THEN
2158:
2159: x_return_status := fnd_api.g_ret_sts_error;
2160: fnd_message.set_name ('JTF', 'JTF_RS_RES_MEM_DT_ERR');
2161: FND_MSG_PUB.add;
2162: RAISE fnd_api.g_exc_error;
2163: END IF;
2164: close res_team_cur;
2165:
2171:
2172: If(res_group_cur%found)
2173: THEN
2174: fnd_message.set_name ('JTF', 'JTF_RS_RES_MEM_DT_ERR');
2175: FND_MSG_PUB.add;
2176: RAISE fnd_api.g_exc_error;
2177: END IF;
2178: close res_group_cur;
2179:
2191:
2192: If NOT(l_valid)
2193: THEN
2194: --fnd_message.set_name ('JTF', 'JTF_RS_RES_UPD_DT_ERR');
2195: --FND_MSG_PUB.add;
2196: RAISE fnd_api.g_exc_error;
2197: END IF;
2198:
2199: END IF;
2209: EXCEPTION
2210:
2211: WHEN OTHERS THEN
2212: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
2213: fnd_msg_pub.add;
2214: RAISE fnd_api.g_exc_error;
2215:
2216: END;
2217:
2235:
2236: IF(l_return_status <> fnd_api.g_ret_sts_success)
2237: THEN
2238: fnd_message.set_name ('JTF', 'JTF_RS_AUDIT_ERR');
2239: FND_MSG_PUB.add;
2240: IF L_RETURN_STATUS = FND_API.G_RET_STS_ERROR THEN
2241: RAISE FND_API.G_EXC_ERROR;
2242: ELSIF L_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR THEN
2243: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2356: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
2357: fnd_message.set_token('P_SQLCODE',SQLCODE);
2358: fnd_message.set_token('P_SQLERRM',SQLERRM);
2359: fnd_message.set_token('P_API_NAME', l_api_name);
2360: FND_MSG_PUB.add;
2361: RAISE fnd_api.g_exc_unexpected_error;
2362:
2363:
2364: end;
2375: close conc_prog_cur;
2376: fnd_message.set_name ('JTF', 'JTF_RS_CONC_START');
2377: fnd_message.set_token('P_NAME',g_name);
2378: fnd_message.set_token('P_ID',l_request);
2379: FND_MSG_PUB.add;
2380:
2381:
2382: exception when others then
2383: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
2383: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
2384: fnd_message.set_token('P_SQLCODE',SQLCODE);
2385: fnd_message.set_token('P_SQLERRM',SQLERRM);
2386: fnd_message.set_token('P_API_NAME', l_api_name);
2387: FND_MSG_PUB.add;
2388: RAISE fnd_api.g_exc_unexpected_error;
2389: end;
2390:
2391: else
2427: p_count => L_count,
2428: P_return_code => l_return_code);
2429: if( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
2430: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
2431: FND_MSG_PUB.add;
2432: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2433: RAISE FND_API.G_EXC_ERROR;
2434: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2435: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2453: p_count => L_count,
2454: P_return_code => l_return_code);
2455: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
2456: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
2457: FND_MSG_PUB.add;
2458: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2459: RAISE FND_API.G_EXC_ERROR;
2460: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2461: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2482: P_return_code => l_return_code);
2483: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS)
2484: then
2485: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
2486: FND_MSG_PUB.add;
2487: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2488: RAISE FND_API.G_EXC_ERROR;
2489: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2490: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2537: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
2538: -- x_return_status := fnd_api.g_ret_sts_error;
2539:
2540: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
2541: fnd_msg_pub.add;
2542: IF X_RETURN_STATUS = FND_API.G_RET_STS_ERROR THEN
2543: RAISE FND_API.G_EXC_ERROR;
2544: ELSIF X_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR THEN
2545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2562: COMMIT WORK;
2563: END IF;
2564:
2565:
2566: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2567:
2568: EXCEPTION
2569: WHEN fnd_api.g_exc_error THEN
2570: ROLLBACK TO ROLE_RELATE_SP;
2568: EXCEPTION
2569: WHEN fnd_api.g_exc_error THEN
2570: ROLLBACK TO ROLE_RELATE_SP;
2571: x_return_status := fnd_api.g_ret_sts_error;
2572: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
2573: p_data => x_msg_data);
2574: WHEN fnd_api.g_exc_unexpected_error THEN
2575: ROLLBACK TO ROLE_RELATE_SP;
2576: x_return_status := fnd_api.g_ret_sts_unexp_error;
2573: p_data => x_msg_data);
2574: WHEN fnd_api.g_exc_unexpected_error THEN
2575: ROLLBACK TO ROLE_RELATE_SP;
2576: x_return_status := fnd_api.g_ret_sts_unexp_error;
2577: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
2578: p_data => x_msg_data);
2579: WHEN OTHERS THEN
2580: ROLLBACK TO ROLE_RELATE_SP;
2581: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
2581: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
2582: fnd_message.set_token('P_SQLCODE',SQLCODE);
2583: fnd_message.set_token('P_SQLERRM',SQLERRM);
2584: fnd_message.set_token('P_API_NAME', l_api_name);
2585: FND_MSG_PUB.add;
2586: x_return_status := fnd_api.g_ret_sts_unexp_error;
2587: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
2588: p_data => x_msg_data);
2589:
2583: fnd_message.set_token('P_SQLERRM',SQLERRM);
2584: fnd_message.set_token('P_API_NAME', l_api_name);
2585: FND_MSG_PUB.add;
2586: x_return_status := fnd_api.g_ret_sts_unexp_error;
2587: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
2588: p_data => x_msg_data);
2589:
2590: END update_resource_role_relate;
2591:
2765:
2766: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
2767: IF FND_API.To_boolean(P_INIT_MSG_LIST)
2768: THEN
2769: FND_MSG_PUB.Initialize;
2770: END IF;
2771:
2772: -- user hook calls for customer
2773: -- Customer pre- processing section - mandatory
2781: p_count => L_count,
2782: P_return_code => l_return_code);
2783: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
2784: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
2785: FND_MSG_PUB.add;
2786: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2787: RAISE FND_API.G_EXC_ERROR;
2788: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2789: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2806: p_count => L_count,
2807: P_return_code => l_return_code);
2808: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
2809: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
2810: FND_MSG_PUB.add;
2811: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2812: RAISE FND_API.G_EXC_ERROR;
2813: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2814: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2831: p_count => L_count,
2832: P_return_code => l_return_code);
2833: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
2834: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
2835: FND_MSG_PUB.add;
2836: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
2837: RAISE FND_API.G_EXC_ERROR;
2838: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
2839: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2881: chk_type_rec.end_date_active);
2882: FETCH chk_team_cur INTO chk_team_rec;
2883: IF(chk_team_cur%FOUND) THEN
2884: fnd_message.set_name ('JTF', 'JTF_RS_MEM_ROLE_EXIST_ERR');
2885: FND_MSG_PUB.add;
2886: CLOSE chk_team_cur;
2887: RAISE fnd_api.g_exc_error;
2888: END IF;
2889: CLOSE chk_team_cur;
2893: chk_type_rec.end_date_active);
2894: FETCH chk_grp_cur INTO chk_grp_rec;
2895: IF(chk_grp_cur%FOUND) THEN
2896: fnd_message.set_name ('JTF', 'JTF_RS_MEM_ROLE_EXIST_ERR');
2897: FND_MSG_PUB.add;
2898: CLOSE chk_grp_cur;
2899: RAISE fnd_api.g_exc_error;
2900: END IF;
2901: CLOSE chk_grp_cur;
2923:
2924: IF(l_return_status <> fnd_api.g_ret_sts_success)
2925: THEN
2926: --fnd_message.set_name ('JTF', 'JTF_RS_AUDIT_ERR');
2927: --FND_MSG_PUB.add;
2928: IF L_RETURN_STATUS = FND_API.G_RET_STS_ERROR THEN
2929: RAISE FND_API.G_EXC_ERROR;
2930: ELSIF L_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR THEN
2931: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3020: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
3021: fnd_message.set_token('P_SQLCODE',SQLCODE);
3022: fnd_message.set_token('P_SQLERRM',SQLERRM);
3023: fnd_message.set_token('P_API_NAME', l_api_name);
3024: FND_MSG_PUB.add;
3025: RAISE fnd_api.g_exc_unexpected_error;
3026:
3027:
3028: end;
3039:
3040: fnd_message.set_name ('JTF', 'JTF_RS_CONC_START');
3041: fnd_message.set_token('P_NAME',g_name);
3042: fnd_message.set_token('P_ID',l_request);
3043: FND_MSG_PUB.add;
3044:
3045: exception when others then
3046: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
3047: fnd_message.set_token('P_SQLCODE',SQLCODE);
3046: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
3047: fnd_message.set_token('P_SQLCODE',SQLCODE);
3048: fnd_message.set_token('P_SQLERRM',SQLERRM);
3049: fnd_message.set_token('P_API_NAME', l_api_name);
3050: FND_MSG_PUB.add;
3051:
3052: RAISE fnd_api.g_exc_unexpected_error;
3053: end;
3054:
3089: p_count => L_count,
3090: P_return_code => l_return_code);
3091: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
3092: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
3093: FND_MSG_PUB.add;
3094: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
3095: RAISE FND_API.G_EXC_ERROR;
3096: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
3097: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3114: p_count => L_count,
3115: P_return_code => l_return_code);
3116: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
3117: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
3118: FND_MSG_PUB.add;
3119: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
3120: RAISE FND_API.G_EXC_ERROR;
3121: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
3122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3140: p_count => L_count,
3141: P_return_code => l_return_code);
3142: if ( l_return_code <> FND_API.G_RET_STS_SUCCESS) then
3143: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
3144: FND_MSG_PUB.add;
3145: IF l_return_code = FND_API.G_RET_STS_ERROR THEN
3146: RAISE FND_API.G_EXC_ERROR;
3147: ELSIF l_return_code = FND_API.G_RET_STS_UNEXP_ERROR THEN
3148: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3194: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
3195: --x_return_status := fnd_api.g_ret_sts_error;
3196:
3197: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
3198: fnd_msg_pub.add;
3199:
3200: IF X_RETURN_STATUS = FND_API.G_RET_STS_ERROR THEN
3201: RAISE FND_API.G_EXC_ERROR;
3202: ELSIF X_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR THEN
3236: end;
3237:
3238: /* End of publish API call */
3239:
3240: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
3241:
3242: EXCEPTION
3243: WHEN fnd_api.g_exc_error THEN
3244: ROLLBACK TO ROLE_RELATE_SP;
3242: EXCEPTION
3243: WHEN fnd_api.g_exc_error THEN
3244: ROLLBACK TO ROLE_RELATE_SP;
3245: x_return_status := fnd_api.g_ret_sts_error;
3246: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
3247: p_data => x_msg_data);
3248: WHEN fnd_api.g_exc_unexpected_error THEN
3249: ROLLBACK TO ROLE_RELATE_SP;
3250: x_return_status := fnd_api.g_ret_sts_unexp_error;
3247: p_data => x_msg_data);
3248: WHEN fnd_api.g_exc_unexpected_error THEN
3249: ROLLBACK TO ROLE_RELATE_SP;
3250: x_return_status := fnd_api.g_ret_sts_unexp_error;
3251: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
3252: p_data => x_msg_data);
3253: WHEN OTHERS THEN
3254: ROLLBACK TO ROLE_RELATE_SP;
3255: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
3255: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
3256: fnd_message.set_token('P_SQLCODE',SQLCODE);
3257: fnd_message.set_token('P_SQLERRM',SQLERRM);
3258: fnd_message.set_token('P_API_NAME', l_api_name);
3259: FND_MSG_PUB.add;
3260: x_return_status := fnd_api.g_ret_sts_unexp_error;
3261: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
3262: p_data => x_msg_data);
3263:
3257: fnd_message.set_token('P_SQLERRM',SQLERRM);
3258: fnd_message.set_token('P_API_NAME', l_api_name);
3259: FND_MSG_PUB.add;
3260: x_return_status := fnd_api.g_ret_sts_unexp_error;
3261: FND_MSG_PUB.count_and_get (p_count => x_msg_count,
3262: p_data => x_msg_data);
3263:
3264: END delete_resource_role_relate;
3265: