[Home] [Help]
120: IF (l_debug = 'Y') THEN
121: okc_debug.log('600: Entered create_article', 2);
122: END IF;
123:
124: -- Standard Start of API savepoint
125: SAVEPOINT g_create_article_GRP;
126: -- Standard call to check for call compatibility.
127: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
128: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
122: END IF;
123:
124: -- Standard Start of API savepoint
125: SAVEPOINT g_create_article_GRP;
126: -- Standard call to check for call compatibility.
127: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
128: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
129: END IF;
130: -- Initialize message list if p_init_msg_list is set to TRUE.
297: END IF;
298: END LOOP;
299: END IF;
300:
301: -- Standard check of p_commit
302: IF FND_API.To_Boolean( p_commit ) THEN
303: COMMIT WORK;
304: END IF;
305: -- Standard call to get message count and if count is 1, get message info.
301: -- Standard check of p_commit
302: IF FND_API.To_Boolean( p_commit ) THEN
303: COMMIT WORK;
304: END IF;
305: -- Standard call to get message count and if count is 1, get message info.
306: FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => x_msg_count, p_data => x_msg_data );
307:
308: IF (l_debug = 'Y') THEN
309: okc_debug.log('700: Leaving create_article', 2);
412: IF (l_debug = 'Y') THEN
413: okc_debug.log('100: Entered validate_row', 2);
414: END IF;
415:
416: -- Standard Start of API savepoint
417: SAVEPOINT g_validate_row_GRP;
418: -- Standard call to check for call compatibility.
419: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
420: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
414: END IF;
415:
416: -- Standard Start of API savepoint
417: SAVEPOINT g_validate_row_GRP;
418: -- Standard call to check for call compatibility.
419: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
420: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
421: END IF;
422: -- Initialize message list if p_init_msg_list is set to TRUE.
479: RAISE FND_API.G_EXC_ERROR ;
480: END IF;
481: --------------------------------------------
482:
483: -- Standard call to get message count and if count is 1, get message info.
484: FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => x_msg_count, p_data => x_msg_data );
485:
486: IF (l_debug = 'Y') THEN
487: okc_debug.log('200: Leaving validate_row', 2);
537: IF (l_debug = 'Y') THEN
538: okc_debug.log('1100: Entered lock_row', 2);
539: END IF;
540:
541: -- Standard Start of API savepoint
542: SAVEPOINT g_lock_row_GRP;
543: -- Standard call to check for call compatibility.
544: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
539: END IF;
540:
541: -- Standard Start of API savepoint
542: SAVEPOINT g_lock_row_GRP;
543: -- Standard call to check for call compatibility.
544: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END IF;
547: -- Initialize message list if p_init_msg_list is set to TRUE.
566: RAISE FND_API.G_EXC_ERROR ;
567: END IF;
568: --------------------------------------------
569:
570: -- Standard call to get message count and if count is 1, get message info.
571: FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => x_msg_count, p_data => x_msg_data );
572:
573: IF (l_debug = 'Y') THEN
574: okc_debug.log('1200: Leaving lock_row', 2);
665: l_document_id NUMBER;
666: l_cle_id NUMBER;
667: l_document_type VARCHAR2(30);
668: l_article_version_id NUMBER;
669: l_standard_yn VARCHAR2(1);
670: l_sync_variable VARCHAR2(1) := FND_API.G_FALSE;
671: l_amendment_operation_code OKC_K_ARTICLES_B.AMENDMENT_OPERATION_CODE%TYPE;
672: l_summary_amend_operation_code OKC_K_ARTICLES_B.AMENDMENT_OPERATION_CODE%TYPE;
673: l_existing_summary_code OKC_SECTIONS_B.SUMMARY_AMEND_OPERATION_CODE%TYPE;
682: FROM OKC_K_ARTIClES_B
683: WHERE ID=P_ID;
684:
685: CURSOR l_art_version_csr IS
686: SELECT ARTICLE_VERSION_ID,standard_yn
687: FROM OKC_K_ARTIClES_B kart,okc_articles_all art
688: WHERE ID=P_ID
689: AND art.article_id=kart.sav_sae_id;
690:
749: IF (l_debug = 'Y') THEN
750: okc_debug.log('1600: Entered update_article', 2);
751: END IF;
752:
753: -- Standard Start of API savepoint
754: SAVEPOINT g_update_article_grp;
755: -- Standard call to check for call compatibility.
756: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
751: END IF;
752:
753: -- Standard Start of API savepoint
754: SAVEPOINT g_update_article_grp;
755: -- Standard call to check for call compatibility.
756: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
758: END IF;
759: -- Initialize message list if p_init_msg_list is set to TRUE.
795:
796: -- Check if this update going to update article version also.If yes then article variables will be created.
797:
798: OPEN l_art_version_csr;
799: FETCH l_art_version_csr into l_article_version_id,l_standard_yn;
800: CLOSE l_art_version_csr;
801:
802: IF (p_article_version_id IS NOT NULL AND
803: p_article_version_id <>FND_API.G_MISS_NUM AND
800: CLOSE l_art_version_csr;
801:
802: IF (p_article_version_id IS NOT NULL AND
803: p_article_version_id <>FND_API.G_MISS_NUM AND
804: l_article_version_id <> p_article_version_id ) OR l_standard_yn='N' THEN
805:
806: l_sync_variable := FND_API.G_TRUE;
807:
808: END IF;
1023: END LOOP;
1024:
1025: END IF;
1026:
1027: -- Standard check of p_commit
1028: IF FND_API.To_Boolean( p_commit ) THEN
1029: COMMIT WORK;
1030: END IF;
1031: -- Standard call to get message count and if count is 1, get message info.
1027: -- Standard check of p_commit
1028: IF FND_API.To_Boolean( p_commit ) THEN
1029: COMMIT WORK;
1030: END IF;
1031: -- Standard call to get message count and if count is 1, get message info.
1032: FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => x_msg_count, p_data => x_msg_data );
1033:
1034: IF (l_debug = 'Y') THEN
1035: okc_debug.log('1800: Leaving update_article', 2);
1156: l_document_id NUMBER;
1157: l_cle_id NUMBER;
1158: l_document_type VARCHAR2(30);
1159: l_mandatory_yn VARCHAR2(1);
1160: l_standard_yn VARCHAR2(1);
1161: l_amendment_operation_code OKC_K_ARTICLES_B.AMENDMENT_OPERATION_CODE%TYPE;
1162: l_amendment_description OKC_K_ARTICLES_B.AMENDMENT_DESCRIPTION%TYPE;
1163:
1164: l_summary_amend_operation_code OKC_SECTIONS_B.SUMMARY_AMEND_OPERATION_CODE%TYPE;
1167: l_delete_rec BOOLEAN := FALSE;
1168: l_orig_system_reference_id1 NUMBER;
1169:
1170: CURSOR l_document_id_csr IS
1171: SELECT kart.DOCUMENT_ID,kart.DOCUMENT_TYPE,kart.mandatory_yn, art.standard_yn
1172: FROM OKC_K_ARTIClES_B kart, OKC_ARTICLES_ALL art
1173: WHERE kart.sav_sae_id = art.article_id
1174: AND ID=P_ID;
1175:
1184: IF (l_debug = 'Y') THEN
1185: okc_debug.log('2200: Entered delete_article', 2);
1186: END IF;
1187:
1188: -- Standard Start of API savepoint
1189: SAVEPOINT g_delete_article_grp;
1190: -- Standard call to check for call compatibility.
1191: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
1192: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1186: END IF;
1187:
1188: -- Standard Start of API savepoint
1189: SAVEPOINT g_delete_article_grp;
1190: -- Standard call to check for call compatibility.
1191: IF NOT FND_API.Compatible_API_Call( l_api_version, p_api_version, l_api_name, G_PKG_NAME) THEN
1192: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1193: END IF;
1194: -- Initialize message list if p_init_msg_list is set to TRUE.
1200: x_return_status := FND_API.G_RET_STS_SUCCESS;
1201:
1202:
1203: OPEN l_document_id_csr;
1204: FETCH l_document_id_csr INTO l_document_id,l_document_type,l_mandatory_yn, l_standard_yn;
1205: CLOSE l_document_id_csr;
1206:
1207: IF l_mandatory_yn='Y' and l_document_type<>'TEMPLATE' and p_super_user_yn='N' and p_mandatory_clause_delete='N' THEN
1208:
1214: END IF;
1215:
1216: -- if user does NOT have non-std access, don't allow delete of non-std articles
1217: IF (NOT fnd_function.test('OKC_TERMS_AUTHOR_NON_STD','N')) AND
1218: l_standard_yn ='N' THEN
1219: okc_Api.Set_Message(p_app_name => G_APP_NAME,
1220: p_msg_name => 'OKC_DEL_NON_STD_ARTICLE');
1221:
1222: raise FND_API.G_EXC_ERROR;
1369: RAISE FND_API.G_EXC_ERROR ;
1370: END IF;
1371: --------------------------------------------
1372: END IF;
1373: -- Standard check of p_commit
1374: IF FND_API.To_Boolean( p_commit ) THEN
1375: COMMIT WORK;
1376: END IF;
1377: -- Standard call to get message count and if count is 1, get message info.
1373: -- Standard check of p_commit
1374: IF FND_API.To_Boolean( p_commit ) THEN
1375: COMMIT WORK;
1376: END IF;
1377: -- Standard call to get message count and if count is 1, get message info.
1378: FND_MSG_PUB.Count_And_Get(p_encoded=>'F', p_count => x_msg_count, p_data => x_msg_data );
1379:
1380: IF (l_debug = 'Y') THEN
1381: okc_debug.log('2300: Leaving delete_article', 2);