72: l_end_date_active JTF_RS_GRP_RELATIONS.END_DATE_ACTIVE%TYPE := p_end_date_active;
73: l_temp_end_date_active JTF_RS_GRP_RELATIONS.END_DATE_ACTIVE%TYPE ;
74: l_group_relate_id JTF_RS_GRP_RELATIONS.GROUP_RELATE_ID%TYPE;
75:
76: l_g_miss_date date := to_date(to_char(fnd_api.g_miss_date,'DD-MM-RRRR'),'DD-MM-RRRR') ;
77:
78: --CHECK THIS CURSOR FOR VALIDITY OF DATES
79:
80: CURSOR check_overlap_cur(l_group_id JTF_RS_GRP_RELATIONS.GROUP_ID%TYPE,
225: BEGIN
226: --Standard Start of API SAVEPOINT
227: SAVEPOINT GROUP_RELATE_SP;
228:
229: x_return_status := fnd_api.g_ret_sts_success;
230: l_return_status := fnd_api.g_ret_sts_success;
231:
232: --Standard Call to check API compatibility
233: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
226: --Standard Start of API SAVEPOINT
227: SAVEPOINT GROUP_RELATE_SP;
228:
229: x_return_status := fnd_api.g_ret_sts_success;
230: l_return_status := fnd_api.g_ret_sts_success;
231:
232: --Standard Call to check API compatibility
233: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
234: THEN
229: x_return_status := fnd_api.g_ret_sts_success;
230: l_return_status := fnd_api.g_ret_sts_success;
231:
232: --Standard Call to check API compatibility
233: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
234: THEN
235: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
236: END IF;
237:
231:
232: --Standard Call to check API compatibility
233: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
234: THEN
235: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
236: END IF;
237:
238: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
239: IF FND_API.To_boolean(P_INIT_MSG_LIST)
235: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
236: END IF;
237:
238: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
239: IF FND_API.To_boolean(P_INIT_MSG_LIST)
240: THEN
241: FND_MSG_PUB.Initialize;
242: END IF;
243:
261: P_END_DATE_ACTIVE => p_end_date_active,
262: p_data => L_data,
263: p_count => L_count,
264: P_return_code => l_return_code);
265: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
266: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
267:
268: x_return_status := fnd_api.g_ret_sts_error;
269: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
262: p_data => L_data,
263: p_count => L_count,
264: P_return_code => l_return_code);
265: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
266: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
267:
268: x_return_status := fnd_api.g_ret_sts_error;
269: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
270: FND_MSG_PUB.add;
264: P_return_code => l_return_code);
265: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
266: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
267:
268: x_return_status := fnd_api.g_ret_sts_error;
269: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
270: FND_MSG_PUB.add;
271: RAISE fnd_api.g_exc_error;
272: end if;
267:
268: x_return_status := fnd_api.g_ret_sts_error;
269: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
270: FND_MSG_PUB.add;
271: RAISE fnd_api.g_exc_error;
272: end if;
273: end if;
274: end if;
275:
287: P_END_DATE_ACTIVE => p_end_date_active,
288: p_data => L_data,
289: p_count => L_count,
290: P_return_code => l_return_code);
291: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
292: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
293: x_return_status := fnd_api.g_ret_sts_error;
294: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
295: FND_MSG_PUB.add;
288: p_data => L_data,
289: p_count => L_count,
290: P_return_code => l_return_code);
291: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
292: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
293: x_return_status := fnd_api.g_ret_sts_error;
294: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
295: FND_MSG_PUB.add;
296: RAISE fnd_api.g_exc_error;
289: p_count => L_count,
290: P_return_code => l_return_code);
291: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
292: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
293: x_return_status := fnd_api.g_ret_sts_error;
294: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
295: FND_MSG_PUB.add;
296: RAISE fnd_api.g_exc_error;
297: end if;
292: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
293: x_return_status := fnd_api.g_ret_sts_error;
294: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
295: FND_MSG_PUB.add;
296: RAISE fnd_api.g_exc_error;
297: end if;
298: end if;
299: end if;
300:
312: P_END_DATE_ACTIVE => p_end_date_active,
313: p_data => L_data,
314: p_count => L_count,
315: P_return_code => l_return_code);
316: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
317: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
318: x_return_status := fnd_api.g_ret_sts_error;
319: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
320: FND_MSG_PUB.add;
313: p_data => L_data,
314: p_count => L_count,
315: P_return_code => l_return_code);
316: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
317: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
318: x_return_status := fnd_api.g_ret_sts_error;
319: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
320: FND_MSG_PUB.add;
321: RAISE fnd_api.g_exc_error;
314: p_count => L_count,
315: P_return_code => l_return_code);
316: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
317: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
318: x_return_status := fnd_api.g_ret_sts_error;
319: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
320: FND_MSG_PUB.add;
321: RAISE fnd_api.g_exc_error;
322: end if;
317: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
318: x_return_status := fnd_api.g_ret_sts_error;
319: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
320: FND_MSG_PUB.add;
321: RAISE fnd_api.g_exc_error;
322: end if;
323: end if;
324: end if;
325:
331: JTF_RESOURCE_UTL.VALIDATE_INPUT_DATES(l_start_date_active,
332: l_end_date_active,
333: l_return_status);
334:
335: IF(l_return_status <> fnd_api.g_ret_sts_success)
336: THEN
337: x_return_status := fnd_api.g_ret_sts_error;
338: RAISE fnd_api.g_exc_error;
339: END IF;
333: l_return_status);
334:
335: IF(l_return_status <> fnd_api.g_ret_sts_success)
336: THEN
337: x_return_status := fnd_api.g_ret_sts_error;
338: RAISE fnd_api.g_exc_error;
339: END IF;
340:
341:
334:
335: IF(l_return_status <> fnd_api.g_ret_sts_success)
336: THEN
337: x_return_status := fnd_api.g_ret_sts_error;
338: RAISE fnd_api.g_exc_error;
339: END IF;
340:
341:
342:
344: --time period if relation_type = PARENT_GROUP
345: IF (l_relation_type='PARENT_GROUP')
346: THEN
347: IF (l_end_date_active is null) THEN
348: l_temp_end_date_active := to_date(to_char(fnd_api.g_miss_date,'dd-MM-RRRR'),'dd-MM-RRRR');
349: --l_temp_end_date_active := to_date('31-DEC-4712','dd-MM-RRRR');
350: ELSE l_temp_end_date_active := l_end_date_active;
351: END IF;
352: OPEN check_overlap_cur(l_group_id,
356: FETCH check_overlap_cur INTO check_overlap_rec;
357:
358: IF(check_overlap_cur%FOUND)
359: THEN
360: x_return_status := fnd_api.g_ret_sts_error;
361: fnd_message.set_name ('JTF', 'JTF_RS_GRP_REL_OVERLAP');
362: FND_MSG_PUB.add;
363: RAISE fnd_api.g_exc_error;
364: END IF;
359: THEN
360: x_return_status := fnd_api.g_ret_sts_error;
361: fnd_message.set_name ('JTF', 'JTF_RS_GRP_REL_OVERLAP');
362: FND_MSG_PUB.add;
363: RAISE fnd_api.g_exc_error;
364: END IF;
365: CLOSE check_overlap_cur;
366:
367: END IF;
372: l_end_date_active);
373: FETCH check_group_dt_cur INTO check_group_dt_rec;
374: IF(check_group_dt_cur%NOTFOUND)
375: THEN
376: x_return_status := fnd_api.g_ret_sts_error;
377: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_GRP_DT_ERR');
378: FND_MSG_PUB.add;
379: RAISE fnd_api.g_exc_error;
380:
375: THEN
376: x_return_status := fnd_api.g_ret_sts_error;
377: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_GRP_DT_ERR');
378: FND_MSG_PUB.add;
379: RAISE fnd_api.g_exc_error;
380:
381: END IF;
382: CLOSE check_group_dt_cur;
383:
387: l_end_date_active);
388: FETCH check_group_dt_cur INTO check_group_dt_rec;
389: IF(check_group_dt_cur%NOTFOUND)
390: THEN
391: x_return_status := fnd_api.g_ret_sts_error;
392: fnd_message.set_name ('JTF', 'JTF_RS_RELATED_GRP_DT_ERR');
393: FND_MSG_PUB.add;
394: RAISE fnd_api.g_exc_error;
395:
390: THEN
391: x_return_status := fnd_api.g_ret_sts_error;
392: fnd_message.set_name ('JTF', 'JTF_RS_RELATED_GRP_DT_ERR');
393: FND_MSG_PUB.add;
394: RAISE fnd_api.g_exc_error;
395:
396: END IF;
397: CLOSE check_group_dt_cur;
398:
402: FETCH check_dates_cur INTO check_dates_rec;
403:
404: IF(check_dates_cur%NOTFOUND)
405: THEN
406: x_return_status := fnd_api.g_ret_sts_error;
407: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_REL_DT_ERR');
408: FND_MSG_PUB.add;
409: RAISE fnd_api.g_exc_error;
410:
405: THEN
406: x_return_status := fnd_api.g_ret_sts_error;
407: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_REL_DT_ERR');
408: FND_MSG_PUB.add;
409: RAISE fnd_api.g_exc_error;
410:
411: END IF;
412: CLOSE check_dates_cur;*/
413:
418: p_end_date_active );
419: fetch dep_cur into dep_rec;
420: if(dep_cur%found)
421: then
422: x_return_status := fnd_api.g_ret_sts_error;
423: fnd_message.set_name ('JTF', 'JTF_RS_CYCLIC_DEP_ERR');
424: FND_MSG_PUB.add;
425: RAISE fnd_api.g_exc_error;
426: end if;
421: then
422: x_return_status := fnd_api.g_ret_sts_error;
423: fnd_message.set_name ('JTF', 'JTF_RS_CYCLIC_DEP_ERR');
424: FND_MSG_PUB.add;
425: RAISE fnd_api.g_exc_error;
426: end if;
427: close dep_cur;
428:
429:
449: X_RETURN_STATUS => l_return_status,
450: X_MSG_COUNT => l_msg_count,
451: X_MSG_DATA => l_msg_data);
452:
453: IF(l_return_status <> fnd_api.g_ret_sts_success)
454: THEN
455: x_return_status := fnd_api.g_ret_sts_error;
456: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
457: FND_MSG_PUB.add;
451: X_MSG_DATA => l_msg_data);
452:
453: IF(l_return_status <> fnd_api.g_ret_sts_success)
454: THEN
455: x_return_status := fnd_api.g_ret_sts_error;
456: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
457: FND_MSG_PUB.add;
458: RAISE fnd_api.g_exc_error;
459:
454: THEN
455: x_return_status := fnd_api.g_ret_sts_error;
456: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
457: FND_MSG_PUB.add;
458: RAISE fnd_api.g_exc_error;
459:
460: END IF;
461:
462:
562: fnd_message.set_token('P_SQLCODE',SQLCODE);
563: fnd_message.set_token('P_SQLERRM',SQLERRM);
564: fnd_message.set_token('P_API_NAME', l_api_name);
565: FND_MSG_PUB.add;
566: x_return_status := fnd_api.g_ret_sts_unexp_error;
567: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
568: RAISE fnd_api.g_exc_unexpected_error;
569: end;
570: exception when others then
564: fnd_message.set_token('P_API_NAME', l_api_name);
565: FND_MSG_PUB.add;
566: x_return_status := fnd_api.g_ret_sts_unexp_error;
567: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
568: RAISE fnd_api.g_exc_unexpected_error;
569: end;
570: exception when others then
571:
572: fnd_message.set_name ('JTF', 'JTF_RS_UNEXP_ERROR');
573: fnd_message.set_token('P_SQLCODE',SQLCODE);
574: fnd_message.set_token('P_SQLERRM',SQLERRM);
575: fnd_message.set_token('P_API_NAME', l_api_name);
576: FND_MSG_PUB.add;
577: x_return_status := fnd_api.g_ret_sts_unexp_error;
578: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
579: RAISE fnd_api.g_exc_unexpected_error;
580:
581: end;
575: fnd_message.set_token('P_API_NAME', l_api_name);
576: FND_MSG_PUB.add;
577: x_return_status := fnd_api.g_ret_sts_unexp_error;
578: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
579: RAISE fnd_api.g_exc_unexpected_error;
580:
581: end;
582:
583: ELSE
590: X_RETURN_STATUS => l_return_status,
591: X_MSG_COUNT => l_msg_count,
592: X_MSG_DATA => l_msg_data);
593:
594: IF(l_return_status <> fnd_api.g_ret_sts_success)
595: THEN
596: x_return_status := fnd_api.g_ret_sts_error;
597: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
598: FND_MSG_PUB.add;
592: X_MSG_DATA => l_msg_data);
593:
594: IF(l_return_status <> fnd_api.g_ret_sts_success)
595: THEN
596: x_return_status := fnd_api.g_ret_sts_error;
597: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
598: FND_MSG_PUB.add;
599: RAISE fnd_api.g_exc_error;
600:
595: THEN
596: x_return_status := fnd_api.g_ret_sts_error;
597: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
598: FND_MSG_PUB.add;
599: RAISE fnd_api.g_exc_error;
600:
601: END IF;
602:
603:
611: X_RETURN_STATUS => l_return_status,
612: X_MSG_COUNT => l_msg_count,
613: X_MSG_DATA => l_msg_data);
614:
615: IF(l_return_status <> fnd_api.g_ret_sts_success)
616: THEN
617:
618: x_return_status := fnd_api.g_ret_sts_error;
619: fnd_message.set_name ('JTF', 'JTF_RS_REP_MGR_ERR');
614:
615: IF(l_return_status <> fnd_api.g_ret_sts_success)
616: THEN
617:
618: x_return_status := fnd_api.g_ret_sts_error;
619: fnd_message.set_name ('JTF', 'JTF_RS_REP_MGR_ERR');
620: FND_MSG_PUB.add;
621: RAISE fnd_api.g_exc_error;
622:
617:
618: x_return_status := fnd_api.g_ret_sts_error;
619: fnd_message.set_name ('JTF', 'JTF_RS_REP_MGR_ERR');
620: FND_MSG_PUB.add;
621: RAISE fnd_api.g_exc_error;
622:
623: END IF; */
624: END IF; -- end of count check
625: END IF;
639: P_END_DATE_ACTIVE => p_end_date_active,
640: p_data => L_data,
641: p_count => L_count,
642: P_return_code => l_return_code);
643: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
644: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
645: x_return_status := fnd_api.g_ret_sts_error;
646: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
647: FND_MSG_PUB.add;
640: p_data => L_data,
641: p_count => L_count,
642: P_return_code => l_return_code);
643: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
644: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
645: x_return_status := fnd_api.g_ret_sts_error;
646: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
647: FND_MSG_PUB.add;
648: RAISE fnd_api.g_exc_error;
641: p_count => L_count,
642: P_return_code => l_return_code);
643: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
644: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
645: x_return_status := fnd_api.g_ret_sts_error;
646: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
647: FND_MSG_PUB.add;
648: RAISE fnd_api.g_exc_error;
649: end if;
644: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
645: x_return_status := fnd_api.g_ret_sts_error;
646: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
647: FND_MSG_PUB.add;
648: RAISE fnd_api.g_exc_error;
649: end if;
650: end if;
651: end if;
652:
665: P_END_DATE_ACTIVE => p_end_date_active,
666: p_data => l_msg_data,
667: p_count => L_count,
668: P_return_code => l_return_code);
669: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
670: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
671: x_return_status := fnd_api.g_ret_sts_error;
672: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
673: FND_MSG_PUB.add;
666: p_data => l_msg_data,
667: p_count => L_count,
668: P_return_code => l_return_code);
669: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
670: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
671: x_return_status := fnd_api.g_ret_sts_error;
672: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
673: FND_MSG_PUB.add;
674: RAISE fnd_api.g_exc_error;
667: p_count => L_count,
668: P_return_code => l_return_code);
669: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
670: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
671: x_return_status := fnd_api.g_ret_sts_error;
672: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
673: FND_MSG_PUB.add;
674: RAISE fnd_api.g_exc_error;
675: end if;
670: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
671: x_return_status := fnd_api.g_ret_sts_error;
672: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
673: FND_MSG_PUB.add;
674: RAISE fnd_api.g_exc_error;
675: end if;
676: end if;
677: end if;
678:
691: P_END_DATE_ACTIVE => p_end_date_active,
692: p_data => l_msg_data,
693: p_count => L_count,
694: P_return_code => l_return_code);
695: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
696: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
697: x_return_status := fnd_api.g_ret_sts_error;
698: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
699: FND_MSG_PUB.add;
692: p_data => l_msg_data,
693: p_count => L_count,
694: P_return_code => l_return_code);
695: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
696: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
697: x_return_status := fnd_api.g_ret_sts_error;
698: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
699: FND_MSG_PUB.add;
700: RAISE fnd_api.g_exc_error;
693: p_count => L_count,
694: P_return_code => l_return_code);
695: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
696: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
697: x_return_status := fnd_api.g_ret_sts_error;
698: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
699: FND_MSG_PUB.add;
700: RAISE fnd_api.g_exc_error;
701: end if;
696: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
697: x_return_status := fnd_api.g_ret_sts_error;
698: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
699: FND_MSG_PUB.add;
700: RAISE fnd_api.g_exc_error;
701: end if;
702: end if;
703: end if;
704:
748: p_bind_data_id => l_bind_data_id,
749: x_return_code => x_return_status);
750:
751:
752: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
753: x_return_status := fnd_api.g_ret_sts_error;
754: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
755: fnd_msg_pub.add;
756: RAISE fnd_api.g_exc_error;
749: x_return_code => x_return_status);
750:
751:
752: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
753: x_return_status := fnd_api.g_ret_sts_error;
754: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
755: fnd_msg_pub.add;
756: RAISE fnd_api.g_exc_error;
757: END IF;
752: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
753: x_return_status := fnd_api.g_ret_sts_error;
754: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
755: fnd_msg_pub.add;
756: RAISE fnd_api.g_exc_error;
757: END IF;
758: END IF;
759: END IF;
760: END IF;
761:
762:
763:
764: --standard commit
765: IF fnd_api.to_boolean (p_commit)
766: THEN
767: COMMIT WORK;
768: END IF;
769:
770:
771: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
772:
773: EXCEPTION
774: WHEN fnd_api.g_exc_unexpected_error
775: THEN
776: ROLLBACK TO group_relate_sp;
777: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
778: --FND_MSG_PUB.add;
775: THEN
776: ROLLBACK TO group_relate_sp;
777: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
778: --FND_MSG_PUB.add;
779: --x_return_status := fnd_api.g_ret_sts_unexp_error;
780: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
781: WHEN fnd_api.g_exc_error
782: THEN
783: ROLLBACK TO group_relate_sp;
777: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
778: --FND_MSG_PUB.add;
779: --x_return_status := fnd_api.g_ret_sts_unexp_error;
780: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
781: WHEN fnd_api.g_exc_error
782: THEN
783: ROLLBACK TO group_relate_sp;
784: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
785:
790: fnd_message.set_token('P_SQLCODE',SQLCODE);
791: fnd_message.set_token('P_SQLERRM',SQLERRM);
792: fnd_message.set_token('P_API_NAME',l_api_name);
793: FND_MSG_PUB.add;
794: x_return_status := fnd_api.g_ret_sts_unexp_error;
795: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
796:
797:
798: END create_resource_group_relate;
857: l_delete_flag JTF_RS_GRP_RELATIONS.DELETE_FLAG%TYPE;
858:
859: l_group_relate_id JTF_RS_GRP_RELATIONS.GROUP_RELATE_ID%TYPE := p_group_relate_id;
860:
861: l_g_miss_date date := to_date(to_char(fnd_api.g_miss_date,'DD-MM-RRRR'),'DD-MM-RRRR') ;
862:
863: L_ATTRIBUTE1 JTF_RS_GRP_RELATIONS.ATTRIBUTE1%TYPE;
864: L_ATTRIBUTE2 JTF_RS_GRP_RELATIONS.ATTRIBUTE2%TYPE;
865: L_ATTRIBUTE3 JTF_RS_GRP_RELATIONS.ATTRIBUTE3%TYPE;
1052: BEGIN
1053: --Standard Start of API SAVEPOINT
1054: SAVEPOINT GROUP_RELATE_SP;
1055:
1056: x_return_status := fnd_api.g_ret_sts_success;
1057:
1058: --Standard Call to check API compatibility
1059: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1060: THEN
1055:
1056: x_return_status := fnd_api.g_ret_sts_success;
1057:
1058: --Standard Call to check API compatibility
1059: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1060: THEN
1061: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1062: END IF;
1063:
1057:
1058: --Standard Call to check API compatibility
1059: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1060: THEN
1061: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1062: END IF;
1063:
1064: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1065: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1061: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1062: END IF;
1063:
1064: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1065: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1066: THEN
1067: FND_MSG_PUB.Initialize;
1068: END IF;
1069:
1084: P_OBJECT_VERSION_NUM => p_object_version_num,
1085: p_data => L_data,
1086: p_count => L_count,
1087: P_return_code => l_return_code);
1088: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1089: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1090: x_return_status := fnd_api.g_ret_sts_error;
1091: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1092: FND_MSG_PUB.add;
1085: p_data => L_data,
1086: p_count => L_count,
1087: P_return_code => l_return_code);
1088: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1089: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1090: x_return_status := fnd_api.g_ret_sts_error;
1091: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1092: FND_MSG_PUB.add;
1093: RAISE fnd_api.g_exc_error;
1086: p_count => L_count,
1087: P_return_code => l_return_code);
1088: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1089: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1090: x_return_status := fnd_api.g_ret_sts_error;
1091: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1092: FND_MSG_PUB.add;
1093: RAISE fnd_api.g_exc_error;
1094: end if;
1089: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1090: x_return_status := fnd_api.g_ret_sts_error;
1091: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1092: FND_MSG_PUB.add;
1093: RAISE fnd_api.g_exc_error;
1094: end if;
1095: end if;
1096: end if;
1097:
1108: P_OBJECT_VERSION_NUM => p_object_version_num,
1109: p_data => l_data,
1110: p_count => l_count,
1111: P_return_code => l_return_code);
1112: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1113: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1114: x_return_status := fnd_api.g_ret_sts_error;
1115: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1116: FND_MSG_PUB.add;
1109: p_data => l_data,
1110: p_count => l_count,
1111: P_return_code => l_return_code);
1112: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1113: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1114: x_return_status := fnd_api.g_ret_sts_error;
1115: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1116: FND_MSG_PUB.add;
1117: RAISE fnd_api.g_exc_error;
1110: p_count => l_count,
1111: P_return_code => l_return_code);
1112: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1113: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1114: x_return_status := fnd_api.g_ret_sts_error;
1115: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1116: FND_MSG_PUB.add;
1117: RAISE fnd_api.g_exc_error;
1118: end if;
1113: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1114: x_return_status := fnd_api.g_ret_sts_error;
1115: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1116: FND_MSG_PUB.add;
1117: RAISE fnd_api.g_exc_error;
1118: end if;
1119: end if;
1120: end if;
1121:
1132: P_OBJECT_VERSION_NUM => p_object_version_num,
1133: p_data => l_data,
1134: p_count => l_count,
1135: P_return_code => l_return_code);
1136: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1137: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1138: x_return_status := fnd_api.g_ret_sts_error;
1139: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1140: FND_MSG_PUB.add;
1133: p_data => l_data,
1134: p_count => l_count,
1135: P_return_code => l_return_code);
1136: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1137: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1138: x_return_status := fnd_api.g_ret_sts_error;
1139: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1140: FND_MSG_PUB.add;
1141: RAISE fnd_api.g_exc_error;
1134: p_count => l_count,
1135: P_return_code => l_return_code);
1136: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1137: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1138: x_return_status := fnd_api.g_ret_sts_error;
1139: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1140: FND_MSG_PUB.add;
1141: RAISE fnd_api.g_exc_error;
1142: end if;
1137: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1138: x_return_status := fnd_api.g_ret_sts_error;
1139: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1140: FND_MSG_PUB.add;
1141: RAISE fnd_api.g_exc_error;
1142: end if;
1143: end if;
1144: end if;
1145:
1158: l_object_version_number := grp_rel_rec.object_version_number;
1159: l_relation_type := grp_rel_rec.relation_type;
1160:
1161:
1162: IF(p_start_date_active = FND_API.G_MISS_DATE)
1163: THEN
1164: l_start_date_active := grp_rel_rec.start_date_active;
1165: ELSE
1166: l_start_date_active := p_start_date_active;
1164: l_start_date_active := grp_rel_rec.start_date_active;
1165: ELSE
1166: l_start_date_active := p_start_date_active;
1167: END IF;
1168: IF(p_end_date_active = FND_API.G_MISS_DATE)
1169: THEN
1170: l_end_date_active := grp_rel_rec.end_date_active;
1171: ELSE
1172: l_end_date_active := p_end_date_active;
1170: l_end_date_active := grp_rel_rec.end_date_active;
1171: ELSE
1172: l_end_date_active := p_end_date_active;
1173: END IF;
1174: IF(p_attribute1 = FND_API.G_MISS_CHAR)
1175: THEN
1176: l_attribute1 := grp_rel_rec.attribute1;
1177: ELSE
1178: l_attribute1 := p_attribute1;
1176: l_attribute1 := grp_rel_rec.attribute1;
1177: ELSE
1178: l_attribute1 := p_attribute1;
1179: END IF;
1180: IF(p_attribute2= FND_API.G_MISS_CHAR)
1181: THEN
1182: l_attribute2 := grp_rel_rec.attribute2;
1183: ELSE
1184: l_attribute2 := p_attribute2;
1182: l_attribute2 := grp_rel_rec.attribute2;
1183: ELSE
1184: l_attribute2 := p_attribute2;
1185: END IF;
1186: IF(p_attribute3 = FND_API.G_MISS_CHAR)
1187: THEN
1188: l_attribute3 := grp_rel_rec.attribute3;
1189: ELSE
1190: l_attribute3 := p_attribute3;
1188: l_attribute3 := grp_rel_rec.attribute3;
1189: ELSE
1190: l_attribute3 := p_attribute3;
1191: END IF;
1192: IF(p_attribute4 = FND_API.G_MISS_CHAR)
1193: THEN
1194: l_attribute4 := grp_rel_rec.attribute1;
1195: ELSE
1196: l_attribute4 := p_attribute4;
1194: l_attribute4 := grp_rel_rec.attribute1;
1195: ELSE
1196: l_attribute4 := p_attribute4;
1197: END IF;
1198: IF(p_attribute5 = FND_API.G_MISS_CHAR)
1199: THEN
1200: l_attribute5 := grp_rel_rec.attribute5;
1201: ELSE
1202: l_attribute5 := p_attribute5;
1200: l_attribute5 := grp_rel_rec.attribute5;
1201: ELSE
1202: l_attribute5 := p_attribute5;
1203: END IF;
1204: IF(p_attribute6 = FND_API.G_MISS_CHAR)
1205: THEN
1206: l_attribute6 := grp_rel_rec.attribute1;
1207: ELSE
1208: l_attribute6 := p_attribute6;
1206: l_attribute6 := grp_rel_rec.attribute1;
1207: ELSE
1208: l_attribute6 := p_attribute6;
1209: END IF;
1210: IF(p_attribute7 = FND_API.G_MISS_CHAR)
1211: THEN
1212: l_attribute7 := grp_rel_rec.attribute7;
1213: ELSE
1214: l_attribute7 := p_attribute7;
1212: l_attribute7 := grp_rel_rec.attribute7;
1213: ELSE
1214: l_attribute7 := p_attribute7;
1215: END IF;
1216: IF(p_attribute8 = FND_API.G_MISS_CHAR)
1217: THEN
1218: l_attribute8 := grp_rel_rec.attribute8;
1219: ELSE
1220: l_attribute8 := p_attribute8;
1218: l_attribute8 := grp_rel_rec.attribute8;
1219: ELSE
1220: l_attribute8 := p_attribute8;
1221: END IF;
1222: IF(p_attribute9 = FND_API.G_MISS_CHAR)
1223: THEN
1224: l_attribute9 := grp_rel_rec.attribute9;
1225: ELSE
1226: l_attribute9 := p_attribute9;
1224: l_attribute9 := grp_rel_rec.attribute9;
1225: ELSE
1226: l_attribute9 := p_attribute9;
1227: END IF;
1228: IF(p_attribute10 = FND_API.G_MISS_CHAR)
1229: THEN
1230: l_attribute10 := grp_rel_rec.attribute10;
1231: ELSE
1232: l_attribute10 := p_attribute10;
1230: l_attribute10 := grp_rel_rec.attribute10;
1231: ELSE
1232: l_attribute10 := p_attribute10;
1233: END IF;
1234: IF(p_attribute11 = FND_API.G_MISS_CHAR)
1235: THEN
1236: l_attribute11 := grp_rel_rec.attribute11;
1237: ELSE
1238: l_attribute11 := p_attribute11;
1236: l_attribute11 := grp_rel_rec.attribute11;
1237: ELSE
1238: l_attribute11 := p_attribute11;
1239: END IF;
1240: IF(p_attribute12 = FND_API.G_MISS_CHAR)
1241: THEN
1242: l_attribute12 := grp_rel_rec.attribute12;
1243: ELSE
1244: l_attribute12 := p_attribute12;
1242: l_attribute12 := grp_rel_rec.attribute12;
1243: ELSE
1244: l_attribute12 := p_attribute12;
1245: END IF;
1246: IF(p_attribute13 = FND_API.G_MISS_CHAR)
1247: THEN
1248: l_attribute13 := grp_rel_rec.attribute13;
1249: ELSE
1250: l_attribute13 := p_attribute13;
1248: l_attribute13 := grp_rel_rec.attribute13;
1249: ELSE
1250: l_attribute13 := p_attribute13;
1251: END IF;
1252: IF(p_attribute14 = FND_API.G_MISS_CHAR)
1253: THEN
1254: l_attribute14 := grp_rel_rec.attribute14;
1255: ELSE
1256: l_attribute14 := p_attribute14;
1254: l_attribute14 := grp_rel_rec.attribute14;
1255: ELSE
1256: l_attribute14 := p_attribute14;
1257: END IF;
1258: IF(p_attribute15 = FND_API.G_MISS_CHAR)
1259: THEN
1260: l_attribute15 := grp_rel_rec.attribute15;
1261: ELSE
1262: l_attribute15 := p_attribute15;
1261: ELSE
1262: l_attribute15 := p_attribute15;
1263: END IF;
1264:
1265: IF(p_attribute_category = FND_API.G_MISS_CHAR)
1266: THEN
1267: l_attribute_category := grp_rel_rec.attribute_category;
1268: ELSE
1269: l_attribute_category := p_attribute_category;
1276: JTF_RESOURCE_UTL.VALIDATE_INPUT_DATES(l_start_date_active,
1277: l_end_date_active,
1278: l_return_status);
1279:
1280: IF(l_return_status <> fnd_api.g_ret_sts_success)
1281: THEN
1282: x_return_status := fnd_api.g_ret_sts_error;
1283: RAISE fnd_api.g_exc_error;
1284: END IF;
1278: l_return_status);
1279:
1280: IF(l_return_status <> fnd_api.g_ret_sts_success)
1281: THEN
1282: x_return_status := fnd_api.g_ret_sts_error;
1283: RAISE fnd_api.g_exc_error;
1284: END IF;
1285:
1286:
1279:
1280: IF(l_return_status <> fnd_api.g_ret_sts_success)
1281: THEN
1282: x_return_status := fnd_api.g_ret_sts_error;
1283: RAISE fnd_api.g_exc_error;
1284: END IF;
1285:
1286:
1287:
1289: --time period if relation_type = PARENT_GROUP
1290: IF (l_relation_type='PARENT_GROUP')
1291: THEN
1292: IF (l_end_date_active is null) THEN
1293: l_temp_end_date_active := to_date(to_char(fnd_api.g_miss_date,'dd-MM-RRRR'),'dd-MM-RRRR');
1294: --l_temp_end_date_active := to_date('31-DEC-4712','dd-MM-RRRR');
1295: ELSE l_temp_end_date_active := l_end_date_active;
1296: END IF;
1297:
1303: FETCH check_overlap_cur INTO check_overlap_rec;
1304:
1305: IF(check_overlap_cur%FOUND)
1306: THEN
1307: x_return_status := fnd_api.g_ret_sts_error;
1308: fnd_message.set_name ('JTF', 'JTF_RS_GRP_REL_OVERLAP');
1309: FND_MSG_PUB.add;
1310: RAISE fnd_api.g_exc_error;
1311: END IF;
1306: THEN
1307: x_return_status := fnd_api.g_ret_sts_error;
1308: fnd_message.set_name ('JTF', 'JTF_RS_GRP_REL_OVERLAP');
1309: FND_MSG_PUB.add;
1310: RAISE fnd_api.g_exc_error;
1311: END IF;
1312: CLOSE check_overlap_cur;
1313:
1314: END IF;
1323: l_end_date_active );
1324: fetch dep_cur into dep_rec;
1325: if(dep_cur%found)
1326: then
1327: x_return_status := fnd_api.g_ret_sts_error;
1328: fnd_message.set_name ('JTF', 'JTF_RS_CYCLIC_DEP_ERR');
1329: FND_MSG_PUB.add;
1330: RAISE fnd_api.g_exc_error;
1331: end if;
1326: then
1327: x_return_status := fnd_api.g_ret_sts_error;
1328: fnd_message.set_name ('JTF', 'JTF_RS_CYCLIC_DEP_ERR');
1329: FND_MSG_PUB.add;
1330: RAISE fnd_api.g_exc_error;
1331: end if;
1332: close dep_cur;
1333: END IF;
1334:
1340:
1341: FETCH check_group_dt_cur INTO check_group_dt_rec;
1342: IF(check_group_dt_cur%NOTFOUND)
1343: THEN
1344: x_return_status := fnd_api.g_ret_sts_error;
1345: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_GRP_DT_ERR');
1346: FND_MSG_PUB.add;
1347: RAISE fnd_api.g_exc_error;
1348:
1343: THEN
1344: x_return_status := fnd_api.g_ret_sts_error;
1345: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_GRP_DT_ERR');
1346: FND_MSG_PUB.add;
1347: RAISE fnd_api.g_exc_error;
1348:
1349: END IF;
1350: CLOSE check_group_dt_cur;
1351:
1355: l_end_date_active);
1356: FETCH check_group_dt_cur INTO check_group_dt_rec;
1357: IF(check_group_dt_cur%NOTFOUND)
1358: THEN
1359: x_return_status := fnd_api.g_ret_sts_error;
1360: fnd_message.set_name ('JTF', 'JTF_RS_RELATED_GRP_DT_ERR');
1361: FND_MSG_PUB.add;
1362: RAISE fnd_api.g_exc_error;
1363:
1358: THEN
1359: x_return_status := fnd_api.g_ret_sts_error;
1360: fnd_message.set_name ('JTF', 'JTF_RS_RELATED_GRP_DT_ERR');
1361: FND_MSG_PUB.add;
1362: RAISE fnd_api.g_exc_error;
1363:
1364: END IF;
1365: CLOSE check_group_dt_cur;
1366:
1369: l_related_group_id);
1370: FETCH check_dates_cur INTO check_dates_rec;
1371: IF(check_dates_cur%NOTFOUND)
1372: THEN
1373: x_return_status := fnd_api.g_ret_sts_error;
1374: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_REL_DT_ERR');
1375: FND_MSG_PUB.add;
1376: RAISE fnd_api.g_exc_error;
1377:
1372: THEN
1373: x_return_status := fnd_api.g_ret_sts_error;
1374: fnd_message.set_name ('JTF', 'JTF_RS_CHILD_REL_DT_ERR');
1375: FND_MSG_PUB.add;
1376: RAISE fnd_api.g_exc_error;
1377:
1378: END IF;
1379: CLOSE check_dates_cur;*/
1380:
1391:
1392: EXCEPTION
1393:
1394: WHEN OTHERS THEN
1395: x_return_status := fnd_api.g_ret_sts_error;
1396: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
1397: fnd_msg_pub.add;
1398: RAISE fnd_api.g_exc_error;
1399:
1394: WHEN OTHERS THEN
1395: x_return_status := fnd_api.g_ret_sts_error;
1396: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
1397: fnd_msg_pub.add;
1398: RAISE fnd_api.g_exc_error;
1399:
1400: END;
1401:
1402:
1419: X_RETURN_STATUS => l_return_status,
1420: X_MSG_COUNT => l_msg_count,
1421: X_MSG_DATA => l_msg_data);
1422:
1423: IF(l_return_status <> fnd_api.g_ret_sts_success)
1424: THEN
1425: x_return_status := fnd_api.g_ret_sts_error;
1426: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1427: FND_MSG_PUB.add;
1421: X_MSG_DATA => l_msg_data);
1422:
1423: IF(l_return_status <> fnd_api.g_ret_sts_success)
1424: THEN
1425: x_return_status := fnd_api.g_ret_sts_error;
1426: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1427: FND_MSG_PUB.add;
1428: RAISE fnd_api.g_exc_error;
1429:
1424: THEN
1425: x_return_status := fnd_api.g_ret_sts_error;
1426: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1427: FND_MSG_PUB.add;
1428: RAISE fnd_api.g_exc_error;
1429:
1430: END IF;
1431:
1432:
1470: --call to insert records in jtf_rs_groups_denorm FOR UPDATION EFFECT
1471: IF(l_relation_type = 'PARENT_GROUP')
1472: THEN
1473: IF (l_start_date_active <> grp_rel_rec.start_date_active
1474: OR nvl(l_end_date_active, fnd_api.g_miss_date) <>
1475: nvl(grp_rel_rec.end_date_active, fnd_api.g_miss_date)
1476: OR l_relation_type <> grp_rel_rec.relation_type)
1477: THEN
1478: l_parent := 0;
1471: IF(l_relation_type = 'PARENT_GROUP')
1472: THEN
1473: IF (l_start_date_active <> grp_rel_rec.start_date_active
1474: OR nvl(l_end_date_active, fnd_api.g_miss_date) <>
1475: nvl(grp_rel_rec.end_date_active, fnd_api.g_miss_date)
1476: OR l_relation_type <> grp_rel_rec.relation_type)
1477: THEN
1478: l_parent := 0;
1479: l_child := 0;
1528: fnd_message.set_token('P_SQLCODE',SQLCODE);
1529: fnd_message.set_token('P_SQLERRM',SQLERRM);
1530: fnd_message.set_token('P_API_NAME', l_api_name);
1531: FND_MSG_PUB.add;
1532: x_return_status := fnd_api.g_ret_sts_unexp_error;
1533: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1534: RAISE fnd_api.g_exc_unexpected_error;
1535:
1536: end;
1530: fnd_message.set_token('P_API_NAME', l_api_name);
1531: FND_MSG_PUB.add;
1532: x_return_status := fnd_api.g_ret_sts_unexp_error;
1533: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1534: RAISE fnd_api.g_exc_unexpected_error;
1535:
1536: end;
1537:
1538:
1555: fnd_message.set_token('P_SQLCODE',SQLCODE);
1556: fnd_message.set_token('P_SQLERRM',SQLERRM);
1557: fnd_message.set_token('P_API_NAME', l_api_name);
1558: FND_MSG_PUB.add;
1559: x_return_status := fnd_api.g_ret_sts_unexp_error;
1560: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1561: RAISE fnd_api.g_exc_unexpected_error;
1562:
1563: end;
1557: fnd_message.set_token('P_API_NAME', l_api_name);
1558: FND_MSG_PUB.add;
1559: x_return_status := fnd_api.g_ret_sts_unexp_error;
1560: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1561: RAISE fnd_api.g_exc_unexpected_error;
1562:
1563: end;
1564: ELSE
1565: JTF_RS_GROUP_DENORM_PVT.UPDATE_GROUPS
1570: X_RETURN_STATUS => l_return_status,
1571: X_MSG_COUNT => l_msg_count,
1572: X_MSG_DATA => l_msg_data);
1573:
1574: IF(l_return_status <> fnd_api.g_ret_sts_success)
1575: THEN
1576: x_return_status := fnd_api.g_ret_sts_error;
1577: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
1578: FND_MSG_PUB.add;
1572: X_MSG_DATA => l_msg_data);
1573:
1574: IF(l_return_status <> fnd_api.g_ret_sts_success)
1575: THEN
1576: x_return_status := fnd_api.g_ret_sts_error;
1577: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
1578: FND_MSG_PUB.add;
1579: RAISE fnd_api.g_exc_error;
1580:
1575: THEN
1576: x_return_status := fnd_api.g_ret_sts_error;
1577: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
1578: FND_MSG_PUB.add;
1579: RAISE fnd_api.g_exc_error;
1580:
1581: END IF;
1582: END IF; --end of count check
1583: else
1600: P_OBJECT_VERSION_NUM => p_object_version_num,
1601: p_data => L_data,
1602: p_count => l_count,
1603: P_return_code => l_return_code);
1604: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1605: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1606: x_return_status := fnd_api.g_ret_sts_error;
1607: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
1608: FND_MSG_PUB.add;
1601: p_data => L_data,
1602: p_count => l_count,
1603: P_return_code => l_return_code);
1604: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1605: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1606: x_return_status := fnd_api.g_ret_sts_error;
1607: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
1608: FND_MSG_PUB.add;
1609: RAISE fnd_api.g_exc_error;
1602: p_count => l_count,
1603: P_return_code => l_return_code);
1604: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1605: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1606: x_return_status := fnd_api.g_ret_sts_error;
1607: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
1608: FND_MSG_PUB.add;
1609: RAISE fnd_api.g_exc_error;
1610: end if;
1605: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1606: x_return_status := fnd_api.g_ret_sts_error;
1607: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
1608: FND_MSG_PUB.add;
1609: RAISE fnd_api.g_exc_error;
1610: end if;
1611: end if;
1612: end if;
1613:
1623: P_OBJECT_VERSION_NUM => p_object_version_num,
1624: p_data => L_data,
1625: p_count => L_count,
1626: P_return_code => l_return_code);
1627: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1628: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1629: x_return_status := fnd_api.g_ret_sts_error;
1630: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
1631: FND_MSG_PUB.add;
1624: p_data => L_data,
1625: p_count => L_count,
1626: P_return_code => l_return_code);
1627: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1628: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1629: x_return_status := fnd_api.g_ret_sts_error;
1630: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
1631: FND_MSG_PUB.add;
1632: RAISE fnd_api.g_exc_error;
1625: p_count => L_count,
1626: P_return_code => l_return_code);
1627: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1628: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1629: x_return_status := fnd_api.g_ret_sts_error;
1630: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
1631: FND_MSG_PUB.add;
1632: RAISE fnd_api.g_exc_error;
1633: end if;
1628: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1629: x_return_status := fnd_api.g_ret_sts_error;
1630: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
1631: FND_MSG_PUB.add;
1632: RAISE fnd_api.g_exc_error;
1633: end if;
1634: end if;
1635: end if;
1636:
1646: P_OBJECT_VERSION_NUM => p_object_version_num,
1647: p_data => L_data,
1648: p_count => L_count,
1649: P_return_code => l_return_code);
1650: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1651: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1652: x_return_status := fnd_api.g_ret_sts_error;
1653: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1654: FND_MSG_PUB.add;
1647: p_data => L_data,
1648: p_count => L_count,
1649: P_return_code => l_return_code);
1650: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1651: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1652: x_return_status := fnd_api.g_ret_sts_error;
1653: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1654: FND_MSG_PUB.add;
1655: RAISE fnd_api.g_exc_error;
1648: p_count => L_count,
1649: P_return_code => l_return_code);
1650: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1651: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1652: x_return_status := fnd_api.g_ret_sts_error;
1653: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1654: FND_MSG_PUB.add;
1655: RAISE fnd_api.g_exc_error;
1656: end if;
1651: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1652: x_return_status := fnd_api.g_ret_sts_error;
1653: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1654: FND_MSG_PUB.add;
1655: RAISE fnd_api.g_exc_error;
1656: end if;
1657: end if;
1658: end if;
1659:
1697: p_bind_data_id => l_bind_data_id,
1698: x_return_code => x_return_status);
1699:
1700:
1701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1702: x_return_status := fnd_api.g_ret_sts_error;
1703: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1704: fnd_msg_pub.add;
1705: RAISE fnd_api.g_exc_error;
1698: x_return_code => x_return_status);
1699:
1700:
1701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1702: x_return_status := fnd_api.g_ret_sts_error;
1703: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1704: fnd_msg_pub.add;
1705: RAISE fnd_api.g_exc_error;
1706: END IF;
1701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1702: x_return_status := fnd_api.g_ret_sts_error;
1703: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1704: fnd_msg_pub.add;
1705: RAISE fnd_api.g_exc_error;
1706: END IF;
1707: END IF;
1708: END IF;
1709: END IF;
1710:
1711:
1712:
1713: --standard commit
1714: IF fnd_api.to_boolean (p_commit)
1715: THEN
1716: COMMIT WORK;
1717: END IF;
1718:
1720: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1721:
1722:
1723: EXCEPTION
1724: WHEN fnd_api.g_exc_unexpected_error
1725: THEN
1726: ROLLBACK TO group_relate_sp;
1727: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
1728: --FND_MSG_PUB.add;
1725: THEN
1726: ROLLBACK TO group_relate_sp;
1727: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
1728: --FND_MSG_PUB.add;
1729: --x_return_status := fnd_api.g_ret_sts_unexp_error;
1730: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1731: WHEN fnd_api.g_exc_error
1732: THEN
1733: ROLLBACK TO group_relate_sp;
1727: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
1728: --FND_MSG_PUB.add;
1729: --x_return_status := fnd_api.g_ret_sts_unexp_error;
1730: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1731: WHEN fnd_api.g_exc_error
1732: THEN
1733: ROLLBACK TO group_relate_sp;
1734: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1735:
1740: fnd_message.set_token('P_SQLCODE',SQLCODE);
1741: fnd_message.set_token('P_SQLERRM',SQLERRM);
1742: fnd_message.set_token('P_API_NAME',l_api_name);
1743: FND_MSG_PUB.add;
1744: x_return_status := fnd_api.g_ret_sts_unexp_error;
1745: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1746:
1747: END update_resource_group_relate;
1748:
1858: BEGIN
1859: --Standard Start of API SAVEPOINT
1860: SAVEPOINT GROUP_RELATE_SP;
1861:
1862: x_return_status := fnd_api.g_ret_sts_success;
1863:
1864: --Standard Call to check API compatibility
1865: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1866: THEN
1861:
1862: x_return_status := fnd_api.g_ret_sts_success;
1863:
1864: --Standard Call to check API compatibility
1865: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1866: THEN
1867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1868: END IF;
1869:
1863:
1864: --Standard Call to check API compatibility
1865: IF NOT FND_API.Compatible_API_CALL(L_API_VERSION,P_API_VERSION,L_API_NAME,G_PKG_NAME)
1866: THEN
1867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1868: END IF;
1869:
1870: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1871: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1868: END IF;
1869:
1870: --Initialize the message List if P_INIT_MSG_LIST is set to TRUE
1871: IF FND_API.To_boolean(P_INIT_MSG_LIST)
1872: THEN
1873: FND_MSG_PUB.Initialize;
1874: END IF;
1875:
1888: P_OBJECT_VERSION_NUM => p_object_version_num,
1889: p_data => L_data,
1890: p_count => L_count,
1891: P_return_code => l_return_code);
1892: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1893: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1894: x_return_status := fnd_api.g_ret_sts_error;
1895: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1896: FND_MSG_PUB.add;
1889: p_data => L_data,
1890: p_count => L_count,
1891: P_return_code => l_return_code);
1892: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1893: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1894: x_return_status := fnd_api.g_ret_sts_error;
1895: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1896: FND_MSG_PUB.add;
1897: RAISE fnd_api.g_exc_error;
1890: p_count => L_count,
1891: P_return_code => l_return_code);
1892: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1893: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1894: x_return_status := fnd_api.g_ret_sts_error;
1895: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1896: FND_MSG_PUB.add;
1897: RAISE fnd_api.g_exc_error;
1898: end if;
1893: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1894: x_return_status := fnd_api.g_ret_sts_error;
1895: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
1896: FND_MSG_PUB.add;
1897: RAISE fnd_api.g_exc_error;
1898: end if;
1899: end if;
1900: end if;
1901:
1911: P_OBJECT_VERSION_NUM => p_object_version_num,
1912: p_data => l_data,
1913: p_count => l_count,
1914: P_return_code => l_return_code);
1915: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1916: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1917: x_return_status := fnd_api.g_ret_sts_error;
1918: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1919: FND_MSG_PUB.add;
1912: p_data => l_data,
1913: p_count => l_count,
1914: P_return_code => l_return_code);
1915: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1916: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1917: x_return_status := fnd_api.g_ret_sts_error;
1918: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1919: FND_MSG_PUB.add;
1920: RAISE fnd_api.g_exc_error;
1913: p_count => l_count,
1914: P_return_code => l_return_code);
1915: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1916: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1917: x_return_status := fnd_api.g_ret_sts_error;
1918: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1919: FND_MSG_PUB.add;
1920: RAISE fnd_api.g_exc_error;
1921: end if;
1916: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1917: x_return_status := fnd_api.g_ret_sts_error;
1918: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
1919: FND_MSG_PUB.add;
1920: RAISE fnd_api.g_exc_error;
1921: end if;
1922: end if;
1923: end if;
1924:
1936: P_OBJECT_VERSION_NUM => p_object_version_num,
1937: p_data => l_data,
1938: p_count => l_count,
1939: P_return_code => l_return_code);
1940: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1941: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1942: x_return_status := fnd_api.g_ret_sts_error;
1943: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1944: FND_MSG_PUB.add;
1937: p_data => l_data,
1938: p_count => l_count,
1939: P_return_code => l_return_code);
1940: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1941: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1942: x_return_status := fnd_api.g_ret_sts_error;
1943: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1944: FND_MSG_PUB.add;
1945: RAISE fnd_api.g_exc_error;
1938: p_count => l_count,
1939: P_return_code => l_return_code);
1940: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
1941: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1942: x_return_status := fnd_api.g_ret_sts_error;
1943: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1944: FND_MSG_PUB.add;
1945: RAISE fnd_api.g_exc_error;
1946: end if;
1941: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
1942: x_return_status := fnd_api.g_ret_sts_error;
1943: fnd_message.set_name ('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
1944: FND_MSG_PUB.add;
1945: RAISE fnd_api.g_exc_error;
1946: end if;
1947: end if;
1948: end if;
1949: -- end of user hook call
1964: X_RETURN_STATUS => l_return_status,
1965: X_MSG_COUNT => l_msg_count,
1966: X_MSG_DATA => l_msg_data);
1967:
1968: IF(l_return_status <> fnd_api.g_ret_sts_success)
1969: THEN
1970: x_return_status := fnd_api.g_ret_sts_error;
1971: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1972: FND_MSG_PUB.add;
1966: X_MSG_DATA => l_msg_data);
1967:
1968: IF(l_return_status <> fnd_api.g_ret_sts_success)
1969: THEN
1970: x_return_status := fnd_api.g_ret_sts_error;
1971: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1972: FND_MSG_PUB.add;
1973: RAISE fnd_api.g_exc_error;
1974:
1969: THEN
1970: x_return_status := fnd_api.g_ret_sts_error;
1971: fnd_message.set_name ('JTF', 'JTF_RS_GRP_RELATE_AUDIT_ERR');
1972: FND_MSG_PUB.add;
1973: RAISE fnd_api.g_exc_error;
1974:
1975: END IF;
1976:
1977:
1987:
1988: EXCEPTION
1989:
1990: WHEN OTHERS THEN
1991: x_return_status := fnd_api.g_ret_sts_error;
1992: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
1993: fnd_msg_pub.add;
1994: RAISE fnd_api.g_exc_error;
1995:
1990: WHEN OTHERS THEN
1991: x_return_status := fnd_api.g_ret_sts_error;
1992: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
1993: fnd_msg_pub.add;
1994: RAISE fnd_api.g_exc_error;
1995:
1996: END;
1997:
1998:
2084: fnd_message.set_token('P_SQLCODE',SQLCODE);
2085: fnd_message.set_token('P_SQLERRM',SQLERRM);
2086: fnd_message.set_token('P_API_NAME', l_api_name);
2087: FND_MSG_PUB.add;
2088: x_return_status := fnd_api.g_ret_sts_unexp_error;
2089: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2090: RAISE fnd_api.g_exc_unexpected_error;
2091:
2092: end;
2086: fnd_message.set_token('P_API_NAME', l_api_name);
2087: FND_MSG_PUB.add;
2088: x_return_status := fnd_api.g_ret_sts_unexp_error;
2089: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2090: RAISE fnd_api.g_exc_unexpected_error;
2091:
2092: end;
2093: begin
2094: l_request := fnd_request.submit_request(APPLICATION => 'JTF',
2109: fnd_message.set_token('P_SQLCODE',SQLCODE);
2110: fnd_message.set_token('P_SQLERRM',SQLERRM);
2111: fnd_message.set_token('P_API_NAME', l_api_name);
2112: FND_MSG_PUB.add;
2113: x_return_status := fnd_api.g_ret_sts_unexp_error;
2114: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2115: RAISE fnd_api.g_exc_unexpected_error;
2116:
2117: end;
2111: fnd_message.set_token('P_API_NAME', l_api_name);
2112: FND_MSG_PUB.add;
2113: x_return_status := fnd_api.g_ret_sts_unexp_error;
2114: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2115: RAISE fnd_api.g_exc_unexpected_error;
2116:
2117: end;
2118: ELSE
2119: /* JTF_RS_GROUP_DENORM_PVT.DELETE_GROUPS
2135: X_RETURN_STATUS => l_return_status,
2136: X_MSG_COUNT => l_msg_count,
2137: X_MSG_DATA => l_msg_data);
2138:
2139: IF(l_return_status <> fnd_api.g_ret_sts_success)
2140: THEN
2141: x_return_status := fnd_api.g_ret_sts_error;
2142: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
2143: FND_MSG_PUB.add;
2137: X_MSG_DATA => l_msg_data);
2138:
2139: IF(l_return_status <> fnd_api.g_ret_sts_success)
2140: THEN
2141: x_return_status := fnd_api.g_ret_sts_error;
2142: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
2143: FND_MSG_PUB.add;
2144: RAISE fnd_api.g_exc_error;
2145:
2140: THEN
2141: x_return_status := fnd_api.g_ret_sts_error;
2142: fnd_message.set_name ('JTF', 'JTF_RS_GRP_DENORM_ERR');
2143: FND_MSG_PUB.add;
2144: RAISE fnd_api.g_exc_error;
2145:
2146: END IF;
2147: END IF; -- end of count
2148: END IF;
2158: P_OBJECT_VERSION_NUM => p_object_version_num,
2159: p_data => L_data,
2160: p_count => l_count,
2161: P_return_code => l_return_code);
2162: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2163: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2164: x_return_status := fnd_api.g_ret_sts_error;
2165: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
2166: FND_MSG_PUB.add;
2159: p_data => L_data,
2160: p_count => l_count,
2161: P_return_code => l_return_code);
2162: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2163: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2164: x_return_status := fnd_api.g_ret_sts_error;
2165: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
2166: FND_MSG_PUB.add;
2167: RAISE fnd_api.g_exc_error;
2160: p_count => l_count,
2161: P_return_code => l_return_code);
2162: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2163: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2164: x_return_status := fnd_api.g_ret_sts_error;
2165: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
2166: FND_MSG_PUB.add;
2167: RAISE fnd_api.g_exc_error;
2168: end if;
2163: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2164: x_return_status := fnd_api.g_ret_sts_error;
2165: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
2166: FND_MSG_PUB.add;
2167: RAISE fnd_api.g_exc_error;
2168: end if;
2169: end if;
2170: end if;
2171:
2180: P_OBJECT_VERSION_NUM => p_object_version_num,
2181: p_data => L_data,
2182: p_count => L_count,
2183: P_return_code => l_return_code);
2184: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2185: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2186: x_return_status := fnd_api.g_ret_sts_error;
2187: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
2188: FND_MSG_PUB.add;
2181: p_data => L_data,
2182: p_count => L_count,
2183: P_return_code => l_return_code);
2184: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2185: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2186: x_return_status := fnd_api.g_ret_sts_error;
2187: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
2188: FND_MSG_PUB.add;
2189: RAISE fnd_api.g_exc_error;
2182: p_count => L_count,
2183: P_return_code => l_return_code);
2184: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2185: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2186: x_return_status := fnd_api.g_ret_sts_error;
2187: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
2188: FND_MSG_PUB.add;
2189: RAISE fnd_api.g_exc_error;
2190: end if;
2185: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2186: x_return_status := fnd_api.g_ret_sts_error;
2187: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
2188: FND_MSG_PUB.add;
2189: RAISE fnd_api.g_exc_error;
2190: end if;
2191: end if;
2192: end if;
2193:
2202: P_OBJECT_VERSION_NUM => p_object_version_num,
2203: p_data => L_data,
2204: p_count => L_count,
2205: P_return_code => l_return_code);
2206: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2207: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2208: x_return_status := fnd_api.g_ret_sts_error;
2209: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
2210: FND_MSG_PUB.add;
2203: p_data => L_data,
2204: p_count => L_count,
2205: P_return_code => l_return_code);
2206: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2207: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2208: x_return_status := fnd_api.g_ret_sts_error;
2209: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
2210: FND_MSG_PUB.add;
2211: RAISE fnd_api.g_exc_error;
2204: p_count => L_count,
2205: P_return_code => l_return_code);
2206: if ( l_return_code = FND_API.G_RET_STS_ERROR) OR
2207: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2208: x_return_status := fnd_api.g_ret_sts_error;
2209: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
2210: FND_MSG_PUB.add;
2211: RAISE fnd_api.g_exc_error;
2212: end if;
2207: (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR ) then
2208: x_return_status := fnd_api.g_ret_sts_error;
2209: fnd_message.set_name ('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
2210: FND_MSG_PUB.add;
2211: RAISE fnd_api.g_exc_error;
2212: end if;
2213: end if;
2214: end if;
2215:
2253: p_bind_data_id => l_bind_data_id,
2254: x_return_code => x_return_status);
2255:
2256:
2257: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
2258: x_return_status := fnd_api.g_ret_sts_error;
2259: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
2260: fnd_msg_pub.add;
2261: RAISE fnd_api.g_exc_error;
2254: x_return_code => x_return_status);
2255:
2256:
2257: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
2258: x_return_status := fnd_api.g_ret_sts_error;
2259: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
2260: fnd_msg_pub.add;
2261: RAISE fnd_api.g_exc_error;
2262: END IF;
2257: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
2258: x_return_status := fnd_api.g_ret_sts_error;
2259: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
2260: fnd_msg_pub.add;
2261: RAISE fnd_api.g_exc_error;
2262: END IF;
2263: END IF;
2264: END IF;
2265: END IF;
2265: END IF;
2266:
2267:
2268: --standard commit
2269: IF fnd_api.to_boolean (p_commit)
2270: THEN
2271: COMMIT WORK;
2272: END IF;
2273:
2275: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2276:
2277:
2278: EXCEPTION
2279: WHEN fnd_api.g_exc_unexpected_error
2280: THEN
2281: -- ROLLBACK TO group_relate_sp;
2282: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
2283: --FND_MSG_PUB.add;
2280: THEN
2281: -- ROLLBACK TO group_relate_sp;
2282: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
2283: --FND_MSG_PUB.add;
2284: --x_return_status := fnd_api.g_ret_sts_unexp_error;
2285: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2286: WHEN fnd_api.g_exc_error
2287: THEN
2288: -- ROLLBACK TO group_relate_sp;
2282: --fnd_message.set_name ('JTF', 'JTF_RS_GROUP_DENORM_ERR');
2283: --FND_MSG_PUB.add;
2284: --x_return_status := fnd_api.g_ret_sts_unexp_error;
2285: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2286: WHEN fnd_api.g_exc_error
2287: THEN
2288: -- ROLLBACK TO group_relate_sp;
2289: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2290:
2295: fnd_message.set_token('P_SQLCODE',SQLCODE);
2296: fnd_message.set_token('P_SQLERRM',SQLERRM);
2297: fnd_message.set_token('P_API_NAME',l_api_name);
2298: FND_MSG_PUB.add;
2299: x_return_status := fnd_api.g_ret_sts_unexp_error;
2300: FND_MSG_PUB.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
2301:
2302:
2303: END delete_resource_group_relate;