194: BEGIN
195: SAVEPOINT BATCH_UPDATE_LABELS_SAVE;
196: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
197: IF (l_debug = 'Y') THEN
198: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Starts +');
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
195: SAVEPOINT BATCH_UPDATE_LABELS_SAVE;
196: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
197: IF (l_debug = 'Y') THEN
198: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Starts +');
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
203: IBE_UTIL.debug('p_version_number_tbl:'||p_version_number_tbl.Count);
196: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
197: IF (l_debug = 'Y') THEN
198: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Starts +');
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
203: IBE_UTIL.debug('p_version_number_tbl:'||p_version_number_tbl.Count);
204: END IF;
197: IF (l_debug = 'Y') THEN
198: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Starts +');
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
203: IBE_UTIL.debug('p_version_number_tbl:'||p_version_number_tbl.Count);
204: END IF;
205: IF NOT FND_API.Compatible_API_Call(l_api_version,
198: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Starts +');
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
203: IBE_UTIL.debug('p_version_number_tbl:'||p_version_number_tbl.Count);
204: END IF;
205: IF NOT FND_API.Compatible_API_Call(l_api_version,
206: p_api_version,
199: IBE_UTIL.debug('p_api_version = '||p_api_version);
200: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
201: IBE_UTIL.debug('p_commit = '||p_commit);
202: IBE_UTIL.debug('p_content_item_id_tbl number:'||p_content_item_id_tbl.Count);
203: IBE_UTIL.debug('p_version_number_tbl:'||p_version_number_tbl.Count);
204: END IF;
205: IF NOT FND_API.Compatible_API_Call(l_api_version,
206: p_api_version,
207: l_api_name,
214: -- Initialize API return status to SUCCESS
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
216:
217: IF (l_debug = 'Y') THEN
218: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Upsert_Cv_Labels starts');
219: IBE_UTIL.debug('p_label_code = '||l_label_code);
220: IBE_UTIL.debug('p_content_item_id_tbl.COUNT = '||p_content_item_id_tbl.COUNT);
221: IF (p_content_item_id_tbl.COUNT > 0) THEN
222: FOR i IN p_content_item_id_tbl.FIRST..p_content_item_id_tbl.LAST LOOP
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
216:
217: IF (l_debug = 'Y') THEN
218: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Upsert_Cv_Labels starts');
219: IBE_UTIL.debug('p_label_code = '||l_label_code);
220: IBE_UTIL.debug('p_content_item_id_tbl.COUNT = '||p_content_item_id_tbl.COUNT);
221: IF (p_content_item_id_tbl.COUNT > 0) THEN
222: FOR i IN p_content_item_id_tbl.FIRST..p_content_item_id_tbl.LAST LOOP
223: IBE_UTIL.debug('p_content_item_id_tbl '||i||' = '||p_content_item_id_tbl(i));
216:
217: IF (l_debug = 'Y') THEN
218: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Upsert_Cv_Labels starts');
219: IBE_UTIL.debug('p_label_code = '||l_label_code);
220: IBE_UTIL.debug('p_content_item_id_tbl.COUNT = '||p_content_item_id_tbl.COUNT);
221: IF (p_content_item_id_tbl.COUNT > 0) THEN
222: FOR i IN p_content_item_id_tbl.FIRST..p_content_item_id_tbl.LAST LOOP
223: IBE_UTIL.debug('p_content_item_id_tbl '||i||' = '||p_content_item_id_tbl(i));
224: END LOOP;
219: IBE_UTIL.debug('p_label_code = '||l_label_code);
220: IBE_UTIL.debug('p_content_item_id_tbl.COUNT = '||p_content_item_id_tbl.COUNT);
221: IF (p_content_item_id_tbl.COUNT > 0) THEN
222: FOR i IN p_content_item_id_tbl.FIRST..p_content_item_id_tbl.LAST LOOP
223: IBE_UTIL.debug('p_content_item_id_tbl '||i||' = '||p_content_item_id_tbl(i));
224: END LOOP;
225: END IF;
226: IBE_UTIL.debug('p_version_number_tbl.COUNT = '||p_version_number_tbl.COUNT);
227: IF (p_version_number_tbl.COUNT > 0) THEN
222: FOR i IN p_content_item_id_tbl.FIRST..p_content_item_id_tbl.LAST LOOP
223: IBE_UTIL.debug('p_content_item_id_tbl '||i||' = '||p_content_item_id_tbl(i));
224: END LOOP;
225: END IF;
226: IBE_UTIL.debug('p_version_number_tbl.COUNT = '||p_version_number_tbl.COUNT);
227: IF (p_version_number_tbl.COUNT > 0) THEN
228: FOR i IN p_version_number_tbl.FIRST..p_version_number_tbl.LAST LOOP
229: IBE_UTIL.debug('p_version_number_tbl '||i||' = '||p_version_number_tbl(i));
230: END LOOP;
225: END IF;
226: IBE_UTIL.debug('p_version_number_tbl.COUNT = '||p_version_number_tbl.COUNT);
227: IF (p_version_number_tbl.COUNT > 0) THEN
228: FOR i IN p_version_number_tbl.FIRST..p_version_number_tbl.LAST LOOP
229: IBE_UTIL.debug('p_version_number_tbl '||i||' = '||p_version_number_tbl(i));
230: END LOOP;
231: END IF;
232: END IF;
233: Ibc_Cv_Label_Grp.Upsert_Cv_Labels(
239: x_return_status => x_return_status,
240: x_msg_count => x_msg_count,
241: x_msg_data => x_msg_data);
242: IF (l_debug = 'Y') THEN
243: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Upsert_Cv_Labels:'||x_return_status);
244: END IF;
245: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
246: IF (l_debug = 'Y') THEN
247: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Upsert_Cv_Labels');
243: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Upsert_Cv_Labels:'||x_return_status);
244: END IF;
245: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
246: IF (l_debug = 'Y') THEN
247: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Upsert_Cv_Labels');
248: for i in 1..x_msg_count loop
249: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
250: IBE_UTIL.debug(l_msg_data);
251: end loop;
246: IF (l_debug = 'Y') THEN
247: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Upsert_Cv_Labels');
248: for i in 1..x_msg_count loop
249: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
250: IBE_UTIL.debug(l_msg_data);
251: end loop;
252: END IF;
253: RAISE FND_API.G_EXC_ERROR;
254: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
252: END IF;
253: RAISE FND_API.G_EXC_ERROR;
254: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
255: IF (l_debug = 'Y') THEN
256: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Upsert_Cv_Labels');
257: for i in 1..x_msg_count loop
258: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
259: IBE_UTIL.debug(l_msg_data);
260: end loop;
255: IF (l_debug = 'Y') THEN
256: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Upsert_Cv_Labels');
257: for i in 1..x_msg_count loop
258: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
259: IBE_UTIL.debug(l_msg_data);
260: end loop;
261: END IF;
262: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
263: END IF;
262: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
263: END IF;
264:
265: IF (l_debug = 'Y') THEN
266: IBE_UTIL.debug('Before committing the work:'||p_commit);
267: END IF;
268: IF (FND_API.To_Boolean(p_commit)) THEN
269: COMMIT WORK;
270: END IF;
271: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
272: p_data => x_msg_data,
273: p_encoded => 'F');
274: IF (l_debug = 'Y') THEN
275: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Batch_Update_Labels Ends +');
276: END IF;
277: EXCEPTION
278: WHEN FND_API.G_EXC_ERROR THEN
279: ROLLBACK TO BATCH_UPDATE_LABELS_SAVE;
294: FND_MESSAGE.Set_Token('ERRNO', SQLCODE);
295: FND_MESSAGE.Set_Token('REASON', SQLERRM);
296: FND_MSG_PUB.Add;
297: IF (l_debug = 'Y') THEN
298: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
299: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
300: END IF;
301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
302: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
295: FND_MESSAGE.Set_Token('REASON', SQLERRM);
296: FND_MSG_PUB.Add;
297: IF (l_debug = 'Y') THEN
298: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
299: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
300: END IF;
301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
302: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
303: THEN
386: BEGIN
387: SAVEPOINT UPDATE_LABEL_ASSOCIATION_SAVE;
388: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
389: IF (l_debug = 'Y') THEN
390: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Update_Label_Association starts +');
391: END IF;
392: IF NOT FND_API.Compatible_API_Call(l_api_version,
393: p_api_version,
394: l_api_name,
401: x_return_status := FND_API.g_ret_sts_success;
402: l_content_item_id := p_new_content_item_id;
403: l_version_number := p_new_version_number;
404: IF (l_debug = 'Y') THEN
405: IBE_UTIL.debug('Before getting version id');
406: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
407: IBE_UTIL.debug('l_version_number = '||l_version_number);
408: END IF;
409: OPEN c_get_version_id(l_content_item_id, l_version_number);
402: l_content_item_id := p_new_content_item_id;
403: l_version_number := p_new_version_number;
404: IF (l_debug = 'Y') THEN
405: IBE_UTIL.debug('Before getting version id');
406: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
407: IBE_UTIL.debug('l_version_number = '||l_version_number);
408: END IF;
409: OPEN c_get_version_id(l_content_item_id, l_version_number);
410: FETCH c_get_version_id INTO l_item_version_id;
403: l_version_number := p_new_version_number;
404: IF (l_debug = 'Y') THEN
405: IBE_UTIL.debug('Before getting version id');
406: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
407: IBE_UTIL.debug('l_version_number = '||l_version_number);
408: END IF;
409: OPEN c_get_version_id(l_content_item_id, l_version_number);
410: FETCH c_get_version_id INTO l_item_version_id;
411: IF (c_get_version_id%NOTFOUND) THEN
410: FETCH c_get_version_id INTO l_item_version_id;
411: IF (c_get_version_id%NOTFOUND) THEN
412: CLOSE c_get_version_id;
413: IF (l_debug = 'Y') THEN
414: IBE_UTIL.debug('version id is not found');
415: END IF;
416: raise FND_API.G_EXC_ERROR;
417: END IF;
418: CLOSE c_get_version_id;
416: raise FND_API.G_EXC_ERROR;
417: END IF;
418: CLOSE c_get_version_id;
419: IF (l_debug = 'Y') THEN
420: IBE_UTIL.debug('After getting version id: '||l_item_version_id);
421: END IF;
422: l_association_type_code := NVL(p_association_type_code,
423: g_association_type_code);
424: IF (l_debug = 'Y') THEN
421: END IF;
422: l_association_type_code := NVL(p_association_type_code,
423: g_association_type_code);
424: IF (l_debug = 'Y') THEN
425: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
426: END IF;
427: -- Process association
428: IF (p_old_content_item_id IS NULL) THEN
429: IF (l_debug = 'Y') THEN
426: END IF;
427: -- Process association
428: IF (p_old_content_item_id IS NULL) THEN
429: IF (l_debug = 'Y') THEN
430: IBE_UTIL.debug('p_old_content_item_id IS NULL');
431: END IF;
432: IF (p_media_object_id IS NULL) THEN
433: IF (l_debug = 'Y') THEN
434: IBE_UTIL.debug('p_media_object_id IS NULL, RAISE ERROR');
430: IBE_UTIL.debug('p_old_content_item_id IS NULL');
431: END IF;
432: IF (p_media_object_id IS NULL) THEN
433: IF (l_debug = 'Y') THEN
434: IBE_UTIL.debug('p_media_object_id IS NULL, RAISE ERROR');
435: END IF;
436: raise FND_API.G_EXC_ERROR;
437: END IF;
438: l_old_item_ids := JTF_NUMBER_TABLE();
450: l_assoc_objects1 := JTF_VARCHAR2_TABLE_300();
451: l_assoc_objects1.extend(1);
452: l_assoc_objects1(1) := NULL;
453: IF (l_debug = 'Y') THEN
454: IBE_UTIL.debug('l_old_item_ids(1) is NULL');
455: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
456: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
457: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
458: IBE_UTIL.debug('l_assoc_objects1(1) IS NULL');
451: l_assoc_objects1.extend(1);
452: l_assoc_objects1(1) := NULL;
453: IF (l_debug = 'Y') THEN
454: IBE_UTIL.debug('l_old_item_ids(1) is NULL');
455: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
456: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
457: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
458: IBE_UTIL.debug('l_assoc_objects1(1) IS NULL');
459: END IF;
452: l_assoc_objects1(1) := NULL;
453: IF (l_debug = 'Y') THEN
454: IBE_UTIL.debug('l_old_item_ids(1) is NULL');
455: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
456: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
457: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
458: IBE_UTIL.debug('l_assoc_objects1(1) IS NULL');
459: END IF;
460: l_move_flag := 'Y';
453: IF (l_debug = 'Y') THEN
454: IBE_UTIL.debug('l_old_item_ids(1) is NULL');
455: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
456: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
457: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
458: IBE_UTIL.debug('l_assoc_objects1(1) IS NULL');
459: END IF;
460: l_move_flag := 'Y';
461: ELSE
454: IBE_UTIL.debug('l_old_item_ids(1) is NULL');
455: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
456: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
457: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
458: IBE_UTIL.debug('l_assoc_objects1(1) IS NULL');
459: END IF;
460: l_move_flag := 'Y';
461: ELSE
462: IF (l_debug = 'Y') THEN
459: END IF;
460: l_move_flag := 'Y';
461: ELSE
462: IF (l_debug = 'Y') THEN
463: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
464: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
465: END IF;
466: IF (p_old_content_item_id <> p_new_content_item_id) THEN
467: IF (l_debug = 'Y') THEN
460: l_move_flag := 'Y';
461: ELSE
462: IF (l_debug = 'Y') THEN
463: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
464: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
465: END IF;
466: IF (p_old_content_item_id <> p_new_content_item_id) THEN
467: IF (l_debug = 'Y') THEN
468: IBE_UTIL.debug('Need to move the label');
464: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
465: END IF;
466: IF (p_old_content_item_id <> p_new_content_item_id) THEN
467: IF (l_debug = 'Y') THEN
468: IBE_UTIL.debug('Need to move the label');
469: END IF;
470: l_old_item_ids := JTF_NUMBER_TABLE();
471: l_old_item_ids.extend(1);
472: l_old_item_ids(1) := p_old_content_item_id;
476: l_assoc_type_codes := JTF_VARCHAR2_TABLE_100();
477: l_assoc_type_codes.extend(1);
478: l_assoc_type_codes(1) := g_association_type_code;
479: IF (l_debug = 'Y') THEN
480: IBE_UTIL.debug('l_old_item_ids(1) = '||l_old_item_ids(1));
481: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
482: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
483: END IF;
484: IF (p_media_object_id IS NULL) THEN
477: l_assoc_type_codes.extend(1);
478: l_assoc_type_codes(1) := g_association_type_code;
479: IF (l_debug = 'Y') THEN
480: IBE_UTIL.debug('l_old_item_ids(1) = '||l_old_item_ids(1));
481: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
482: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
483: END IF;
484: IF (p_media_object_id IS NULL) THEN
485: IF (l_debug = 'Y') THEN
478: l_assoc_type_codes(1) := g_association_type_code;
479: IF (l_debug = 'Y') THEN
480: IBE_UTIL.debug('l_old_item_ids(1) = '||l_old_item_ids(1));
481: IBE_UTIL.debug('l_new_item_ids(1) = '||l_new_item_ids(1));
482: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
483: END IF;
484: IF (p_media_object_id IS NULL) THEN
485: IF (l_debug = 'Y') THEN
486: IBE_UTIL.debug('p_media_object_id IS NULL, move all for content item');
482: IBE_UTIL.debug('l_assoc_type_codes(1) = '||l_assoc_type_codes(1));
483: END IF;
484: IF (p_media_object_id IS NULL) THEN
485: IF (l_debug = 'Y') THEN
486: IBE_UTIL.debug('p_media_object_id IS NULL, move all for content item');
487: END IF;
488: --
489: l_assoc_objects := JTF_VARCHAR2_TABLE_300();
490: l_assoc_objects.extend(1);
494: l_assoc_objects1(1) := NULL;
495: l_move_flag := 'Y';
496: ELSE
497: IF (l_debug = 'Y') THEN
498: IBE_UTIL.debug('p_media_object_id is NOT NULL, move specific for content item');
499: END IF;
500: l_assoc_objects := JTF_VARCHAR2_TABLE_300();
501: l_assoc_objects.extend(1);
502: l_assoc_objects(1) := TO_CHAR(p_media_object_id);
500: l_assoc_objects := JTF_VARCHAR2_TABLE_300();
501: l_assoc_objects.extend(1);
502: l_assoc_objects(1) := TO_CHAR(p_media_object_id);
503: IF (l_debug = 'Y') THEN
504: IBE_UTIL.debug('l_assoc_objects(1) = '||l_assoc_objects(1));
505: END IF;
506: l_assoc_objects1 := JTF_VARCHAR2_TABLE_300();
507: l_assoc_objects1.extend(1);
508: l_assoc_objects1(1) := NULL;
510: END IF;
511: END IF;
512: END IF;
513: IF (l_debug = 'Y') THEN
514: IBE_UTIL.debug('l_move_flag = '||l_move_flag);
515: END IF;
516: IF (l_move_flag = 'Y') THEN
517: IF (l_debug = 'Y') THEN
518: IBE_UTIL.debug('Calling Ibc_Associations_Grp.Move_Associations');
514: IBE_UTIL.debug('l_move_flag = '||l_move_flag);
515: END IF;
516: IF (l_move_flag = 'Y') THEN
517: IF (l_debug = 'Y') THEN
518: IBE_UTIL.debug('Calling Ibc_Associations_Grp.Move_Associations');
519: END IF;
520: Ibc_Associations_Grp.Move_Associations (
521: p_api_version => 1.0,
522: p_init_msg_list => FND_API.G_FALSE,
532: x_return_status => x_return_status,
533: x_msg_count => x_msg_count,
534: x_msg_data => x_msg_data);
535: IF (l_debug = 'Y') THEN
536: IBE_UTIL.debug('After calling Ibc_Associations_Grp.Move_Associations:'
537: ||x_return_status);
538: END IF;
539: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
540: IF (l_debug = 'Y') THEN
537: ||x_return_status);
538: END IF;
539: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
540: IF (l_debug = 'Y') THEN
541: IBE_UTIL.debug('Error in Ibc_Associations_Grp.Move_Associations');
542: for i in 1..x_msg_count loop
543: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
544: IBE_UTIL.debug(l_msg_data);
545: end loop;
540: IF (l_debug = 'Y') THEN
541: IBE_UTIL.debug('Error in Ibc_Associations_Grp.Move_Associations');
542: for i in 1..x_msg_count loop
543: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
544: IBE_UTIL.debug(l_msg_data);
545: end loop;
546: END IF;
547: RAISE FND_API.G_EXC_ERROR;
548: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
546: END IF;
547: RAISE FND_API.G_EXC_ERROR;
548: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
549: IF (l_debug = 'Y') THEN
550: IBE_UTIL.debug('Error in Ibc_Associations_Grp.Move_Associations');
551: for i in 1..x_msg_count loop
552: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
553: IBE_UTIL.debug(l_msg_data);
554: end loop;
549: IF (l_debug = 'Y') THEN
550: IBE_UTIL.debug('Error in Ibc_Associations_Grp.Move_Associations');
551: for i in 1..x_msg_count loop
552: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
553: IBE_UTIL.debug(l_msg_data);
554: end loop;
555: END IF;
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: END IF;
558: END IF;
559:
560: -- Process label
561: IF (l_debug = 'Y') THEN
562: IBE_UTIL.debug('Process label starts');
563: END IF;
564: IF (p_old_content_item_id IS NOT NULL) AND
565: (p_old_content_item_id = p_new_content_item_id) THEN
566: -- Change iStore label to the new version of
565: (p_old_content_item_id = p_new_content_item_id) THEN
566: -- Change iStore label to the new version of
567: -- the same content item
568: IF (l_debug = 'Y') THEN
569: IBE_UTIL.debug('Find label version, p_old_content_item_id = p_new_content_item_id');
570: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
571: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
572: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
573: IBE_UTIL.debug('l_label_code = '||l_label_code);
566: -- Change iStore label to the new version of
567: -- the same content item
568: IF (l_debug = 'Y') THEN
569: IBE_UTIL.debug('Find label version, p_old_content_item_id = p_new_content_item_id');
570: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
571: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
572: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
573: IBE_UTIL.debug('l_label_code = '||l_label_code);
574: END IF;
567: -- the same content item
568: IF (l_debug = 'Y') THEN
569: IBE_UTIL.debug('Find label version, p_old_content_item_id = p_new_content_item_id');
570: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
571: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
572: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
573: IBE_UTIL.debug('l_label_code = '||l_label_code);
574: END IF;
575: OPEN c_label_flag(l_content_item_id,l_label_code);
568: IF (l_debug = 'Y') THEN
569: IBE_UTIL.debug('Find label version, p_old_content_item_id = p_new_content_item_id');
570: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
571: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
572: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
573: IBE_UTIL.debug('l_label_code = '||l_label_code);
574: END IF;
575: OPEN c_label_flag(l_content_item_id,l_label_code);
576: FETCH c_label_flag INTO l_temp;
569: IBE_UTIL.debug('Find label version, p_old_content_item_id = p_new_content_item_id');
570: IBE_UTIL.debug('p_old_content_item_id = '||p_old_content_item_id);
571: IBE_UTIL.debug('p_new_content_item_id = '||p_new_content_item_id);
572: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
573: IBE_UTIL.debug('l_label_code = '||l_label_code);
574: END IF;
575: OPEN c_label_flag(l_content_item_id,l_label_code);
576: FETCH c_label_flag INTO l_temp;
577: IF (c_label_flag%NOTFOUND) THEN
576: FETCH c_label_flag INTO l_temp;
577: IF (c_label_flag%NOTFOUND) THEN
578: CLOSE c_label_flag;
579: IF (l_debug = 'Y') THEN
580: IBE_UTIL.debug('Cannot find label item, exception');
581: END IF;
582: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
583: END IF;
584: CLOSE c_label_flag;
582: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
583: END IF;
584: CLOSE c_label_flag;
585: IF (l_debug = 'Y') THEN
586: IBE_UTIL.debug('After finding label version');
587: END IF;
588: l_cv_label_rec.content_item_id := l_content_item_id;
589: l_cv_label_rec.citem_version_id := l_item_version_id;
590: l_cv_label_rec.label_code := l_label_code;
592: l_cv_label_rec.last_update_date := SYSDATE;
593: l_cv_label_rec.object_version_number := l_temp;
594: l_cv_label_rec.last_update_login := FND_GLOBAL.login_id;
595: IF (l_debug = 'Y') THEN
596: IBE_UTIL.debug('Before calling Ibc_Cv_Label_Grp.Update_CV_Label');
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
593: l_cv_label_rec.object_version_number := l_temp;
594: l_cv_label_rec.last_update_login := FND_GLOBAL.login_id;
595: IF (l_debug = 'Y') THEN
596: IBE_UTIL.debug('Before calling Ibc_Cv_Label_Grp.Update_CV_Label');
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
601: IBE_UTIL.debug('l_cv_label_rec.object_version_number = '
594: l_cv_label_rec.last_update_login := FND_GLOBAL.login_id;
595: IF (l_debug = 'Y') THEN
596: IBE_UTIL.debug('Before calling Ibc_Cv_Label_Grp.Update_CV_Label');
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
601: IBE_UTIL.debug('l_cv_label_rec.object_version_number = '
602: ||l_cv_label_rec.object_version_number);
595: IF (l_debug = 'Y') THEN
596: IBE_UTIL.debug('Before calling Ibc_Cv_Label_Grp.Update_CV_Label');
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
601: IBE_UTIL.debug('l_cv_label_rec.object_version_number = '
602: ||l_cv_label_rec.object_version_number);
603: END IF;
596: IBE_UTIL.debug('Before calling Ibc_Cv_Label_Grp.Update_CV_Label');
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
601: IBE_UTIL.debug('l_cv_label_rec.object_version_number = '
602: ||l_cv_label_rec.object_version_number);
603: END IF;
604: Ibc_Cv_Label_Grp.Update_CV_Label(
597: IBE_UTIL.debug('l_cv_label_rec.content_item_id = '||l_cv_label_rec.content_item_id);
598: IBE_UTIL.debug('l_cv_label_rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
599: IBE_UTIL.debug('l_cv_label_rec.label_code = '||l_cv_label_rec.label_code);
600: IBE_UTIL.debug('l_cv_label_rec.last_updated_by = '||l_cv_label_rec.last_updated_by);
601: IBE_UTIL.debug('l_cv_label_rec.object_version_number = '
602: ||l_cv_label_rec.object_version_number);
603: END IF;
604: Ibc_Cv_Label_Grp.Update_CV_Label(
605: p_api_version_number => 1.0,
610: x_return_status => x_return_status,
611: x_msg_count => x_msg_count,
612: x_msg_data => x_msg_data);
613: IF (l_debug = 'Y') THEN
614: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Update_CV_Label:'||x_return_status);
615: END IF;
616: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
617: IF (l_debug = 'Y') THEN
618: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label');
614: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Update_CV_Label:'||x_return_status);
615: END IF;
616: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
617: IF (l_debug = 'Y') THEN
618: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label');
619: for i in 1..x_msg_count loop
620: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
621: IBE_UTIL.debug(l_msg_data);
622: end loop;
617: IF (l_debug = 'Y') THEN
618: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label');
619: for i in 1..x_msg_count loop
620: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
621: IBE_UTIL.debug(l_msg_data);
622: end loop;
623: END IF;
624: RAISE FND_API.G_EXC_ERROR;
625: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
623: END IF;
624: RAISE FND_API.G_EXC_ERROR;
625: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
626: IF (l_debug = 'Y') THEN
627: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label');
628: for i in 1..x_msg_count loop
629: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
630: IBE_UTIL.debug(l_msg_data);
631: end loop;
626: IF (l_debug = 'Y') THEN
627: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label');
628: for i in 1..x_msg_count loop
629: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
630: IBE_UTIL.debug(l_msg_data);
631: end loop;
632: END IF;
633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
634: END IF;
636: IF (p_old_content_item_id IS NOT NULL) THEN
637: -- Check the old content item has association or not
638: -- If not, remove the label
639: IF (l_debug = 'Y') THEN
640: IBE_UTIL.debug('Check the old content item has association or not');
641: END IF;
642: l_temp := 0;
643: l_old_item_id := p_old_content_item_id;
644: IF (l_debug = 'Y') THEN
641: END IF;
642: l_temp := 0;
643: l_old_item_id := p_old_content_item_id;
644: IF (l_debug = 'Y') THEN
645: IBE_UTIL.debug('Check association');
646: IBE_UTIL.debug('l_old_item_id = '||l_old_item_id);
647: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
648: END IF;
649: OPEN c_associations_flag(l_old_item_id,
642: l_temp := 0;
643: l_old_item_id := p_old_content_item_id;
644: IF (l_debug = 'Y') THEN
645: IBE_UTIL.debug('Check association');
646: IBE_UTIL.debug('l_old_item_id = '||l_old_item_id);
647: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
648: END IF;
649: OPEN c_associations_flag(l_old_item_id,
650: l_association_type_code);
643: l_old_item_id := p_old_content_item_id;
644: IF (l_debug = 'Y') THEN
645: IBE_UTIL.debug('Check association');
646: IBE_UTIL.debug('l_old_item_id = '||l_old_item_id);
647: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
648: END IF;
649: OPEN c_associations_flag(l_old_item_id,
650: l_association_type_code);
651: FETCH c_associations_flag INTO l_temp;
653: l_temp := 0;
654: END IF;
655: CLOSE c_associations_flag;
656: IF (l_debug = 'Y') THEN
657: IBE_UTIL.debug('After checking old association:'||l_temp);
658: END IF;
659: IF (l_temp <> 1) THEN
660: IF (l_debug = 'Y') THEN
661: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
657: IBE_UTIL.debug('After checking old association:'||l_temp);
658: END IF;
659: IF (l_temp <> 1) THEN
660: IF (l_debug = 'Y') THEN
661: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
662: IBE_UTIL.debug('p_label_code = '||l_label_code);
663: IBE_UTIL.debug('p_content_item_id = '||l_old_item_id);
664: END IF;
665: Ibc_Cv_Label_Grp.Delete_CV_Label(
658: END IF;
659: IF (l_temp <> 1) THEN
660: IF (l_debug = 'Y') THEN
661: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
662: IBE_UTIL.debug('p_label_code = '||l_label_code);
663: IBE_UTIL.debug('p_content_item_id = '||l_old_item_id);
664: END IF;
665: Ibc_Cv_Label_Grp.Delete_CV_Label(
666: P_Api_Version_Number => 1.0,
659: IF (l_temp <> 1) THEN
660: IF (l_debug = 'Y') THEN
661: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
662: IBE_UTIL.debug('p_label_code = '||l_label_code);
663: IBE_UTIL.debug('p_content_item_id = '||l_old_item_id);
664: END IF;
665: Ibc_Cv_Label_Grp.Delete_CV_Label(
666: P_Api_Version_Number => 1.0,
667: P_Init_Msg_List => FND_API.G_FALSE,
671: x_return_status => x_return_status,
672: x_msg_count => x_msg_count,
673: x_msg_data => x_msg_data);
674: IF (l_debug = 'Y') THEN
675: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Delete_CV_Label:'||x_return_status);
676: END IF;
677: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
678: IF (l_debug = 'Y') THEN
679: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
675: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Delete_CV_Label:'||x_return_status);
676: END IF;
677: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
678: IF (l_debug = 'Y') THEN
679: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
680: for i in 1..x_msg_count loop
681: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
682: IBE_UTIL.debug(l_msg_data);
683: end loop;
678: IF (l_debug = 'Y') THEN
679: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
680: for i in 1..x_msg_count loop
681: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
682: IBE_UTIL.debug(l_msg_data);
683: end loop;
684: END IF;
685: RAISE FND_API.G_EXC_ERROR;
686: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
684: END IF;
685: RAISE FND_API.G_EXC_ERROR;
686: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
687: IF (l_debug = 'Y') THEN
688: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
689: for i in 1..x_msg_count loop
690: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
691: IBE_UTIL.debug(l_msg_data);
692: end loop;
687: IF (l_debug = 'Y') THEN
688: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
689: for i in 1..x_msg_count loop
690: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
691: IBE_UTIL.debug(l_msg_data);
692: end loop;
693: END IF;
694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
695: END IF;
696: END IF;
697: END IF;
698: l_temp := 0;
699: IF (l_debug = 'Y') THEN
700: IBE_UTIL.debug('Before checking label');
701: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
702: IBE_UTIL.debug('l_label_code = '||l_label_code);
703: END IF;
704: OPEN c_label_flag(l_content_item_id,l_label_code);
697: END IF;
698: l_temp := 0;
699: IF (l_debug = 'Y') THEN
700: IBE_UTIL.debug('Before checking label');
701: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
702: IBE_UTIL.debug('l_label_code = '||l_label_code);
703: END IF;
704: OPEN c_label_flag(l_content_item_id,l_label_code);
705: FETCH c_label_flag INTO l_temp;
698: l_temp := 0;
699: IF (l_debug = 'Y') THEN
700: IBE_UTIL.debug('Before checking label');
701: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
702: IBE_UTIL.debug('l_label_code = '||l_label_code);
703: END IF;
704: OPEN c_label_flag(l_content_item_id,l_label_code);
705: FETCH c_label_flag INTO l_temp;
706: IF (c_label_flag%NOTFOUND) THEN
707: l_temp := -1;
708: END IF;
709: CLOSE c_label_flag;
710: IF (l_debug = 'Y') THEN
711: IBE_UTIL.debug('After checking label:'||l_temp);
712: END IF;
713: l_cv_label_rec.content_item_id := l_content_item_id;
714: l_cv_label_rec.citem_version_id := l_item_version_id;
715: l_cv_label_rec.label_code := l_label_code;
718: l_cv_label_rec.object_version_number := l_temp;
719: l_cv_label_rec.last_update_login := FND_GLOBAL.login_id;
720: IF (l_temp >= 0) THEN
721: IF (l_debug = 'Y') THEN
722: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
723: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
719: l_cv_label_rec.last_update_login := FND_GLOBAL.login_id;
720: IF (l_temp >= 0) THEN
721: IF (l_debug = 'Y') THEN
722: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
723: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
720: IF (l_temp >= 0) THEN
721: IF (l_debug = 'Y') THEN
722: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
723: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
721: IF (l_debug = 'Y') THEN
722: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
723: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
729: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
722: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
723: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
729: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
730: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
724: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
725: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
729: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
730: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
731: ||l_cv_label_rec.object_version_number);
732: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
726: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
727: ||l_cv_label_rec.last_updated_by);
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
729: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
730: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
731: ||l_cv_label_rec.object_version_number);
732: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
733: ||l_cv_label_rec.last_update_login);
734: END IF;
728: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
729: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
730: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
731: ||l_cv_label_rec.object_version_number);
732: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
733: ||l_cv_label_rec.last_update_login);
734: END IF;
735: Ibc_Cv_Label_Grp.Update_CV_Label(
736: p_api_version_number => 1.0,
741: x_return_status => x_return_status,
742: x_msg_count => x_msg_count,
743: x_msg_data => x_msg_data);
744: IF (l_debug = 'Y') THEN
745: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Update_CV_Label:'||x_return_status);
746: END IF;
747: ELSE
748: l_cv_label_rec.object_version_number := 1;
749: l_cv_label_rec.created_by := FND_GLOBAL.user_id;
748: l_cv_label_rec.object_version_number := 1;
749: l_cv_label_rec.created_by := FND_GLOBAL.user_id;
750: l_cv_label_rec.creation_date := SYSDATE;
751: IF (l_debug = 'Y') THEN
752: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
753: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
749: l_cv_label_rec.created_by := FND_GLOBAL.user_id;
750: l_cv_label_rec.creation_date := SYSDATE;
751: IF (l_debug = 'Y') THEN
752: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
753: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
750: l_cv_label_rec.creation_date := SYSDATE;
751: IF (l_debug = 'Y') THEN
752: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
753: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
751: IF (l_debug = 'Y') THEN
752: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
753: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
759: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
752: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Update_CV_Label');
753: IBE_UTIL.debug('P_CV_Label_Rec.content_item_id = '||l_cv_label_rec.content_item_id);
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
759: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
760: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
754: IBE_UTIL.debug('P_CV_Label_Rec.citem_version_id = '||l_cv_label_rec.citem_version_id);
755: IBE_UTIL.debug('P_CV_Label_Rec.label_code = '||l_cv_label_rec.label_code);
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
759: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
760: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
761: ||l_cv_label_rec.object_version_number);
762: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
756: IBE_UTIL.debug('P_CV_Label_Rec.last_updated_by = '
757: ||l_cv_label_rec.last_updated_by);
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
759: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
760: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
761: ||l_cv_label_rec.object_version_number);
762: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
763: ||l_cv_label_rec.last_update_login);
764: IBE_UTIL.debug('P_CV_Label_Rec.creation_date = '
758: IBE_UTIL.debug('P_CV_Label_Rec.last_update_date = '
759: ||to_char(l_cv_label_rec.last_update_date,'MM-DD-RRRR HH24:MI:SS'));
760: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
761: ||l_cv_label_rec.object_version_number);
762: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
763: ||l_cv_label_rec.last_update_login);
764: IBE_UTIL.debug('P_CV_Label_Rec.creation_date = '
765: ||to_char(l_cv_label_rec.creation_date,'MM-DD-RRRR HH24:MI:SS'));
766: IBE_UTIL.debug('P_CV_Label_Rec.created_by = '||l_cv_label_rec.created_by);
760: IBE_UTIL.debug('P_CV_Label_Rec.object_version_number = '
761: ||l_cv_label_rec.object_version_number);
762: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
763: ||l_cv_label_rec.last_update_login);
764: IBE_UTIL.debug('P_CV_Label_Rec.creation_date = '
765: ||to_char(l_cv_label_rec.creation_date,'MM-DD-RRRR HH24:MI:SS'));
766: IBE_UTIL.debug('P_CV_Label_Rec.created_by = '||l_cv_label_rec.created_by);
767: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Create_CV_Label');
768: END IF;
762: IBE_UTIL.debug('P_CV_Label_Rec.last_update_login = '
763: ||l_cv_label_rec.last_update_login);
764: IBE_UTIL.debug('P_CV_Label_Rec.creation_date = '
765: ||to_char(l_cv_label_rec.creation_date,'MM-DD-RRRR HH24:MI:SS'));
766: IBE_UTIL.debug('P_CV_Label_Rec.created_by = '||l_cv_label_rec.created_by);
767: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Create_CV_Label');
768: END IF;
769: Ibc_Cv_Label_Grp.Create_CV_Label(
770: p_api_version_number => 1.0,
763: ||l_cv_label_rec.last_update_login);
764: IBE_UTIL.debug('P_CV_Label_Rec.creation_date = '
765: ||to_char(l_cv_label_rec.creation_date,'MM-DD-RRRR HH24:MI:SS'));
766: IBE_UTIL.debug('P_CV_Label_Rec.created_by = '||l_cv_label_rec.created_by);
767: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Create_CV_Label');
768: END IF;
769: Ibc_Cv_Label_Grp.Create_CV_Label(
770: p_api_version_number => 1.0,
771: P_Init_Msg_List => FND_API.G_FALSE,
775: x_return_status => x_return_status,
776: x_msg_count => x_msg_count,
777: x_msg_data => x_msg_data);
778: IF (l_debug = 'Y') THEN
779: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Create_CV_Label:'||x_return_status);
780: END IF;
781: END IF;
782: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
783: IF (l_debug = 'Y') THEN
780: END IF;
781: END IF;
782: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
783: IF (l_debug = 'Y') THEN
784: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label/Create_CV_Label');
785: for i in 1..x_msg_count loop
786: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
787: IBE_UTIL.debug(l_msg_data);
788: end loop;
783: IF (l_debug = 'Y') THEN
784: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label/Create_CV_Label');
785: for i in 1..x_msg_count loop
786: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
787: IBE_UTIL.debug(l_msg_data);
788: end loop;
789: END IF;
790: RAISE FND_API.G_EXC_ERROR;
791: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
789: END IF;
790: RAISE FND_API.G_EXC_ERROR;
791: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
792: IF (l_debug = 'Y') THEN
793: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label/Create_CV_Label');
794: for i in 1..x_msg_count loop
795: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
796: IBE_UTIL.debug(l_msg_data);
797: end loop;
792: IF (l_debug = 'Y') THEN
793: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Update_CV_Label/Create_CV_Label');
794: for i in 1..x_msg_count loop
795: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
796: IBE_UTIL.debug(l_msg_data);
797: end loop;
798: END IF;
799: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
800: END IF;
799: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
800: END IF;
801: END IF;
802: IF (l_debug = 'Y') THEN
803: IBE_UTIL.debug('Before committing work:'||p_commit);
804: END IF;
805: IF (FND_API.To_Boolean(p_commit)) THEN
806: COMMIT WORK;
807: END IF;
808: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
809: p_data => x_msg_data,
810: p_encoded => 'F');
811: IF (l_debug = 'Y') THEN
812: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Update_Label_Association ends +');
813: END IF;
814: EXCEPTION
815: WHEN FND_API.G_EXC_ERROR THEN
816: ROLLBACK TO UPDATE_LABEL_ASSOCIATION_SAVE;
831: FND_MESSAGE.Set_Token('ERRNO', SQLCODE);
832: FND_MESSAGE.Set_Token('REASON', SQLERRM);
833: FND_MSG_PUB.Add;
834: IF (l_debug = 'Y') THEN
835: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
836: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
837: END IF;
838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
839: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
832: FND_MESSAGE.Set_Token('REASON', SQLERRM);
833: FND_MSG_PUB.Add;
834: IF (l_debug = 'Y') THEN
835: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
836: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
837: END IF;
838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
839: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
840: THEN
878: BEGIN
879: SAVEPOINT DELETE_LABEL_ASSOCIATION_SAVE;
880: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
881: IF (l_debug = 'Y') THEN
882: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association Starts +');
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
879: SAVEPOINT DELETE_LABEL_ASSOCIATION_SAVE;
880: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
881: IF (l_debug = 'Y') THEN
882: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association Starts +');
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
880: l_debug := NVL(FND_PROFILE.VALUE('IBE_DEBUG'),'N');
881: IF (l_debug = 'Y') THEN
882: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association Starts +');
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
881: IF (l_debug = 'Y') THEN
882: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association Starts +');
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
889: IBE_UTIL.debug('p_association_type_code = '||p_association_type_code);
882: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association Starts +');
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
889: IBE_UTIL.debug('p_association_type_code = '||p_association_type_code);
890: END IF;
883: IBE_UTIL.debug('p_api_version = '||p_api_version);
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
889: IBE_UTIL.debug('p_association_type_code = '||p_association_type_code);
890: END IF;
891: IF NOT FND_API.Compatible_API_Call(l_api_version,
884: IBE_UTIL.debug('p_init_msg_list = '||p_init_msg_list);
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
889: IBE_UTIL.debug('p_association_type_code = '||p_association_type_code);
890: END IF;
891: IF NOT FND_API.Compatible_API_Call(l_api_version,
892: p_api_version,
885: IBE_UTIL.debug('p_commit = '||p_commit);
886: IBE_UTIL.debug('p_content_item_id = '||p_content_item_id);
887: IBE_UTIL.debug('p_version_number = '||p_version_number);
888: IBE_UTIL.debug('p_media_object_id = '||p_media_object_id);
889: IBE_UTIL.debug('p_association_type_code = '||p_association_type_code);
890: END IF;
891: IF NOT FND_API.Compatible_API_Call(l_api_version,
892: p_api_version,
893: l_api_name,
902: l_content_item_id := p_content_item_id;
903: l_association_type_code := NVL(p_association_type_code,
904: g_association_type_code);
905: IF (l_debug = 'Y') THEN
906: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association starts');
907: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
908: IBE_UTIL.debug('p_association_type_code = '||l_association_type_code);
909: IBE_UTIL.debug('p_associated_object_val1 = '||TO_CHAR(p_media_object_id));
910: END IF;
903: l_association_type_code := NVL(p_association_type_code,
904: g_association_type_code);
905: IF (l_debug = 'Y') THEN
906: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association starts');
907: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
908: IBE_UTIL.debug('p_association_type_code = '||l_association_type_code);
909: IBE_UTIL.debug('p_associated_object_val1 = '||TO_CHAR(p_media_object_id));
910: END IF;
911: IBC_CITEM_ADMIN_GRP.delete_association(
904: g_association_type_code);
905: IF (l_debug = 'Y') THEN
906: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association starts');
907: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
908: IBE_UTIL.debug('p_association_type_code = '||l_association_type_code);
909: IBE_UTIL.debug('p_associated_object_val1 = '||TO_CHAR(p_media_object_id));
910: END IF;
911: IBC_CITEM_ADMIN_GRP.delete_association(
912: p_content_item_id => l_content_item_id,
905: IF (l_debug = 'Y') THEN
906: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association starts');
907: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
908: IBE_UTIL.debug('p_association_type_code = '||l_association_type_code);
909: IBE_UTIL.debug('p_associated_object_val1 = '||TO_CHAR(p_media_object_id));
910: END IF;
911: IBC_CITEM_ADMIN_GRP.delete_association(
912: p_content_item_id => l_content_item_id,
913: p_association_type_code => l_association_type_code,
918: x_return_status => x_return_status,
919: x_msg_count => x_msg_count,
920: x_msg_data => x_msg_data);
921: IF (l_debug = 'Y') THEN
922: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association ends:'||x_return_status);
923: END IF;
924: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
925: IF (l_debug = 'Y') THEN
926: IBE_UTIL.debug('Error in IBC_CITEM_ADMIN_GRP.delete_association');
922: IBE_UTIL.debug('Calling IBC_CITEM_ADMIN_GRP.delete_association ends:'||x_return_status);
923: END IF;
924: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
925: IF (l_debug = 'Y') THEN
926: IBE_UTIL.debug('Error in IBC_CITEM_ADMIN_GRP.delete_association');
927: for i in 1..x_msg_count loop
928: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
929: IBE_UTIL.debug(l_msg_data);
930: end loop;
925: IF (l_debug = 'Y') THEN
926: IBE_UTIL.debug('Error in IBC_CITEM_ADMIN_GRP.delete_association');
927: for i in 1..x_msg_count loop
928: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
929: IBE_UTIL.debug(l_msg_data);
930: end loop;
931: END IF;
932: RAISE FND_API.G_EXC_ERROR;
933: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
931: END IF;
932: RAISE FND_API.G_EXC_ERROR;
933: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
934: IF (l_debug = 'Y') THEN
935: IBE_UTIL.debug('Error in IBC_CITEM_ADMIN_GRP.delete_association');
936: for i in 1..x_msg_count loop
937: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
938: IBE_UTIL.debug(l_msg_data);
939: end loop;
934: IF (l_debug = 'Y') THEN
935: IBE_UTIL.debug('Error in IBC_CITEM_ADMIN_GRP.delete_association');
936: for i in 1..x_msg_count loop
937: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
938: IBE_UTIL.debug(l_msg_data);
939: end loop;
940: END IF;
941: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
942: END IF;
941: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
942: END IF;
943: l_temp := 0;
944: IF (l_debug = 'Y') THEN
945: IBE_UTIL.debug('Check the association for the content item');
946: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
947: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
948: END IF;
949: OPEN c_associations_flag(l_content_item_id,
942: END IF;
943: l_temp := 0;
944: IF (l_debug = 'Y') THEN
945: IBE_UTIL.debug('Check the association for the content item');
946: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
947: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
948: END IF;
949: OPEN c_associations_flag(l_content_item_id,
950: l_association_type_code);
943: l_temp := 0;
944: IF (l_debug = 'Y') THEN
945: IBE_UTIL.debug('Check the association for the content item');
946: IBE_UTIL.debug('l_content_item_id = '||l_content_item_id);
947: IBE_UTIL.debug('l_association_type_code = '||l_association_type_code);
948: END IF;
949: OPEN c_associations_flag(l_content_item_id,
950: l_association_type_code);
951: FETCH c_associations_flag INTO l_temp;
953: l_temp := 0;
954: END IF;
955: CLOSE c_associations_flag;
956: IF (l_debug = 'Y') THEN
957: IBE_UTIL.debug('After checking association for the content item:'||l_temp);
958: END IF;
959: IF (l_temp <> 1) THEN
960: IF (l_debug = 'Y') THEN
961: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
957: IBE_UTIL.debug('After checking association for the content item:'||l_temp);
958: END IF;
959: IF (l_temp <> 1) THEN
960: IF (l_debug = 'Y') THEN
961: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
962: IBE_UTIL.debug('p_label_code = '||l_label_code);
963: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
964: END IF;
965: Ibc_Cv_Label_Grp.Delete_CV_Label(
958: END IF;
959: IF (l_temp <> 1) THEN
960: IF (l_debug = 'Y') THEN
961: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
962: IBE_UTIL.debug('p_label_code = '||l_label_code);
963: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
964: END IF;
965: Ibc_Cv_Label_Grp.Delete_CV_Label(
966: P_Api_Version_Number => 1.0,
959: IF (l_temp <> 1) THEN
960: IF (l_debug = 'Y') THEN
961: IBE_UTIL.debug('Calling Ibc_Cv_Label_Grp.Delete_CV_Label');
962: IBE_UTIL.debug('p_label_code = '||l_label_code);
963: IBE_UTIL.debug('p_content_item_id = '||l_content_item_id);
964: END IF;
965: Ibc_Cv_Label_Grp.Delete_CV_Label(
966: P_Api_Version_Number => 1.0,
967: P_Init_Msg_List => FND_API.G_FALSE,
971: x_return_status => x_return_status,
972: x_msg_count => x_msg_count,
973: x_msg_data => x_msg_data);
974: IF (l_debug = 'Y') THEN
975: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Delete_CV_Label:'||x_return_status);
976: END IF;
977: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
978: IF (l_debug = 'Y') THEN
979: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
975: IBE_UTIL.debug('After calling Ibc_Cv_Label_Grp.Delete_CV_Label:'||x_return_status);
976: END IF;
977: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
978: IF (l_debug = 'Y') THEN
979: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
980: for i in 1..x_msg_count loop
981: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
982: IBE_UTIL.debug(l_msg_data);
983: end loop;
978: IF (l_debug = 'Y') THEN
979: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
980: for i in 1..x_msg_count loop
981: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
982: IBE_UTIL.debug(l_msg_data);
983: end loop;
984: END IF;
985: RAISE FND_API.G_EXC_ERROR;
986: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
984: END IF;
985: RAISE FND_API.G_EXC_ERROR;
986: ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
987: IF (l_debug = 'Y') THEN
988: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
989: for i in 1..x_msg_count loop
990: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
991: IBE_UTIL.debug(l_msg_data);
992: end loop;
987: IF (l_debug = 'Y') THEN
988: IBE_UTIL.debug('Error in Ibc_Cv_Label_Grp.Delete_CV_Label');
989: for i in 1..x_msg_count loop
990: l_msg_data := FND_MSG_PUB.get(i,FND_API.G_FALSE);
991: IBE_UTIL.debug(l_msg_data);
992: end loop;
993: END IF;
994: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
995: END IF;
994: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
995: END IF;
996: END IF;
997: IF (l_debug = 'Y') THEN
998: IBE_UTIL.debug('Before committing the result:'||p_commit);
999: END IF;
1000: IF (FND_API.To_Boolean(p_commit)) THEN
1001: COMMIT WORK;
1002: END IF;
1000: IF (FND_API.To_Boolean(p_commit)) THEN
1001: COMMIT WORK;
1002: END IF;
1003: IF (l_debug = 'Y') THEN
1004: IBE_UTIL.debug('IBE_M_IBC_INT_PVT.Delete_Label_Association ends +');
1005: END IF;
1006: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1007: p_data => x_msg_data,
1008: p_encoded => 'F');
1026: FND_MESSAGE.Set_Token('ERRNO', SQLCODE);
1027: FND_MESSAGE.Set_Token('REASON', SQLERRM);
1028: FND_MSG_PUB.Add;
1029: IF (l_debug = 'Y') THEN
1030: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
1031: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
1032: END IF;
1033: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1034: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1027: FND_MESSAGE.Set_Token('REASON', SQLERRM);
1028: FND_MSG_PUB.Add;
1029: IF (l_debug = 'Y') THEN
1030: IBE_UTIL.debug('SQLCODE:'||SQLCODE);
1031: IBE_UTIL.debug('SQLERRM:'||SQLERRM);
1032: END IF;
1033: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1034: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1035: THEN