96: l_object_version_number JTF_RS_RESOURCE_SKILLS.OBJECT_VERSION_NUMBER%TYPE;
97:
98: BEGIN
99:
100: x_return_status := fnd_api.g_ret_sts_success ;
101:
102: FOR component_skills_curr_rec in component_skills_curr( p_product_id, p_product_org_id, p_resource_id)
103: LOOP
104:
143: X_MSG_COUNT => X_MSG_COUNT,
144: X_MSG_DATA => X_MSG_DATA
145: );
146:
147: EXIT WHEN (x_return_status <> fnd_api.g_ret_sts_success );
148:
149: END LOOP;
150:
151: END UPDATE_EXISTING_COMP_SKILLS;
206: l_resource_skill_id JTF_RS_RESOURCE_SKILLS.RESOURCE_SKILL_ID%TYPE;
207:
208: BEGIN
209:
210: x_return_status := fnd_api.g_ret_sts_success ;
211:
212: FOR unrated_component_curr_rec IN unrated_component_curr( p_product_id, p_product_org_id, p_resource_id)
213: LOOP
214: -- Create skill rating with default subcomponent_id
249: X_RESOURCE_SKILL_ID => l_resource_skill_id
250: );
251:
252:
253: EXIT WHEN (x_return_status <> fnd_api.g_ret_sts_success );
254: END LOOP;
255:
256: END CREATE_UNRATED_COMP_SKILLS;
257:
321: l_object_version_number JTF_RS_RESOURCE_SKILLS.OBJECT_VERSION_NUMBER%TYPE;
322:
323: BEGIN
324:
325: x_return_status := fnd_api.g_ret_sts_success ;
326:
327: FOR product_skills_curr_rec in product_skills_curr( p_category_id, p_resource_id)
328: LOOP
329:
369: X_MSG_DATA => X_MSG_DATA
370: );
371:
372:
373: EXIT WHEN (x_return_status <> fnd_api.g_ret_sts_success );
374:
375: END LOOP;
376:
377: END UPDATE_EXISTING_PROD_SKILLS;
437: l_resource_skill_id JTF_RS_RESOURCE_SKILLS.RESOURCE_SKILL_ID%TYPE;
438:
439: BEGIN
440:
441: x_return_status := fnd_api.g_ret_sts_success ;
442:
443: FOR unrated_product_curr_rec IN unrated_product_curr( p_category_id, p_resource_id)
444: LOOP
445: -- Create skill rating with default product_id
480: X_RESOURCE_SKILL_ID => l_resource_skill_id
481: );
482:
483:
484: EXIT WHEN (x_return_status <> fnd_api.g_ret_sts_success );
485: END LOOP;
486:
487: END CREATE_UNRATED_PROD_SKILLS;
488:
544: BEGIN
545: --Standard Start of API SAVEPOINT
546: SAVEPOINT CREATE_RESOURCE_SKILLS_SP;
547:
548: x_return_status := fnd_api.g_ret_sts_success;
549:
550: --Standard Call to check API compatibility
551: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
552: THEN
547:
548: x_return_status := fnd_api.g_ret_sts_success;
549:
550: --Standard Call to check API compatibility
551: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
552: THEN
553: RAISE FND_API.G_EXC_ERROR;
554: END IF;
555:
549:
550: --Standard Call to check API compatibility
551: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
552: THEN
553: RAISE FND_API.G_EXC_ERROR;
554: END IF;
555:
556: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
557: IF FND_API.To_boolean(P_INIT_MSG_LIST)
553: RAISE FND_API.G_EXC_ERROR;
554: END IF;
555:
556: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
557: IF FND_API.To_boolean(P_INIT_MSG_LIST)
558: THEN
559: FND_MSG_PUB.Initialize;
560: END IF;
561:
600: X_RETURN_STATUS := l_return_status;
601: X_MSG_COUNT := l_msg_count;
602: X_MSG_DATA := l_msg_data;
603:
604: IF(l_return_status <> fnd_api.g_ret_sts_success)
605: THEN
606: x_return_status := l_return_status ;
607: RAISE fnd_api.g_exc_error;
608: END IF;
603:
604: IF(l_return_status <> fnd_api.g_ret_sts_success)
605: THEN
606: x_return_status := l_return_status ;
607: RAISE fnd_api.g_exc_error;
608: END IF;
609:
610:
611: --standard commit
608: END IF;
609:
610:
611: --standard commit
612: IF fnd_api.to_boolean (p_commit)
613: THEN
614: COMMIT WORK;
615: END IF;
616:
616:
617: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
618:
619: EXCEPTION
620: WHEN fnd_api.g_exc_unexpected_error
621: THEN
622:
623: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
624: x_return_status := fnd_api.g_ret_sts_unexp_error;
620: WHEN fnd_api.g_exc_unexpected_error
621: THEN
622:
623: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
624: x_return_status := fnd_api.g_ret_sts_unexp_error;
625: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
626: WHEN fnd_api.g_exc_error
627: THEN
628: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
622:
623: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
624: x_return_status := fnd_api.g_ret_sts_unexp_error;
625: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
626: WHEN fnd_api.g_exc_error
627: THEN
628: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
629: --x_return_status := fnd_api.g_ret_sts_error;
630: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
625: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
626: WHEN fnd_api.g_exc_error
627: THEN
628: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
629: --x_return_status := fnd_api.g_ret_sts_error;
630: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
631: WHEN OTHERS
632: THEN
633: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
635: fnd_message.set_token('P_SQLCODE',SQLCODE);
636: fnd_message.set_token('P_SQLERRM',SQLERRM);
637: fnd_message.set_token('P_API_NAME', l_api_name);
638: FND_MSG_PUB.add;
639: x_return_status := fnd_api.g_ret_sts_unexp_error;
640: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
641:
642: END CREATE_RESOURCE_SKILLS;
643:
699: BEGIN
700: --Standard Start of API SAVEPOINT
701: SAVEPOINT UPDATE_RESOURCE_SKILLS_SP;
702:
703: x_return_status := fnd_api.g_ret_sts_success;
704:
705: --Standard Call to check API compatibility
706: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
707: THEN
702:
703: x_return_status := fnd_api.g_ret_sts_success;
704:
705: --Standard Call to check API compatibility
706: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
707: THEN
708: RAISE FND_API.G_EXC_ERROR;
709: END IF;
710:
704:
705: --Standard Call to check API compatibility
706: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
707: THEN
708: RAISE FND_API.G_EXC_ERROR;
709: END IF;
710:
711: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
712: IF FND_API.To_boolean(P_INIT_MSG_LIST)
708: RAISE FND_API.G_EXC_ERROR;
709: END IF;
710:
711: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
712: IF FND_API.To_boolean(P_INIT_MSG_LIST)
713: THEN
714: FND_MSG_PUB.Initialize;
715: END IF;
716:
756: X_MSG_COUNT := l_msg_count;
757: X_MSG_DATA := l_msg_data;
758: P_OBJECT_VERSION_NUM := l_object_version_number;
759:
760: IF(l_return_status <> fnd_api.g_ret_sts_success)
761: THEN
762: x_return_status := l_return_status ;
763: RAISE fnd_api.g_exc_error;
764: END IF;
759:
760: IF(l_return_status <> fnd_api.g_ret_sts_success)
761: THEN
762: x_return_status := l_return_status ;
763: RAISE fnd_api.g_exc_error;
764: END IF;
765:
766:
767: IF fnd_api.to_boolean (p_commit)
763: RAISE fnd_api.g_exc_error;
764: END IF;
765:
766:
767: IF fnd_api.to_boolean (p_commit)
768: THEN
769: COMMIT WORK;
770: END IF;
771:
771:
772: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
773:
774: EXCEPTION
775: WHEN fnd_api.g_exc_error
776: THEN
777: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
778: --x_return_status := fnd_api.g_ret_sts_error;
779: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
774: EXCEPTION
775: WHEN fnd_api.g_exc_error
776: THEN
777: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
778: --x_return_status := fnd_api.g_ret_sts_error;
779: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
780:
781: WHEN fnd_api.g_exc_unexpected_error
782: THEN
777: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
778: --x_return_status := fnd_api.g_ret_sts_error;
779: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
780:
781: WHEN fnd_api.g_exc_unexpected_error
782: THEN
783: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
784: x_return_status := fnd_api.g_ret_sts_unexp_error;
785: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
780:
781: WHEN fnd_api.g_exc_unexpected_error
782: THEN
783: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
784: x_return_status := fnd_api.g_ret_sts_unexp_error;
785: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
786: WHEN OTHERS
787: THEN
788: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
790: fnd_message.set_token('P_SQLCODE',SQLCODE);
791: fnd_message.set_token('P_SQLERRM',SQLERRM);
792: fnd_message.set_token('P_API_NAME',l_api_name);
793: FND_MSG_PUB.add;
794: x_return_status := fnd_api.g_ret_sts_unexp_error;
795: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
796: END update_resource_skills;
797:
798:
825: BEGIN
826: --Standard Start of API SAVEPOINT
827: SAVEPOINT DELETE_RESOURCE_SKILLS_SP;
828:
829: x_return_status := fnd_api.g_ret_sts_success;
830:
831: --Standard Call to check API compatibility
832: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
833: THEN
828:
829: x_return_status := fnd_api.g_ret_sts_success;
830:
831: --Standard Call to check API compatibility
832: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
833: THEN
834: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
835: END IF;
836:
830:
831: --Standard Call to check API compatibility
832: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
833: THEN
834: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
835: END IF;
836:
837: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
838: IF FND_API.To_boolean(P_INIT_MSG_LIST)
834: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
835: END IF;
836:
837: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
838: IF FND_API.To_boolean(P_INIT_MSG_LIST)
839: THEN
840: FND_MSG_PUB.Initialize;
841: END IF;
842:
854: X_RETURN_STATUS := l_return_status;
855: X_MSG_COUNT := l_msg_count;
856: X_MSG_DATA := l_msg_data;
857:
858: IF(l_return_status <> fnd_api.g_ret_sts_success)
859: THEN
860: x_return_status := l_return_status ;
861: RAISE fnd_api.g_exc_error;
862: END IF;
857:
858: IF(l_return_status <> fnd_api.g_ret_sts_success)
859: THEN
860: x_return_status := l_return_status ;
861: RAISE fnd_api.g_exc_error;
862: END IF;
863:
864: IF fnd_api.to_boolean (p_commit)
865: THEN
860: x_return_status := l_return_status ;
861: RAISE fnd_api.g_exc_error;
862: END IF;
863:
864: IF fnd_api.to_boolean (p_commit)
865: THEN
866: COMMIT WORK;
867: END IF;
868:
868:
869: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
870:
871: EXCEPTION
872: WHEN fnd_api.g_exc_unexpected_error
873: THEN
874: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
875: x_return_status := fnd_api.g_ret_sts_unexp_error;
876: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
871: EXCEPTION
872: WHEN fnd_api.g_exc_unexpected_error
873: THEN
874: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
875: x_return_status := fnd_api.g_ret_sts_unexp_error;
876: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
877: WHEN fnd_api.g_exc_error
878: THEN
879: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
873: THEN
874: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
875: x_return_status := fnd_api.g_ret_sts_unexp_error;
876: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
877: WHEN fnd_api.g_exc_error
878: THEN
879: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
880: --x_return_status := fnd_api.g_ret_sts_error;
881: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
876: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
877: WHEN fnd_api.g_exc_error
878: THEN
879: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
880: --x_return_status := fnd_api.g_ret_sts_error;
881: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
882: WHEN OTHERS
883: THEN
884: ROLLBACK TO DELETE_RESOURCE_SKILLS_SP;
886: fnd_message.set_token('P_SQLCODE',SQLCODE);
887: fnd_message.set_token('P_SQLERRM',SQLERRM);
888: fnd_message.set_token('P_API_NAME',l_api_name);
889: FND_MSG_PUB.add;
890: x_return_status := fnd_api.g_ret_sts_unexp_error;
891: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
892:
893: END delete_resource_skills;
894:
935:
936:
937: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_RESOURCE_SKILLS';
938: l_api_version CONSTANT NUMBER :=1.0;
939: l_commit CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
940: l_init_msg_list CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
941:
942: l_product_org_id JTF_RS_RESOURCE_SKILLS.PRODUCT_ORG_ID%TYPE;
943:
936:
937: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_RESOURCE_SKILLS';
938: l_api_version CONSTANT NUMBER :=1.0;
939: l_commit CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
940: l_init_msg_list CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
941:
942: l_product_org_id JTF_RS_RESOURCE_SKILLS.PRODUCT_ORG_ID%TYPE;
943:
944: l_cascade_option NUMBER;
953: SAVEPOINT CREATE_RESOURCE_SKILLS_SP;
954:
955:
956: l_cascade_option := p_cascade_option;
957: x_return_status := fnd_api.g_ret_sts_success;
958: l_product_org_id := p_product_org_id ;
959:
960: --Standard Call to check API compatibility
961: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
957: x_return_status := fnd_api.g_ret_sts_success;
958: l_product_org_id := p_product_org_id ;
959:
960: --Standard Call to check API compatibility
961: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
962: THEN
963: RAISE FND_API.G_EXC_ERROR;
964: END IF;
965:
959:
960: --Standard Call to check API compatibility
961: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
962: THEN
963: RAISE FND_API.G_EXC_ERROR;
964: END IF;
965:
966: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
967: IF FND_API.To_boolean(P_INIT_MSG_LIST)
963: RAISE FND_API.G_EXC_ERROR;
964: END IF;
965:
966: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
967: IF FND_API.To_boolean(P_INIT_MSG_LIST)
968: THEN
969: FND_MSG_PUB.Initialize;
970: END IF;
971:
985: (l_cascade_option = CASCADE_ALL )
986: )
987: )
988: THEN
989: RAISE fnd_api.g_exc_unexpected_error;
990: END IF;
991:
992: IF ( l_product_org_id is NULL ) THEN
993: l_product_org_id := nvl(JTF_RESOURCE_UTL.GET_INVENTORY_ORG_ID, -1);
1041: X_MSG_DATA => X_MSG_DATA,
1042: X_RESOURCE_SKILL_ID => x_resource_skill_id
1043: );
1044:
1045: IF (x_return_status <> fnd_api.g_ret_sts_success)
1046: THEN
1047: RAISE fnd_api.g_exc_error;
1048: END IF;
1049:
1043: );
1044:
1045: IF (x_return_status <> fnd_api.g_ret_sts_success)
1046: THEN
1047: RAISE fnd_api.g_exc_error;
1048: END IF;
1049:
1050: ELSE /* else of (l_subcategory is null) AND (P_CATEGORY_ID is NOT NULL) AND (l_cascade_option = DONT_CASCADE)*/
1051:
1067: X_MSG_COUNT => X_MSG_COUNT,
1068: X_MSG_DATA => X_MSG_DATA
1069: );
1070:
1071: IF (x_return_status <> fnd_api.g_ret_sts_success)
1072: THEN
1073: RAISE fnd_api.g_exc_error;
1074: END IF;
1075: ELSE
1069: );
1070:
1071: IF (x_return_status <> fnd_api.g_ret_sts_success)
1072: THEN
1073: RAISE fnd_api.g_exc_error;
1074: END IF;
1075: ELSE
1076: UPDATE_EXISTING_COMP_SKILLS
1077: (
1088: X_MSG_COUNT => X_MSG_COUNT,
1089: X_MSG_DATA => X_MSG_DATA
1090: );
1091:
1092: IF (x_return_status <> fnd_api.g_ret_sts_success)
1093: THEN
1094: RAISE fnd_api.g_exc_error;
1095: END IF;
1096: END IF;
1090: );
1091:
1092: IF (x_return_status <> fnd_api.g_ret_sts_success)
1093: THEN
1094: RAISE fnd_api.g_exc_error;
1095: END IF;
1096: END IF;
1097: END IF;
1098:
1134: X_MSG_DATA => X_MSG_DATA,
1135: X_RESOURCE_SKILL_ID => x_resource_skill_id
1136: );
1137:
1138: IF (x_return_status <> fnd_api.g_ret_sts_success)
1139: THEN
1140: RAISE fnd_api.g_exc_error;
1141: END IF;
1142:
1136: );
1137:
1138: IF (x_return_status <> fnd_api.g_ret_sts_success)
1139: THEN
1140: RAISE fnd_api.g_exc_error;
1141: END IF;
1142:
1143: -- Create component level skill ratings for unrated components of the product
1144:
1180: X_MSG_COUNT => X_MSG_COUNT,
1181: X_MSG_DATA => X_MSG_DATA
1182: );
1183:
1184: IF (x_return_status <> fnd_api.g_ret_sts_success)
1185: THEN
1186: RAISE fnd_api.g_exc_error;
1187: END IF;
1188: ELSE
1182: );
1183:
1184: IF (x_return_status <> fnd_api.g_ret_sts_success)
1185: THEN
1186: RAISE fnd_api.g_exc_error;
1187: END IF;
1188: ELSE
1189: CREATE_UNRATED_COMP_SKILLS(
1190: P_API_VERSION => l_api_version,
1219: X_MSG_COUNT => X_MSG_COUNT,
1220: X_MSG_DATA => X_MSG_DATA
1221: );
1222:
1223: IF (x_return_status <> fnd_api.g_ret_sts_success)
1224: THEN
1225: RAISE fnd_api.g_exc_error;
1226: END IF;
1227:
1221: );
1222:
1223: IF (x_return_status <> fnd_api.g_ret_sts_success)
1224: THEN
1225: RAISE fnd_api.g_exc_error;
1226: END IF;
1227:
1228: END IF;
1229: END IF;
1230:
1231: END IF; /* End of if (l_subcategory is null) AND (P_CATEGORY_ID is NOT NULL) AND (l_cascade_option = DONT_CASCADE)*/
1232:
1233: --standard commit
1234: IF fnd_api.to_boolean (p_commit)
1235: THEN
1236: COMMIT WORK;
1237: END IF;
1238:
1237: END IF;
1238:
1239:
1240: EXCEPTION
1241: WHEN fnd_api.g_exc_unexpected_error
1242: THEN
1243: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1244: x_return_status := fnd_api.g_ret_sts_unexp_error;
1245: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1240: EXCEPTION
1241: WHEN fnd_api.g_exc_unexpected_error
1242: THEN
1243: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1244: x_return_status := fnd_api.g_ret_sts_unexp_error;
1245: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1246: WHEN fnd_api.g_exc_error
1247: THEN
1248: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1242: THEN
1243: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1244: x_return_status := fnd_api.g_ret_sts_unexp_error;
1245: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1246: WHEN fnd_api.g_exc_error
1247: THEN
1248: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1249: x_return_status := fnd_api.g_ret_sts_error;
1250: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1245: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1246: WHEN fnd_api.g_exc_error
1247: THEN
1248: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1249: x_return_status := fnd_api.g_ret_sts_error;
1250: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1251: WHEN OTHERS
1252: THEN
1253: ROLLBACK TO CREATE_RESOURCE_SKILLS_SP;
1255: fnd_message.set_token('P_SQLCODE',SQLCODE);
1256: fnd_message.set_token('P_SQLERRM',SQLERRM);
1257: fnd_message.set_token('P_API_NAME', l_api_name);
1258: FND_MSG_PUB.add;
1259: x_return_status := fnd_api.g_ret_sts_unexp_error;
1260: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1261:
1262: END CREATE_RESOURCE_SKILLS;
1263:
1342: skill_curr_rec skill_curr%rowtype;
1343:
1344: l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_RESOURCE_SKILLS';
1345: l_api_version CONSTANT NUMBER :=1.0;
1346: l_commit CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
1347: l_init_msg_list CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
1348:
1349: l_cascade_option NUMBER;
1350: l_return_status VARCHAR2(200);
1343:
1344: l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_RESOURCE_SKILLS';
1345: l_api_version CONSTANT NUMBER :=1.0;
1346: l_commit CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
1347: l_init_msg_list CONSTANT VARCHAR2(1):= FND_API.G_FALSE;
1348:
1349: l_cascade_option NUMBER;
1350: l_return_status VARCHAR2(200);
1351: l_msg_count NUMBER;
1359:
1360:
1361: -- Initialize local variable
1362: l_cascade_option := p_cascade_option;
1363: x_return_status := fnd_api.g_ret_sts_success;
1364: l_return_status := fnd_api.g_ret_sts_success;
1365:
1366:
1367: --Standard Call to check API compatibility
1360:
1361: -- Initialize local variable
1362: l_cascade_option := p_cascade_option;
1363: x_return_status := fnd_api.g_ret_sts_success;
1364: l_return_status := fnd_api.g_ret_sts_success;
1365:
1366:
1367: --Standard Call to check API compatibility
1368: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1364: l_return_status := fnd_api.g_ret_sts_success;
1365:
1366:
1367: --Standard Call to check API compatibility
1368: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1369: THEN
1370: RAISE FND_API.G_EXC_ERROR;
1371: END IF;
1372:
1366:
1367: --Standard Call to check API compatibility
1368: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1369: THEN
1370: RAISE FND_API.G_EXC_ERROR;
1371: END IF;
1372:
1373: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1374: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1370: RAISE FND_API.G_EXC_ERROR;
1371: END IF;
1372:
1373: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1374: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1375: THEN
1376: FND_MSG_PUB.Initialize;
1377: END IF;
1378:
1388: (l_cascade_option = CASCADE_ALL )
1389: )
1390: )
1391: THEN
1392: RAISE fnd_api.g_exc_unexpected_error;
1393: END IF;
1394:
1395:
1396: -- Update resource skill
1431: X_MSG_COUNT => X_MSG_COUNT,
1432: X_MSG_DATA => X_MSG_DATA
1433: );
1434:
1435: IF (x_return_status <> fnd_api.g_ret_sts_success)
1436: THEN
1437: RAISE fnd_api.g_exc_error;
1438: END IF;
1439:
1433: );
1434:
1435: IF (x_return_status <> fnd_api.g_ret_sts_success)
1436: THEN
1437: RAISE fnd_api.g_exc_error;
1438: END IF;
1439:
1440: IF ( ( l_cascade_option = DO_CASCADE) OR ( l_cascade_option = CASCADE_ALL ) )
1441: THEN
1482: X_MSG_DATA => X_MSG_DATA
1483: );
1484: END IF;
1485: END IF;
1486: IF (x_return_status <> fnd_api.g_ret_sts_success)
1487: THEN
1488: RAISE fnd_api.g_exc_error;
1489: END IF;
1490:
1484: END IF;
1485: END IF;
1486: IF (x_return_status <> fnd_api.g_ret_sts_success)
1487: THEN
1488: RAISE fnd_api.g_exc_error;
1489: END IF;
1490:
1491: -- Create component level skill rating for unrated component
1492: IF (SKILL_CURR_REC.PRODUCT_ID IS NULL) THEN
1559: X_MSG_COUNT => X_MSG_COUNT,
1560: X_MSG_DATA => X_MSG_DATA
1561: );
1562: END IF;
1563: IF (x_return_status <> fnd_api.g_ret_sts_success)
1564: THEN
1565: RAISE fnd_api.g_exc_error;
1566: END IF;
1567: END IF;
1561: );
1562: END IF;
1563: IF (x_return_status <> fnd_api.g_ret_sts_success)
1564: THEN
1565: RAISE fnd_api.g_exc_error;
1566: END IF;
1567: END IF;
1568: END IF;
1569: IF skill_curr%ISOPEN THEN
1572:
1573: END IF;
1574:
1575: --standard commit
1576: IF fnd_api.to_boolean (p_commit)
1577: THEN
1578: COMMIT WORK;
1579: END IF;
1580:
1578: COMMIT WORK;
1579: END IF;
1580:
1581: EXCEPTION
1582: WHEN fnd_api.g_exc_unexpected_error
1583: THEN
1584: IF skill_curr%ISOPEN THEN
1585: CLOSE skill_curr;
1586: END IF;
1584: IF skill_curr%ISOPEN THEN
1585: CLOSE skill_curr;
1586: END IF;
1587: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
1588: x_return_status := fnd_api.g_ret_sts_unexp_error;
1589: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1590: WHEN fnd_api.g_exc_error
1591: THEN
1592: IF skill_curr%ISOPEN THEN
1586: END IF;
1587: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
1588: x_return_status := fnd_api.g_ret_sts_unexp_error;
1589: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1590: WHEN fnd_api.g_exc_error
1591: THEN
1592: IF skill_curr%ISOPEN THEN
1593: CLOSE skill_curr;
1594: END IF;
1592: IF skill_curr%ISOPEN THEN
1593: CLOSE skill_curr;
1594: END IF;
1595: ROLLBACK TO UPDATE_RESOURCE_SKILLS_SP;
1596: x_return_status := fnd_api.g_ret_sts_error;
1597: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1598: WHEN OTHERS
1599: THEN
1600: IF skill_curr%ISOPEN THEN
1605: fnd_message.set_token('P_SQLCODE',SQLCODE);
1606: fnd_message.set_token('P_SQLERRM',SQLERRM);
1607: fnd_message.set_token('P_API_NAME', l_api_name);
1608: FND_MSG_PUB.add;
1609: x_return_status := fnd_api.g_ret_sts_unexp_error;
1610: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1611:
1612: END UPDATE_RESOURCE_SKILLS;
1613: END jtf_rs_resource_skills_pub;