23: /* ----------------------------------------------------------------------- */
24:
25: PROCEDURE Copy_Attributes
26: ( p_api_version IN NUMBER,
27: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
28: p_commit IN VARCHAR2 := FND_API.G_FALSE,
29: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
30: p_return_status OUT NOCOPY VARCHAR2,
31: p_msg_count OUT NOCOPY NUMBER,
24:
25: PROCEDURE Copy_Attributes
26: ( p_api_version IN NUMBER,
27: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
28: p_commit IN VARCHAR2 := FND_API.G_FALSE,
29: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
30: p_return_status OUT NOCOPY VARCHAR2,
31: p_msg_count OUT NOCOPY NUMBER,
32: p_msg_data OUT NOCOPY VARCHAR2,
25: PROCEDURE Copy_Attributes
26: ( p_api_version IN NUMBER,
27: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
28: p_commit IN VARCHAR2 := FND_API.G_FALSE,
29: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
30: p_return_status OUT NOCOPY VARCHAR2,
31: p_msg_count OUT NOCOPY NUMBER,
32: p_msg_data OUT NOCOPY VARCHAR2,
33: p_extract_method IN VARCHAR2,
74: SAVEPOINT Copy_Attributes_Pvt;
75:
76: -- Standard call to check for call compatibility.
77:
78: if not FND_API.Compatible_API_Call (l_api_version,
79: p_api_version,
80: l_api_name,
81: G_PKG_NAME)
82: then
79: p_api_version,
80: l_api_name,
81: G_PKG_NAME)
82: then
83: raise FND_API.G_EXC_UNEXPECTED_ERROR;
84: end if;
85:
86: -- Initialize message list if p_init_msg_list is set to TRUE.
87:
84: end if;
85:
86: -- Initialize message list if p_init_msg_list is set to TRUE.
87:
88: if FND_API.to_Boolean (p_init_msg_list) then
89: FND_MSG_PUB.initialize;
90: end if;
91:
92: -- Initialize API return status to success
90: end if;
91:
92: -- Initialize API return status to success
93:
94: p_return_status := FND_API.G_RET_STS_SUCCESS;
95:
96: -- API body
97: l_last_update_date := sysdate;
98: l_last_updated_by := FND_GLOBAL.USER_ID;
110: p_status => l_status,
111: p_restart_id => l_restart_id
112: );
113:
114: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
115: raise FND_API.G_EXC_ERROR;
116: end if;
117:
118: if (l_status <> 'C') then
111: p_restart_id => l_restart_id
112: );
113:
114: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
115: raise FND_API.G_EXC_ERROR;
116: end if;
117:
118: if (l_status <> 'C') then
119: For C_Attr_Val_Rec in C_Attr_Val
173: p_last_updated_by => l_last_updated_by,
174: p_last_update_login => l_last_update_login
175: );
176:
177: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
178: raise FND_API.G_EXC_ERROR;
179: end if;
180: End Loop;
181:
174: p_last_update_login => l_last_update_login
175: );
176:
177: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
178: raise FND_API.G_EXC_ERROR;
179: end if;
180: End Loop;
181:
182: if (l_attr_dummy = 0) then
236: p_created_by => l_created_by,
237: p_creation_date => l_creation_date
238: ) ;
239:
240: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
241: debug('Insert Attribute Values Failed');
242: raise FND_API.G_EXC_ERROR;
243: end if;
244:
238: ) ;
239:
240: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
241: debug('Insert Attribute Values Failed');
242: raise FND_API.G_EXC_ERROR;
243: end if;
244:
245: end if;
246:
255: p_extract_method => p_extract_method,
256: p_process => 'Copy Attributes'
257: );
258:
259: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
260: debug('Reentry Failed Copy Attributes');
261: raise FND_API.G_EXC_ERROR;
262: end if;
263: end if;
257: );
258:
259: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
260: debug('Reentry Failed Copy Attributes');
261: raise FND_API.G_EXC_ERROR;
262: end if;
263: end if;
264:
265: -- End of API body.
265: -- End of API body.
266:
267: -- Standard check of p_commit.
268:
269: if FND_API.to_Boolean (p_commit) then
270: commit work;
271: end if;
272:
273: -- Standard call to get message count and if count is 1, get message info.
276: p_data => p_msg_data);
277:
278: EXCEPTION
279:
280: when FND_API.G_EXC_ERROR then
281:
282: rollback to Copy_Attributes_Pvt;
283:
284: p_return_status := FND_API.G_RET_STS_ERROR;
280: when FND_API.G_EXC_ERROR then
281:
282: rollback to Copy_Attributes_Pvt;
283:
284: p_return_status := FND_API.G_RET_STS_ERROR;
285:
286: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
287: p_data => p_msg_data);
288:
286: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
287: p_data => p_msg_data);
288:
289:
290: when FND_API.G_EXC_UNEXPECTED_ERROR then
291:
292: rollback to Copy_Attributes_Pvt;
293:
294: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
290: when FND_API.G_EXC_UNEXPECTED_ERROR then
291:
292: rollback to Copy_Attributes_Pvt;
293:
294: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
295:
296: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
297: p_data => p_msg_data);
298:
300: when OTHERS then
301:
302: rollback to Copy_Attributes_Pvt;
303:
304: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
305:
306: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
307:
308: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
315: END Copy_Attributes;
316:
317: PROCEDURE Copy_Position_Sets
318: ( p_api_version IN NUMBER,
319: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
320: p_commit IN VARCHAR2 := FND_API.G_FALSE,
321: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
322: p_return_status OUT NOCOPY VARCHAR2,
323: p_msg_count OUT NOCOPY NUMBER,
316:
317: PROCEDURE Copy_Position_Sets
318: ( p_api_version IN NUMBER,
319: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
320: p_commit IN VARCHAR2 := FND_API.G_FALSE,
321: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
322: p_return_status OUT NOCOPY VARCHAR2,
323: p_msg_count OUT NOCOPY NUMBER,
324: p_msg_data OUT NOCOPY VARCHAR2,
317: PROCEDURE Copy_Position_Sets
318: ( p_api_version IN NUMBER,
319: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
320: p_commit IN VARCHAR2 := FND_API.G_FALSE,
321: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
322: p_return_status OUT NOCOPY VARCHAR2,
323: p_msg_count OUT NOCOPY NUMBER,
324: p_msg_data OUT NOCOPY VARCHAR2,
325: p_extract_method IN VARCHAR2,
343: SAVEPOINT Copy_Position_Sets_Pvt;
344:
345: -- Standard call to check for call compatibility.
346:
347: if not FND_API.Compatible_API_Call (l_api_version,
348: p_api_version,
349: l_api_name,
350: G_PKG_NAME)
351: then
348: p_api_version,
349: l_api_name,
350: G_PKG_NAME)
351: then
352: raise FND_API.G_EXC_UNEXPECTED_ERROR;
353: end if;
354:
355: -- Initialize message list if p_init_msg_list is set to TRUE.
356:
353: end if;
354:
355: -- Initialize message list if p_init_msg_list is set to TRUE.
356:
357: if FND_API.to_Boolean (p_init_msg_list) then
358: FND_MSG_PUB.initialize;
359: end if;
360:
361: -- Initialize API return status to success
359: end if;
360:
361: -- Initialize API return status to success
362:
363: p_return_status := FND_API.G_RET_STS_SUCCESS;
364:
365: -- API body
366: PSB_HR_EXTRACT_DATA_PVT.Check_Reentry
367: (p_api_version => 1.0 ,
373: p_status => l_status,
374: p_restart_id => l_restart_id
375: );
376:
377: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
378: raise FND_API.G_EXC_ERROR;
379: end if;
380:
381: if (l_status <> 'C') then
374: p_restart_id => l_restart_id
375: );
376:
377: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
378: raise FND_API.G_EXC_ERROR;
379: end if;
380:
381: if (l_status <> 'C') then
382:
393: p_target_data_extract_id => p_data_extract_id,
394: p_entity_table => l_entity_tbl
395: );
396:
397: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
398: debug('Copy Position Sets Failed');
399: raise FND_API.G_EXC_ERROR;
400: end if;
401:
395: );
396:
397: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
398: debug('Copy Position Sets Failed');
399: raise FND_API.G_EXC_ERROR;
400: end if;
401:
402: PSB_HR_EXTRACT_DATA_PVT.Reentrant_Process
403: ( p_api_version => 1.0 ,
408: p_extract_method => p_extract_method,
409: p_process => 'Copy Position Sets'
410: );
411:
412: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
413: debug('Reentry Failed Copy Position Sets');
414: raise FND_API.G_EXC_ERROR;
415: end if;
416:
410: );
411:
412: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
413: debug('Reentry Failed Copy Position Sets');
414: raise FND_API.G_EXC_ERROR;
415: end if;
416:
417: end if;
418: -- End of API body.
418: -- End of API body.
419:
420: -- Standard check of p_commit.
421:
422: if FND_API.to_Boolean (p_commit) then
423: commit work;
424: end if;
425:
426: -- Standard call to get message count and if count is 1, get message info.
429: p_data => p_msg_data);
430:
431: EXCEPTION
432:
433: when FND_API.G_EXC_ERROR then
434:
435: rollback to Copy_Position_Sets_Pvt;
436:
437: p_return_status := FND_API.G_RET_STS_ERROR;
433: when FND_API.G_EXC_ERROR then
434:
435: rollback to Copy_Position_Sets_Pvt;
436:
437: p_return_status := FND_API.G_RET_STS_ERROR;
438:
439: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
440: p_data => p_msg_data);
441:
439: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
440: p_data => p_msg_data);
441:
442:
443: when FND_API.G_EXC_UNEXPECTED_ERROR then
444:
445: rollback to Copy_Position_Sets_Pvt;
446:
447: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
443: when FND_API.G_EXC_UNEXPECTED_ERROR then
444:
445: rollback to Copy_Position_Sets_Pvt;
446:
447: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
448:
449: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
450: p_data => p_msg_data);
451:
453: when OTHERS then
454:
455: rollback to Copy_Position_Sets_Pvt;
456:
457: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
458:
459: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
460:
461: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
467: END;
468:
469: PROCEDURE Copy_Elements
470: ( p_api_version IN NUMBER,
471: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
472: p_commit IN VARCHAR2 := FND_API.G_FALSE,
473: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
474: p_return_status OUT NOCOPY VARCHAR2,
475: p_msg_count OUT NOCOPY NUMBER,
468:
469: PROCEDURE Copy_Elements
470: ( p_api_version IN NUMBER,
471: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
472: p_commit IN VARCHAR2 := FND_API.G_FALSE,
473: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
474: p_return_status OUT NOCOPY VARCHAR2,
475: p_msg_count OUT NOCOPY NUMBER,
476: p_msg_data OUT NOCOPY VARCHAR2,
469: PROCEDURE Copy_Elements
470: ( p_api_version IN NUMBER,
471: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
472: p_commit IN VARCHAR2 := FND_API.G_FALSE,
473: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
474: p_return_status OUT NOCOPY VARCHAR2,
475: p_msg_count OUT NOCOPY NUMBER,
476: p_msg_data OUT NOCOPY VARCHAR2,
477: p_extract_method IN VARCHAR2,
524: SAVEPOINT Copy_Elements_Pvt;
525:
526: -- Standard call to check for call compatibility.
527:
528: if not FND_API.Compatible_API_Call (l_api_version,
529: p_api_version,
530: l_api_name,
531: G_PKG_NAME)
532: then
529: p_api_version,
530: l_api_name,
531: G_PKG_NAME)
532: then
533: raise FND_API.G_EXC_UNEXPECTED_ERROR;
534: end if;
535:
536: -- Initialize message list if p_init_msg_list is set to TRUE.
537:
534: end if;
535:
536: -- Initialize message list if p_init_msg_list is set to TRUE.
537:
538: if FND_API.to_Boolean (p_init_msg_list) then
539: FND_MSG_PUB.initialize;
540: end if;
541:
542: -- Initialize API return status to success
540: end if;
541:
542: -- Initialize API return status to success
543:
544: p_return_status := FND_API.G_RET_STS_SUCCESS;
545:
546: -- API body
547: l_last_update_date := sysdate;
548: l_last_updated_by := FND_GLOBAL.USER_ID;
560: p_status => l_status,
561: p_restart_id => l_restart_id
562: );
563:
564: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
565: raise FND_API.G_EXC_ERROR;
566: end if;
567:
568: if (l_status <> 'C') then
561: p_restart_id => l_restart_id
562: );
563:
564: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
565: raise FND_API.G_EXC_ERROR;
566: end if;
567:
568: if (l_status <> 'C') then
569:
577: p_source_data_extract_id => p_src_data_extract_id,
578: p_source_business_group_id => l_business_group_id,
579: p_target_data_extract_id => p_data_extract_id);
580:
581: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
582: raise FND_API.G_EXC_ERROR;
583: end if;
584: /* Bug No 2579818 End */
585:
578: p_source_business_group_id => l_business_group_id,
579: p_target_data_extract_id => p_data_extract_id);
580:
581: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
582: raise FND_API.G_EXC_ERROR;
583: end if;
584: /* Bug No 2579818 End */
585:
586:
626: p_source_data_extract_id => p_src_data_extract_id,
627: p_target_data_extract_id => p_data_extract_id,
628: p_pay_element_id => l_find_element_rec.pay_element_id);
629:
630: if l_return_status = FND_API.G_RET_STS_ERROR then
631: debug('Copy Entity Elements Failed');
632: raise FND_API.G_EXC_ERROR;
633: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
634: debug('Copy Entity Elements Failed');
628: p_pay_element_id => l_find_element_rec.pay_element_id);
629:
630: if l_return_status = FND_API.G_RET_STS_ERROR then
631: debug('Copy Entity Elements Failed');
632: raise FND_API.G_EXC_ERROR;
633: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
634: debug('Copy Entity Elements Failed');
635: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
636: end if;
629:
630: if l_return_status = FND_API.G_RET_STS_ERROR then
631: debug('Copy Entity Elements Failed');
632: raise FND_API.G_EXC_ERROR;
633: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
634: debug('Copy Entity Elements Failed');
635: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
636: end if;
637:
631: debug('Copy Entity Elements Failed');
632: raise FND_API.G_EXC_ERROR;
633: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
634: debug('Copy Entity Elements Failed');
635: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
636: end if;
637:
638: end if; -- element_dummy value check
639: End Loop;
647: p_extract_method => p_extract_method,
648: p_process => 'Copy Elements'
649: );
650:
651: if l_return_status = FND_API.G_RET_STS_ERROR then
652: debug('Reentry Failed Copy Elements');
653: raise FND_API.G_EXC_ERROR;
654: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
655: debug('Reentry Failed Copy Elements');
649: );
650:
651: if l_return_status = FND_API.G_RET_STS_ERROR then
652: debug('Reentry Failed Copy Elements');
653: raise FND_API.G_EXC_ERROR;
654: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
655: debug('Reentry Failed Copy Elements');
656: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
657: end if;
650:
651: if l_return_status = FND_API.G_RET_STS_ERROR then
652: debug('Reentry Failed Copy Elements');
653: raise FND_API.G_EXC_ERROR;
654: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
655: debug('Reentry Failed Copy Elements');
656: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
657: end if;
658:
652: debug('Reentry Failed Copy Elements');
653: raise FND_API.G_EXC_ERROR;
654: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
655: debug('Reentry Failed Copy Elements');
656: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
657: end if;
658:
659: end if; -- check for status
660:
661: -- End of API body.
662:
663: -- Standard check of p_commit.
664:
665: if FND_API.to_Boolean (p_commit) then
666: commit work;
667: end if;
668:
669: -- Standard call to get message count and if count is 1, get message info.
672: p_data => p_msg_data);
673:
674: EXCEPTION
675:
676: when FND_API.G_EXC_ERROR then
677:
678: rollback to Copy_Elements_Pvt;
679:
680: p_return_status := FND_API.G_RET_STS_ERROR;
676: when FND_API.G_EXC_ERROR then
677:
678: rollback to Copy_Elements_Pvt;
679:
680: p_return_status := FND_API.G_RET_STS_ERROR;
681:
682: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
683: p_data => p_msg_data);
684:
682: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
683: p_data => p_msg_data);
684:
685:
686: when FND_API.G_EXC_UNEXPECTED_ERROR then
687:
688: rollback to Copy_Elements_Pvt;
689:
690: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
686: when FND_API.G_EXC_UNEXPECTED_ERROR then
687:
688: rollback to Copy_Elements_Pvt;
689:
690: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
691:
692: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
693: p_data => p_msg_data);
694:
696: when OTHERS then
697:
698: rollback to Copy_Elements_Pvt;
699:
700: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
701:
702: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
703:
704: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,
711: END Copy_Elements;
712:
713: PROCEDURE Copy_Default_Rules
714: ( p_api_version IN NUMBER,
715: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
716: p_commit IN VARCHAR2 := FND_API.G_FALSE,
717: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
718: p_return_status OUT NOCOPY VARCHAR2,
719: p_msg_count OUT NOCOPY NUMBER,
712:
713: PROCEDURE Copy_Default_Rules
714: ( p_api_version IN NUMBER,
715: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
716: p_commit IN VARCHAR2 := FND_API.G_FALSE,
717: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
718: p_return_status OUT NOCOPY VARCHAR2,
719: p_msg_count OUT NOCOPY NUMBER,
720: p_msg_data OUT NOCOPY VARCHAR2,
713: PROCEDURE Copy_Default_Rules
714: ( p_api_version IN NUMBER,
715: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
716: p_commit IN VARCHAR2 := FND_API.G_FALSE,
717: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
718: p_return_status OUT NOCOPY VARCHAR2,
719: p_msg_count OUT NOCOPY NUMBER,
720: p_msg_data OUT NOCOPY VARCHAR2,
721: p_extract_method IN VARCHAR2,
910: SAVEPOINT Copy_Default_Rules_Pvt;
911:
912: -- Standard call to check for call compatibility.
913:
914: if not FND_API.Compatible_API_Call (l_api_version,
915: p_api_version,
916: l_api_name,
917: G_PKG_NAME)
918: then
915: p_api_version,
916: l_api_name,
917: G_PKG_NAME)
918: then
919: raise FND_API.G_EXC_UNEXPECTED_ERROR;
920: end if;
921:
922: -- Initialize message list if p_init_msg_list is set to TRUE.
923:
920: end if;
921:
922: -- Initialize message list if p_init_msg_list is set to TRUE.
923:
924: if FND_API.to_Boolean (p_init_msg_list) then
925: FND_MSG_PUB.initialize;
926: end if;
927:
928: -- Initialize API return status to success
926: end if;
927:
928: -- Initialize API return status to success
929:
930: p_return_status := FND_API.G_RET_STS_SUCCESS;
931: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Inside Copy rule program');
932:
933: -- API body
934: l_last_update_date := sysdate;
947: p_status => l_status,
948: p_restart_id => l_restart_id
949: );
950:
951: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
952: raise FND_API.G_EXC_ERROR;
953: end if;
954:
955: if (l_status <> 'C') then
948: p_restart_id => l_restart_id
949: );
950:
951: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
952: raise FND_API.G_EXC_ERROR;
953: end if;
954:
955: if (l_status <> 'C') then
956:
998: from dual;
999:
1000: PSB_DEFAULTS_PVT.Insert_Row(
1001: p_api_version => 1.0,
1002: p_init_msg_list => FND_API.G_FALSE,
1003: p_commit => FND_API.G_FALSE,
1004: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1005: p_return_status => l_return_status,
1006: p_msg_count => l_msg_count,
999:
1000: PSB_DEFAULTS_PVT.Insert_Row(
1001: p_api_version => 1.0,
1002: p_init_msg_list => FND_API.G_FALSE,
1003: p_commit => FND_API.G_FALSE,
1004: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1005: p_return_status => l_return_status,
1006: p_msg_count => l_msg_count,
1007: p_msg_data => l_msg_data,
1000: PSB_DEFAULTS_PVT.Insert_Row(
1001: p_api_version => 1.0,
1002: p_init_msg_list => FND_API.G_FALSE,
1003: p_commit => FND_API.G_FALSE,
1004: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1005: p_return_status => l_return_status,
1006: p_msg_count => l_msg_count,
1007: p_msg_data => l_msg_data,
1008: --
1024: p_overwrite => c_defaults_rec.overwrite
1025: /* Bug 4179734 End*/
1026: );
1027:
1028: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1029: raise FND_API.G_EXC_ERROR;
1030: end if;
1031:
1032: /* Start bug no 1308558 */
1025: /* Bug 4179734 End*/
1026: );
1027:
1028: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1029: raise FND_API.G_EXC_ERROR;
1030: end if;
1031:
1032: /* Start bug no 1308558 */
1033: -- This tables will store all existing default rule ID's
1042: Loop
1043: l_set_relation_id := null;
1044: PSB_Set_Relation_PVT.Insert_Row
1045: ( p_api_version => 1.0,
1046: p_init_msg_list => FND_API.G_FALSE,
1047: p_commit => FND_API.G_FALSE,
1048: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1049: p_return_status => l_return_status,
1050: p_msg_count => l_msg_count,
1043: l_set_relation_id := null;
1044: PSB_Set_Relation_PVT.Insert_Row
1045: ( p_api_version => 1.0,
1046: p_init_msg_list => FND_API.G_FALSE,
1047: p_commit => FND_API.G_FALSE,
1048: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1049: p_return_status => l_return_status,
1050: p_msg_count => l_msg_count,
1051: p_msg_data => l_msg_data,
1044: PSB_Set_Relation_PVT.Insert_Row
1045: ( p_api_version => 1.0,
1046: p_init_msg_list => FND_API.G_FALSE,
1047: p_commit => FND_API.G_FALSE,
1048: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1049: p_return_status => l_return_status,
1050: p_msg_count => l_msg_count,
1051: p_msg_data => l_msg_data,
1052: p_Row_Id => l_rowid2,
1071: p_created_by => l_created_by,
1072: p_creation_date => l_creation_date
1073: );
1074:
1075: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1076: raise FND_API.G_EXC_ERROR;
1077: end if;
1078:
1079: End Loop;
1072: p_creation_date => l_creation_date
1073: );
1074:
1075: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1076: raise FND_API.G_EXC_ERROR;
1077: end if;
1078:
1079: End Loop;
1080:
1138:
1139: if (l_insert_flag = 'Y') then
1140: PSB_DEFAULT_ASSIGNMENTS_PVT.Insert_Row
1141: ( p_api_version => 1.0,
1142: p_init_msg_list => FND_API.G_FALSE,
1143: p_commit => FND_API.G_FALSE,
1144: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1145: p_return_status => l_return_status,
1146: p_msg_count => l_msg_count,
1139: if (l_insert_flag = 'Y') then
1140: PSB_DEFAULT_ASSIGNMENTS_PVT.Insert_Row
1141: ( p_api_version => 1.0,
1142: p_init_msg_list => FND_API.G_FALSE,
1143: p_commit => FND_API.G_FALSE,
1144: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1145: p_return_status => l_return_status,
1146: p_msg_count => l_msg_count,
1147: p_msg_data => l_msg_data,
1140: PSB_DEFAULT_ASSIGNMENTS_PVT.Insert_Row
1141: ( p_api_version => 1.0,
1142: p_init_msg_list => FND_API.G_FALSE,
1143: p_commit => FND_API.G_FALSE,
1144: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1145: p_return_status => l_return_status,
1146: p_msg_count => l_msg_count,
1147: p_msg_data => l_msg_data,
1148: p_Row_Id => l_rowid3,
1164: p_last_updated_by => l_last_updated_by,
1165: p_last_update_login => l_last_update_login
1166: );
1167:
1168: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1169: raise FND_API.G_EXC_ERROR;
1170: end if;
1171: end if;
1172:
1165: p_last_update_login => l_last_update_login
1166: );
1167:
1168: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1169: raise FND_API.G_EXC_ERROR;
1170: end if;
1171: end if;
1172:
1173: End Loop;
1206: For C_Alloc_Rec in C_Alloc
1207: Loop
1208: PSB_ALLOCRULE_PERCENTS_PVT.Insert_Row
1209: ( p_api_version => 1.0,
1210: p_init_msg_list => FND_API.G_FALSE,
1211: p_commit => FND_API.G_FALSE,
1212: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1213: p_return_status => l_return_status,
1214: p_msg_count => l_msg_count,
1207: Loop
1208: PSB_ALLOCRULE_PERCENTS_PVT.Insert_Row
1209: ( p_api_version => 1.0,
1210: p_init_msg_list => FND_API.G_FALSE,
1211: p_commit => FND_API.G_FALSE,
1212: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1213: p_return_status => l_return_status,
1214: p_msg_count => l_msg_count,
1215: p_msg_data => l_msg_data,
1208: PSB_ALLOCRULE_PERCENTS_PVT.Insert_Row
1209: ( p_api_version => 1.0,
1210: p_init_msg_list => FND_API.G_FALSE,
1211: p_commit => FND_API.G_FALSE,
1212: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1213: p_return_status => l_return_status,
1214: p_msg_count => l_msg_count,
1215: p_msg_data => l_msg_data,
1216: p_allocation_rule_percent_id => l_alloc_rule_percent_id,
1280: l_return_status := null;
1281: -- call the insert procedure PSB_ENTITY_SET.INSERT_ROW
1282: PSB_ENTITY_SET_PVT.Insert_Row
1283: (p_api_version => 1.0,
1284: p_init_msg_list => FND_API.G_FALSE,
1285: p_commit => FND_API.G_FALSE,
1286: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1287: p_return_status => l_return_status,
1288: p_msg_count => l_msg_count,
1281: -- call the insert procedure PSB_ENTITY_SET.INSERT_ROW
1282: PSB_ENTITY_SET_PVT.Insert_Row
1283: (p_api_version => 1.0,
1284: p_init_msg_list => FND_API.G_FALSE,
1285: p_commit => FND_API.G_FALSE,
1286: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1287: p_return_status => l_return_status,
1288: p_msg_count => l_msg_count,
1289: p_msg_data => l_msg_data,
1282: PSB_ENTITY_SET_PVT.Insert_Row
1283: (p_api_version => 1.0,
1284: p_init_msg_list => FND_API.G_FALSE,
1285: p_commit => FND_API.G_FALSE,
1286: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1287: p_return_status => l_return_status,
1288: p_msg_count => l_msg_count,
1289: p_msg_data => l_msg_data,
1290: P_ROWID => l_rowid4,
1317: p_Creation_Date => l_creation_date);
1318:
1319: -- check the success of the API
1320:
1321: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1322: RAISE FND_API.G_EXC_ERROR;
1323: END IF;
1324:
1325: FOR l_entity_assignment_rec IN l_entity_assignment_csr
1318:
1319: -- check the success of the API
1320:
1321: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1322: RAISE FND_API.G_EXC_ERROR;
1323: END IF;
1324:
1325: FOR l_entity_assignment_rec IN l_entity_assignment_csr
1326: LOOP
1327:
1328: -- insert the data into entity assignment table
1329: PSB_ENTITY_ASSIGNMENT_PVT.Insert_Row (
1330: p_api_version => 1.0,
1331: p_init_msg_list => FND_API.G_FALSE,
1332: p_commit => FND_API.G_FALSE,
1333: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1334: p_return_status => l_return_status,
1335: p_msg_count => l_msg_count,
1328: -- insert the data into entity assignment table
1329: PSB_ENTITY_ASSIGNMENT_PVT.Insert_Row (
1330: p_api_version => 1.0,
1331: p_init_msg_list => FND_API.G_FALSE,
1332: p_commit => FND_API.G_FALSE,
1333: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1334: p_return_status => l_return_status,
1335: p_msg_count => l_msg_count,
1336: p_msg_data => l_msg_data,
1329: PSB_ENTITY_ASSIGNMENT_PVT.Insert_Row (
1330: p_api_version => 1.0,
1331: p_init_msg_list => FND_API.G_FALSE,
1332: p_commit => FND_API.G_FALSE,
1333: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1334: p_return_status => l_return_status,
1335: p_msg_count => l_msg_count,
1336: p_msg_data => l_msg_data,
1337: P_ROWID => l_rowid5,
1348: p_Last_Update_Login => l_last_update_login,
1349: p_Created_By => l_created_by,
1350: p_Creation_Date => l_creation_date);
1351:
1352: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1353: RAISE FND_API.G_EXC_ERROR;
1354: END IF;
1355:
1356: END LOOP;
1349: p_Created_By => l_created_by,
1350: p_Creation_Date => l_creation_date);
1351:
1352: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1353: RAISE FND_API.G_EXC_ERROR;
1354: END IF;
1355:
1356: END LOOP;
1357:
1367: p_extract_method => p_extract_method,
1368: p_process => 'Copy Default Rules'
1369: );
1370:
1371: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1372: debug('Reentry Failed Copy Default Rules');
1373: raise FND_API.G_EXC_ERROR;
1374: end if;
1375: end if;
1369: );
1370:
1371: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1372: debug('Reentry Failed Copy Default Rules');
1373: raise FND_API.G_EXC_ERROR;
1374: end if;
1375: end if;
1376:
1377: -- End of API body.
1377: -- End of API body.
1378:
1379: -- Standard check of p_commit.
1380:
1381: if FND_API.to_Boolean (p_commit) then
1382: commit work;
1383: end if;
1384:
1385: -- Standard call to get message count and if count is 1, get message info.
1388: p_data => p_msg_data);
1389:
1390: EXCEPTION
1391:
1392: when FND_API.G_EXC_ERROR then
1393: fnd_file.put_line(fnd_file.log, sqlerrm||' - exception ');
1394: debug('SQLCODE '||SQLCODE);
1395: rollback to Copy_Default_Rules_Pvt;
1396:
1393: fnd_file.put_line(fnd_file.log, sqlerrm||' - exception ');
1394: debug('SQLCODE '||SQLCODE);
1395: rollback to Copy_Default_Rules_Pvt;
1396:
1397: p_return_status := FND_API.G_RET_STS_ERROR;
1398:
1399: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
1400: p_data => p_msg_data);
1401:
1399: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
1400: p_data => p_msg_data);
1401:
1402:
1403: when FND_API.G_EXC_UNEXPECTED_ERROR then
1404:
1405: fnd_file.put_line(fnd_file.log, sqlerrm||' - exception ');
1406: debug('SQLCODE '||SQLCODE);
1407: rollback to Copy_Default_Rules_Pvt;
1405: fnd_file.put_line(fnd_file.log, sqlerrm||' - exception ');
1406: debug('SQLCODE '||SQLCODE);
1407: rollback to Copy_Default_Rules_Pvt;
1408:
1409: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1410:
1411: FND_MSG_PUB.Count_And_Get (p_count => p_msg_count,
1412: p_data => p_msg_data);
1413:
1417: fnd_file.put_line(fnd_file.log, sqlerrm||' - exception ');
1418: debug('SQLCODE '||SQLCODE);
1419: rollback to Copy_Default_Rules_Pvt;
1420:
1421: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1422:
1423: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) then
1424:
1425: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,