DBA Data[Home] [Help]

APPS.QA_SPECS_PUB dependencies on FND_API

Line 283: RAISE fnd_api.g_exc_error;

279: IF c%NOTFOUND THEN
280: CLOSE c;
281: fnd_message.set_name('QA', 'QA_API_INVALID_ELEMENT');
282: fnd_msg_pub.add();
283: RAISE fnd_api.g_exc_error;
284: END IF;
285:
286: CLOSE c;
287: RETURN l_char_id;

Line 318: RAISE fnd_api.g_exc_error;

314:
315: IF NOT l_found THEN
316: fnd_message.set_name('QA', 'QA_API_SPEC_MUST_HAVE_CHARS');
317: fnd_msg_pub.add();
318: RAISE fnd_api.g_exc_error;
319: END IF;
320:
321: END check_for_spec_element;
322:

Line 359: RAISE fnd_api.g_exc_error;

355:
356: IF (l_item_id IS NULL) THEN
357: fnd_message.set_name('QA', 'QA_API_INVALID_ITEM_NAME');
358: fnd_msg_pub.add();
359: RAISE fnd_api.g_exc_error;
360: ELSE
361: l_revision_flag := get_revision_flag(l_item_id, p_org_id);
362: IF (l_revision_flag = 1) THEN
363:

Line 367: RAISE fnd_api.g_exc_error;

363:
364: IF (p_item_revision IS NOT NULL) THEN
365: fnd_message.set_name('QA', 'QA_API_REVISION_CONTROLLED');
366: fnd_msg_pub.add();
367: RAISE fnd_api.g_exc_error;
368: END IF;
369:
370: ELSIF (l_revision_flag = 2) and (p_item_revision IS NULL) THEN
371: fnd_message.set_name('QA', 'QA_API_MANDATORY_REVISION');

Line 373: RAISE fnd_api.g_exc_error;

369:
370: ELSIF (l_revision_flag = 2) and (p_item_revision IS NULL) THEN
371: fnd_message.set_name('QA', 'QA_API_MANDATORY_REVISION');
372: fnd_msg_pub.add();
373: RAISE fnd_api.g_exc_error;
374:
375: ELSE
376: IF NOT qa_plan_element_api.validate_revision(p_org_id,
377: l_item_id, p_item_revision) THEN

Line 380: RAISE fnd_api.g_exc_error;

376: IF NOT qa_plan_element_api.validate_revision(p_org_id,
377: l_item_id, p_item_revision) THEN
378: fnd_message.set_name('QA', 'QA_API_INVALID_REVISION');
379: fnd_msg_pub.add();
380: RAISE fnd_api.g_exc_error;
381: END IF;
382: END IF;
383: END IF;
384:

Line 407: RAISE fnd_api.g_exc_error;

403: temp_number := to_number(p_value);
404: EXCEPTION WHEN OTHERS THEN
405: fnd_message.set_name('QA', 'QA_INVALID_NUMBER');
406: fnd_msg_pub.add();
407: RAISE fnd_api.g_exc_error;
408: END;
409:
410: ELSIF p_datatype = qa_ss_const.date_datatype THEN
411: BEGIN

Line 416: RAISE fnd_api.g_exc_error;

412: temp_date := qltdate.any_to_date(p_value);
413: EXCEPTION WHEN OTHERS THEN
414: fnd_message.set_name('QA', 'QA_INVALID_DATE');
415: fnd_msg_pub.add();
416: RAISE fnd_api.g_exc_error;
417: END;
418: END IF;
419:
420: END validate_datatype;

Line 488: RAISE fnd_api.g_exc_error;

484:
485: IF (l_category_set_id IS NULL) THEN
486: fnd_message.set_name('QA', 'QA_API_INVALID_CATEGORY_SET');
487: fnd_msg_pub.add();
488: RAISE fnd_api.g_exc_error;
489: END IF;
490:
491: RETURN l_category_set_id;
492:

Line 535: RAISE fnd_api.g_exc_error;

531:
532: IF (l_category_id IS NULL) THEN
533: fnd_message.set_name('QA', 'QA_API_INVALID_CATEGORY');
534: fnd_msg_pub.add();
535: RAISE fnd_api.g_exc_error;
536: END IF;
537:
538: RETURN l_category_id;
539:

Line 565: RAISE fnd_api.g_exc_error;

561: IF c%NOTFOUND THEN
562: CLOSE c;
563: fnd_message.set_name('QA', 'QA_API_SPEC_NAME_NOT_FOUND');
564: fnd_msg_pub.add();
565: RAISE fnd_api.g_exc_error;
566: END IF;
567:
568: CLOSE c;
569:

Line 626: IF p_flag = fnd_api.g_true THEN

622: RETURN NUMBER IS
623:
624: BEGIN
625:
626: IF p_flag = fnd_api.g_true THEN
627: RETURN 1;
628: END IF;
629:
630: RETURN 2;

Line 753: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

749: --
750:
751: PROCEDURE create_specification(
752: p_api_version IN NUMBER,
753: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
754: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,
755: p_user_name IN VARCHAR2 := NULL,
756: p_spec_name IN VARCHAR2,
757: p_organization_code IN VARCHAR2,

Line 754: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,

750:
751: PROCEDURE create_specification(
752: p_api_version IN NUMBER,
753: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
754: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,
755: p_user_name IN VARCHAR2 := NULL,
756: p_spec_name IN VARCHAR2,
757: p_organization_code IN VARCHAR2,
758: p_reference_spec IN VARCHAR2 := NULL,

Line 834: IF NOT fnd_api.compatible_api_call (

830:
831: SAVEPOINT create_specification_pub;
832:
833: -- Standard call to check for call compatibility.
834: IF NOT fnd_api.compatible_api_call (
835: l_api_version,
836: p_api_version,
837: l_api_name,
838: g_pkg_name) THEN

Line 839: RAISE fnd_api.g_exc_unexpected_error;

835: l_api_version,
836: p_api_version,
837: l_api_name,
838: g_pkg_name) THEN
839: RAISE fnd_api.g_exc_unexpected_error;
840: END IF;
841:
842: -- Initialize message list if p_init_msg_list is set to TRUE.
843: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 843: IF fnd_api.to_boolean(p_init_msg_list) THEN

839: RAISE fnd_api.g_exc_unexpected_error;
840: END IF;
841:
842: -- Initialize message list if p_init_msg_list is set to TRUE.
843: IF fnd_api.to_boolean(p_init_msg_list) THEN
844: fnd_msg_pub.initialize;
845: END IF;
846:
847:

Line 849: x_return_status := fnd_api.g_ret_sts_success;

845: END IF;
846:
847:
848: -- Initialize API return status to success
849: x_return_status := fnd_api.g_ret_sts_success;
850:
851: l_user_id := get_user_id(p_user_name);
852: IF l_user_id = -1 THEN
853: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 855: raise fnd_api.g_exc_error;

851: l_user_id := get_user_id(p_user_name);
852: IF l_user_id = -1 THEN
853: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
854: fnd_msg_pub.add();
855: raise fnd_api.g_exc_error;
856: END IF;
857:
858: -- Algorithm
859: --

Line 899: RAISE fnd_api.g_exc_error;

895:
896: IF (spec_exists(p_spec_name)) THEN
897: fnd_message.set_name('QA', 'QA_API_DUPLICATE_SPEC_NAME');
898: fnd_msg_pub.add();
899: RAISE fnd_api.g_exc_error;
900: END IF;
901:
902: -- See if the spec exists with p_common_spec_name
903: IF p_reference_spec IS NOT NULL AND NOT spec_exists(p_reference_spec) THEN

Line 907: RAISE fnd_api.g_exc_error;

903: IF p_reference_spec IS NOT NULL AND NOT spec_exists(p_reference_spec) THEN
904: fnd_message.set_name('QA', 'QA_SPEC_NOT_EXISTS');
905: fnd_message.set_token('ENTITY1', p_reference_spec);
906: fnd_msg_pub.add();
907: RAISE fnd_api.g_exc_error;
908: END IF;
909:
910: -- Force not to reference a child spec if common_spec_name is passed
911: IF p_reference_spec IS NOT NULL AND is_child_spec(p_reference_spec) THEN

Line 914: RAISE fnd_api.g_exc_error;

910: -- Force not to reference a child spec if common_spec_name is passed
911: IF p_reference_spec IS NOT NULL AND is_child_spec(p_reference_spec) THEN
912: fnd_message.set_name('QA', 'QA_CANNOT_REFER_CHILD_SPEC');
913: fnd_msg_pub.add();
914: RAISE fnd_api.g_exc_error;
915: END IF;
916:
917: l_org_id := qa_plans_api.get_org_id(p_organization_code);
918:

Line 922: RAISE fnd_api.g_exc_error;

918:
919: IF (l_org_id IS NULL) THEN
920: fnd_message.set_name('QA', 'QA_API_INVALID_ORG_CODE');
921: fnd_msg_pub.add();
922: RAISE fnd_api.g_exc_error;
923: END IF;
924:
925: IF (p_effective_to IS NOT NULL) THEN
926: IF (p_effective_to < p_effective_from) THEN

Line 929: RAISE fnd_api.g_exc_error;

925: IF (p_effective_to IS NOT NULL) THEN
926: IF (p_effective_to < p_effective_from) THEN
927: fnd_message.set_name('QA', 'QA_EFFECTIVE_DATE_RANGE');
928: fnd_msg_pub.add();
929: RAISE fnd_api.g_exc_error;
930: END IF;
931: END IF;
932:
933: IF (p_assignment_type = g_spec_type_item) THEN

Line 941: RAISE fnd_api.g_exc_error;

937: l_vendor_id := qa_plan_element_api.get_supplier_id(p_supplier_name);
938: IF (l_vendor_id IS NULL) THEN
939: fnd_message.set_name('QA', 'QA_API_INVALID_VENDOR_NAME');
940: fnd_msg_pub.add();
941: RAISE fnd_api.g_exc_error;
942: END IF;
943:
944: ELSIF (p_assignment_type = g_spec_type_customer) THEN
945: l_customer_id := qa_plan_element_api.get_customer_id(p_customer_name);

Line 949: RAISE fnd_api.g_exc_error;

945: l_customer_id := qa_plan_element_api.get_customer_id(p_customer_name);
946: IF (l_customer_id IS NULL) THEN
947: fnd_message.set_name('QA', 'QA_API_INVALID_CUSTOMER_NAME');
948: fnd_msg_pub.add();
949: RAISE fnd_api.g_exc_error;
950: END IF;
951:
952: ELSE
953: fnd_message.set_name('QA', 'QA_API_INVALID_ASSIGNMENT_TYPE');

Line 955: RAISE fnd_api.g_exc_error;

951:
952: ELSE
953: fnd_message.set_name('QA', 'QA_API_INVALID_ASSIGNMENT_TYPE');
954: fnd_msg_pub.add();
955: RAISE fnd_api.g_exc_error;
956: END IF;
957:
958: IF (p_item_name IS NOT NULL) THEN
959: l_item_id := process_item_and_revision(p_item_name, p_item_revision,

Line 979: RAISE fnd_api.g_exc_error;

975: validate_datatype(l_sub_type_value, l_datatype);
976: ELSE
977: fnd_message.set_name('QA', 'QA_API_INVALID_ELEMENT');
978: fnd_msg_pub.add();
979: RAISE fnd_api.g_exc_error;
980: END IF;
981: ELSE
982: l_char_id := -1;
983: l_sub_type_value := '-1';

Line 993: RAISE fnd_api.g_exc_error;

989:
990: fnd_message.set_name('QA', 'QA_SPEC_COMBINATION_EXISTS');
991: fnd_message.set_token('ENTITY1', l_existing_spec_name);
992: fnd_msg_pub.add();
993: RAISE fnd_api.g_exc_error;
994: END IF;
995:
996: SELECT qa_specs_s.nextval INTO x_spec_id FROM DUAL;
997:

Line 1087: WHEN fnd_api.g_exc_error THEN

1083: p_attribute15 );
1084:
1085: EXCEPTION
1086:
1087: WHEN fnd_api.g_exc_error THEN
1088: ROLLBACK TO create_specification_pub;
1089: x_return_status := fnd_api.g_ret_sts_error;
1090: fnd_msg_pub.count_and_get(
1091: p_count => x_msg_count,

Line 1089: x_return_status := fnd_api.g_ret_sts_error;

1085: EXCEPTION
1086:
1087: WHEN fnd_api.g_exc_error THEN
1088: ROLLBACK TO create_specification_pub;
1089: x_return_status := fnd_api.g_ret_sts_error;
1090: fnd_msg_pub.count_and_get(
1091: p_count => x_msg_count,
1092: p_data => x_msg_data
1093: );

Line 1095: WHEN fnd_api.g_exc_unexpected_error THEN

1091: p_count => x_msg_count,
1092: p_data => x_msg_data
1093: );
1094:
1095: WHEN fnd_api.g_exc_unexpected_error THEN
1096: ROLLBACK TO create_specification_pub;
1097: x_return_status := fnd_api.g_ret_sts_unexp_error;
1098: fnd_msg_pub.count_and_get(
1099: p_count => x_msg_count,

Line 1097: x_return_status := fnd_api.g_ret_sts_unexp_error;

1093: );
1094:
1095: WHEN fnd_api.g_exc_unexpected_error THEN
1096: ROLLBACK TO create_specification_pub;
1097: x_return_status := fnd_api.g_ret_sts_unexp_error;
1098: fnd_msg_pub.count_and_get(
1099: p_count => x_msg_count,
1100: p_data => x_msg_data
1101: );

Line 1106: x_return_status := fnd_api.g_ret_sts_unexp_error;

1102:
1103: WHEN OTHERS THEN
1104: -- dbms_output.put_line(SQLCODE || SQLERRM);
1105: ROLLBACK TO create_specification_pub;
1106: x_return_status := fnd_api.g_ret_sts_unexp_error;
1107: IF fnd_msg_pub.Check_Msg_Level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1108: fnd_msg_pub.Add_Exc_Msg(g_pkg_name, l_api_name);
1109: END IF;
1110: fnd_msg_pub.count_and_get(

Line 1126: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1122: --
1123:
1124: PROCEDURE add_spec_element(
1125: p_api_version IN NUMBER,
1126: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1127: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,
1128: p_user_name IN VARCHAR2 := NULL,
1129: p_spec_name IN VARCHAR2,
1130: p_organization_code IN VARCHAR2,

Line 1127: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,

1123:
1124: PROCEDURE add_spec_element(
1125: p_api_version IN NUMBER,
1126: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1127: p_validation_level IN NUMBER := fnd_api.G_VALID_LEVEL_FULL,
1128: p_user_name IN VARCHAR2 := NULL,
1129: p_spec_name IN VARCHAR2,
1130: p_organization_code IN VARCHAR2,
1131: p_element_name IN VARCHAR2,

Line 1133: p_enabled_flag IN VARCHAR2 := fnd_api.g_true,

1129: p_spec_name IN VARCHAR2,
1130: p_organization_code IN VARCHAR2,
1131: p_element_name IN VARCHAR2,
1132: p_uom_code IN VARCHAR2 := NULL,
1133: p_enabled_flag IN VARCHAR2 := fnd_api.g_true,
1134: p_target_value IN VARCHAR2 := NULL,
1135: p_upper_spec_limit IN VARCHAR2 := NULL,
1136: p_lower_spec_limit IN VARCHAR2 := NULL,
1137: p_upper_reasonable_limit IN VARCHAR2 := NULL,

Line 1182: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version,

1178:
1179: SAVEPOINT add_spec_element;
1180:
1181: -- Standard call to check for call compatibility.
1182: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version,
1183: l_api_name, g_pkg_name) THEN
1184: RAISE fnd_api.g_exc_unexpected_error;
1185: END IF;
1186:

Line 1184: RAISE fnd_api.g_exc_unexpected_error;

1180:
1181: -- Standard call to check for call compatibility.
1182: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version,
1183: l_api_name, g_pkg_name) THEN
1184: RAISE fnd_api.g_exc_unexpected_error;
1185: END IF;
1186:
1187: -- Initialize message list if p_init_msg_list is set to TRUE.
1188: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1188: IF fnd_api.to_boolean(p_init_msg_list) THEN

1184: RAISE fnd_api.g_exc_unexpected_error;
1185: END IF;
1186:
1187: -- Initialize message list if p_init_msg_list is set to TRUE.
1188: IF fnd_api.to_boolean(p_init_msg_list) THEN
1189: fnd_msg_pub.initialize;
1190: END IF;
1191:
1192: -- Initialize API return status to success

Line 1193: x_return_status := fnd_api.g_ret_sts_success;

1189: fnd_msg_pub.initialize;
1190: END IF;
1191:
1192: -- Initialize API return status to success
1193: x_return_status := fnd_api.g_ret_sts_success;
1194:
1195: l_user_id := get_user_id(p_user_name);
1196: IF l_user_id = -1 THEN
1197: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 1199: raise fnd_api.g_exc_error;

1195: l_user_id := get_user_id(p_user_name);
1196: IF l_user_id = -1 THEN
1197: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
1198: fnd_msg_pub.add();
1199: raise fnd_api.g_exc_error;
1200: END IF;
1201:
1202: l_char_id := get_context_element_id(p_element_name);
1203: l_spec_id := get_spec_id(p_spec_name, p_organization_code);

Line 1209: raise fnd_api.g_exc_error;

1205: -- See if the spec is a child and throw exception appropriately
1206: IF is_child_spec(l_spec_id) THEN
1207: fnd_message.set_name('QA', 'QA_SPEC_ELEM_TO_CHILD');
1208: fnd_msg_pub.add();
1209: raise fnd_api.g_exc_error;
1210: END IF;
1211:
1212: IF (spec_element_exists(l_spec_id, l_char_id)) THEN
1213: fnd_message.set_name ('QA', 'QA_API_DUPLICATE_SPEC_ELEMENT');

Line 1215: RAISE fnd_api.g_exc_error;

1211:
1212: IF (spec_element_exists(l_spec_id, l_char_id)) THEN
1213: fnd_message.set_name ('QA', 'QA_API_DUPLICATE_SPEC_ELEMENT');
1214: fnd_msg_pub.add();
1215: RAISE fnd_api.g_exc_error;
1216: END IF;
1217:
1218: l_datatype := qa_chars_api.datatype(l_char_id);
1219:

Line 1232: RAISE fnd_api.g_exc_error;

1228: IF qltcompb.compare(p_upper_spec_limit, 6, p_lower_spec_limit, null,
1229: l_datatype) THEN
1230: fnd_message.set_name('QA', 'QA_LSL_GREATER_THAN_USL');
1231: fnd_msg_pub.add();
1232: RAISE fnd_api.g_exc_error;
1233: END IF;
1234:
1235: IF qltcompb.compare(p_upper_reasonable_limit, 6, p_lower_reasonable_limit,
1236: null, l_datatype) THEN

Line 1239: RAISE fnd_api.g_exc_error;

1235: IF qltcompb.compare(p_upper_reasonable_limit, 6, p_lower_reasonable_limit,
1236: null, l_datatype) THEN
1237: fnd_message.set_name('QA', 'QA_LRL_GREATER_THAN_URL');
1238: fnd_msg_pub.add();
1239: RAISE fnd_api.g_exc_error;
1240: END IF;
1241:
1242: IF qltcompb.compare(p_upper_user_defined_limit, 6,
1243: p_lower_user_defined_limit, null, l_datatype) THEN

Line 1246: RAISE fnd_api.g_exc_error;

1242: IF qltcompb.compare(p_upper_user_defined_limit, 6,
1243: p_lower_user_defined_limit, null, l_datatype) THEN
1244: fnd_message.set_name('QA', 'QA_LUL_GREATER_THAN_UUL');
1245: fnd_msg_pub.add();
1246: RAISE fnd_api.g_exc_error;
1247: END IF;
1248:
1249: l_enabled_flag := convert_flag(p_enabled_flag);
1250:

Line 1326: WHEN fnd_api.g_exc_error THEN

1322: p_attribute15 );
1323:
1324: EXCEPTION
1325:
1326: WHEN fnd_api.g_exc_error THEN
1327: ROLLBACK TO add_spec_element;
1328: x_return_status := fnd_api.g_ret_sts_error;
1329: fnd_msg_pub.count_and_get(
1330: p_count => x_msg_count,

Line 1328: x_return_status := fnd_api.g_ret_sts_error;

1324: EXCEPTION
1325:
1326: WHEN fnd_api.g_exc_error THEN
1327: ROLLBACK TO add_spec_element;
1328: x_return_status := fnd_api.g_ret_sts_error;
1329: fnd_msg_pub.count_and_get(
1330: p_count => x_msg_count,
1331: p_data => x_msg_data
1332: );

Line 1334: WHEN fnd_api.g_exc_unexpected_error THEN

1330: p_count => x_msg_count,
1331: p_data => x_msg_data
1332: );
1333:
1334: WHEN fnd_api.g_exc_unexpected_error THEN
1335: ROLLBACK TO add_spec_element;
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337: fnd_msg_pub.count_and_get(
1338: p_count => x_msg_count,

Line 1336: x_return_status := fnd_api.g_ret_sts_unexp_error;

1332: );
1333:
1334: WHEN fnd_api.g_exc_unexpected_error THEN
1335: ROLLBACK TO add_spec_element;
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337: fnd_msg_pub.count_and_get(
1338: p_count => x_msg_count,
1339: p_data => x_msg_data
1340: );

Line 1344: x_return_status := fnd_api.g_ret_sts_unexp_error;

1340: );
1341:
1342: WHEN OTHERS THEN
1343: ROLLBACK TO add_spec_element;
1344: x_return_status := fnd_api.g_ret_sts_unexp_error;
1345: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1346: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1347: END IF;
1348: fnd_msg_pub.count_and_get(

Line 1358: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1354:
1355:
1356: PROCEDURE complete_spec_processing(
1357: p_api_version IN NUMBER,
1358: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1359: p_user_name IN VARCHAR2 := NULL,
1360: p_spec_name IN VARCHAR2,
1361: p_organization_code IN VARCHAR2,
1362: p_commit IN VARCHAR2 := fnd_api.g_false,

Line 1362: p_commit IN VARCHAR2 := fnd_api.g_false,

1358: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1359: p_user_name IN VARCHAR2 := NULL,
1360: p_spec_name IN VARCHAR2,
1361: p_organization_code IN VARCHAR2,
1362: p_commit IN VARCHAR2 := fnd_api.g_false,
1363: x_msg_count OUT NOCOPY NUMBER,
1364: x_msg_data OUT NOCOPY VARCHAR2,
1365: x_return_status OUT NOCOPY VARCHAR2) IS
1366:

Line 1380: IF NOT fnd_api.compatible_api_call(

1376:
1377: SAVEPOINT complete_spec_definition;
1378:
1379: -- Standard call to check for call compatibility.
1380: IF NOT fnd_api.compatible_api_call(
1381: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1382: RAISE fnd_api.g_exc_unexpected_error;
1383: END IF;
1384:

Line 1382: RAISE fnd_api.g_exc_unexpected_error;

1378:
1379: -- Standard call to check for call compatibility.
1380: IF NOT fnd_api.compatible_api_call(
1381: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1382: RAISE fnd_api.g_exc_unexpected_error;
1383: END IF;
1384:
1385: -- Initialize message list if p_init_msg_list is set to TRUE.
1386: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1386: IF fnd_api.to_boolean(p_init_msg_list) THEN

1382: RAISE fnd_api.g_exc_unexpected_error;
1383: END IF;
1384:
1385: -- Initialize message list if p_init_msg_list is set to TRUE.
1386: IF fnd_api.to_boolean(p_init_msg_list) THEN
1387: fnd_msg_pub.initialize;
1388: END IF;
1389:
1390: -- Initialize API return status to success

Line 1391: x_return_status := fnd_api.g_ret_sts_success;

1387: fnd_msg_pub.initialize;
1388: END IF;
1389:
1390: -- Initialize API return status to success
1391: x_return_status := fnd_api.g_ret_sts_success;
1392:
1393: l_user_id := get_user_id(p_user_name);
1394: IF l_user_id = -1 THEN
1395: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 1397: raise fnd_api.g_exc_error;

1393: l_user_id := get_user_id(p_user_name);
1394: IF l_user_id = -1 THEN
1395: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
1396: fnd_msg_pub.add();
1397: raise fnd_api.g_exc_error;
1398: END IF;
1399:
1400: l_spec_id := get_spec_id(p_spec_name, p_organization_code);
1401: check_for_spec_element(l_spec_id);

Line 1403: IF fnd_api.to_boolean(p_commit) THEN

1399:
1400: l_spec_id := get_spec_id(p_spec_name, p_organization_code);
1401: check_for_spec_element(l_spec_id);
1402:
1403: IF fnd_api.to_boolean(p_commit) THEN
1404: COMMIT;
1405: END IF;
1406:
1407: EXCEPTION

Line 1409: WHEN fnd_api.g_exc_error THEN

1405: END IF;
1406:
1407: EXCEPTION
1408:
1409: WHEN fnd_api.g_exc_error THEN
1410: ROLLBACK TO complete_spec_definition;
1411: x_return_status := fnd_api.g_ret_sts_error;
1412: fnd_msg_pub.count_and_get(
1413: p_count => x_msg_count,

Line 1411: x_return_status := fnd_api.g_ret_sts_error;

1407: EXCEPTION
1408:
1409: WHEN fnd_api.g_exc_error THEN
1410: ROLLBACK TO complete_spec_definition;
1411: x_return_status := fnd_api.g_ret_sts_error;
1412: fnd_msg_pub.count_and_get(
1413: p_count => x_msg_count,
1414: p_data => x_msg_data
1415: );

Line 1417: WHEN fnd_api.g_exc_unexpected_error THEN

1413: p_count => x_msg_count,
1414: p_data => x_msg_data
1415: );
1416:
1417: WHEN fnd_api.g_exc_unexpected_error THEN
1418: ROLLBACK TO complete_spec_definition;
1419: x_return_status := fnd_api.g_ret_sts_unexp_error;
1420: fnd_msg_pub.count_and_get(
1421: p_count => x_msg_count,

Line 1419: x_return_status := fnd_api.g_ret_sts_unexp_error;

1415: );
1416:
1417: WHEN fnd_api.g_exc_unexpected_error THEN
1418: ROLLBACK TO complete_spec_definition;
1419: x_return_status := fnd_api.g_ret_sts_unexp_error;
1420: fnd_msg_pub.count_and_get(
1421: p_count => x_msg_count,
1422: p_data => x_msg_data
1423: );

Line 1427: x_return_status := fnd_api.g_ret_sts_unexp_error;

1423: );
1424:
1425: WHEN OTHERS THEN
1426: ROLLBACK TO complete_spec_definition;
1427: x_return_status := fnd_api.g_ret_sts_unexp_error;
1428: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1429: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1430: END IF;
1431: fnd_msg_pub.count_and_get(

Line 1478: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1474: --
1475:
1476: PROCEDURE delete_specification(
1477: p_api_version IN NUMBER,
1478: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1479: p_user_name IN VARCHAR2 := NULL,
1480: p_spec_name IN VARCHAR2,
1481: p_organization_code IN VARCHAR2,
1482: p_commit IN VARCHAR2 := fnd_api.g_false,

Line 1482: p_commit IN VARCHAR2 := fnd_api.g_false,

1478: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1479: p_user_name IN VARCHAR2 := NULL,
1480: p_spec_name IN VARCHAR2,
1481: p_organization_code IN VARCHAR2,
1482: p_commit IN VARCHAR2 := fnd_api.g_false,
1483: x_msg_count OUT NOCOPY NUMBER,
1484: x_msg_data OUT NOCOPY VARCHAR2,
1485: x_return_status OUT NOCOPY VARCHAR2) IS
1486:

Line 1501: IF NOT fnd_api.compatible_api_call(

1497:
1498: SAVEPOINT delete_specification;
1499:
1500: -- Standard call to check for call compatibility.
1501: IF NOT fnd_api.compatible_api_call(
1502: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1503: RAISE fnd_api.g_exc_unexpected_error;
1504: END IF;
1505:

Line 1503: RAISE fnd_api.g_exc_unexpected_error;

1499:
1500: -- Standard call to check for call compatibility.
1501: IF NOT fnd_api.compatible_api_call(
1502: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1503: RAISE fnd_api.g_exc_unexpected_error;
1504: END IF;
1505:
1506: -- Initialize message list if p_init_msg_list is set to TRUE.
1507: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1507: IF fnd_api.to_boolean(p_init_msg_list) THEN

1503: RAISE fnd_api.g_exc_unexpected_error;
1504: END IF;
1505:
1506: -- Initialize message list if p_init_msg_list is set to TRUE.
1507: IF fnd_api.to_boolean(p_init_msg_list) THEN
1508: fnd_msg_pub.initialize;
1509: END IF;
1510:
1511: -- Initialize API return status to success

Line 1512: x_return_status := fnd_api.g_ret_sts_success;

1508: fnd_msg_pub.initialize;
1509: END IF;
1510:
1511: -- Initialize API return status to success
1512: x_return_status := fnd_api.g_ret_sts_success;
1513:
1514: l_user_id := get_user_id(p_user_name);
1515: IF l_user_id = -1 THEN
1516: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 1518: raise fnd_api.g_exc_error;

1514: l_user_id := get_user_id(p_user_name);
1515: IF l_user_id = -1 THEN
1516: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
1517: fnd_msg_pub.add();
1518: raise fnd_api.g_exc_error;
1519: END IF;
1520:
1521: l_spec_id := get_spec_id(p_spec_name, p_organization_code);
1522:

Line 1527: raise fnd_api.g_exc_error;

1523: -- Perfect place to check for child specs
1524: IF child_spec_exists(l_spec_id) THEN
1525: fnd_message.set_name('QA', 'QA_CHILD_SPECS_EXIST');
1526: fnd_msg_pub.add();
1527: raise fnd_api.g_exc_error;
1528: END IF;
1529:
1530: delete_spec_private(l_spec_id);
1531:

Line 1532: IF fnd_api.to_boolean(p_commit) THEN

1528: END IF;
1529:
1530: delete_spec_private(l_spec_id);
1531:
1532: IF fnd_api.to_boolean(p_commit) THEN
1533: COMMIT;
1534: END IF;
1535:
1536: EXCEPTION

Line 1538: WHEN fnd_api.g_exc_error THEN

1534: END IF;
1535:
1536: EXCEPTION
1537:
1538: WHEN fnd_api.g_exc_error THEN
1539: ROLLBACK TO delete_specification;
1540: x_return_status := fnd_api.g_ret_sts_error;
1541: fnd_msg_pub.count_and_get(
1542: p_count => x_msg_count,

Line 1540: x_return_status := fnd_api.g_ret_sts_error;

1536: EXCEPTION
1537:
1538: WHEN fnd_api.g_exc_error THEN
1539: ROLLBACK TO delete_specification;
1540: x_return_status := fnd_api.g_ret_sts_error;
1541: fnd_msg_pub.count_and_get(
1542: p_count => x_msg_count,
1543: p_data => x_msg_data
1544: );

Line 1546: WHEN fnd_api.g_exc_unexpected_error THEN

1542: p_count => x_msg_count,
1543: p_data => x_msg_data
1544: );
1545:
1546: WHEN fnd_api.g_exc_unexpected_error THEN
1547: ROLLBACK TO delete_specification;
1548: x_return_status := fnd_api.g_ret_sts_unexp_error;
1549: fnd_msg_pub.count_and_get(
1550: p_count => x_msg_count,

Line 1548: x_return_status := fnd_api.g_ret_sts_unexp_error;

1544: );
1545:
1546: WHEN fnd_api.g_exc_unexpected_error THEN
1547: ROLLBACK TO delete_specification;
1548: x_return_status := fnd_api.g_ret_sts_unexp_error;
1549: fnd_msg_pub.count_and_get(
1550: p_count => x_msg_count,
1551: p_data => x_msg_data
1552: );

Line 1556: x_return_status := fnd_api.g_ret_sts_unexp_error;

1552: );
1553:
1554: WHEN OTHERS THEN
1555: ROLLBACK TO delete_specification;
1556: x_return_status := fnd_api.g_ret_sts_unexp_error;
1557: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1558: fnd_msg_pub.Add_Exc_Msg(g_pkg_name, l_api_name);
1559: END IF;
1560: fnd_msg_pub.count_and_get(

Line 1577: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1573: --
1574:
1575: PROCEDURE delete_spec_element(
1576: p_api_version IN NUMBER,
1577: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1578: p_user_name IN VARCHAR2 := NULL,
1579: p_spec_name IN VARCHAR2,
1580: p_organization_code IN VARCHAR2,
1581: p_element_name IN VARCHAR2,

Line 1582: p_commit IN VARCHAR2 := fnd_api.g_false,

1578: p_user_name IN VARCHAR2 := NULL,
1579: p_spec_name IN VARCHAR2,
1580: p_organization_code IN VARCHAR2,
1581: p_element_name IN VARCHAR2,
1582: p_commit IN VARCHAR2 := fnd_api.g_false,
1583: x_msg_count OUT NOCOPY NUMBER,
1584: x_msg_data OUT NOCOPY VARCHAR2,
1585: x_return_status OUT NOCOPY VARCHAR2) IS
1586:

Line 1602: IF NOT fnd_api.compatible_api_call(

1598:
1599: SAVEPOINT delete_spec_element;
1600:
1601: -- Standard call to check for call compatibility.
1602: IF NOT fnd_api.compatible_api_call(
1603: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1604: RAISE fnd_api.g_exc_unexpected_error;
1605: END IF;
1606:

Line 1604: RAISE fnd_api.g_exc_unexpected_error;

1600:
1601: -- Standard call to check for call compatibility.
1602: IF NOT fnd_api.compatible_api_call(
1603: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1604: RAISE fnd_api.g_exc_unexpected_error;
1605: END IF;
1606:
1607: -- Initialize message list if p_init_msg_list is set to TRUE.
1608: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1608: IF fnd_api.to_boolean(p_init_msg_list) THEN

1604: RAISE fnd_api.g_exc_unexpected_error;
1605: END IF;
1606:
1607: -- Initialize message list if p_init_msg_list is set to TRUE.
1608: IF fnd_api.to_boolean(p_init_msg_list) THEN
1609: fnd_msg_pub.initialize;
1610: END IF;
1611:
1612: -- Initialize API return status to success

Line 1613: x_return_status := fnd_api.g_ret_sts_success;

1609: fnd_msg_pub.initialize;
1610: END IF;
1611:
1612: -- Initialize API return status to success
1613: x_return_status := fnd_api.g_ret_sts_success;
1614:
1615: l_user_id := get_user_id(p_user_name);
1616: IF l_user_id = -1 THEN
1617: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 1619: raise fnd_api.g_exc_error;

1615: l_user_id := get_user_id(p_user_name);
1616: IF l_user_id = -1 THEN
1617: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
1618: fnd_msg_pub.add();
1619: raise fnd_api.g_exc_error;
1620: END IF;
1621:
1622: l_spec_id := get_spec_id(p_spec_name, p_organization_code);
1623:

Line 1628: raise fnd_api.g_exc_error;

1624: -- We must be checking here if the spec is a child
1625: IF is_child_spec(l_spec_id) THEN
1626: fnd_message.set_name('QA', 'QA_DELETE_SPEC_ELEM_ON_CHILD');
1627: fnd_msg_pub.add();
1628: raise fnd_api.g_exc_error;
1629: END IF;
1630:
1631: l_char_id := get_context_element_id(p_element_name);
1632:

Line 1635: IF fnd_api.to_boolean(p_commit) THEN

1631: l_char_id := get_context_element_id(p_element_name);
1632:
1633: delete_spec_element_private(l_spec_id, l_char_id);
1634:
1635: IF fnd_api.to_boolean(p_commit) THEN
1636: COMMIT;
1637: END IF;
1638:
1639: EXCEPTION

Line 1641: WHEN fnd_api.g_exc_error THEN

1637: END IF;
1638:
1639: EXCEPTION
1640:
1641: WHEN fnd_api.g_exc_error THEN
1642: ROLLBACK TO delete_spec_element;
1643: x_return_status := fnd_api.g_ret_sts_error;
1644: fnd_msg_pub.count_and_get(
1645: p_count => x_msg_count,

Line 1643: x_return_status := fnd_api.g_ret_sts_error;

1639: EXCEPTION
1640:
1641: WHEN fnd_api.g_exc_error THEN
1642: ROLLBACK TO delete_spec_element;
1643: x_return_status := fnd_api.g_ret_sts_error;
1644: fnd_msg_pub.count_and_get(
1645: p_count => x_msg_count,
1646: p_data => x_msg_data
1647: );

Line 1649: WHEN fnd_api.g_exc_unexpected_error THEN

1645: p_count => x_msg_count,
1646: p_data => x_msg_data
1647: );
1648:
1649: WHEN fnd_api.g_exc_unexpected_error THEN
1650: ROLLBACK TO delete_spec_element;
1651: x_return_status := fnd_api.g_ret_sts_unexp_error;
1652: fnd_msg_pub.count_and_get(
1653: p_count => x_msg_count,

Line 1651: x_return_status := fnd_api.g_ret_sts_unexp_error;

1647: );
1648:
1649: WHEN fnd_api.g_exc_unexpected_error THEN
1650: ROLLBACK TO delete_spec_element;
1651: x_return_status := fnd_api.g_ret_sts_unexp_error;
1652: fnd_msg_pub.count_and_get(
1653: p_count => x_msg_count,
1654: p_data => x_msg_data
1655: );

Line 1659: x_return_status := fnd_api.g_ret_sts_unexp_error;

1655: );
1656:
1657: WHEN OTHERS THEN
1658: ROLLBACK TO delete_spec_element;
1659: x_return_status := fnd_api.g_ret_sts_unexp_error;
1660: IF fnd_msg_pub.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1661: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1662: END IF;
1663: fnd_msg_pub.count_and_get(

Line 1680: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1676: --
1677:
1678: PROCEDURE copy_specification(
1679: p_api_version IN NUMBER,
1680: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1681: p_user_name IN VARCHAR2 := NULL,
1682: p_spec_name IN VARCHAR2,
1683: p_organization_code IN VARCHAR2,
1684: p_to_spec_name IN VARCHAR2,

Line 1688: p_commit IN VARCHAR2 := fnd_api.g_false,

1684: p_to_spec_name IN VARCHAR2,
1685: p_to_organization_code IN VARCHAR2,
1686: p_to_item_name IN VARCHAR2,
1687: p_to_item_revision IN VARCHAR2 := NULL,
1688: p_commit IN VARCHAR2 := fnd_api.g_false,
1689: x_spec_id OUT NOCOPY NUMBER,
1690: x_msg_count OUT NOCOPY NUMBER,
1691: x_msg_data OUT NOCOPY VARCHAR2,
1692: x_return_status OUT NOCOPY VARCHAR2) IS

Line 1727: IF NOT fnd_api.compatible_api_call(

1723:
1724: SAVEPOINT copy_specification;
1725:
1726: -- Standard call to check for call compatibility.
1727: IF NOT fnd_api.compatible_api_call(
1728: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1729: RAISE fnd_api.g_exc_unexpected_error;
1730: END IF;
1731:

Line 1729: RAISE fnd_api.g_exc_unexpected_error;

1725:
1726: -- Standard call to check for call compatibility.
1727: IF NOT fnd_api.compatible_api_call(
1728: l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1729: RAISE fnd_api.g_exc_unexpected_error;
1730: END IF;
1731:
1732: -- Initialize message list if p_init_msg_list is set to TRUE.
1733: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1733: IF fnd_api.to_boolean(p_init_msg_list) THEN

1729: RAISE fnd_api.g_exc_unexpected_error;
1730: END IF;
1731:
1732: -- Initialize message list if p_init_msg_list is set to TRUE.
1733: IF fnd_api.to_boolean(p_init_msg_list) THEN
1734: fnd_msg_pub.initialize;
1735: END IF;
1736:
1737: -- Initialize API return status to success

Line 1738: x_return_status := fnd_api.g_ret_sts_success;

1734: fnd_msg_pub.initialize;
1735: END IF;
1736:
1737: -- Initialize API return status to success
1738: x_return_status := fnd_api.g_ret_sts_success;
1739:
1740: l_user_id := get_user_id(p_user_name);
1741: IF l_user_id = -1 THEN
1742: fnd_message.set_name('QA', 'QA_API_INVALID_USER');

Line 1744: raise fnd_api.g_exc_error;

1740: l_user_id := get_user_id(p_user_name);
1741: IF l_user_id = -1 THEN
1742: fnd_message.set_name('QA', 'QA_API_INVALID_USER');
1743: fnd_msg_pub.add();
1744: raise fnd_api.g_exc_error;
1745: END IF;
1746:
1747: l_spec_id := get_spec_id(p_spec_name, p_organization_code);
1748: l_org_id := organization_id(l_spec_id);

Line 1754: RAISE fnd_api.g_exc_error;

1750: l_to_org_id := qa_plans_api.get_org_id(p_to_organization_code);
1751: IF (l_to_org_id IS NULL) THEN
1752: fnd_message.set_name('QA', 'QA_API_INVALID_ORG_CODE');
1753: fnd_msg_pub.add();
1754: RAISE fnd_api.g_exc_error;
1755: END IF;
1756:
1757: IF (spec_exists(p_to_spec_name)) THEN
1758: fnd_message.set_name('QA', 'QA_API_DUPLICATE_SPEC_NAME');

Line 1760: RAISE fnd_api.g_exc_error;

1756:
1757: IF (spec_exists(p_to_spec_name)) THEN
1758: fnd_message.set_name('QA', 'QA_API_DUPLICATE_SPEC_NAME');
1759: fnd_msg_pub.add();
1760: RAISE fnd_api.g_exc_error;
1761: END IF;
1762:
1763: l_to_item_id := process_item_and_revision(p_to_item_name,
1764: p_to_item_revision, l_org_id);

Line 1780: RAISE fnd_api.g_exc_error;

1776:
1777: fnd_message.set_name('QA', 'QA_SPEC_COMBINATION_EXISTS');
1778: fnd_message.set_token('ENTITY1', l_existing_spec_name);
1779: fnd_msg_pub.add();
1780: RAISE fnd_api.g_exc_error;
1781: END IF;
1782:
1783: SELECT qa_specs_s.nextval INTO x_spec_id FROM DUAL;
1784:

Line 1885: IF fnd_api.to_boolean(p_commit) THEN

1881: qa_specs_pkg.copy_attachment(
1882: p_from_spec_id => l_spec_id,
1883: p_to_spec_id => x_spec_id);
1884:
1885: IF fnd_api.to_boolean(p_commit) THEN
1886: COMMIT;
1887: END IF;
1888:
1889: EXCEPTION

Line 1891: WHEN fnd_api.g_exc_error THEN

1887: END IF;
1888:
1889: EXCEPTION
1890:
1891: WHEN fnd_api.g_exc_error THEN
1892: ROLLBACK TO copy_specification;
1893: x_return_status := fnd_api.g_ret_sts_error;
1894: fnd_msg_pub.count_and_get(
1895: p_count => x_msg_count,

Line 1893: x_return_status := fnd_api.g_ret_sts_error;

1889: EXCEPTION
1890:
1891: WHEN fnd_api.g_exc_error THEN
1892: ROLLBACK TO copy_specification;
1893: x_return_status := fnd_api.g_ret_sts_error;
1894: fnd_msg_pub.count_and_get(
1895: p_count => x_msg_count,
1896: p_data => x_msg_data
1897: );

Line 1899: WHEN fnd_api.g_exc_unexpected_error THEN

1895: p_count => x_msg_count,
1896: p_data => x_msg_data
1897: );
1898:
1899: WHEN fnd_api.g_exc_unexpected_error THEN
1900: ROLLBACK TO copy_specification;
1901: x_return_status := fnd_api.g_ret_sts_unexp_error;
1902: fnd_msg_pub.count_and_get(
1903: p_count => x_msg_count,

Line 1901: x_return_status := fnd_api.g_ret_sts_unexp_error;

1897: );
1898:
1899: WHEN fnd_api.g_exc_unexpected_error THEN
1900: ROLLBACK TO copy_specification;
1901: x_return_status := fnd_api.g_ret_sts_unexp_error;
1902: fnd_msg_pub.count_and_get(
1903: p_count => x_msg_count,
1904: p_data => x_msg_data
1905: );

Line 1909: x_return_status := fnd_api.g_ret_sts_unexp_error;

1905: );
1906:
1907: WHEN OTHERS THEN
1908: ROLLBACK TO copy_specification;
1909: x_return_status := fnd_api.g_ret_sts_unexp_error;
1910: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1911: fnd_msg_pub.Add_Exc_Msg(g_pkg_name, l_api_name);
1912: END IF;
1913: fnd_msg_pub.count_and_get(