2: /* $Header: OKCCCATB.pls 120.0 2005/05/25 19:13:43 appldev noship $ */
3:
4: l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
5:
6: G_APP_NAME CONSTANT VARCHAR2(3) := OKC_API.G_APP_NAME;
7: G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKC_K_ARTICLE_PVT';
8: G_CHILD_RECORD_FOUND CONSTANT varchar2(200) := 'OKC_CHILD_RECORD_FOUND';
9: G_PARENT_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_PARENT_TABLE_TOKEN;
10: G_CHILD_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_CHILD_TABLE_TOKEN;
5:
6: G_APP_NAME CONSTANT VARCHAR2(3) := OKC_API.G_APP_NAME;
7: G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKC_K_ARTICLE_PVT';
8: G_CHILD_RECORD_FOUND CONSTANT varchar2(200) := 'OKC_CHILD_RECORD_FOUND';
9: G_PARENT_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_PARENT_TABLE_TOKEN;
10: G_CHILD_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_CHILD_TABLE_TOKEN;
11:
12: -- Start of comments
13: --
6: G_APP_NAME CONSTANT VARCHAR2(3) := OKC_API.G_APP_NAME;
7: G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKC_K_ARTICLE_PVT';
8: G_CHILD_RECORD_FOUND CONSTANT varchar2(200) := 'OKC_CHILD_RECORD_FOUND';
9: G_PARENT_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_PARENT_TABLE_TOKEN;
10: G_CHILD_TABLE_TOKEN CONSTANT VARCHAR2(200) := OKC_API.G_CHILD_TABLE_TOKEN;
11:
12: -- Start of comments
13: --
14: -- Procedure Name : add_language_k_article
56: open l_std_art_exists_csr;
57: fetch l_std_art_exists_csr into l_dummy;
58: close l_std_art_exists_csr;
59: if (l_dummy <> '?') then
60: OKC_API.SET_MESSAGE(p_app_name => 'OKC',
61: p_msg_name => 'OKC_ARTICLE_EXISTS',
62: p_token1 => 'VALUE1',
63: p_token1_value => l_dummy);
64: x_return_status := OKC_API.G_RET_STS_ERROR;
60: OKC_API.SET_MESSAGE(p_app_name => 'OKC',
61: p_msg_name => 'OKC_ARTICLE_EXISTS',
62: p_token1 => 'VALUE1',
63: p_token1_value => l_dummy);
64: x_return_status := OKC_API.G_RET_STS_ERROR;
65: return;
66: end if;
67: l_catv_rec.NAME := NULL;
68: l_catv_rec.SBT_CODE := NULL;
79: x_return_status => x_return_status,
80: p_catv_rec => l_catv_rec,
81: x_catv_rec => x_catv_rec);
82: --V
83: if (x_return_status <> OKC_API.G_RET_STS_SUCCESS) then
84: return;
85: end if;
86: l_cvmv_rec.chr_id := p_catv_rec.DNZ_CHR_ID;
87: OKC_CVM_PVT.update_contract_version(
85: end if;
86: l_cvmv_rec.chr_id := p_catv_rec.DNZ_CHR_ID;
87: OKC_CVM_PVT.update_contract_version(
88: p_api_version => p_api_version,
89: p_init_msg_list => OKC_API.G_FALSE,
90: x_return_status => x_return_status,
91: x_msg_count => x_msg_count,
92: x_msg_data => x_msg_data,
93: p_cvmv_rec => l_cvmv_rec,
159: x_return_status => x_return_status,
160: p_catv_rec => l_catv_rec,
161: x_catv_rec => x_catv_rec);
162: --V
163: if (x_return_status <> OKC_API.G_RET_STS_SUCCESS) then
164: return;
165: end if;
166: open dnz_csr;
167: fetch dnz_csr into l_cvmv_rec.chr_id;
167: fetch dnz_csr into l_cvmv_rec.chr_id;
168: close dnz_csr;
169: OKC_CVM_PVT.update_contract_version(
170: p_api_version => p_api_version,
171: p_init_msg_list => OKC_API.G_FALSE,
172: x_return_status => x_return_status,
173: x_msg_count => x_msg_count,
174: x_msg_data => x_msg_data,
175: p_cvmv_rec => l_cvmv_rec,
225: open l_cat_csr;
226: fetch l_cat_csr into l_dummy;
227: close l_cat_csr;
228: if (l_dummy = '!') then
229: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
230: p_msg_name => G_CHILD_RECORD_FOUND,
231: p_token1 => G_PARENT_TABLE_TOKEN,
232: p_token1_value => 'OKC_K_ARTICLES_V',
233: p_token2 => G_CHILD_TABLE_TOKEN,
231: p_token1 => G_PARENT_TABLE_TOKEN,
232: p_token1_value => 'OKC_K_ARTICLES_V',
233: p_token2 => G_CHILD_TABLE_TOKEN,
234: p_token2_value => 'OKC_K_ARTICLES_V');
235: x_return_status := OKC_API.G_RET_STS_ERROR;
236: return;
237: end if;
238: --
239: l_dummy := '?';
240: open l_atn_csr;
241: fetch l_atn_csr into l_dummy;
242: close l_atn_csr;
243: if (l_dummy = '!') then
244: OKC_API.SET_MESSAGE(p_app_name => G_APP_NAME,
245: p_msg_name => G_CHILD_RECORD_FOUND,
246: p_token1 => G_PARENT_TABLE_TOKEN,
247: p_token1_value => 'OKC_K_ARTICLES_V',
248: p_token2 => G_CHILD_TABLE_TOKEN,
246: p_token1 => G_PARENT_TABLE_TOKEN,
247: p_token1_value => 'OKC_K_ARTICLES_V',
248: p_token2 => G_CHILD_TABLE_TOKEN,
249: p_token2_value => 'OKC_ARTICLE_TRANS_V');
250: x_return_status := OKC_API.G_RET_STS_ERROR;
251: return;
252: end if;
253: --V
254: open dnz_csr;
254: open dnz_csr;
255: fetch dnz_csr into l_cvmv_rec.chr_id;
256: close dnz_csr;
257: if (l_cvmv_rec.chr_id is NULL) then
258: x_return_status := OKC_API.G_RET_STS_SUCCESS;
259: return;
260: end if;
261: --V
262: okc_cat_pvt.delete_row(p_api_version => p_api_version,
265: x_msg_data => x_msg_data,
266: x_return_status => x_return_status,
267: p_catv_rec => p_catv_rec);
268: --V
269: if (x_return_status <> OKC_API.G_RET_STS_SUCCESS) then
270: return;
271: else
272: open section_csr;
273: fetch section_csr into l_scc_id;
285: end if;
286: end if;
287: OKC_CVM_PVT.update_contract_version(
288: p_api_version => p_api_version,
289: p_init_msg_list => OKC_API.G_FALSE,
290: x_return_status => x_return_status,
291: x_msg_count => x_msg_count,
292: x_msg_data => x_msg_data,
293: p_cvmv_rec => l_cvmv_rec,
345: x_return_status => x_return_status,
346: p_atnv_rec => p_atnv_rec,
347: x_atnv_rec => x_atnv_rec);
348: --V
349: if (x_return_status <> OKC_API.G_RET_STS_SUCCESS) then
350: return;
351: end if;
352: l_cvmv_rec.chr_id := p_atnv_rec.DNZ_CHR_ID;
353: OKC_CVM_PVT.update_contract_version(
351: end if;
352: l_cvmv_rec.chr_id := p_atnv_rec.DNZ_CHR_ID;
353: OKC_CVM_PVT.update_contract_version(
354: p_api_version => p_api_version,
355: p_init_msg_list => OKC_API.G_FALSE,
356: x_return_status => x_return_status,
357: x_msg_count => x_msg_count,
358: x_msg_data => x_msg_data,
359: p_cvmv_rec => l_cvmv_rec,
411: open dnz_csr;
412: fetch dnz_csr into l_cvmv_rec.chr_id;
413: close dnz_csr;
414: if (l_cvmv_rec.chr_id is NULL) then
415: x_return_status := OKC_API.G_RET_STS_SUCCESS;
416: return;
417: end if;
418: --V
419: okc_atn_pvt.delete_row(p_api_version => p_api_version,
422: x_msg_data => x_msg_data,
423: x_return_status => x_return_status,
424: p_atnv_rec => p_atnv_rec);
425: --V
426: if (x_return_status <> OKC_API.G_RET_STS_SUCCESS) then
427: return;
428: end if;
429: OKC_CVM_PVT.update_contract_version(
430: p_api_version => p_api_version,
427: return;
428: end if;
429: OKC_CVM_PVT.update_contract_version(
430: p_api_version => p_api_version,
431: p_init_msg_list => OKC_API.G_FALSE,
432: x_return_status => x_return_status,
433: x_msg_count => x_msg_count,
434: x_msg_data => x_msg_data,
435: p_cvmv_rec => l_cvmv_rec,