DBA Data[Home] [Help]

APPS.OKC_IMP_TERMS_TEMPLATES_PVT dependencies on FND_API

Line 56: p_commit IN VARCHAR2 := fnd_api.g_false

52: g_sqlcode_token CONSTANT VARCHAR2 (200) := 'ERROR_CODE';
53:
54: PROCEDURE create_section (
55: p_section_rec IN OUT NOCOPY section_rec_type,
56: p_commit IN VARCHAR2 := fnd_api.g_false
57: );
58:
59: PROCEDURE create_article (
60: p_article_rec IN OUT NOCOPY k_article_rec_type,

Line 61: p_commit IN VARCHAR2 := fnd_api.g_false

57: );
58:
59: PROCEDURE create_article (
60: p_article_rec IN OUT NOCOPY k_article_rec_type,
61: p_commit IN VARCHAR2 := fnd_api.g_false
62: );
63:
64: PROCEDURE create_deliverable (
65: p_deliverable_rec IN OUT NOCOPY deliverable_rec_type,

Line 66: p_commit IN VARCHAR2 := fnd_api.g_false

62: );
63:
64: PROCEDURE create_deliverable (
65: p_deliverable_rec IN OUT NOCOPY deliverable_rec_type,
66: p_commit IN VARCHAR2 := fnd_api.g_false
67: );
68:
69: PROCEDURE create_template (
70: p_template_rec IN OUT NOCOPY terms_template_rec_type,

Line 71: p_commit IN VARCHAR2 := fnd_api.g_false

67: );
68:
69: PROCEDURE create_template (
70: p_template_rec IN OUT NOCOPY terms_template_rec_type,
71: p_commit IN VARCHAR2 := fnd_api.g_false
72: );
73:
74: PROCEDURE update_template (
75: p_template_rec IN OUT NOCOPY terms_template_rec_type

Line 127: l_message := fnd_msg_pub.get (i, p_encoded => fnd_api.g_false);

123: l_message VARCHAR2 (2000);
124: BEGIN
125: FOR i IN 1 .. fnd_msg_pub.count_msg
126: LOOP
127: l_message := fnd_msg_pub.get (i, p_encoded => fnd_api.g_false);
128:
129: IF (LENGTH (l_message) + LENGTH (NVL (x_message, ' '))) <= 2500
130: THEN
131: x_message := x_message || l_message;

Line 857: RAISE fnd_api.g_exc_error;

853: p_msg_name => 'OKC_I_NOT_NULL',
854: p_token1 => 'FIELD',
855: p_token1_value => 'TEMPLATE_NAME'
856: );
857: RAISE fnd_api.g_exc_error;
858: END IF;
859:
860: IF p_template_rec.intent IS NULL
861: THEN

Line 867: RAISE fnd_api.g_exc_error;

863: p_msg_name => 'OKC_I_NOT_NULL',
864: p_token1 => 'FIELD',
865: p_token1_value => 'INTENT'
866: );
867: RAISE fnd_api.g_exc_error;
868: END IF;
869:
870: IF p_template_rec.contract_expert_enabled = 'Y'
871: AND p_template_rec.xprt_scn_code IS NULL

Line 878: RAISE fnd_api.g_exc_error;

874: p_msg_name => 'OKC_I_NOT_NULL',
875: p_token1 => 'FIELD',
876: p_token1_value => 'XPRT_SCN_CODE'
877: );
878: RAISE fnd_api.g_exc_error;
879: END IF;
880:
881: IF p_template_rec.contract_expert_enabled IS NULL
882: AND p_template_rec.xprt_scn_code IS NOT NULL

Line 889: RAISE fnd_api.g_exc_error;

885: p_msg_name => 'OKC_I_NOT_NULL',
886: p_token1 => 'FIELD',
887: p_token1_value => 'CONTRACT_EXPERT_ENABLED'
888: );
889: RAISE fnd_api.g_exc_error;
890: END IF;
891:
892: -- Validate the input attributes
893: IF p_template_rec.intent NOT IN ('B', 'S')

Line 900: RAISE fnd_api.g_exc_error;

896: p_msg_name => 'OKC_I_INVALID_VALUE',
897: p_token1 => 'FIELD',
898: p_token1_value => 'INTENT'
899: );
900: RAISE fnd_api.g_exc_error;
901: END IF;
902:
903: -- validate section code
904: IF p_template_rec.xprt_scn_code IS NOT NULL

Line 922: RAISE fnd_api.g_exc_error;

918: p_msg_name => 'OKC_I_INVALID_VALUE',
919: p_token1 => 'FIELD',
920: p_token1_value => 'XPRT_SCN_CODE'
921: );
922: RAISE fnd_api.g_exc_error;
923: END IF;
924:
925: l_val_lookup := NULL;
926: END IF;

Line 940: RAISE fnd_api.g_exc_error;

936: p_msg_name => 'OKC_I_INVALID_VALUE',
937: p_token1 => 'FIELD',
938: p_token1_value => 'GLOBAL_ORG_ID'
939: );
940: RAISE fnd_api.g_exc_error;
941: END IF;
942: END IF;
943: -- Validate numbering scheme
944: EXCEPTION

Line 954: p_commit IN VARCHAR2 := fnd_api.g_false

950:
951: -------------------------------------------------------------
952: PROCEDURE create_template (
953: p_template_rec IN OUT NOCOPY terms_template_rec_type,
954: p_commit IN VARCHAR2 := fnd_api.g_false
955: )
956: IS
957: x_return_status VARCHAR2 (1);
958: x_msg_count NUMBER;

Line 1203: RAISE fnd_api.g_exc_error;

1199: p_msg_name => 'OKC_I_INVALID_VALUE',
1200: p_token1 => 'FIELD',
1201: p_token1_value => 'ORG_ID'
1202: );
1203: RAISE fnd_api.g_exc_error;
1204: END IF;
1205:
1206: -- Set Policy context
1207: mo_global.set_policy_context ('S', TO_CHAR (p_template_rec.org_id));

Line 1214: RAISE fnd_api.g_exc_error;

1210: p_msg_name => 'OKC_I_NOT_NULL',
1211: p_token1 => 'FIELD',
1212: p_token1_value => 'ORG_ID'
1213: );
1214: RAISE fnd_api.g_exc_error;
1215: END IF;
1216:
1217: -- Validate Row
1218: BEGIN

Line 1221: WHEN fnd_api.g_exc_error

1217: -- Validate Row
1218: BEGIN
1219: validate_template (p_template_rec => p_template_rec);
1220: EXCEPTION
1221: WHEN fnd_api.g_exc_error
1222: THEN
1223: p_template_rec.status := g_ret_sts_error;
1224: RAISE;
1225: WHEN OTHERS

Line 1239: p_init_msg_list => fnd_api.g_true,

1235: */
1236: BEGIN
1237: okc_terms_templates_grp.create_template
1238: (p_api_version => 1,
1239: p_init_msg_list => fnd_api.g_true,
1240: p_validation_level => fnd_api.g_valid_level_full,
1241: p_commit => fnd_api.g_false,
1242: x_return_status => x_return_status,
1243: x_msg_count => x_msg_count,

Line 1240: p_validation_level => fnd_api.g_valid_level_full,

1236: BEGIN
1237: okc_terms_templates_grp.create_template
1238: (p_api_version => 1,
1239: p_init_msg_list => fnd_api.g_true,
1240: p_validation_level => fnd_api.g_valid_level_full,
1241: p_commit => fnd_api.g_false,
1242: x_return_status => x_return_status,
1243: x_msg_count => x_msg_count,
1244: x_msg_data => x_msg_data,

Line 1241: p_commit => fnd_api.g_false,

1237: okc_terms_templates_grp.create_template
1238: (p_api_version => 1,
1239: p_init_msg_list => fnd_api.g_true,
1240: p_validation_level => fnd_api.g_valid_level_full,
1241: p_commit => fnd_api.g_false,
1242: x_return_status => x_return_status,
1243: x_msg_count => x_msg_count,
1244: x_msg_data => x_msg_data,
1245: p_template_name => p_template_rec.template_name,

Line 1292: RAISE fnd_api.g_exc_error;

1288:
1289: IF x_return_status <> g_ret_sts_success
1290: THEN
1291: p_template_rec.status := g_ret_sts_error;
1292: RAISE fnd_api.g_exc_error;
1293: ELSE
1294: p_template_rec.status := g_ret_sts_success;
1295: END IF;
1296: EXCEPTION

Line 1614: RAISE fnd_api.g_exc_error;

1610: p_msg_name => 'OKC_I_INVALID_VALUE',
1611: p_token1 => 'FIELD',
1612: p_token1_value => 'TEMPLATE_ID'
1613: );
1614: RAISE fnd_api.g_exc_error;
1615: END;
1616:
1617: --
1618: IF inittemplateinfo (p_template_rec.template_id) <> 'Y'

Line 1625: RAISE fnd_api.g_exc_error;

1621: p_msg_name => 'OKC_I_INVALID_VALUE',
1622: p_token1 => 'FIELD',
1623: p_token1_value => 'TEMPLATE_ID'
1624: );
1625: RAISE fnd_api.g_exc_error;
1626: END IF;
1627:
1628: --
1629: IF g_headerinfo_update_allowed = 'N'

Line 1638: RAISE fnd_api.g_exc_error;

1634: p_msg_name => 'OKC_I_TEMP_STS_NO_UPD',
1635: p_token1 => 'STATUS',
1636: p_token1_value => l_template_db_rec.status_code
1637: );
1638: RAISE fnd_api.g_exc_error;
1639: ELSE
1640: -- Org Id Can't be changed
1641: IF p_template_rec.org_id <> okc_api.g_miss_num
1642: AND NVL (p_template_rec.org_id, -1) <> l_template_db_rec.org_id

Line 1653: RAISE fnd_api.g_exc_error;

1649: p_token1_value => l_template_db_rec.status_code,
1650: p_token2 => 'FIELD',
1651: p_token2_value => 'ORG_ID'
1652: );
1653: RAISE fnd_api.g_exc_error;
1654: END IF;
1655:
1656: -- Intent Can't be changed
1657: IF p_template_rec.intent <> okc_api.g_miss_char

Line 1669: RAISE fnd_api.g_exc_error;

1665: p_token1_value => l_template_db_rec.status_code,
1666: p_token2 => 'FIELD',
1667: p_token2_value => 'INTENT'
1668: );
1669: RAISE fnd_api.g_exc_error;
1670: END IF;
1671:
1672: -- Status Can't be changed
1673: IF p_template_rec.status_code <> okc_api.g_miss_char

Line 1681: RAISE fnd_api.g_exc_error;

1677: -- You can not change Status
1678: okc_api.set_message (p_app_name => g_app_name,
1679: p_msg_name => 'OKC_I _TEMP_STS_CHANGE'
1680: );
1681: RAISE fnd_api.g_exc_error;
1682: END IF;
1683:
1684: IF l_template_db_rec.status_code = 'APPROVED'
1685: THEN

Line 1700: RAISE fnd_api.g_exc_error;

1696: p_token1_value => l_template_db_rec.status_code,
1697: p_token2 => 'FIELD',
1698: p_token2_value => 'TEMPLATE_NAME'
1699: );
1700: RAISE fnd_api.g_exc_error;
1701: END IF;
1702:
1703: -- Start Date Can't be changed
1704: IF p_template_rec.start_date <> okc_api.g_miss_date

Line 1717: RAISE fnd_api.g_exc_error;

1713: p_token1_value => l_template_db_rec.status_code,
1714: p_token2 => 'FIELD',
1715: p_token2_value => 'START_DATE'
1716: );
1717: RAISE fnd_api.g_exc_error;
1718: END IF;
1719:
1720: -- Contract Expert enabled can't be changed
1721: IF p_template_rec.contract_expert_enabled <>

Line 1735: RAISE fnd_api.g_exc_error;

1731: p_token1_value => l_template_db_rec.status_code,
1732: p_token2 => 'FIELD',
1733: p_token2_value => 'CONTRACT_EXPERT_ENABLED'
1734: );
1735: RAISE fnd_api.g_exc_error;
1736: END IF;
1737:
1738: --
1739: IF p_template_rec.xprt_scn_code <> okc_api.g_miss_char

Line 1752: RAISE fnd_api.g_exc_error;

1748: p_token1_value => l_template_db_rec.status_code,
1749: p_token2 => 'FIELD',
1750: p_token2_value => 'XPRT_SCN_CODE'
1751: );
1752: RAISE fnd_api.g_exc_error;
1753: END IF;
1754:
1755: IF p_template_rec.xprt_clause_mandatory_flag <>
1756: okc_api.g_miss_char

Line 1769: RAISE fnd_api.g_exc_error;

1765: p_token1_value => l_template_db_rec.status_code,
1766: p_token2 => 'FIELD',
1767: p_token2_value => 'XPRT_CLAUSE_MANDATORY_FLAG'
1768: );
1769: RAISE fnd_api.g_exc_error;
1770: END IF;
1771: END IF; -- l_template_db_rec.status_code = 'APPROVED'
1772: END IF; -- g_headerinfo_update_allowed = 'N'
1773:

Line 1797: p_init_msg_list => fnd_api.g_true,

1793: -- update_row
1794: BEGIN
1795: okc_terms_templates_grp.update_template
1796: (p_api_version => 1,
1797: p_init_msg_list => fnd_api.g_true,
1798: p_validation_level => fnd_api.g_valid_level_full,
1799: p_commit => fnd_api.g_false,
1800: x_return_status => x_return_status,
1801: x_msg_count => x_msg_count,

Line 1798: p_validation_level => fnd_api.g_valid_level_full,

1794: BEGIN
1795: okc_terms_templates_grp.update_template
1796: (p_api_version => 1,
1797: p_init_msg_list => fnd_api.g_true,
1798: p_validation_level => fnd_api.g_valid_level_full,
1799: p_commit => fnd_api.g_false,
1800: x_return_status => x_return_status,
1801: x_msg_count => x_msg_count,
1802: x_msg_data => x_msg_data,

Line 1799: p_commit => fnd_api.g_false,

1795: okc_terms_templates_grp.update_template
1796: (p_api_version => 1,
1797: p_init_msg_list => fnd_api.g_true,
1798: p_validation_level => fnd_api.g_valid_level_full,
1799: p_commit => fnd_api.g_false,
1800: x_return_status => x_return_status,
1801: x_msg_count => x_msg_count,
1802: x_msg_data => x_msg_data,
1803: p_template_name => p_template_rec.template_name,

Line 1850: RAISE fnd_api.g_exc_error;

1846:
1847: IF x_return_status <> g_ret_sts_success
1848: THEN
1849: p_template_rec.status := g_ret_sts_error;
1850: RAISE fnd_api.g_exc_error;
1851: ELSE
1852: p_template_rec.status := g_ret_sts_success;
1853: END IF;
1854: EXCEPTION

Line 1867: p_commit IN VARCHAR2 := fnd_api.g_false

1863: END update_template;
1864:
1865: PROCEDURE create_template (
1866: p_template_tbl IN OUT NOCOPY terms_template_tbl_type,
1867: p_commit IN VARCHAR2 := fnd_api.g_false
1868: )
1869: IS
1870: l_success_count NUMBER := 0;
1871: l_error_count NUMBER := 0;

Line 1891: IF fnd_api.to_boolean (p_commit)

1887: IF p_template_tbl (i).status = g_ret_sts_success
1888: THEN
1889: l_success_count := l_success_count + 1;
1890:
1891: IF fnd_api.to_boolean (p_commit)
1892: THEN
1893: COMMIT;
1894: END IF;
1895: ELSE

Line 1900: WHEN fnd_api.g_exc_error

1896: l_error_count := l_error_count + 1;
1897: ROLLBACK TO create_template_sp;
1898: END IF;
1899: EXCEPTION
1900: WHEN fnd_api.g_exc_error
1901: THEN
1902: p_template_tbl (i).status := g_ret_sts_error;
1903: set_proc_error_message (p_proc => l_proc);
1904: set_rec_num_message (p_rec_num => l_failed_rec_num);

Line 1937: p_commit IN VARCHAR2 := fnd_api.g_false

1933: END create_template;
1934:
1935: PROCEDURE update_template (
1936: p_template_tbl IN OUT NOCOPY okc_imp_terms_templates_pvt.terms_template_tbl_type,
1937: p_commit IN VARCHAR2 := fnd_api.g_false
1938: )
1939: IS
1940: l_success_count NUMBER := 0;
1941: l_error_count NUMBER := 0;

Line 1961: IF fnd_api.to_boolean (p_commit)

1957: IF p_template_tbl (i).status = g_ret_sts_success
1958: THEN
1959: l_success_count := l_success_count + 1;
1960:
1961: IF fnd_api.to_boolean (p_commit)
1962: THEN
1963: COMMIT;
1964: END IF;
1965: ELSE

Line 1970: WHEN fnd_api.g_exc_error

1966: l_error_count := l_error_count + 1;
1967: ROLLBACK TO update_template_sp;
1968: END IF;
1969: EXCEPTION
1970: WHEN fnd_api.g_exc_error
1971: THEN
1972: p_template_tbl (i).status := g_ret_sts_error;
1973: set_proc_error_message (p_proc => l_proc);
1974: set_rec_num_message (p_rec_num => l_failed_rec_num);

Line 2007: p_commit IN VARCHAR2 := fnd_api.g_false

2003: END update_template;
2004:
2005: PROCEDURE create_section (
2006: p_section_rec IN OUT NOCOPY section_rec_type,
2007: p_commit IN VARCHAR2 := fnd_api.g_false
2008: )
2009: IS
2010: x_return_status VARCHAR2 (1);
2011: x_msg_count NUMBER;

Line 2277: RAISE fnd_api.g_exc_error;

2273: p_msg_name => 'OKC_I_NOT_NULL',
2274: p_token1 => 'FIELD',
2275: p_token1_value => 'SECTION_SEQUENCE'
2276: );
2277: RAISE fnd_api.g_exc_error;
2278: END IF;
2279:
2280: IF p_section_rec.document_id IS NULL
2281: THEN

Line 2288: RAISE fnd_api.g_exc_error;

2284: p_token1 => 'FIELD',
2285: p_token1_value => 'TEMPLATE_ID'
2286: -- since the flow is for only templates
2287: );
2288: RAISE fnd_api.g_exc_error;
2289: END IF;
2290:
2291: IF p_section_rec.scn_code IS NULL
2292: THEN

Line 2298: RAISE fnd_api.g_exc_error;

2294: p_msg_name => 'OKC_I_NOT_NULL',
2295: p_token1 => 'FIELD',
2296: p_token1_value => 'SCN_CODE'
2297: );
2298: RAISE fnd_api.g_exc_error;
2299: END IF;
2300:
2301: -- Validate Docuemnt Type
2302: IF p_section_rec.document_type <> 'TEMPLATE'

Line 2309: RAISE fnd_api.g_exc_error;

2305: p_msg_name => 'OKC_I_INVALID_VALUE',
2306: p_token1 => 'FIELD',
2307: p_token1_value => 'TEMPLATE'
2308: );
2309: RAISE fnd_api.g_exc_error;
2310: END IF;
2311:
2312: /*IF inittemplateinfo (p_template_id => p_section_rec.document_id) <>
2313: 'Y'

Line 2320: RAISE fnd_api.g_exc_error;

2316: p_msg_name => 'OKC_I_INVALID_VALUE',
2317: p_token1 => 'FIELD',
2318: p_token1_value => 'TEMPLATE_ID'
2319: );
2320: RAISE fnd_api.g_exc_error;
2321: END IF; */
2322:
2323: -- Validate SCN ID for sub-sections
2324: IF p_section_rec.scn_id IS NOT NULL

Line 2335: RAISE fnd_api.g_exc_error;

2331: p_msg_name => 'OKC_I_INVALID_VALUE',
2332: p_token1 => 'FIELD',
2333: p_token1_value => 'SCN_ID'
2334: );
2335: RAISE fnd_api.g_exc_error;
2336: END IF;
2337: END IF;
2338:
2339: -- Validate SCN_CODE

Line 2350: RAISE fnd_api.g_exc_error;

2346: p_msg_name => 'OKC_I_INVALID_VALUE',
2347: p_token1 => 'FIELD',
2348: p_token1_value => 'SCN_CODE'
2349: );
2350: RAISE fnd_api.g_exc_error;
2351: END IF;
2352: -- Add validation for sequence
2353: EXCEPTION
2354: WHEN OTHERS

Line 2374: RAISE fnd_api.g_exc_error;

2370: p_msg_name => 'OKC_I_INVALID_VALUE',
2371: p_token1 => 'FIELD',
2372: p_token1_value => 'TEMPLATE_ID'
2373: );
2374: RAISE fnd_api.g_exc_error;
2375: END IF;
2376: END IF;
2377:
2378: IF g_clause_update_allowed <> 'Y'

Line 2387: RAISE fnd_api.g_exc_error;

2383: p_token1_value => g_template_status_code,
2384: p_token2 => 'OBJECT',
2385: p_token2_value => 'SECTION'
2386: );
2387: RAISE fnd_api.g_exc_error;
2388: END IF;
2389:
2390: -- Default Row
2391: default_row (p_section_rec => p_section_rec);

Line 2410: p_init_msg_list => fnd_api.g_true,

2406: fnd_msg_pub.initialize;
2407: -- Call to Insert Row
2408: okc_terms_sections_grp.create_section
2409: (p_api_version => 1,
2410: p_init_msg_list => fnd_api.g_true,
2411: p_validation_level => fnd_api.g_valid_level_full,
2412: p_commit => fnd_api.g_false,
2413: x_return_status => x_return_status,
2414: x_msg_count => x_msg_count,

Line 2411: p_validation_level => fnd_api.g_valid_level_full,

2407: -- Call to Insert Row
2408: okc_terms_sections_grp.create_section
2409: (p_api_version => 1,
2410: p_init_msg_list => fnd_api.g_true,
2411: p_validation_level => fnd_api.g_valid_level_full,
2412: p_commit => fnd_api.g_false,
2413: x_return_status => x_return_status,
2414: x_msg_count => x_msg_count,
2415: x_msg_data => x_msg_data,

Line 2412: p_commit => fnd_api.g_false,

2408: okc_terms_sections_grp.create_section
2409: (p_api_version => 1,
2410: p_init_msg_list => fnd_api.g_true,
2411: p_validation_level => fnd_api.g_valid_level_full,
2412: p_commit => fnd_api.g_false,
2413: x_return_status => x_return_status,
2414: x_msg_count => x_msg_count,
2415: x_msg_data => x_msg_data,
2416: p_mode => 'NORMAL', --'AMEND' or 'NORMAL'

Line 2457: RAISE fnd_api.g_exc_error;

2453: p_section_rec.status := x_return_status;
2454: ELSE
2455: p_section_rec.status := g_ret_sts_error;
2456: ROLLBACK TO create_section_sp;
2457: RAISE fnd_api.g_exc_error;
2458: END IF;
2459:
2460: IF fnd_api.to_boolean (p_commit)
2461: THEN

Line 2460: IF fnd_api.to_boolean (p_commit)

2456: ROLLBACK TO create_section_sp;
2457: RAISE fnd_api.g_exc_error;
2458: END IF;
2459:
2460: IF fnd_api.to_boolean (p_commit)
2461: THEN
2462: COMMIT;
2463: END IF;
2464: EXCEPTION

Line 2465: WHEN fnd_api.g_exc_error

2461: THEN
2462: COMMIT;
2463: END IF;
2464: EXCEPTION
2465: WHEN fnd_api.g_exc_error
2466: THEN
2467: p_section_rec.status := g_ret_sts_error;
2468: set_proc_error_message (p_proc => l_proc);
2469: read_message (l_error_message);

Line 2494: p_commit IN VARCHAR2 := fnd_api.g_false

2490: ---------------------------------------------------------------------------
2491: ---------------------------------------------------------------------------
2492: PROCEDURE create_article (
2493: p_article_rec IN OUT NOCOPY k_article_rec_type,
2494: p_commit IN VARCHAR2 := fnd_api.g_false
2495: )
2496: IS
2497: x_return_status VARCHAR2 (1);
2498: x_msg_count NUMBER;

Line 2806: RAISE fnd_api.g_exc_error;

2802: p_msg_name => 'OKC_I_NOT_NULL',
2803: p_token1 => 'FIELD',
2804: p_token1_value => 'SAV_SAE_ID'
2805: );
2806: RAISE fnd_api.g_exc_error;
2807: END IF;
2808:
2809: IF p_article_rec.document_type IS NULL
2810: THEN

Line 2816: RAISE fnd_api.g_exc_error;

2812: p_msg_name => 'OKC_I_NOT_NULL',
2813: p_token1 => 'FIELD',
2814: p_token1_value => 'DOCUMENT_TYPE'
2815: );
2816: RAISE fnd_api.g_exc_error;
2817: END IF;
2818:
2819: IF p_article_rec.document_id IS NULL
2820: THEN

Line 2826: RAISE fnd_api.g_exc_error;

2822: p_msg_name => 'OKC_I_NOT_NULL',
2823: p_token1 => 'FIELD',
2824: p_token1_value => 'DOCUMENT_ID'
2825: );
2826: RAISE fnd_api.g_exc_error;
2827: END IF;
2828:
2829: IF p_article_rec.scn_id IS NULL
2830: THEN

Line 2836: RAISE fnd_api.g_exc_error;

2832: p_msg_name => 'OKC_I_NOT_NULL',
2833: p_token1 => 'FIELD',
2834: p_token1_value => 'SCN_ID'
2835: );
2836: RAISE fnd_api.g_exc_error;
2837: END IF;
2838:
2839: IF p_article_rec.display_sequence IS NULL
2840: THEN

Line 2846: RAISE fnd_api.g_exc_error;

2842: p_msg_name => 'OKC_I_NOT_NULL',
2843: p_token1 => 'FIELD',
2844: p_token1_value => 'DISPLAY_SEQUENCE'
2845: );
2846: RAISE fnd_api.g_exc_error;
2847: END IF;
2848:
2849: -- Validate the input values
2850: /*

Line 2859: RAISE fnd_api.g_exc_error;

2855: p_msg_name => 'OKC_I_INVALID_VALUE',
2856: p_token1 => 'FIELD',
2857: p_token1_value => 'TEMPLATE_ID'
2858: );
2859: RAISE fnd_api.g_exc_error;
2860: END IF; */
2861: IF isvalidou (p_org_id => g_template_org_id) <> 'Y'
2862: THEN
2863: -- Can'not access template from this resp

Line 2868: RAISE fnd_api.g_exc_error;

2864: okc_api.set_message
2865: (p_app_name => g_app_name,
2866: p_msg_name => 'Can not access Template. Please change the responsibility'
2867: );
2868: RAISE fnd_api.g_exc_error;
2869: END IF;
2870:
2871: -- Set the policy context
2872:

Line 2885: RAISE fnd_api.g_exc_error;

2881: p_msg_name => 'OKC_I_INVALID_VALUE',
2882: p_token1 => 'FIELD',
2883: p_token1_value => 'SAV_SAE_ID'
2884: );
2885: RAISE fnd_api.g_exc_error;
2886: END IF;
2887:
2888: -- Validate
2889:

Line 2903: RAISE fnd_api.g_exc_error;

2899: p_msg_name => 'OKC_I_INVALID_VALUE',
2900: p_token1 => 'FIELD',
2901: p_token1_value => 'SCN_ID'
2902: );
2903: RAISE fnd_api.g_exc_error;
2904: END IF;
2905:
2906: /* RWA Changes Start */
2907: IF p_article_rec.mandatory_yn IS NOT NULL

Line 2915: RAISE fnd_api.g_exc_error;

2911: p_msg_name => 'OKC_I_INVALID_VALUE',
2912: p_token1 => 'FIELD',
2913: p_token1_value => 'MANDATORY_YN'
2914: );
2915: RAISE fnd_api.g_exc_error;
2916: END IF;
2917:
2918: IF p_article_rec.mandatory_rwa IS NOT NULL
2919: AND isvalidlookup ('OKC_CLAUSE_RWA', p_article_rec.mandatory_rwa) =

Line 2927: RAISE fnd_api.g_exc_error;

2923: p_msg_name => 'OKC_I_INVALID_VALUE',
2924: p_token1 => 'FIELD',
2925: p_token1_value => 'MANDATORY_RWA'
2926: );
2927: RAISE fnd_api.g_exc_error;
2928: END IF;
2929: /* RWA Changes End */
2930: EXCEPTION
2931: WHEN OTHERS

Line 2951: RAISE fnd_api.g_exc_error;

2947: p_msg_name => 'OKC_I_INVALID_VALUE',
2948: p_token1 => 'FIELD',
2949: p_token1_value => 'TEMPLATE_ID'
2950: );
2951: RAISE fnd_api.g_exc_error;
2952: END IF;
2953: END IF;
2954:
2955: IF g_clause_update_allowed <> 'Y'

Line 2964: RAISE fnd_api.g_exc_error;

2960: p_token1_value => g_template_status_code,
2961: p_token2 => 'OBJECT',
2962: p_token2_value => 'ARTICLE'
2963: );
2964: RAISE fnd_api.g_exc_error;
2965: END IF;
2966:
2967: -- default_row
2968: default_row (p_article_rec => p_article_rec);

Line 3066: IF fnd_api.to_boolean (p_commit)

3062: INTO p_article_rec.ID;
3063:
3064: p_article_rec.status := g_ret_sts_success;
3065:
3066: IF fnd_api.to_boolean (p_commit)
3067: THEN
3068: COMMIT;
3069: END IF;
3070: EXCEPTION

Line 3071: WHEN fnd_api.g_exc_error

3067: THEN
3068: COMMIT;
3069: END IF;
3070: EXCEPTION
3071: WHEN fnd_api.g_exc_error
3072: THEN
3073: p_article_rec.status := g_ret_sts_error;
3074: set_proc_error_message (p_proc => l_proc);
3075: read_message (l_error_message);

Line 3098: p_commit IN VARCHAR2 := fnd_api.g_false

3094: END create_article;
3095:
3096: PROCEDURE create_section (
3097: p_section_tbl IN OUT NOCOPY section_tbl_type,
3098: p_commit IN VARCHAR2 := fnd_api.g_false
3099: )
3100: IS
3101: BEGIN
3102: FOR i IN 1 .. p_section_tbl.COUNT

Line 3110: p_commit IN VARCHAR2 := fnd_api.g_false

3106: END create_section;
3107:
3108: PROCEDURE create_article (
3109: p_article_tbl IN OUT NOCOPY k_article_tbl_type,
3110: p_commit IN VARCHAR2 := fnd_api.g_false
3111: )
3112: IS
3113: BEGIN
3114: FOR i IN 1 .. p_article_tbl.COUNT

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

3119:
3120: PROCEDURE create_template_revision (
3121: p_template_id IN NUMBER,
3122: p_copy_deliverables IN VARCHAR2 DEFAULT 'Y',
3123: p_commit IN VARCHAR2 := fnd_api.g_false,
3124: x_new_template_id OUT NOCOPY NUMBER,
3125: x_return_status OUT NOCOPY VARCHAR2,
3126: x_msg_data OUT NOCOPY VARCHAR2,
3127: x_msg_count OUT NOCOPY NUMBER

Line 3142: RAISE fnd_api.g_exc_error;

3138: p_msg_name => 'OKC_I_INVALID_VALUE',
3139: p_token1 => 'FIELD',
3140: p_token1_value => 'TEMPLATE_ID'
3141: );
3142: RAISE fnd_api.g_exc_error;
3143: END IF;
3144:
3145: IF g_template_status_code <> 'APPROVED'
3146: THEN

Line 3152: RAISE fnd_api.g_exc_error;

3148: p_msg_name => 'OKC_TERMS_REV_TMPL_INVALID',
3149: p_token1 => 'STATUS',
3150: p_token1_value => g_template_status_code
3151: );
3152: RAISE fnd_api.g_exc_error;
3153: END IF;
3154:
3155: -- Call 2 API
3156: okc_terms_copy_grp.create_template_revision

Line 3158: p_init_msg_list => fnd_api.g_true,

3154:
3155: -- Call 2 API
3156: okc_terms_copy_grp.create_template_revision
3157: (p_api_version => 1,
3158: p_init_msg_list => fnd_api.g_true,
3159: p_commit => p_commit,
3160: p_template_id => p_template_id,
3161: p_copy_deliverables => p_copy_deliverables,
3162: x_template_id => x_new_template_id,

Line 3168: WHEN fnd_api.g_exc_error

3164: x_msg_data => x_msg_data,
3165: x_msg_count => x_msg_count
3166: );
3167: EXCEPTION
3168: WHEN fnd_api.g_exc_error
3169: THEN
3170: x_return_status := g_ret_sts_error;
3171: set_proc_error_message (p_proc => l_proc);
3172: read_message (x_msg_data);

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

3188:
3189: PROCEDURE delete_articles (
3190: p_template_id IN NUMBER,
3191: p_k_article_id_tbl IN k_article_id_tbl_type,
3192: p_commit IN VARCHAR2 := fnd_api.g_false,
3193: x_k_article_id_tbl OUT NOCOPY k_article_id_tbl_type,
3194: x_return_status OUT NOCOPY VARCHAR2,
3195: x_msg_data OUT NOCOPY VARCHAR2
3196: )

Line 3211: RAISE fnd_api.g_exc_error;

3207: p_msg_name => 'OKC_I_INVALID_VALUE',
3208: p_token1 => 'FIELD',
3209: p_token1_value => 'TEMPLATE_ID'
3210: );
3211: RAISE fnd_api.g_exc_error;
3212: END IF;
3213: END IF;
3214:
3215: -- Validate Template OU also:

Line 3225: RAISE fnd_api.g_exc_error;

3221: p_token1_value => g_template_status_code,
3222: p_token2 => 'OBJECT',
3223: p_token2_value => 'ARTICLE'
3224: );
3225: RAISE fnd_api.g_exc_error;
3226: ELSE
3227: FORALL i IN 1 .. p_k_article_id_tbl.COUNT
3228: DELETE FROM okc_k_articles_b
3229: WHERE ID = p_k_article_id_tbl (i)

Line 3236: IF fnd_api.to_boolean (p_commit)

3232: RETURNING ID
3233: BULK COLLECT INTO x_k_article_id_tbl;
3234: END IF;
3235:
3236: IF fnd_api.to_boolean (p_commit)
3237: THEN
3238: COMMIT;
3239: END IF;
3240:

Line 3243: WHEN fnd_api.g_exc_error

3239: END IF;
3240:
3241: x_return_status := g_ret_sts_success;
3242: EXCEPTION
3243: WHEN fnd_api.g_exc_error
3244: THEN
3245: x_return_status := g_ret_sts_error;
3246: set_proc_error_message (p_proc => l_proc);
3247: read_message (x_msg_data);

Line 3249: IF fnd_api.to_boolean (p_commit)

3245: x_return_status := g_ret_sts_error;
3246: set_proc_error_message (p_proc => l_proc);
3247: read_message (x_msg_data);
3248:
3249: IF fnd_api.to_boolean (p_commit)
3250: THEN
3251: COMMIT;
3252: END IF;
3253:

Line 3268: IF fnd_api.to_boolean (p_commit)

3264: p_token2_value => SQLERRM
3265: );
3266: read_message (x_msg_data);
3267:
3268: IF fnd_api.to_boolean (p_commit)
3269: THEN
3270: COMMIT;
3271: END IF;
3272:

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

3275:
3276: PROCEDURE delete_sections (
3277: p_template_id IN NUMBER,
3278: p_section_id_tbl IN section_id_tbl_type,
3279: p_commit IN VARCHAR2 := fnd_api.g_false,
3280: x_section_id_tbl OUT NOCOPY section_id_tbl_type,
3281: x_return_status OUT NOCOPY VARCHAR2,
3282: x_msg_data OUT NOCOPY VARCHAR2
3283: )

Line 3299: RAISE fnd_api.g_exc_error;

3295: p_msg_name => 'OKC_I_INVALID_VALUE',
3296: p_token1 => 'FIELD',
3297: p_token1_value => 'TEMPLATE_ID'
3298: );
3299: RAISE fnd_api.g_exc_error;
3300: END IF;
3301: END IF;
3302:
3303: IF g_clause_update_allowed <> 'Y'

Line 3312: RAISE fnd_api.g_exc_error;

3308: p_token1_value => g_template_status_code,
3309: p_token2 => 'OBJECT',
3310: p_token2_value => 'SECTION'
3311: );
3312: RAISE fnd_api.g_exc_error;
3313: ELSE
3314: FORALL i IN 1 .. p_section_id_tbl.COUNT
3315: DELETE FROM okc_sections_b
3316: WHERE ID = p_section_id_tbl (i)

Line 3331: IF fnd_api.to_boolean (p_commit)

3327: AND document_type = 'TEMPLATE'
3328: AND document_id = p_template_id;
3329: x_return_status := g_ret_sts_success;
3330:
3331: IF fnd_api.to_boolean (p_commit)
3332: THEN
3333: COMMIT;
3334: END IF;
3335: EXCEPTION

Line 3336: WHEN fnd_api.g_exc_error

3332: THEN
3333: COMMIT;
3334: END IF;
3335: EXCEPTION
3336: WHEN fnd_api.g_exc_error
3337: THEN
3338: x_return_status := g_ret_sts_error;
3339: set_proc_error_message (p_proc => l_proc);
3340: read_message (x_msg_data);

Line 3342: IF fnd_api.to_boolean (p_commit)

3338: x_return_status := g_ret_sts_error;
3339: set_proc_error_message (p_proc => l_proc);
3340: read_message (x_msg_data);
3341:
3342: IF fnd_api.to_boolean (p_commit)
3343: THEN
3344: COMMIT;
3345: END IF;
3346:

Line 3361: IF fnd_api.to_boolean (p_commit)

3357: p_token2_value => SQLERRM
3358: );
3359: read_message (x_msg_data);
3360:
3361: IF fnd_api.to_boolean (p_commit)
3362: THEN
3363: COMMIT;
3364: END IF;
3365:

Line 3376: p_commit IN VARCHAR2 := fnd_api.g_false

3372: * Populate the internal ORg
3373: */
3374: PROCEDURE create_deliverable (
3375: p_deliverable_rec IN OUT NOCOPY deliverable_rec_type,
3376: p_commit IN VARCHAR2 := fnd_api.g_false
3377: )
3378: IS
3379: l_start_date_fixed VARCHAR2 (1);
3380: l_end_date_fixed VARCHAR2 (1);

Line 3871: RAISE fnd_api.g_exc_error;

3867: p_msg_name => 'OKC_I_INVALID_VALUE',
3868: p_token1 => 'FIELD',
3869: p_token1_value => 'BUSINESS_DOCUMENT_TYPE'
3870: );
3871: RAISE fnd_api.g_exc_error;
3872: END IF;
3873:
3874: -- Validate the Deliverable Type
3875: IF p_deliverable_rec.deliverable_type NOT IN

Line 3883: RAISE fnd_api.g_exc_error;

3879: p_msg_name => 'OKC_I_INVALID_VALUE',
3880: p_token1 => 'FIELD',
3881: p_token1_value => 'DELIVERABLE_TYPE'
3882: );
3883: RAISE fnd_api.g_exc_error;
3884: END IF;
3885:
3886: -- Validate the responsible_party
3887: IF ( ( p_deliverable_rec.deliverable_type = 'CONTRACTUAL'

Line 3902: RAISE fnd_api.g_exc_error;

3898: p_msg_name => 'OKC_I_INVALID_VALUE',
3899: p_token1 => 'FIELD',
3900: p_token1_value => 'RESPONSIBLE_PARTY'
3901: );
3902: RAISE fnd_api.g_exc_error;
3903: END IF;
3904:
3905: IF p_deliverable_rec.internal_party_contact_id IS NOT NULL
3906: AND isvalidcontact (p_deliverable_rec.internal_party_contact_id) <>

Line 3914: RAISE fnd_api.g_exc_error;

3910: p_msg_name => 'OKC_I_INVALID_VALUE',
3911: p_token1 => 'FIELD',
3912: p_token1_value => 'RESPONSIBLE_PARTY'
3913: );
3914: RAISE fnd_api.g_exc_error;
3915: END IF;
3916:
3917: IF p_deliverable_rec.requester_id IS NOT NULL
3918: AND isvalidcontact (p_deliverable_rec.requester_id) <> 'Y'

Line 3925: RAISE fnd_api.g_exc_error;

3921: p_msg_name => 'OKC_I_INVALID_VALUE',
3922: p_token1 => 'FIELD',
3923: p_token1_value => 'REQUESTER_ID'
3924: );
3925: RAISE fnd_api.g_exc_error;
3926: END IF;
3927:
3928: IF p_deliverable_rec.deliverable_name IS NULL
3929: THEN

Line 3935: RAISE fnd_api.g_exc_error;

3931: p_msg_name => 'OKC_I_NOT_NULL',
3932: p_token1 => 'FIELD',
3933: p_token1_value => 'DELIVERABLE_NAME'
3934: );
3935: RAISE fnd_api.g_exc_error;
3936: END IF;
3937:
3938: IF p_deliverable_rec.fixed_due_date_yn = 'N'
3939: THEN

Line 3948: RAISE fnd_api.g_exc_error;

3944: p_msg_name => 'OKC_I_NOT_NULL',
3945: p_token1 => 'FIELD',
3946: p_token1_value => 'RELATIVE_ST_DATE_EVENT_ID'
3947: );
3948: RAISE fnd_api.g_exc_error;
3949: END IF;
3950:
3951: IF p_deliverable_rec.relative_st_date_duration IS NULL
3952: THEN

Line 3959: RAISE fnd_api.g_exc_error;

3955: p_msg_name => 'OKC_I_NOT_NULL',
3956: p_token1 => 'FIELD',
3957: p_token1_value => 'RELATIVE_ST_DATE_DURATION'
3958: );
3959: RAISE fnd_api.g_exc_error;
3960: END IF;
3961:
3962: IF p_deliverable_rec.relative_st_date_uom IS NULL
3963: THEN

Line 3969: RAISE fnd_api.g_exc_error;

3965: p_msg_name => 'OKC_I_NOT_NULL',
3966: p_token1 => 'FIELD',
3967: p_token1_value => 'RELATIVE_ST_DATE_UOM'
3968: );
3969: RAISE fnd_api.g_exc_error;
3970: END IF;
3971:
3972: IF p_deliverable_rec.relative_st_date_event_id IS NOT NULL
3973: THEN

Line 3986: RAISE fnd_api.g_exc_error;

3982: p_msg_name => 'OKC_I_INVALID_VALUE',
3983: p_token1 => 'FIELD',
3984: p_token1_value => 'RELATIVE_ST_DATE_EVENT_ID'
3985: );
3986: RAISE fnd_api.g_exc_error;
3987: END IF;
3988: END IF;
3989: END IF;
3990:

Line 4092: RAISE fnd_api.g_exc_error;

4088: okc_api.set_message
4089: (p_app_name => g_app_name,
4090: p_msg_name => 'OKC_DEL_INCONSISTENT_DUE_DATES'
4091: );
4092: RAISE fnd_api.g_exc_error;
4093: END IF;
4094:
4095: -- it is ok to save a deliverable without due date
4096: -- but if the user enters some due date information, we need to make sure that it is complete

Line 4107: RAISE fnd_api.g_exc_error;

4103: okc_api.set_message
4104: (p_app_name => g_app_name,
4105: p_msg_name => 'OKC_DEL_NULL_FIXED_ST_DATE_UI'
4106: );
4107: RAISE fnd_api.g_exc_error;
4108: END IF;
4109: END IF; */
4110:
4111: ----------------------------------

Line 4132: RAISE fnd_api.g_exc_error;

4128: p_msg_name => l_resolved_msg_name,
4129: p_token1 => 'DEL_TOKEN',
4130: p_token1_value => l_resolved_token
4131: );
4132: RAISE fnd_api.g_exc_error;
4133: END IF;
4134:
4135: IF p_deliverable_rec.relative_st_date_duration < 0
4136: THEN

Line 4146: RAISE fnd_api.g_exc_error;

4142: p_msg_name => l_resolved_msg_name,
4143: p_token1 => 'DEL_TOKEN',
4144: p_token1_value => l_resolved_token
4145: );
4146: RAISE fnd_api.g_exc_error;
4147: END IF;
4148:
4149: IF p_deliverable_rec.relative_st_date_event_id IS NULL
4150: THEN

Line 4161: RAISE fnd_api.g_exc_error;

4157: p_token1 => 'DEL_TOKEN',
4158: p_token1_value => l_resolved_token
4159: );
4160:
4161: RAISE fnd_api.g_exc_error;
4162: END IF;
4163:
4164: IF p_deliverable_rec.relative_st_date_event_id IS NOT NULL
4165: THEN

Line 4178: RAISE fnd_api.g_exc_error;

4174: p_msg_name => 'OKC_I_INVALID_VALUE',
4175: p_token1 => 'FIELD',
4176: p_token1_value => 'RELATIVE_ST_DATE_EVENT_ID'
4177: );
4178: RAISE fnd_api.g_exc_error;
4179: END IF;
4180: END IF;
4181: END IF;
4182:

Line 4193: RAISE fnd_api.g_exc_error;

4189: okc_api.set_message
4190: (p_app_name => g_app_name,
4191: p_msg_name => 'OKC_DEL_NULL_REPEAT_WEEK_UI'
4192: );
4193: RAISE fnd_api.g_exc_error;
4194: END IF;
4195:
4196: IF p_deliverable_rec.repeating_duration < 0
4197: THEN

Line 4207: RAISE fnd_api.g_exc_error;

4203: p_token1 => 'DEL_TOKEN',
4204: p_token1_value => l_resolved_token
4205: );
4206:
4207: RAISE fnd_api.g_exc_error;
4208: END IF;
4209:
4210: IF isvalidlookup
4211: (p_lookup_type => 'DAY_OF_WEEK',

Line 4221: RAISE fnd_api.g_exc_error;

4217: okc_api.set_message
4218: (p_app_name => g_app_name,
4219: p_msg_name => 'OKC_DEL_INVALID_DAY_OF_WEEK'
4220: );
4221: RAISE fnd_api.g_exc_error;
4222: END IF;
4223: END IF;
4224:
4225: IF p_deliverable_rec.recurring_yn = 'Y'

Line 4239: RAISE fnd_api.g_exc_error;

4235: p_token1 => 'DEL_TOKEN',
4236: p_token1_value => l_resolved_token
4237: );
4238:
4239: RAISE fnd_api.g_exc_error;
4240: END IF;
4241:
4242: IF p_deliverable_rec.repeating_duration < 0
4243: THEN

Line 4252: RAISE fnd_api.g_exc_error;

4248: p_msg_name => l_resolved_msg_name,
4249: p_token1 => 'DEL_TOKEN',
4250: p_token1_value => l_resolved_token
4251: );
4252: RAISE fnd_api.g_exc_error;
4253: END IF;
4254:
4255: IF isvalidlookup
4256: (p_lookup_type => 'OKC_DAY_OF_MONTH',

Line 4266: RAISE fnd_api.g_exc_error;

4262: okc_api.set_message
4263: (p_app_name => g_app_name,
4264: p_msg_name => 'OKC_DEL_INVALID_DAY_OF_MONTH'
4265: );
4266: RAISE fnd_api.g_exc_error;
4267: END IF;
4268: END IF;
4269:
4270: /*

Line 4296: RAISE fnd_api.g_exc_error;

4292: p_token1 => 'DEL_TOKEN',
4293: p_token1_value => l_resolved_token
4294: );
4295:
4296: RAISE fnd_api.g_exc_error;
4297: END IF;
4298: END IF;
4299:
4300: IF ( p_deliverable_rec.recurring_yn = 'Y'

Line 4314: RAISE fnd_api.g_exc_error;

4310: p_token1 => 'DEL_TOKEN',
4311: p_token1_value => l_resolved_token
4312: );
4313:
4314: RAISE fnd_api.g_exc_error;
4315: END IF;
4316:
4317: IF ( p_deliverable_rec.recurring_yn = 'Y'
4318: AND p_deliverable_rec.relative_end_date_event_id IS NULL

Line 4333: RAISE fnd_api.g_exc_error;

4329: p_token1 => 'DEL_TOKEN',
4330: p_token1_value => l_resolved_token
4331: );
4332:
4333: RAISE fnd_api.g_exc_error;
4334: END IF;
4335: END IF;
4336:
4337: IF p_deliverable_rec.recurring_yn = 'Y'

Line 4355: RAISE fnd_api.g_exc_error;

4351: p_token1_value => l_resolved_token
4352: );
4353:
4354:
4355: RAISE fnd_api.g_exc_error;
4356: END IF;
4357:
4358: IF p_deliverable_rec.relative_end_date_duration < 0
4359: THEN

Line 4375: RAISE fnd_api.g_exc_error;

4371: p_token1 => 'DEL_TOKEN',
4372: p_token1_value => l_resolved_token
4373: );
4374:
4375: RAISE fnd_api.g_exc_error;
4376: END IF;
4377:
4378: IF p_deliverable_rec.relative_end_date_event_id IS NULL
4379: THEN

Line 4394: RAISE fnd_api.g_exc_error;

4390: p_token1 => 'DEL_TOKEN',
4391: p_token1_value => l_resolved_token
4392: );
4393:
4394: RAISE fnd_api.g_exc_error;
4395: END IF;
4396:
4397: IF p_deliverable_rec.relative_end_date_event_id IS NOT NULL
4398: THEN

Line 4411: RAISE fnd_api.g_exc_error;

4407: p_msg_name => 'OKC_I_INVALID_VALUE',
4408: p_token1 => 'FIELD',
4409: p_token1_value => 'RELATIVE_END_DATE_EVENT_ID'
4410: );
4411: RAISE fnd_api.g_exc_error;
4412: END IF;
4413: END IF;
4414: END IF;
4415:

Line 4438: RAISE fnd_api.g_exc_error;

4434: p_msg_name => 'OKC_I_INVALID_VALUE',
4435: p_token1 => 'FIELD',
4436: p_token1_value => l_resolved_msg_name
4437: );
4438: RAISE fnd_api.g_exc_error;
4439: END IF;
4440: END IF;
4441:
4442: /*

Line 4552: RAISE fnd_api.g_exc_error;

4548: p_msg_name => l_resolved_msg_name,
4549: p_token1 => 'DEL_TOKEN',
4550: p_token1_value => l_resolved_token
4551: );
4552: RAISE fnd_api.g_exc_error;
4553: END IF;
4554:
4555: -- Scenario 2 is always valid no need to check
4556:

Line 4575: RAISE fnd_api.g_exc_error;

4571: p_token1 => 'DEL_TOKEN',
4572: p_token1_value => l_resolved_token
4573: );
4574:
4575: RAISE fnd_api.g_exc_error;
4576: END IF;
4577:
4578: IF ( 'A' = l_startba
4579: AND 'A' = l_endba

Line 4598: RAISE fnd_api.g_exc_error;

4594: p_token1 => 'DEL_TOKEN',
4595: p_token1_value => l_resolved_token
4596: );
4597:
4598: RAISE fnd_api.g_exc_error;
4599: END IF;
4600: END IF;
4601: END IF;
4602: END IF;

Line 4615: RAISE fnd_api.g_exc_error;

4611: p_msg_name => 'OKC_I_INVALID_VALUE',
4612: p_token1 => 'FIELD',
4613: p_token1_value => 'ESCALATION_ASSIGNEE'
4614: );
4615: RAISE fnd_api.g_exc_error;
4616: END IF;
4617: END IF;
4618: EXCEPTION
4619: WHEN OTHERS

Line 4639: RAISE fnd_api.g_exc_error;

4635: p_msg_name => 'OKC_I_INVALID_VALUE',
4636: p_token1 => 'FIELD',
4637: p_token1_value => 'TEMPLATE_ID'
4638: );
4639: RAISE fnd_api.g_exc_error;
4640: END IF;
4641: END IF;
4642:
4643: IF g_template_intent = 'S'

Line 4650: RAISE fnd_api.g_exc_error;

4646: p_msg_name => 'OKC_I_INVALID_VALUE',
4647: p_token1 => 'FIELD',
4648: p_token1_value => 'TEMPLATE_INTENT'
4649: );
4650: RAISE fnd_api.g_exc_error;
4651: END IF;
4652:
4653: IF g_deliverable_update_allowed <> 'Y'
4654: THEN

Line 4662: RAISE fnd_api.g_exc_error;

4658: p_token1_value => g_template_status_code,
4659: p_token2 => 'OBJECT',
4660: p_token2_value => 'DELIVERABLE'
4661: );
4662: RAISE fnd_api.g_exc_error;
4663: END IF;
4664:
4665: default_row (p_deliverable_rec => p_deliverable_rec);
4666:

Line 4909: IF fnd_api.to_boolean (p_commit)

4905: );
4906:
4907: p_deliverable_rec.status := g_ret_sts_success;
4908:
4909: IF fnd_api.to_boolean (p_commit)
4910: THEN
4911: COMMIT;
4912: END IF;
4913: EXCEPTION

Line 4914: WHEN fnd_api.g_exc_error

4910: THEN
4911: COMMIT;
4912: END IF;
4913: EXCEPTION
4914: WHEN fnd_api.g_exc_error
4915: THEN
4916: p_deliverable_rec.status := g_ret_sts_error;
4917: set_proc_error_message (p_proc => l_proc);
4918: read_message (l_error_message);

Line 4941: p_commit IN VARCHAR2 := fnd_api.g_false

4937: END create_deliverable;
4938:
4939: PROCEDURE create_deliverable (
4940: p_deliverable_tbl IN OUT NOCOPY deliverable_tbl_type,
4941: p_commit IN VARCHAR2 := fnd_api.g_false
4942: )
4943: IS
4944: BEGIN
4945: IF p_deliverable_tbl.COUNT > 0

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

4965:
4966: PROCEDURE delete_deliverables (
4967: p_template_id IN NUMBER,
4968: p_deliverable_id_tbl IN deliverable_id_tbl_type,
4969: p_commit IN VARCHAR2 := fnd_api.g_false,
4970: x_deliverable_id_tbl OUT NOCOPY deliverable_id_tbl_type,
4971: x_return_status OUT NOCOPY VARCHAR2,
4972: x_msg_data OUT NOCOPY VARCHAR2
4973: )

Line 4989: RAISE fnd_api.g_exc_error;

4985: p_msg_name => 'OKC_I_INVALID_VALUE',
4986: p_token1 => 'FIELD',
4987: p_token1_value => 'TEMPLATE_ID'
4988: );
4989: RAISE fnd_api.g_exc_error;
4990: END IF;
4991: END IF;
4992:
4993: IF g_deliverable_update_allowed <> 'Y'

Line 5002: RAISE fnd_api.g_exc_error;

4998: p_token1_value => g_template_status_code,
4999: p_token2 => 'OBJECT',
5000: p_token2_value => 'DELIVERABLE'
5001: );
5002: RAISE fnd_api.g_exc_error;
5003: ELSE
5004: FORALL i IN 1 .. p_deliverable_id_tbl.COUNT
5005: DELETE FROM okc_deliverables
5006: WHERE deliverable_id = p_deliverable_id_tbl (i)

Line 5015: IF fnd_api.to_boolean (p_commit)

5011: END IF;
5012:
5013: x_return_status := g_ret_sts_success;
5014:
5015: IF fnd_api.to_boolean (p_commit)
5016: THEN
5017: COMMIT;
5018: END IF;
5019: EXCEPTION

Line 5020: WHEN fnd_api.g_exc_error

5016: THEN
5017: COMMIT;
5018: END IF;
5019: EXCEPTION
5020: WHEN fnd_api.g_exc_error
5021: THEN
5022: x_return_status := g_ret_sts_error;
5023: set_proc_error_message (p_proc => l_proc);
5024: read_message (x_msg_data);

Line 5026: IF fnd_api.to_boolean (p_commit)

5022: x_return_status := g_ret_sts_error;
5023: set_proc_error_message (p_proc => l_proc);
5024: read_message (x_msg_data);
5025:
5026: IF fnd_api.to_boolean (p_commit)
5027: THEN
5028: COMMIT;
5029: END IF;
5030:

Line 5045: IF fnd_api.to_boolean (p_commit)

5041: p_token2_value => SQLERRM
5042: );
5043: read_message (x_msg_data);
5044:
5045: IF fnd_api.to_boolean (p_commit)
5046: THEN
5047: COMMIT;
5048: END IF;
5049:

Line 5078: RAISE fnd_api.g_exc_error;

5074: okc_api.g_required_value,
5075: okc_api.g_col_name_token,
5076: 'TEMPLATE_ID'
5077: );
5078: RAISE fnd_api.g_exc_error;
5079: -- Template id must not be null and it must be a valid template
5080: ELSIF inittemplateinfo (p_template_id) <> 'Y'
5081: THEN
5082: okc_api.set_message (g_app_name,

Line 5087: RAISE fnd_api.g_exc_error;

5083: okc_api.g_invalid_value,
5084: okc_api.g_col_name_token,
5085: 'TEMPLATE_ID'
5086: );
5087: RAISE fnd_api.g_exc_error;
5088: END IF;
5089:
5090: -- Validate template status
5091: IF g_headerinfo_update_allowed = 'N'

Line 5100: RAISE fnd_api.g_exc_error;

5096: p_msg_name => 'OKC_I_TEMP_STS_NO_UPD',
5097: p_token1 => 'STATUS',
5098: p_token1_value => g_template_status_code
5099: );
5100: RAISE fnd_api.g_exc_error;
5101: END IF;
5102:
5103: -- If mode is update or delete, validate the allowed_tmpl_usages_id with template id
5104: -- Get object version number and document type details if the user has not already provided.

Line 5114: RAISE fnd_api.g_exc_error;

5110: okc_api.g_required_value,
5111: okc_api.g_col_name_token,
5112: 'ALLOWED_TMPL_USAGES_ID'
5113: );
5114: RAISE fnd_api.g_exc_error;
5115: -- Validate and initialize the p_tmpl_usage_rec
5116: ELSIF validate_tmpl_usage_id (p_template_id, p_tmpl_usage_rec,
5117: p_mode) <> 'Y'
5118: THEN

Line 5124: RAISE fnd_api.g_exc_error;

5120: okc_api.g_invalid_value,
5121: okc_api.g_col_name_token,
5122: 'ALLOWED_TMPL_USAGES_ID'
5123: );
5124: RAISE fnd_api.g_exc_error;
5125: END IF;
5126: END IF;
5127:
5128: -- If the mode is delete do not validate the document_type

Line 5139: RAISE fnd_api.g_exc_error;

5135: okc_api.g_required_value,
5136: okc_api.g_col_name_token,
5137: 'DOCUMENT_TYPE'
5138: );
5139: RAISE fnd_api.g_exc_error;
5140: ELSE
5141: l_doc_intent := NULL;
5142:
5143: OPEN l_doc_intent_csr;

Line 5157: RAISE fnd_api.g_exc_error;

5153: 'OKC_TMPL_ALWD_USG_WRONG_INTENT',
5154: 'DOCUMENT_TYPE',
5155: p_tmpl_usage_rec.document_type
5156: );
5157: RAISE fnd_api.g_exc_error;
5158: END IF;
5159:
5160: IF validate_bus_doc_type (p_tmpl_usage_rec.document_type) <> 'Y'
5161: THEN

Line 5167: RAISE fnd_api.g_exc_error;

5163: okc_api.g_invalid_value,
5164: okc_api.g_col_name_token,
5165: 'DOCUMENT_TYPE'
5166: );
5167: RAISE fnd_api.g_exc_error;
5168: END IF;
5169: END IF;
5170: END IF;
5171: EXCEPTION

Line 5334: p_init_msg_list => fnd_api.g_true,

5330: );
5331: -- Insert the Row
5332: okc_allowed_tmpl_usages_grp.create_allowed_tmpl_usages
5333: (p_api_version => 1,
5334: p_init_msg_list => fnd_api.g_true,
5335: p_validation_level => fnd_api.g_valid_level_full,
5336: p_commit => fnd_api.g_false,
5337: x_return_status => x_return_status,
5338: x_msg_count => x_msg_count,

Line 5335: p_validation_level => fnd_api.g_valid_level_full,

5331: -- Insert the Row
5332: okc_allowed_tmpl_usages_grp.create_allowed_tmpl_usages
5333: (p_api_version => 1,
5334: p_init_msg_list => fnd_api.g_true,
5335: p_validation_level => fnd_api.g_valid_level_full,
5336: p_commit => fnd_api.g_false,
5337: x_return_status => x_return_status,
5338: x_msg_count => x_msg_count,
5339: x_msg_data => x_msg_data,

Line 5336: p_commit => fnd_api.g_false,

5332: okc_allowed_tmpl_usages_grp.create_allowed_tmpl_usages
5333: (p_api_version => 1,
5334: p_init_msg_list => fnd_api.g_true,
5335: p_validation_level => fnd_api.g_valid_level_full,
5336: p_commit => fnd_api.g_false,
5337: x_return_status => x_return_status,
5338: x_msg_count => x_msg_count,
5339: x_msg_data => x_msg_data,
5340: p_template_id => p_template_id,

Line 5366: RAISE fnd_api.g_exc_error;

5362:
5363: IF x_return_status <> g_ret_sts_success
5364: THEN
5365: p_tmpl_usage_rec.status := g_ret_sts_error;
5366: RAISE fnd_api.g_exc_error;
5367: END IF;
5368: EXCEPTION
5369: WHEN OTHERS
5370: THEN

Line 5378: p_commit IN VARCHAR2 := fnd_api.g_false

5374:
5375: PROCEDURE create_tmpl_usage (
5376: p_template_id IN NUMBER,
5377: p_tmpl_usage_tbl IN OUT NOCOPY tmpl_usage_tbl_type,
5378: p_commit IN VARCHAR2 := fnd_api.g_false
5379: )
5380: IS
5381: l_error_message VARCHAR2 (2000);
5382: BEGIN

Line 5396: IF fnd_api.to_boolean (p_commit)

5392: (i)
5393: );
5394: p_tmpl_usage_tbl (i).status := g_ret_sts_success;
5395:
5396: IF fnd_api.to_boolean (p_commit)
5397: THEN
5398: COMMIT;
5399: END IF;
5400: EXCEPTION

Line 5401: WHEN fnd_api.g_exc_error

5397: THEN
5398: COMMIT;
5399: END IF;
5400: EXCEPTION
5401: WHEN fnd_api.g_exc_error
5402: THEN
5403: p_tmpl_usage_tbl (i).status := g_ret_sts_error;
5404: read_message (l_error_message);
5405: p_tmpl_usage_tbl (i).errmsg := l_error_message;

Line 5446: p_init_msg_list => fnd_api.g_true,

5442: validate_tmpl_usage (p_template_id, p_tmpl_usage_rec, 'UPDATE');
5443: -- Call API to validate and Update
5444: okc_allowed_tmpl_usages_grp.update_allowed_tmpl_usages
5445: (p_api_version => 1,
5446: p_init_msg_list => fnd_api.g_true,
5447: p_validation_level => fnd_api.g_valid_level_full,
5448: p_commit => fnd_api.g_false,
5449: x_return_status => x_return_status,
5450: x_msg_count => x_msg_count,

Line 5447: p_validation_level => fnd_api.g_valid_level_full,

5443: -- Call API to validate and Update
5444: okc_allowed_tmpl_usages_grp.update_allowed_tmpl_usages
5445: (p_api_version => 1,
5446: p_init_msg_list => fnd_api.g_true,
5447: p_validation_level => fnd_api.g_valid_level_full,
5448: p_commit => fnd_api.g_false,
5449: x_return_status => x_return_status,
5450: x_msg_count => x_msg_count,
5451: x_msg_data => x_msg_data,

Line 5448: p_commit => fnd_api.g_false,

5444: okc_allowed_tmpl_usages_grp.update_allowed_tmpl_usages
5445: (p_api_version => 1,
5446: p_init_msg_list => fnd_api.g_true,
5447: p_validation_level => fnd_api.g_valid_level_full,
5448: p_commit => fnd_api.g_false,
5449: x_return_status => x_return_status,
5450: x_msg_count => x_msg_count,
5451: x_msg_data => x_msg_data,
5452: p_template_id => p_template_id,

Line 5478: RAISE fnd_api.g_exc_error;

5474:
5475: IF x_return_status <> g_ret_sts_success
5476: THEN
5477: p_tmpl_usage_rec.status := g_ret_sts_error;
5478: RAISE fnd_api.g_exc_error;
5479: END IF;
5480: EXCEPTION
5481: WHEN OTHERS
5482: THEN

Line 5490: p_commit IN VARCHAR2 := fnd_api.g_false

5486:
5487: PROCEDURE update_tmpl_usage (
5488: p_template_id IN NUMBER,
5489: p_tmpl_usage_tbl IN OUT NOCOPY tmpl_usage_tbl_type,
5490: p_commit IN VARCHAR2 := fnd_api.g_false
5491: )
5492: IS
5493: l_error_message VARCHAR2 (2000);
5494: BEGIN

Line 5508: IF fnd_api.to_boolean (p_commit)

5504: (i)
5505: );
5506: p_tmpl_usage_tbl (i).status := g_ret_sts_success;
5507:
5508: IF fnd_api.to_boolean (p_commit)
5509: THEN
5510: COMMIT;
5511: END IF;
5512: EXCEPTION

Line 5513: WHEN fnd_api.g_exc_error

5509: THEN
5510: COMMIT;
5511: END IF;
5512: EXCEPTION
5513: WHEN fnd_api.g_exc_error
5514: THEN
5515: p_tmpl_usage_tbl (i).status := g_ret_sts_error;
5516: read_message (l_error_message);
5517: p_tmpl_usage_tbl (i).errmsg := l_error_message;

Line 5558: p_init_msg_list => fnd_api.g_true,

5554: validate_tmpl_usage (p_template_id, p_tmpl_usage_rec, 'DELETE');
5555: -- Call API to validate and Update
5556: okc_allowed_tmpl_usages_grp.delete_allowed_tmpl_usages
5557: (p_api_version => 1,
5558: p_init_msg_list => fnd_api.g_true,
5559: p_commit => fnd_api.g_false,
5560: x_return_status => x_return_status,
5561: x_msg_count => x_msg_count,
5562: x_msg_data => x_msg_data,

Line 5559: p_commit => fnd_api.g_false,

5555: -- Call API to validate and Update
5556: okc_allowed_tmpl_usages_grp.delete_allowed_tmpl_usages
5557: (p_api_version => 1,
5558: p_init_msg_list => fnd_api.g_true,
5559: p_commit => fnd_api.g_false,
5560: x_return_status => x_return_status,
5561: x_msg_count => x_msg_count,
5562: x_msg_data => x_msg_data,
5563: p_allowed_tmpl_usages_id => p_tmpl_usage_rec.allowed_tmpl_usages_id,

Line 5570: RAISE fnd_api.g_exc_error;

5566:
5567: IF x_return_status <> g_ret_sts_success
5568: THEN
5569: p_tmpl_usage_rec.status := g_ret_sts_error;
5570: RAISE fnd_api.g_exc_error;
5571: END IF;
5572: EXCEPTION
5573: WHEN OTHERS
5574: THEN

Line 5582: p_commit IN VARCHAR2 := fnd_api.g_false

5578:
5579: PROCEDURE delete_tmpl_usage (
5580: p_template_id IN NUMBER,
5581: p_tmpl_usage_tbl IN OUT NOCOPY tmpl_usage_tbl_type,
5582: p_commit IN VARCHAR2 := fnd_api.g_false
5583: )
5584: IS
5585: l_error_message VARCHAR2 (2000);
5586: BEGIN

Line 5600: IF fnd_api.to_boolean (p_commit)

5596: (i)
5597: );
5598: p_tmpl_usage_tbl (i).status := g_ret_sts_success;
5599:
5600: IF fnd_api.to_boolean (p_commit)
5601: THEN
5602: COMMIT;
5603: END IF;
5604: EXCEPTION

Line 5605: WHEN fnd_api.g_exc_error

5601: THEN
5602: COMMIT;
5603: END IF;
5604: EXCEPTION
5605: WHEN fnd_api.g_exc_error
5606: THEN
5607: p_tmpl_usage_tbl (i).status := g_ret_sts_error;
5608: read_message (l_error_message);
5609: p_tmpl_usage_tbl (i).errmsg := l_error_message;