DBA Data[Home] [Help]

APPS.ASO_SALES_TEAM_PVT dependencies on ASO_DEBUG_PUB

Line 24: aso_debug_pub.add('Begin INSERT_ACCESSES_ACCOUNTS',1,'Y');

20: p_WinningTerrMember_tbl IN OUT NOCOPY JTY_ASSIGN_REALTIME_PUB.bulk_winners_rec_type,
21: x_return_status OUT NOCOPY VARCHAR2) IS
22: BEGIN
23:
24: aso_debug_pub.add('Begin INSERT_ACCESSES_ACCOUNTS',1,'Y');
25: x_return_status := FND_API.G_RET_STS_SUCCESS;
26: IF p_WinningTerrMember_tbl.resource_id.COUNT > 0 THEN
27:
28: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP

Line 34: aso_debug_pub.add('Begin INSERT_ACCESSES_ACCOUNTS'|| p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');

30:
31: --added inline view in the select clause of Insert statement to fetch the salesforce role code for Employee resource --fix for bug 5869095
32:
33: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_EMPLOYEE' AND p_WinningTerrMember_tbl.group_id(l_index) IS NOT NULL THEN
34: aso_debug_pub.add('Begin INSERT_ACCESSES_ACCOUNTS'|| p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
35:
36: Insert into ASO_QUOTE_ACCESSES
37: (ACCESS_ID,
38: QUOTE_NUMBER,

Line 72: aso_debug_pub.add('Proc INSERT_ACCESSES_ACCOUNTS exception part',1,'Y');

68:
69: EXCEPTION
70: WHEN OTHERS THEN
71:
72: aso_debug_pub.add('Proc INSERT_ACCESSES_ACCOUNTS exception part',1,'Y');
73:
74: x_errbuf := SQLERRM;
75: x_retcode := SQLCODE;
76: x_return_status := FND_API.G_RET_STS_ERROR;

Line 111: aso_debug_pub.add('Explode Team',1,'Y');

107:
108:
109: BEGIN
110:
111: aso_debug_pub.add('Explode Team',1,'Y');
112:
113: x_return_status := FND_API.G_RET_STS_SUCCESS;
114: -- l_resource_type := 'RS_TEAM';
115: /* Get resources within a resource team */

Line 124: aso_debug_pub.add('Explode Team ' ||p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');

120: IF p_WinningTerrMember_tbl.resource_id.COUNT > 0 THEN
121:
122: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP
123: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_TEAM' THEN
124: aso_debug_pub.add('Explode Team ' ||p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
125: SELECT resource_id, group_id , person_id
126: BULK COLLECT INTO l_resource_id, l_group_id,l_person_id
127: FROM
128: (

Line 239: aso_debug_pub.add('Explode Team ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');

235: AND jtm.group_id = g.group_id
236: GROUP BY m.resource_id, m.person_id, jtm.team_id, res.CATEGORY) J
237:
238: WHERE j.team_id = p_WinningTerrMember_tbl.resource_id(l_index);
239: aso_debug_pub.add('Explode Team ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');
240:
241:
242: IF l_resource_id.COUNT > 0 THEN
243: FOR i IN l_resource_id.FIRST .. l_resource_id.LAST LOOP

Line 278: aso_debug_pub.add('Explode Team praks1212 ' || p_WinningTerrMember_tbl.resource_id(i),1,'Y');

274: END IF;
275: END IF;
276: END LOOP;
277: /* FOR i IN l_resource_id.FIRST .. l_resource_id.LAST LOOP
278: aso_debug_pub.add('Explode Team praks1212 ' || p_WinningTerrMember_tbl.resource_id(i),1,'Y');
279: end loop;
280: */
281:
282: END IF; /* if p_WinningTerrMember_tbl.resource_id.COUNT > 0 */

Line 458: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');

454: */
455: --Commented Code End Yogeshwar (MOAC)
456: BEGIN
457:
458: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
459:
460: -- Standard Start of API savepoint
461: SAVEPOINT ASSIGN_SALES_TEAM_PVT;
462:

Line 485: IF aso_debug_pub.g_debug_flag = 'Y' THEN

481:
482: --
483: -- API body
484: --
485: IF aso_debug_pub.g_debug_flag = 'Y' THEN
486: aso_debug_pub.add('Begin Sales_Team_Assign',1,'Y');
487: END IF;
488: -- BASIC VALIDATIONS
489:

Line 486: aso_debug_pub.add('Begin Sales_Team_Assign',1,'Y');

482: --
483: -- API body
484: --
485: IF aso_debug_pub.g_debug_flag = 'Y' THEN
486: aso_debug_pub.add('Begin Sales_Team_Assign',1,'Y');
487: END IF;
488: -- BASIC VALIDATIONS
489:
490: -- Check if profiles are set

Line 493: IF aso_debug_pub.g_debug_flag = 'Y' THEN

489:
490: -- Check if profiles are set
491: IF (NVL(FND_PROFILE.Value('ASO_API_ENABLE_SECURITY'),'N') = 'N') OR (l_sales_team_prof = 'NONE') THEN
492:
493: IF aso_debug_pub.g_debug_flag = 'Y' THEN
494: aso_debug_pub.add('API_Enable_Sec is N or sales_team_prof is None: ',1,'Y');
495: END IF;
496:
497: RAISE Leave_Proc;

Line 494: aso_debug_pub.add('API_Enable_Sec is N or sales_team_prof is None: ',1,'Y');

490: -- Check if profiles are set
491: IF (NVL(FND_PROFILE.Value('ASO_API_ENABLE_SECURITY'),'N') = 'N') OR (l_sales_team_prof = 'NONE') THEN
492:
493: IF aso_debug_pub.g_debug_flag = 'Y' THEN
494: aso_debug_pub.add('API_Enable_Sec is N or sales_team_prof is None: ',1,'Y');
495: END IF;
496:
497: RAISE Leave_Proc;
498:

Line 565: IF aso_debug_pub.g_debug_flag = 'Y' THEN

561: END IF;
562: -- End: Check if a concurrent lock exists
563: -- END BASIC VALIDATIONS
564:
565: IF aso_debug_pub.g_debug_flag = 'Y' THEN
566: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
567: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
568: END IF;
569:

Line 566: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');

562: -- End: Check if a concurrent lock exists
563: -- END BASIC VALIDATIONS
564:
565: IF aso_debug_pub.g_debug_flag = 'Y' THEN
566: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
567: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
568: END IF;
569:
570: DELETE FROM ASO_STEAM_TEMP;

Line 567: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');

563: -- END BASIC VALIDATIONS
564:
565: IF aso_debug_pub.g_debug_flag = 'Y' THEN
566: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
567: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
568: END IF;
569:
570: DELETE FROM ASO_STEAM_TEMP;
571:

Line 603: IF aso_debug_pub.g_debug_flag = 'Y' THEN

599:
600: l_qte_header_rec := P_Qte_Header_Rec;
601:
602: END IF;
603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
604: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
605: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
606: END IF;
607:

Line 604: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');

600: l_qte_header_rec := P_Qte_Header_Rec;
601:
602: END IF;
603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
604: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
605: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
606: END IF;
607:
608: ASO_SALES_TEAM_PVT.Get_Sales_Team (

Line 605: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');

601:
602: END IF;
603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
604: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
605: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
606: END IF;
607:
608: ASO_SALES_TEAM_PVT.Get_Sales_Team (
609: P_Init_Msg_List => FND_API.G_FALSE,

Line 617: IF aso_debug_pub.g_debug_flag = 'Y' THEN

613: x_msg_count => x_msg_count,
614: x_msg_data => x_msg_data
615: );
616:
617: IF aso_debug_pub.g_debug_flag = 'Y' THEN
618: aso_debug_pub.add('After ASO_SALES_TEAM_PVT.get_sales_team: '||x_return_status,1,'Y');
619: END IF;
620:
621: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 618: aso_debug_pub.add('After ASO_SALES_TEAM_PVT.get_sales_team: '||x_return_status,1,'Y');

614: x_msg_data => x_msg_data
615: );
616:
617: IF aso_debug_pub.g_debug_flag = 'Y' THEN
618: aso_debug_pub.add('After ASO_SALES_TEAM_PVT.get_sales_team: '||x_return_status,1,'Y');
619: END IF;
620:
621: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
622: RAISE FND_API.G_EXC_ERROR;

Line 634: IF aso_debug_pub.g_debug_flag = 'Y' THEN

630: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
631: FND_MESSAGE.Set_Name('ASO', 'ASO_NO_SALES_TEAM');
632: FND_MSG_PUB.ADD;
633: END IF;
634: IF aso_debug_pub.g_debug_flag = 'Y' THEN
635: aso_debug_pub.add('After ASO_SALES_TEAM_PVT Added MSG: ',1,'Y');
636: END IF;
637:
638: X_Qte_Header_Rec := P_Qte_Header_Rec;

Line 635: aso_debug_pub.add('After ASO_SALES_TEAM_PVT Added MSG: ',1,'Y');

631: FND_MESSAGE.Set_Name('ASO', 'ASO_NO_SALES_TEAM');
632: FND_MSG_PUB.ADD;
633: END IF;
634: IF aso_debug_pub.g_debug_flag = 'Y' THEN
635: aso_debug_pub.add('After ASO_SALES_TEAM_PVT Added MSG: ',1,'Y');
636: END IF;
637:
638: X_Qte_Header_Rec := P_Qte_Header_Rec;
639: RAISE Leave_Proc;

Line 643: IF aso_debug_pub.g_debug_flag = 'Y' THEN

639: RAISE Leave_Proc;
640: ELSE
641: IF P_Operation = 'UPDATE' THEN -- istore case
642:
643: IF aso_debug_pub.g_debug_flag = 'Y' THEN
644: aso_debug_pub.add('Before Update_Primary_SalesAgent(oprn=update): ',1,'Y');
645: END IF;
646: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
647: P_Init_Msg_List => FND_API.G_FALSE,

Line 644: aso_debug_pub.add('Before Update_Primary_SalesAgent(oprn=update): ',1,'Y');

640: ELSE
641: IF P_Operation = 'UPDATE' THEN -- istore case
642:
643: IF aso_debug_pub.g_debug_flag = 'Y' THEN
644: aso_debug_pub.add('Before Update_Primary_SalesAgent(oprn=update): ',1,'Y');
645: END IF;
646: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
647: P_Init_Msg_List => FND_API.G_FALSE,
648: P_Qte_Header_Rec => l_Qte_Header_Rec,

Line 658: IF aso_debug_pub.g_debug_flag = 'Y' THEN

654: x_msg_count => x_msg_count,
655: x_msg_data => x_msg_data
656: );
657:
658: IF aso_debug_pub.g_debug_flag = 'Y' THEN
659: aso_debug_pub.add('After Update_Primary_SalesInfo(oprn=update): '||x_return_status,1,'Y');
660: END IF;
661:
662: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 659: aso_debug_pub.add('After Update_Primary_SalesInfo(oprn=update): '||x_return_status,1,'Y');

655: x_msg_data => x_msg_data
656: );
657:
658: IF aso_debug_pub.g_debug_flag = 'Y' THEN
659: aso_debug_pub.add('After Update_Primary_SalesInfo(oprn=update): '||x_return_status,1,'Y');
660: END IF;
661:
662: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
663: RAISE FND_API.G_EXC_ERROR;

Line 677: IF aso_debug_pub.g_debug_flag = 'Y' THEN

673: OPEN C_Get_Creator_Res(G_USER_ID);
674: FETCH C_Get_Creator_Res INTO l_creator_res;
675: CLOSE C_Get_Creator_Res;
676:
677: IF aso_debug_pub.g_debug_flag = 'Y' THEN
678: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
679: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
680: END IF;
681: IF l_creator_res IS NOT NULL THEN

Line 678: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');

674: FETCH C_Get_Creator_Res INTO l_creator_res;
675: CLOSE C_Get_Creator_Res;
676:
677: IF aso_debug_pub.g_debug_flag = 'Y' THEN
678: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
679: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
680: END IF;
681: IF l_creator_res IS NOT NULL THEN
682:

Line 679: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');

675: CLOSE C_Get_Creator_Res;
676:
677: IF aso_debug_pub.g_debug_flag = 'Y' THEN
678: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
679: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
680: END IF;
681: IF l_creator_res IS NOT NULL THEN
682:
683: -- Role Defaulting Logic

Line 685: IF aso_debug_pub.g_debug_flag = 'Y' THEN

681: IF l_creator_res IS NOT NULL THEN
682:
683: -- Role Defaulting Logic
684:
685: IF aso_debug_pub.g_debug_flag = 'Y' THEN
686: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
687: END IF;
688:
689: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 686: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');

682:
683: -- Role Defaulting Logic
684:
685: IF aso_debug_pub.g_debug_flag = 'Y' THEN
686: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
687: END IF;
688:
689: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
690: p_application_id => 521);

Line 692: IF aso_debug_pub.g_debug_flag = 'Y' THEN

688:
689: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
690: p_application_id => 521);
691:
692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
694: END IF;
695:
696: if l_obsolete_status = 'T' then

Line 693: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

689: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
690: p_application_id => 521);
691:
692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
694: END IF;
695:
696: if l_obsolete_status = 'T' then
697:

Line 702: IF aso_debug_pub.g_debug_flag = 'Y' THEN

698: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE');
699:
700: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
701:
702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
703: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
704: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
705: END IF;
706:

Line 703: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');

699:
700: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
701:
702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
703: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
704: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
705: END IF;
706:
707: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 704: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

700: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
701:
702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
703: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
704: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
705: END IF;
706:
707: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
708:

Line 709: IF aso_debug_pub.g_debug_flag = 'Y' THEN

705: END IF;
706:
707: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
708:
709: IF aso_debug_pub.g_debug_flag = 'Y' THEN
710: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
711: END IF;
712:
713: if l_creator_grp is null then

Line 710: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

706:
707: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
708:
709: IF aso_debug_pub.g_debug_flag = 'Y' THEN
710: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
711: END IF;
712:
713: if l_creator_grp is null then
714:

Line 717: IF aso_debug_pub.g_debug_flag = 'Y' THEN

713: if l_creator_grp is null then
714:
715: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
716:
717: IF aso_debug_pub.g_debug_flag = 'Y' THEN
718: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
719: END IF;
720:
721: l_creator_grp := to_number(l_ots_grp_prof);

Line 718: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

714:
715: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
716:
717: IF aso_debug_pub.g_debug_flag = 'Y' THEN
718: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
719: END IF;
720:
721: l_creator_grp := to_number(l_ots_grp_prof);
722:

Line 723: IF aso_debug_pub.g_debug_flag = 'Y' THEN

719: END IF;
720:
721: l_creator_grp := to_number(l_ots_grp_prof);
722:
723: IF aso_debug_pub.g_debug_flag = 'Y' THEN
724: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
725: END IF;
726:
727: end if;

Line 724: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

720:
721: l_creator_grp := to_number(l_ots_grp_prof);
722:
723: IF aso_debug_pub.g_debug_flag = 'Y' THEN
724: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
725: END IF;
726:
727: end if;
728:

Line 735: IF aso_debug_pub.g_debug_flag = 'Y' THEN

731: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE_AND_GROUP');
732:
733: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
734:
735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
736: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
737: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
738: END IF;
739:

Line 736: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');

732:
733: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
734:
735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
736: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
737: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
738: END IF;
739:
740: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 737: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

733: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
734:
735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
736: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
737: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
738: END IF;
739:
740: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
741:

Line 742: IF aso_debug_pub.g_debug_flag = 'Y' THEN

738: END IF;
739:
740: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
741:
742: IF aso_debug_pub.g_debug_flag = 'Y' THEN
743: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
744: END IF;
745:
746: if l_creator_grp is null then

Line 743: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

739:
740: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
741:
742: IF aso_debug_pub.g_debug_flag = 'Y' THEN
743: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
744: END IF;
745:
746: if l_creator_grp is null then
747:

Line 750: IF aso_debug_pub.g_debug_flag = 'Y' THEN

746: if l_creator_grp is null then
747:
748: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
749:
750: IF aso_debug_pub.g_debug_flag = 'Y' THEN
751: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
752: END IF;
753:
754: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 751: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

747:
748: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
749:
750: IF aso_debug_pub.g_debug_flag = 'Y' THEN
751: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
752: END IF;
753:
754: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
755:

Line 756: IF aso_debug_pub.g_debug_flag = 'Y' THEN

752: END IF;
753:
754: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
755:
756: IF aso_debug_pub.g_debug_flag = 'Y' THEN
757: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
758: END IF;
759:
760: end if;

Line 757: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

753:
754: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
755:
756: IF aso_debug_pub.g_debug_flag = 'Y' THEN
757: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
758: END IF;
759:
760: end if;
761:

Line 766: IF aso_debug_pub.g_debug_flag = 'Y' THEN

762: end if;
763:
764: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
765:
766: IF aso_debug_pub.g_debug_flag = 'Y' THEN
767: aso_debug_pub.add(' nores:create:l_role_prof: ' || l_role_prof, 1, 'N');
768: END IF;
769:
770: OPEN C_Get_Role_From_Code (l_role_prof);

Line 767: aso_debug_pub.add(' nores:create:l_role_prof: ' || l_role_prof, 1, 'N');

763:
764: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
765:
766: IF aso_debug_pub.g_debug_flag = 'Y' THEN
767: aso_debug_pub.add(' nores:create:l_role_prof: ' || l_role_prof, 1, 'N');
768: END IF;
769:
770: OPEN C_Get_Role_From_Code (l_role_prof);
771: FETCH C_Get_Role_From_Code INTO l_creator_role;

Line 775: IF aso_debug_pub.g_debug_flag = 'Y' THEN

771: FETCH C_Get_Role_From_Code INTO l_creator_role;
772: CLOSE C_Get_Role_From_Code;
773:
774: IF l_creator_role IS NULL THEN
775: IF aso_debug_pub.g_debug_flag = 'Y' THEN
776: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
777: END IF;
778:
779: OPEN C_Get_Resource_Role (l_creator_res);

Line 776: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');

772: CLOSE C_Get_Role_From_Code;
773:
774: IF l_creator_role IS NULL THEN
775: IF aso_debug_pub.g_debug_flag = 'Y' THEN
776: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
777: END IF;
778:
779: OPEN C_Get_Resource_Role (l_creator_res);
780: FETCH C_Get_Resource_Role INTO l_creator_role;

Line 785: IF aso_debug_pub.g_debug_flag = 'Y' THEN

781: CLOSE C_Get_Resource_Role;
782:
783: END IF;
784:
785: IF aso_debug_pub.g_debug_flag = 'Y' THEN
786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');

Line 786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');

782:
783: END IF;
784:
785: IF aso_debug_pub.g_debug_flag = 'Y' THEN
786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
790: END IF;

Line 787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');

783: END IF;
784:
785: IF aso_debug_pub.g_debug_flag = 'Y' THEN
786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
790: END IF;
791:

Line 788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');

784:
785: IF aso_debug_pub.g_debug_flag = 'Y' THEN
786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
790: END IF;
791:
792: l_sequence := NULL;

Line 789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');

785: IF aso_debug_pub.g_debug_flag = 'Y' THEN
786: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
787: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
788: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
789: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
790: END IF;
791:
792: l_sequence := NULL;
793:

Line 842: IF aso_debug_pub.g_debug_flag = 'Y' THEN

838: OPEN C_Valid_SalesRep (l_creator_res);
839: FETCH C_Valid_SalesRep INTO l_valid;
840: CLOSE C_Valid_SalesRep;
841:
842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
843: aso_debug_pub.add('nores:create:Creator Valid SalesRep : '||l_valid,1,'Y');
844: END IF;
845:
846: IF l_valid = 'Y' THEN

Line 843: aso_debug_pub.add('nores:create:Creator Valid SalesRep : '||l_valid,1,'Y');

839: FETCH C_Valid_SalesRep INTO l_valid;
840: CLOSE C_Valid_SalesRep;
841:
842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
843: aso_debug_pub.add('nores:create:Creator Valid SalesRep : '||l_valid,1,'Y');
844: END IF;
845:
846: IF l_valid = 'Y' THEN
847: l_primary_salesagent := l_creator_res;

Line 860: IF aso_debug_pub.g_debug_flag = 'Y' THEN

856: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
857: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
858: CLOSE C_Get_Res_From_Srep;
859:
860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
861: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
862: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
863: END IF;
864: ELSE

Line 861: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');

857: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
858: CLOSE C_Get_Res_From_Srep;
859:
860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
861: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
862: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
863: END IF;
864: ELSE
865: x_return_status := FND_API.G_RET_STS_ERROR;

Line 862: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');

858: CLOSE C_Get_Res_From_Srep;
859:
860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
861: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
862: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
863: END IF;
864: ELSE
865: x_return_status := FND_API.G_RET_STS_ERROR;
866: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

Line 881: IF aso_debug_pub.g_debug_flag = 'Y' THEN

877: END IF; -- salesrep_prof
878:
879: l_primary_role := l_default_role_prof;
880:
881: IF aso_debug_pub.g_debug_flag = 'Y' THEN
882: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
883: END IF;
884:
885: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 882: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');

878:
879: l_primary_role := l_default_role_prof;
880:
881: IF aso_debug_pub.g_debug_flag = 'Y' THEN
882: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
883: END IF;
884:
885: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
886: p_application_id => 521);

Line 888: IF aso_debug_pub.g_debug_flag = 'Y' THEN

884:
885: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
886: p_application_id => 521);
887:
888: IF aso_debug_pub.g_debug_flag = 'Y' THEN
889: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
890: END IF;
891:
892: if l_obsolete_status = 'T' then

Line 889: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

885: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
886: p_application_id => 521);
887:
888: IF aso_debug_pub.g_debug_flag = 'Y' THEN
889: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
890: END IF;
891:
892: if l_obsolete_status = 'T' then
893:

Line 896: IF aso_debug_pub.g_debug_flag = 'Y' THEN

892: if l_obsolete_status = 'T' then
893:
894: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
895:
896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
897: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
898: END IF;
899:
900: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 897: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

893:
894: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
895:
896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
897: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
898: END IF;
899:
900: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
901:

Line 902: IF aso_debug_pub.g_debug_flag = 'Y' THEN

898: END IF;
899:
900: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
901:
902: IF aso_debug_pub.g_debug_flag = 'Y' THEN
903: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
904: END IF;
905:
906: if l_primary_res_grp is null then

Line 903: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

899:
900: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
901:
902: IF aso_debug_pub.g_debug_flag = 'Y' THEN
903: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
904: END IF;
905:
906: if l_primary_res_grp is null then
907:

Line 910: IF aso_debug_pub.g_debug_flag = 'Y' THEN

906: if l_primary_res_grp is null then
907:
908: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
909:
910: IF aso_debug_pub.g_debug_flag = 'Y' THEN
911: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
912: END IF;
913:
914: l_primary_res_grp := to_number(l_ots_grp_prof);

Line 911: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

907:
908: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
909:
910: IF aso_debug_pub.g_debug_flag = 'Y' THEN
911: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
912: END IF;
913:
914: l_primary_res_grp := to_number(l_ots_grp_prof);
915:

Line 916: IF aso_debug_pub.g_debug_flag = 'Y' THEN

912: END IF;
913:
914: l_primary_res_grp := to_number(l_ots_grp_prof);
915:
916: IF aso_debug_pub.g_debug_flag = 'Y' THEN
917: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
918: END IF;
919:
920: end if;

Line 917: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

913:
914: l_primary_res_grp := to_number(l_ots_grp_prof);
915:
916: IF aso_debug_pub.g_debug_flag = 'Y' THEN
917: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
918: END IF;
919:
920: end if;
921:

Line 926: IF aso_debug_pub.g_debug_flag = 'Y' THEN

922: else
923:
924: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
925:
926: IF aso_debug_pub.g_debug_flag = 'Y' THEN
927: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
928: END IF;
929:
930: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 927: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

923:
924: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
925:
926: IF aso_debug_pub.g_debug_flag = 'Y' THEN
927: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
928: END IF;
929:
930: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
931:

Line 932: IF aso_debug_pub.g_debug_flag = 'Y' THEN

928: END IF;
929:
930: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
931:
932: IF aso_debug_pub.g_debug_flag = 'Y' THEN
933: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
934: END IF;
935:
936: if l_primary_res_grp is null then

Line 933: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

929:
930: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
931:
932: IF aso_debug_pub.g_debug_flag = 'Y' THEN
933: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
934: END IF;
935:
936: if l_primary_res_grp is null then
937:

Line 940: IF aso_debug_pub.g_debug_flag = 'Y' THEN

936: if l_primary_res_grp is null then
937:
938: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
939:
940: IF aso_debug_pub.g_debug_flag = 'Y' THEN
941: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
942: END IF;
943:
944: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 941: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

937:
938: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
939:
940: IF aso_debug_pub.g_debug_flag = 'Y' THEN
941: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
942: END IF;
943:
944: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
945:

Line 946: IF aso_debug_pub.g_debug_flag = 'Y' THEN

942: END IF;
943:
944: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
945:
946: IF aso_debug_pub.g_debug_flag = 'Y' THEN
947: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
948: END IF;
949:
950: end if;

Line 947: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

943:
944: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
945:
946: IF aso_debug_pub.g_debug_flag = 'Y' THEN
947: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
948: END IF;
949:
950: end if;
951:

Line 954: IF aso_debug_pub.g_debug_flag = 'Y' THEN

950: end if;
951:
952: end if;
953:
954: IF aso_debug_pub.g_debug_flag = 'Y' THEN
955: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
956: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
957: END IF;
958:

Line 955: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');

951:
952: end if;
953:
954: IF aso_debug_pub.g_debug_flag = 'Y' THEN
955: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
956: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
957: END IF;
958:
959: END IF; -- salesagent is NULL

Line 956: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');

952: end if;
953:
954: IF aso_debug_pub.g_debug_flag = 'Y' THEN
955: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
956: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
957: END IF;
958:
959: END IF; -- salesagent is NULL
960:

Line 966: IF aso_debug_pub.g_debug_flag = 'Y' THEN

962: OPEN C_Get_Resource_Role (l_primary_salesagent);
963: FETCH C_Get_Resource_Role INTO l_primary_role;
964: CLOSE C_Get_Resource_Role;
965:
966: IF aso_debug_pub.g_debug_flag = 'Y' THEN
967: aso_debug_pub.add('nores:create:Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
968: END IF;
969: END IF;
970:

Line 967: aso_debug_pub.add('nores:create:Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');

963: FETCH C_Get_Resource_Role INTO l_primary_role;
964: CLOSE C_Get_Resource_Role;
965:
966: IF aso_debug_pub.g_debug_flag = 'Y' THEN
967: aso_debug_pub.add('nores:create:Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
968: END IF;
969: END IF;
970:
971: IF l_valid IS NULL OR l_valid <> 'Y' THEN

Line 972: IF aso_debug_pub.g_debug_flag = 'Y' THEN

968: END IF;
969: END IF;
970:
971: IF l_valid IS NULL OR l_valid <> 'Y' THEN
972: IF aso_debug_pub.g_debug_flag = 'Y' THEN
973: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert:l_valid '||l_valid,1,'N');
974: END IF;
975: l_sequence := NULL;
976:

Line 973: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert:l_valid '||l_valid,1,'N');

969: END IF;
970:
971: IF l_valid IS NULL OR l_valid <> 'Y' THEN
972: IF aso_debug_pub.g_debug_flag = 'Y' THEN
973: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert:l_valid '||l_valid,1,'N');
974: END IF;
975: l_sequence := NULL;
976:
977: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

Line 1023: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1019: );
1020:
1021: END IF;
1022:
1023: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1024: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert in qte_hdr ',1,'N');
1025: END IF;
1026:
1027: UPDATE ASO_QUOTE_HEADERS_ALL

Line 1024: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert in qte_hdr ',1,'N');

1020:
1021: END IF;
1022:
1023: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1024: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert in qte_hdr ',1,'N');
1025: END IF;
1026:
1027: UPDATE ASO_QUOTE_HEADERS_ALL
1028: SET Resource_Id = l_primary_salesagent,

Line 1048: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1044:
1045: END IF; -- p_operation ELSE
1046: END IF; -- res count = 0
1047:
1048: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1049: aso_debug_pub.add('Before Temp_Insert'||NVL(lx_gen_return_Rec.resource_id.COUNT,0),1,'Y');
1050: END IF;
1051:
1052: FORALL i IN lx_gen_return_Rec.resource_id.FIRST..lx_gen_return_Rec.resource_id.LAST

Line 1049: aso_debug_pub.add('Before Temp_Insert'||NVL(lx_gen_return_Rec.resource_id.COUNT,0),1,'Y');

1045: END IF; -- p_operation ELSE
1046: END IF; -- res count = 0
1047:
1048: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1049: aso_debug_pub.add('Before Temp_Insert'||NVL(lx_gen_return_Rec.resource_id.COUNT,0),1,'Y');
1050: END IF;
1051:
1052: FORALL i IN lx_gen_return_Rec.resource_id.FIRST..lx_gen_return_Rec.resource_id.LAST
1053: INSERT INTO ASO_STEAM_TEMP ( Access_Id,

Line 1085: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1081: FROM JTF_RS_ROLES_B A
1082: WHERE A.Role_Code = NVL(lx_gen_return_Rec.role(i),A.Role_Code)
1083: AND rownum = 1;
1084:
1085: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1086: aso_debug_pub.add('After Temp Insert',1,'Y');
1087: END IF;
1088:
1089: IF l_Reassign_Flag = 'Y' THEN

Line 1086: aso_debug_pub.add('After Temp Insert',1,'Y');

1082: WHERE A.Role_Code = NVL(lx_gen_return_Rec.role(i),A.Role_Code)
1083: AND rownum = 1;
1084:
1085: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1086: aso_debug_pub.add('After Temp Insert',1,'Y');
1087: END IF;
1088:
1089: IF l_Reassign_Flag = 'Y' THEN
1090:

Line 1091: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1087: END IF;
1088:
1089: IF l_Reassign_Flag = 'Y' THEN
1090:
1091: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1092: select count(*) into i from aso_steam_temp;
1093: aso_debug_pub.add('count: '||i,1,'Y');
1094:
1095: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');

Line 1093: aso_debug_pub.add('count: '||i,1,'Y');

1089: IF l_Reassign_Flag = 'Y' THEN
1090:
1091: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1092: select count(*) into i from aso_steam_temp;
1093: aso_debug_pub.add('count: '||i,1,'Y');
1094:
1095: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');
1096: END IF;
1097: DELETE FROM ASO_QUOTE_ACCESSES C

Line 1095: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');

1091: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1092: select count(*) into i from aso_steam_temp;
1093: aso_debug_pub.add('count: '||i,1,'Y');
1094:
1095: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');
1096: END IF;
1097: DELETE FROM ASO_QUOTE_ACCESSES C
1098: WHERE C.resource_id NOT IN
1099: (SELECT A.resource_id

Line 1109: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1105: OR NVL(A.keep_flag,'N') = 'Y')
1106: AND A.Quote_Number = l_qte_header_rec.quote_number)
1107: AND C.Quote_Number = l_qte_header_rec.quote_number;
1108:
1109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1110: select count(*) into i from aso_steam_temp;
1111: aso_debug_pub.add('count: '||i,1,'Y');
1112:
1113: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');

Line 1111: aso_debug_pub.add('count: '||i,1,'Y');

1107: AND C.Quote_Number = l_qte_header_rec.quote_number;
1108:
1109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1110: select count(*) into i from aso_steam_temp;
1111: aso_debug_pub.add('count: '||i,1,'Y');
1112:
1113: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');
1114: END IF;
1115: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);

Line 1113: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');

1109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1110: select count(*) into i from aso_steam_temp;
1111: aso_debug_pub.add('count: '||i,1,'Y');
1112:
1113: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');
1114: END IF;
1115: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);
1116: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
1117: CLOSE C_Get_All_Resource;

Line 1119: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1115: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);
1116: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
1117: CLOSE C_Get_All_Resource;
1118:
1119: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1120: aso_debug_pub.add('Keep_Res_Id.COUNT: '||NVL(Keep_Res_Id.COUNT,0),1,'Y');
1121: END IF;
1122: IF NVL(Keep_Res_Id.COUNT,0) > 0 THEN
1123: FORALL i IN Keep_Res_Id.FIRST..Keep_Res_Id.LAST

Line 1120: aso_debug_pub.add('Keep_Res_Id.COUNT: '||NVL(Keep_Res_Id.COUNT,0),1,'Y');

1116: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
1117: CLOSE C_Get_All_Resource;
1118:
1119: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1120: aso_debug_pub.add('Keep_Res_Id.COUNT: '||NVL(Keep_Res_Id.COUNT,0),1,'Y');
1121: END IF;
1122: IF NVL(Keep_Res_Id.COUNT,0) > 0 THEN
1123: FORALL i IN Keep_Res_Id.FIRST..Keep_Res_Id.LAST
1124: DELETE FROM ASO_STEAM_TEMP

Line 1129: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1125: WHERE Resource_Id = Keep_Res_Id(i);
1126: END IF;
1127: END IF;
1128:
1129: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1130: select count(*) into i from aso_steam_temp;
1131: aso_debug_pub.add('count: '||i,1,'Y');
1132:
1133: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');

Line 1131: aso_debug_pub.add('count: '||i,1,'Y');

1127: END IF;
1128:
1129: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1130: select count(*) into i from aso_steam_temp;
1131: aso_debug_pub.add('count: '||i,1,'Y');
1132:
1133: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');
1134: END IF;
1135: DELETE FROM ASO_STEAM_TEMP

Line 1133: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');

1129: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1130: select count(*) into i from aso_steam_temp;
1131: aso_debug_pub.add('count: '||i,1,'Y');
1132:
1133: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');
1134: END IF;
1135: DELETE FROM ASO_STEAM_TEMP
1136: WHERE Role_Id IS NOT NULL
1137: AND Role_Id NOT IN ( SELECT Role_Id

Line 1141: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1137: AND Role_Id NOT IN ( SELECT Role_Id
1138: FROM JTF_RS_ROLES_B
1139: WHERE Role_Type_Code IN ('TELESALES', 'SALES','FIELDSALES','PRM'));
1140:
1141: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1142: select count(*) into i from aso_steam_temp;
1143: aso_debug_pub.add('count: '||i,1,'Y');
1144:
1145: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');

Line 1143: aso_debug_pub.add('count: '||i,1,'Y');

1139: WHERE Role_Type_Code IN ('TELESALES', 'SALES','FIELDSALES','PRM'));
1140:
1141: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1142: select count(*) into i from aso_steam_temp;
1143: aso_debug_pub.add('count: '||i,1,'Y');
1144:
1145: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');
1146: END IF;
1147: l_dynamic := 'DELETE FROM ASO_STEAM_TEMP '||

Line 1145: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');

1141: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1142: select count(*) into i from aso_steam_temp;
1143: aso_debug_pub.add('count: '||i,1,'Y');
1144:
1145: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');
1146: END IF;
1147: l_dynamic := 'DELETE FROM ASO_STEAM_TEMP '||
1148: 'WHERE rowid NOT IN ( SELECT rowid '||
1149: 'FROM ( SELECT rowid, dense_rank() OVER '||

Line 1158: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1154: 'WHERE Rank_Val = 1 )';
1155:
1156: EXECUTE IMMEDIATE l_dynamic;
1157:
1158: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1159: select count(*) into i from aso_steam_temp;
1160: aso_debug_pub.add('count: '||i,1,'Y');
1161:
1162: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');

Line 1160: aso_debug_pub.add('count: '||i,1,'Y');

1156: EXECUTE IMMEDIATE l_dynamic;
1157:
1158: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1159: select count(*) into i from aso_steam_temp;
1160: aso_debug_pub.add('count: '||i,1,'Y');
1161:
1162: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');
1163: END IF;
1164: DELETE FROM ASO_STEAM_TEMP

Line 1162: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');

1158: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1159: select count(*) into i from aso_steam_temp;
1160: aso_debug_pub.add('count: '||i,1,'Y');
1161:
1162: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');
1163: END IF;
1164: DELETE FROM ASO_STEAM_TEMP
1165: WHERE rowid IN (
1166: SELECT rowid FROM ASO_STEAM_TEMP

Line 1172: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1168: MINUS
1169: SELECT min(rowid) FROM ASO_STEAM_TEMP
1170: GROUP BY Resource_Id);
1171:
1172: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1173: select count(*) into i from aso_steam_temp;
1174: aso_debug_pub.add('count: '||i,1,'Y');
1175:
1176: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');

Line 1174: aso_debug_pub.add('count: '||i,1,'Y');

1170: GROUP BY Resource_Id);
1171:
1172: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1173: select count(*) into i from aso_steam_temp;
1174: aso_debug_pub.add('count: '||i,1,'Y');
1175:
1176: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');
1177: END IF;
1178: INSERT INTO ASO_QUOTE_ACCESSES ( ACCESS_ID,

Line 1176: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');

1172: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1173: select count(*) into i from aso_steam_temp;
1174: aso_debug_pub.add('count: '||i,1,'Y');
1175:
1176: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');
1177: END IF;
1178: INSERT INTO ASO_QUOTE_ACCESSES ( ACCESS_ID,
1179: QUOTE_NUMBER,
1180: RESOURCE_ID,

Line 1210: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1206: and not exists (select 1 from
1207: ASO_QUOTE_ACCESSES where resource_id = ASO_STEAM_TEMP.resource_id
1208: and quote_number = l_Qte_Header_Rec.Quote_Number);
1209:
1210: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1211: aso_debug_pub.add('After Insert into Quote_Accesses ',1,'Y');
1212: END IF;
1213:
1214: IF P_Operation = 'CREATE' THEN

Line 1211: aso_debug_pub.add('After Insert into Quote_Accesses ',1,'Y');

1207: ASO_QUOTE_ACCESSES where resource_id = ASO_STEAM_TEMP.resource_id
1208: and quote_number = l_Qte_Header_Rec.Quote_Number);
1209:
1210: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1211: aso_debug_pub.add('After Insert into Quote_Accesses ',1,'Y');
1212: END IF;
1213:
1214: IF P_Operation = 'CREATE' THEN
1215:

Line 1220: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1216: OPEN C_Get_Creator_Res(G_USER_ID);
1217: FETCH C_Get_Creator_Res INTO l_creator_res;
1218: CLOSE C_Get_Creator_Res;
1219:
1220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1221: aso_debug_pub.add('Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
1222: END IF;
1223:
1224: IF l_creator_res IS NOT NULL THEN

Line 1221: aso_debug_pub.add('Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');

1217: FETCH C_Get_Creator_Res INTO l_creator_res;
1218: CLOSE C_Get_Creator_Res;
1219:
1220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1221: aso_debug_pub.add('Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
1222: END IF;
1223:
1224: IF l_creator_res IS NOT NULL THEN
1225:

Line 1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1225:
1226: OPEN C_Check_Creator_Res(l_Qte_Header_Rec.Quote_Number, l_creator_res);
1227: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
1228: CLOSE C_Check_Creator_Res;
1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');

Line 1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');

1226: OPEN C_Check_Creator_Res(l_Qte_Header_Rec.Quote_Number, l_creator_res);
1227: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
1228: CLOSE C_Check_Creator_Res;
1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
1234: END IF;

Line 1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');

1227: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
1228: CLOSE C_Check_Creator_Res;
1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
1234: END IF;
1235:

Line 1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');

1228: CLOSE C_Check_Creator_Res;
1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
1234: END IF;
1235:
1236: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN

Line 1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');

1229: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1230: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
1231: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
1232: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
1233: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
1234: END IF;
1235:
1236: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
1237: -- Role Defaulting Logic

Line 1239: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1235:
1236: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
1237: -- Role Defaulting Logic
1238:
1239: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1240: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
1241: END IF;
1242:
1243: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 1240: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');

1236: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
1237: -- Role Defaulting Logic
1238:
1239: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1240: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
1241: END IF;
1242:
1243: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1244: p_application_id => 521);

Line 1246: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1242:
1243: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1244: p_application_id => 521);
1245:
1246: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1247: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
1248: END IF;
1249:
1250: if l_obsolete_status = 'T' then

Line 1247: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

1243: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1244: p_application_id => 521);
1245:
1246: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1247: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
1248: END IF;
1249:
1250: if l_obsolete_status = 'T' then
1251:

Line 1256: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1252: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE');
1253:
1254: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1255:
1256: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1257: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1258: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1259: END IF;
1260:

Line 1257: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');

1253:
1254: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1255:
1256: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1257: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1258: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1259: END IF;
1260:
1261: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 1258: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

1254: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1255:
1256: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1257: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1258: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1259: END IF;
1260:
1261: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1262:

Line 1263: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1259: END IF;
1260:
1261: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1262:
1263: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1264: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1265: END IF;
1266:
1267: if l_creator_grp is null then

Line 1264: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

1260:
1261: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1262:
1263: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1264: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1265: END IF;
1266:
1267: if l_creator_grp is null then
1268:

Line 1271: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1267: if l_creator_grp is null then
1268:
1269: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
1270:
1271: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1272: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1273: END IF;
1274:
1275: l_creator_grp := to_number(l_ots_grp_prof);

Line 1272: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

1268:
1269: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
1270:
1271: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1272: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1273: END IF;
1274:
1275: l_creator_grp := to_number(l_ots_grp_prof);
1276:

Line 1277: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1273: END IF;
1274:
1275: l_creator_grp := to_number(l_ots_grp_prof);
1276:
1277: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1278: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1279: END IF;
1280:
1281: end if;

Line 1278: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

1274:
1275: l_creator_grp := to_number(l_ots_grp_prof);
1276:
1277: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1278: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1279: END IF;
1280:
1281: end if;
1282:

Line 1289: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1285: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE_AND_GROUP');
1286:
1287: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1288:
1289: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1290: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1291: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1292: END IF;
1293:

Line 1290: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');

1286:
1287: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1288:
1289: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1290: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1291: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1292: END IF;
1293:
1294: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 1291: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

1287: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1288:
1289: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1290: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
1291: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1292: END IF;
1293:
1294: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1295:

Line 1296: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1292: END IF;
1293:
1294: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1295:
1296: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1297: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1298: END IF;
1299:
1300: if l_creator_grp is null then

Line 1297: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

1293:
1294: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1295:
1296: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1297: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1298: END IF;
1299:
1300: if l_creator_grp is null then
1301:

Line 1304: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1300: if l_creator_grp is null then
1301:
1302: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1303:
1304: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1305: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1306: END IF;
1307:
1308: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 1305: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

1301:
1302: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1303:
1304: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1305: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1306: END IF;
1307:
1308: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1309:

Line 1310: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1306: END IF;
1307:
1308: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1309:
1310: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1311: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1312: END IF;
1313:
1314: end if;

Line 1311: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');

1307:
1308: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1309:
1310: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1311: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1312: END IF;
1313:
1314: end if;
1315:

Line 1320: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1316: end if;
1317:
1318: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
1319:
1320: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1321: aso_debug_pub.add('l_role_prof: ' || l_role_prof, 1, 'N');
1322: END IF;
1323:
1324: OPEN C_Get_Role_From_Code (l_role_prof);

Line 1321: aso_debug_pub.add('l_role_prof: ' || l_role_prof, 1, 'N');

1317:
1318: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
1319:
1320: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1321: aso_debug_pub.add('l_role_prof: ' || l_role_prof, 1, 'N');
1322: END IF;
1323:
1324: OPEN C_Get_Role_From_Code (l_role_prof);
1325: FETCH C_Get_Role_From_Code INTO l_creator_role;

Line 1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1325: FETCH C_Get_Role_From_Code INTO l_creator_role;
1326: CLOSE C_Get_Role_From_Code;
1327:
1328: IF l_creator_role IS NULL THEN
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
1331: END IF;
1332:
1333: OPEN C_Get_Resource_Role (l_creator_res);

Line 1330: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');

1326: CLOSE C_Get_Role_From_Code;
1327:
1328: IF l_creator_role IS NULL THEN
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
1331: END IF;
1332:
1333: OPEN C_Get_Resource_Role (l_creator_res);
1334: FETCH C_Get_Resource_Role INTO l_creator_role;

Line 1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1335: CLOSE C_Get_Resource_Role;
1336:
1337: END IF;
1338:
1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');

Line 1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');

1336:
1337: END IF;
1338:
1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1344: END IF;

Line 1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');

1337: END IF;
1338:
1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1344: END IF;
1345:

Line 1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');

1338:
1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1344: END IF;
1345:
1346: l_sequence := NULL;

Line 1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');

1339: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1340: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1341: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1342: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1343: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1344: END IF;
1345:
1346: l_sequence := NULL;
1347:

Line 1398: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1394: OPEN C_Valid_SalesRep (l_creator_res);
1395: FETCH C_Valid_SalesRep INTO l_valid;
1396: CLOSE C_Valid_SalesRep;
1397:
1398: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1399: aso_debug_pub.add('Creator Valid SalesRep : '||l_valid,1,'Y');
1400: END IF;
1401:
1402: IF l_valid = 'Y' THEN

Line 1399: aso_debug_pub.add('Creator Valid SalesRep : '||l_valid,1,'Y');

1395: FETCH C_Valid_SalesRep INTO l_valid;
1396: CLOSE C_Valid_SalesRep;
1397:
1398: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1399: aso_debug_pub.add('Creator Valid SalesRep : '||l_valid,1,'Y');
1400: END IF;
1401:
1402: IF l_valid = 'Y' THEN
1403: l_primary_salesagent := l_creator_res;

Line 1410: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1406: END IF; -- creator_res is not null
1407:
1408: END IF; -- CREATE
1409:
1410: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1411: aso_debug_pub.add('Before Update_Primary_SalesAgent: ',1,'Y');
1412: END IF;
1413: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
1414: P_Init_Msg_List => FND_API.G_FALSE,

Line 1411: aso_debug_pub.add('Before Update_Primary_SalesAgent: ',1,'Y');

1407:
1408: END IF; -- CREATE
1409:
1410: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1411: aso_debug_pub.add('Before Update_Primary_SalesAgent: ',1,'Y');
1412: END IF;
1413: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
1414: P_Init_Msg_List => FND_API.G_FALSE,
1415: P_Qte_Header_Rec => l_Qte_Header_Rec,

Line 1425: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1421: x_msg_count => x_msg_count,
1422: x_msg_data => x_msg_data
1423: );
1424:
1425: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1426: aso_debug_pub.add('After Update_Primary_SalesInfo: '||x_return_status,1,'Y');
1427: END IF;
1428:
1429: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 1426: aso_debug_pub.add('After Update_Primary_SalesInfo: '||x_return_status,1,'Y');

1422: x_msg_data => x_msg_data
1423: );
1424:
1425: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1426: aso_debug_pub.add('After Update_Primary_SalesInfo: '||x_return_status,1,'Y');
1427: END IF;
1428:
1429: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1430: RAISE FND_API.G_EXC_ERROR;

Line 1441: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1437: -- Release 12 TAP Changes
1438: -- Girish Sachdeva 8/30/2005
1439: -- Adding the call to insert record in the ASO_CHANGED_QUOTES
1440:
1441: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1442: aso_debug_pub.add('ASO_SALES_TEAM_PVT.Assign_Sales_Team : Calling ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES, quote number : ' || l_Qte_Header_Rec.Quote_Number, 1, 'Y');
1443: END IF;
1444:
1445: -- Call to insert record in ASO_CHANGED_QUOTES

Line 1442: aso_debug_pub.add('ASO_SALES_TEAM_PVT.Assign_Sales_Team : Calling ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES, quote number : ' || l_Qte_Header_Rec.Quote_Number, 1, 'Y');

1438: -- Girish Sachdeva 8/30/2005
1439: -- Adding the call to insert record in the ASO_CHANGED_QUOTES
1440:
1441: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1442: aso_debug_pub.add('ASO_SALES_TEAM_PVT.Assign_Sales_Team : Calling ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES, quote number : ' || l_Qte_Header_Rec.Quote_Number, 1, 'Y');
1443: END IF;
1444:
1445: -- Call to insert record in ASO_CHANGED_QUOTES
1446: ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES(l_Qte_Header_Rec.Quote_Number);

Line 1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1619: lp_gen_bulk_rec.SQUAL_NUM10(1) := null;
1620: lp_gen_bulk_rec.SQUAL_NUM50(1) := P_qte_header_rec.quote_header_id;
1621: -- End: Instantiate input rec
1622:
1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

Line 1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');

1620: lp_gen_bulk_rec.SQUAL_NUM50(1) := P_qte_header_rec.quote_header_id;
1621: -- End: Instantiate input rec
1622:
1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');

Line 1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');

1621: -- End: Instantiate input rec
1622:
1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');

Line 1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');

1622:
1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');

Line 1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

1623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');

Line 1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');

1624: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');

Line 1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');

1625: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');

Line 1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');

1626: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');

Line 1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');

1627: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');

Line 1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');

1628: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');

Line 1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');

1629: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');

Line 1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');

1630: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');

Line 1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');

1631: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1639:

Line 1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');

1632: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1639:
1640: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');

Line 1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');

1633: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1639:
1640: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1641: END IF;

Line 1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');

1634: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1635: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1639:
1640: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1641: END IF;
1642:

Line 1640: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');

1636: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1637: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1638: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1639:
1640: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1641: END IF;
1642:
1643: -- Call the JTF Terr Assignment API
1644: JTF_TERR_ASSIGN_PUB.get_winners

Line 1665: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1661:
1662: x_winners_rec => x_winners_rec
1663: );
1664:
1665: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1666: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP

Line 1666: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');

1662: x_winners_rec => x_winners_rec
1663: );
1664:
1665: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1666: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');

Line 1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');

1663: );
1664:
1665: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1666: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');

Line 1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');

1666: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');

Line 1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');

1667: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');

Line 1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');

1668: IF x_winners_rec.Resource_Id.count > 0 THEN
1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1676: END LOOP;

Line 1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');

1669: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1676: END LOOP;
1677: END IF;

Line 1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');

1670: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1676: END LOOP;
1677: END IF;
1678: END IF;

Line 1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');

1671: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1672: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1673: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1674: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1675: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1676: END LOOP;
1677: END IF;
1678: END IF;
1679:

Line 1752: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS',1,'Y');

1748: l_group_id num_list;
1749: l_person_id num_list;
1750:
1751: BEGIN
1752: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS',1,'Y');
1753:
1754: x_return_status := FND_API.G_RET_STS_SUCCESS;
1755: -- l_resource_type := 'RS_TEAM';
1756: /* Get resources within a resource team */

Line 1763: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_id(l_index) ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');

1759: because JTA returns RS_EMPLOYEE AND NOT EMPLOYEE
1760: **/
1761: IF p_WinningTerrMember_tbl.resource_id.COUNT > 0 THEN
1762: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP
1763: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_id(l_index) ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');
1764: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_type(l_index) ' || p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
1765: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_name(l_index) ' || p_WinningTerrMember_tbl.resource_name(l_index),1,'Y');
1766: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.group_ide(l_index) ' || p_WinningTerrMember_tbl.group_id(l_index),1,'Y');
1767: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_GROUP' THEN

Line 1764: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_type(l_index) ' || p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');

1760: **/
1761: IF p_WinningTerrMember_tbl.resource_id.COUNT > 0 THEN
1762: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP
1763: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_id(l_index) ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');
1764: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_type(l_index) ' || p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
1765: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_name(l_index) ' || p_WinningTerrMember_tbl.resource_name(l_index),1,'Y');
1766: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.group_ide(l_index) ' || p_WinningTerrMember_tbl.group_id(l_index),1,'Y');
1767: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_GROUP' THEN
1768: SELECT resource_id, group_id,person_id

Line 1765: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_name(l_index) ' || p_WinningTerrMember_tbl.resource_name(l_index),1,'Y');

1761: IF p_WinningTerrMember_tbl.resource_id.COUNT > 0 THEN
1762: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP
1763: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_id(l_index) ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');
1764: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_type(l_index) ' || p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
1765: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_name(l_index) ' || p_WinningTerrMember_tbl.resource_name(l_index),1,'Y');
1766: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.group_ide(l_index) ' || p_WinningTerrMember_tbl.group_id(l_index),1,'Y');
1767: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_GROUP' THEN
1768: SELECT resource_id, group_id,person_id
1769: BULK COLLECT INTO l_resource_id, l_group_id,l_person_id

Line 1766: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.group_ide(l_index) ' || p_WinningTerrMember_tbl.group_id(l_index),1,'Y');

1762: FOR l_index IN p_WinningTerrMember_tbl.resource_id.FIRST..p_WinningTerrMember_tbl.resource_id.LAST LOOP
1763: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_id(l_index) ' || p_WinningTerrMember_tbl.resource_id(l_index),1,'Y');
1764: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_type(l_index) ' || p_WinningTerrMember_tbl.resource_type(l_index),1,'Y');
1765: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.resource_name(l_index) ' || p_WinningTerrMember_tbl.resource_name(l_index),1,'Y');
1766: aso_debug_pub.add('Proc EXPLODE_GROUPS_ACCOUNTS p_WinningTerrMember_tbl.group_ide(l_index) ' || p_WinningTerrMember_tbl.group_id(l_index),1,'Y');
1767: IF p_WinningTerrMember_tbl.resource_type(l_index) = 'RS_GROUP' THEN
1768: SELECT resource_id, group_id,person_id
1769: BULK COLLECT INTO l_resource_id, l_group_id,l_person_id
1770: FROM

Line 1835: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS ',1,'Y');

1831:
1832: END IF; /* if p_WinningTerrMember_tbl.resource_id.COUNT > 0 */
1833: EXCEPTION
1834: WHEN OTHERS THEN
1835: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS ',1,'Y');
1836:
1837: x_errbuf := SQLERRM;
1838: x_retcode := SQLCODE;
1839: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1840: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_errbuf,1,'Y');

1836:
1837: x_errbuf := SQLERRM;
1838: x_retcode := SQLCODE;
1839: x_return_status := FND_API.G_RET_STS_ERROR;
1840: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_errbuf,1,'Y');
1841: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_retcode,1,'Y');
1842: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_return_status,1,'Y');
1843: END EXPLODE_GROUPS_ACCOUNTS;
1844:

Line 1841: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_retcode,1,'Y');

1837: x_errbuf := SQLERRM;
1838: x_retcode := SQLCODE;
1839: x_return_status := FND_API.G_RET_STS_ERROR;
1840: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_errbuf,1,'Y');
1841: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_retcode,1,'Y');
1842: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_return_status,1,'Y');
1843: END EXPLODE_GROUPS_ACCOUNTS;
1844:
1845: PROCEDURE Get_Sales_Team(

Line 1842: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_return_status,1,'Y');

1838: x_retcode := SQLCODE;
1839: x_return_status := FND_API.G_RET_STS_ERROR;
1840: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_errbuf,1,'Y');
1841: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_retcode,1,'Y');
1842: aso_debug_pub.add('exception in EXPLODE_GROUPS_ACCOUNTS '||x_return_status,1,'Y');
1843: END EXPLODE_GROUPS_ACCOUNTS;
1844:
1845: PROCEDURE Get_Sales_Team(
1846: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,

Line 1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1871: lp_bulk_trans_id.trans_object_id4 := jtf_terr_number_list(null);
1872: lp_bulk_trans_id.trans_object_id5 := jtf_terr_number_list(null);
1873: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1874:
1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

Line 1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');

1872: lp_bulk_trans_id.trans_object_id5 := jtf_terr_number_list(null);
1873: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1874:
1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');

Line 1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');

1873: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1874:
1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1881: aso_utility_pvt.print_login_info();

Line 1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');

1874:
1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1881: aso_utility_pvt.print_login_info();
1882: END IF;

Line 1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

1875: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1881: aso_utility_pvt.print_login_info();
1882: END IF;
1883:

Line 1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');

1876: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1877: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1878: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1879: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1880: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1881: aso_utility_pvt.print_login_info();
1882: END IF;
1883:
1884: -- Call the new JTF Terr Assignment API

Line 1902: IF aso_debug_pub.g_debug_flag = 'Y' THEN

1898: X_msg_count => x_msg_count,
1899: X_msg_data => x_msg_data,
1900: X_winners_rec => X_Winners_Rec
1901: );
1902: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1903: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1904: aso_utility_pvt.print_login_info();
1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN

Line 1903: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');

1899: X_msg_data => x_msg_data,
1900: X_winners_rec => X_Winners_Rec
1901: );
1902: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1903: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1904: aso_utility_pvt.print_login_info();
1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP

Line 1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');

1901: );
1902: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1903: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1904: aso_utility_pvt.print_login_info();
1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');

Line 1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');

1904: aso_utility_pvt.print_login_info();
1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');

Line 1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');

1905: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');

Line 1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');

1906: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1914: END LOOP;

Line 1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');

1907: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1914: END LOOP;
1915: EXPLODE_GROUPS_ACCOUNTS(

Line 1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');

1908: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1914: END LOOP;
1915: EXPLODE_GROUPS_ACCOUNTS(
1916: x_errbuf => l_errbuf,

Line 1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');

1909: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1910: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1911: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1912: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1913: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1914: END LOOP;
1915: EXPLODE_GROUPS_ACCOUNTS(
1916: x_errbuf => l_errbuf,
1917: x_retcode => l_retcode,

Line 2100: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2096: l_primary_salesagent := p_primary_salesagent;
2097: l_primary_res_grp := p_primary_salesgrp;
2098: x_qte_header_rec := p_qte_header_rec;
2099:
2100: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2101: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_salesagent,1,'N');
2102: END IF;
2103:
2104: IF l_primary_salesagent IS NULL THEN

Line 2101: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_salesagent,1,'N');

2097: l_primary_res_grp := p_primary_salesgrp;
2098: x_qte_header_rec := p_qte_header_rec;
2099:
2100: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2101: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_salesagent,1,'N');
2102: END IF;
2103:
2104: IF l_primary_salesagent IS NULL THEN
2105: IF p_reassign_flag = 'Y' THEN

Line 2115: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2111: OPEN C_Primary_Res_Kept(l_Primary_res, P_qte_header_rec.Quote_Number);
2112: FETCH C_Primary_Res_Kept INTO l_primary_res_kept;
2113: CLOSE C_Primary_Res_Kept;
2114:
2115: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2116: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
2117: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
2118: END IF;
2119:

Line 2116: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');

2112: FETCH C_Primary_Res_Kept INTO l_primary_res_kept;
2113: CLOSE C_Primary_Res_Kept;
2114:
2115: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2116: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
2117: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
2118: END IF;
2119:
2120: IF l_primary_res_kept = 'Y' THEN

Line 2117: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');

2113: CLOSE C_Primary_Res_Kept;
2114:
2115: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2116: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
2117: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
2118: END IF;
2119:
2120: IF l_primary_res_kept = 'Y' THEN
2121: l_primary_salesagent := l_primary_res;

Line 2132: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2128:
2129: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2130: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp, l_primary_role;
2131: CLOSE C_Valid_Salesagent;
2132: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2133: aso_debug_pub.add('Assign_Sales_Team: Valid Salesagent: '||l_primary_salesagent,1,'N');
2134: END IF;
2135:
2136: IF l_primary_salesagent IS NOT NULL THEN

Line 2133: aso_debug_pub.add('Assign_Sales_Team: Valid Salesagent: '||l_primary_salesagent,1,'N');

2129: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2130: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp, l_primary_role;
2131: CLOSE C_Valid_Salesagent;
2132: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2133: aso_debug_pub.add('Assign_Sales_Team: Valid Salesagent: '||l_primary_salesagent,1,'N');
2134: END IF;
2135:
2136: IF l_primary_salesagent IS NOT NULL THEN
2137: l_primary_res_kept := 'Y';

Line 2148: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2144:
2145: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
2146: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2147: CLOSE C_Get_Res_From_Srep;
2148: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2149: aso_debug_pub.add('Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
2150: END IF;
2151: ELSE
2152: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2149: aso_debug_pub.add('Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');

2145: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
2146: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2147: CLOSE C_Get_Res_From_Srep;
2148: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2149: aso_debug_pub.add('Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
2150: END IF;
2151: ELSE
2152: x_return_status := FND_API.G_RET_STS_ERROR;
2153: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

Line 2167: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2163: END IF; -- salesrep_prof
2164:
2165: l_primary_role := l_default_role_prof;
2166:
2167: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2168: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2169: END IF;
2170:
2171: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 2168: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');

2164:
2165: l_primary_role := l_default_role_prof;
2166:
2167: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2168: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2169: END IF;
2170:
2171: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2172: p_application_id => 521);

Line 2174: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2170:
2171: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2172: p_application_id => 521);
2173:
2174: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2175: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2176: END IF;
2177:
2178: if l_obsolete_status = 'T' then

Line 2175: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

2171: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2172: p_application_id => 521);
2173:
2174: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2175: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2176: END IF;
2177:
2178: if l_obsolete_status = 'T' then
2179:

Line 2182: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2178: if l_obsolete_status = 'T' then
2179:
2180: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2181:
2182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2183: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2184: END IF;
2185:
2186: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2183: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2179:
2180: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2181:
2182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2183: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2184: END IF;
2185:
2186: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2187:

Line 2188: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2184: END IF;
2185:
2186: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2187:
2188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2189: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2190: END IF;
2191:
2192: if l_primary_res_grp is null then

Line 2189: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2185:
2186: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2187:
2188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2189: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2190: END IF;
2191:
2192: if l_primary_res_grp is null then
2193:

Line 2196: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2192: if l_primary_res_grp is null then
2193:
2194: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2195:
2196: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2197: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2198: END IF;
2199:
2200: l_primary_res_grp := to_number(l_ots_grp_prof);

Line 2197: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2193:
2194: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2195:
2196: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2197: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2198: END IF;
2199:
2200: l_primary_res_grp := to_number(l_ots_grp_prof);
2201:

Line 2202: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2198: END IF;
2199:
2200: l_primary_res_grp := to_number(l_ots_grp_prof);
2201:
2202: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2203: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2204: END IF;
2205:
2206: end if;

Line 2203: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2199:
2200: l_primary_res_grp := to_number(l_ots_grp_prof);
2201:
2202: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2203: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2204: END IF;
2205:
2206: end if;
2207:

Line 2212: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2208: else
2209:
2210: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2211:
2212: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2213: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2214: END IF;
2215:
2216: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2213: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2209:
2210: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2211:
2212: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2213: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2214: END IF;
2215:
2216: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2217:

Line 2218: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2214: END IF;
2215:
2216: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2217:
2218: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2219: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2220: END IF;
2221:
2222: if l_primary_res_grp is null then

Line 2219: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2215:
2216: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2217:
2218: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2219: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2220: END IF;
2221:
2222: if l_primary_res_grp is null then
2223:

Line 2226: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2222: if l_primary_res_grp is null then
2223:
2224: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2225:
2226: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2227: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2228: END IF;
2229:
2230: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 2227: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2223:
2224: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2225:
2226: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2227: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2228: END IF;
2229:
2230: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2231:

Line 2232: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2228: END IF;
2229:
2230: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2231:
2232: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2233: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2234: END IF;
2235:
2236: end if;

Line 2233: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2229:
2230: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2231:
2232: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2233: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2234: END IF;
2235:
2236: end if;
2237:

Line 2240: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2236: end if;
2237:
2238: end if;
2239:
2240: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2241: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
2242: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
2243: END IF;
2244:

Line 2241: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');

2237:
2238: end if;
2239:
2240: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2241: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
2242: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
2243: END IF;
2244:
2245: END IF; -- salesagent is NULL

Line 2242: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');

2238: end if;
2239:
2240: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2241: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
2242: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
2243: END IF;
2244:
2245: END IF; -- salesagent is NULL
2246:

Line 2252: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2248: OPEN C_Get_Resource_Role (l_primary_salesagent);
2249: FETCH C_Get_Resource_Role INTO l_primary_role;
2250: CLOSE C_Get_Resource_Role;
2251:
2252: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2253: aso_debug_pub.add('Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
2254: END IF;
2255: END IF;
2256:

Line 2253: aso_debug_pub.add('Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');

2249: FETCH C_Get_Resource_Role INTO l_primary_role;
2250: CLOSE C_Get_Resource_Role;
2251:
2252: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2253: aso_debug_pub.add('Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
2254: END IF;
2255: END IF;
2256:
2257:

Line 2258: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2254: END IF;
2255: END IF;
2256:
2257:
2258: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2259: aso_debug_pub.add('Assign_Sales_Team: l_primary_res_kept: '||l_primary_res_kept,1,'N');
2260: END IF;
2261:
2262: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN

Line 2259: aso_debug_pub.add('Assign_Sales_Team: l_primary_res_kept: '||l_primary_res_kept,1,'N');

2255: END IF;
2256:
2257:
2258: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2259: aso_debug_pub.add('Assign_Sales_Team: l_primary_res_kept: '||l_primary_res_kept,1,'N');
2260: END IF;
2261:
2262: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
2263:

Line 2264: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2260: END IF;
2261:
2262: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
2263:
2264: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2265: aso_debug_pub.add('Assign_Sales_Team: Before primary salesagent insert: ',1,'N');
2266: END IF;
2267: l_sequence := NULL;
2268:

Line 2265: aso_debug_pub.add('Assign_Sales_Team: Before primary salesagent insert: ',1,'N');

2261:
2262: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
2263:
2264: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2265: aso_debug_pub.add('Assign_Sales_Team: Before primary salesagent insert: ',1,'N');
2266: END IF;
2267: l_sequence := NULL;
2268:
2269: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

Line 2315: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2311: );
2312: END IF; -- primary_res_kept <> Y
2313: END IF; -- primary_res_kept <> Y
2314: END IF;
2315: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2316: aso_debug_pub.add('Assign_Sales_Team: Update primary salesagent in Hdr ',1,'N');
2317: END IF;
2318: UPDATE ASO_QUOTE_HEADERS_ALL
2319: SET Resource_Id = l_primary_salesagent,

Line 2316: aso_debug_pub.add('Assign_Sales_Team: Update primary salesagent in Hdr ',1,'N');

2312: END IF; -- primary_res_kept <> Y
2313: END IF; -- primary_res_kept <> Y
2314: END IF;
2315: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2316: aso_debug_pub.add('Assign_Sales_Team: Update primary salesagent in Hdr ',1,'N');
2317: END IF;
2318: UPDATE ASO_QUOTE_HEADERS_ALL
2319: SET Resource_Id = l_primary_salesagent,
2320: Resource_Grp_Id = l_primary_res_grp,

Line 2501: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');

2497: */
2498: --Commented Code End Yogeshwar (MOAC)
2499: BEGIN
2500:
2501: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2502:
2503: -- Standard Start of API savepoint
2504: SAVEPOINT OPP_QUOTE_PRIMARY_SALESREP_PVT;
2505:

Line 2528: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2524:
2525: --
2526: -- API body
2527: --
2528: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2529: aso_debug_pub.add('Begin Opp_Quote_Primary_SalesRep',1,'Y');
2530: END IF;
2531:
2532: x_qte_header_rec := p_qte_header_rec;

Line 2529: aso_debug_pub.add('Begin Opp_Quote_Primary_SalesRep',1,'Y');

2525: --
2526: -- API body
2527: --
2528: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2529: aso_debug_pub.add('Begin Opp_Quote_Primary_SalesRep',1,'Y');
2530: END IF;
2531:
2532: x_qte_header_rec := p_qte_header_rec;
2533:

Line 2538: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2534: OPEN C_Get_Creator_Res(G_USER_ID);
2535: FETCH C_Get_Creator_Res INTO l_creator_res;
2536: CLOSE C_Get_Creator_Res;
2537:
2538: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2539: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
2540: END IF;
2541:
2542: IF l_creator_res IS NOT NULL THEN

Line 2539: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');

2535: FETCH C_Get_Creator_Res INTO l_creator_res;
2536: CLOSE C_Get_Creator_Res;
2537:
2538: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2539: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
2540: END IF;
2541:
2542: IF l_creator_res IS NOT NULL THEN
2543:

Line 2548: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2544: OPEN C_Valid_SalesRep (l_creator_res);
2545: FETCH C_Valid_SalesRep INTO l_valid;
2546: CLOSE C_Valid_SalesRep;
2547:
2548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2549: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2550: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2551: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2552: END IF;

Line 2549: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');

2545: FETCH C_Valid_SalesRep INTO l_valid;
2546: CLOSE C_Valid_SalesRep;
2547:
2548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2549: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2550: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2551: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2552: END IF;
2553:

Line 2550: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');

2546: CLOSE C_Valid_SalesRep;
2547:
2548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2549: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2550: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2551: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2552: END IF;
2553:
2554: IF l_valid = 'Y' THEN

Line 2551: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');

2547:
2548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2549: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2550: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2551: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2552: END IF;
2553:
2554: IF l_valid = 'Y' THEN
2555:

Line 2561: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2557:
2558: OPEN C_Check_Creator_Res(P_Qte_Header_Rec.Quote_Number, l_creator_res);
2559: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2560: CLOSE C_Check_Creator_Res;
2561: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2562: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2563: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2564: END IF;
2565:

Line 2562: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');

2558: OPEN C_Check_Creator_Res(P_Qte_Header_Rec.Quote_Number, l_creator_res);
2559: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2560: CLOSE C_Check_Creator_Res;
2561: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2562: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2563: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2564: END IF;
2565:
2566: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN

Line 2563: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');

2559: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2560: CLOSE C_Check_Creator_Res;
2561: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2562: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2563: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2564: END IF;
2565:
2566: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
2567: -- Role Defaulting Logic

Line 2575: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2571: FETCH C_Get_Role_From_Code INTO l_primary_role;
2572: CLOSE C_Get_Role_From_Code;
2573:
2574: IF l_primary_role IS NULL THEN
2575: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2576: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_primary_role,1,'N');
2577: END IF;
2578:
2579: OPEN C_Get_Resource_Role (l_creator_res);

Line 2576: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_primary_role,1,'N');

2572: CLOSE C_Get_Role_From_Code;
2573:
2574: IF l_primary_role IS NULL THEN
2575: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2576: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_primary_role,1,'N');
2577: END IF;
2578:
2579: OPEN C_Get_Resource_Role (l_creator_res);
2580: FETCH C_Get_Resource_Role INTO l_primary_role;

Line 2586: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2582:
2583: END IF;
2584:
2585:
2586: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2587: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2588: END IF;
2589:
2590: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 2587: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');

2583: END IF;
2584:
2585:
2586: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2587: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2588: END IF;
2589:
2590: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2591: p_application_id => 521);

Line 2593: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2589:
2590: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2591: p_application_id => 521);
2592:
2593: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2594: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2595: END IF;
2596:
2597: if l_obsolete_status = 'T' then

Line 2594: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

2590: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2591: p_application_id => 521);
2592:
2593: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2594: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2595: END IF;
2596:
2597: if l_obsolete_status = 'T' then
2598:

Line 2601: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2597: if l_obsolete_status = 'T' then
2598:
2599: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2600:
2601: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2602: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2603: END IF;
2604:
2605: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2602: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2598:
2599: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2600:
2601: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2602: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2603: END IF;
2604:
2605: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2606:

Line 2607: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2603: END IF;
2604:
2605: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2606:
2607: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2608: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2609: END IF;
2610:
2611: if l_primary_res_grp is null then

Line 2608: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2604:
2605: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2606:
2607: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2608: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2609: END IF;
2610:
2611: if l_primary_res_grp is null then
2612:

Line 2615: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2611: if l_primary_res_grp is null then
2612:
2613: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2614:
2615: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2616: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2617: END IF;
2618:
2619: l_primary_res_grp := to_number(l_ots_grp_prof);

Line 2616: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2612:
2613: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2614:
2615: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2616: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2617: END IF;
2618:
2619: l_primary_res_grp := to_number(l_ots_grp_prof);
2620:

Line 2621: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2617: END IF;
2618:
2619: l_primary_res_grp := to_number(l_ots_grp_prof);
2620:
2621: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2622: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2623: END IF;
2624:
2625: end if;

Line 2622: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2618:
2619: l_primary_res_grp := to_number(l_ots_grp_prof);
2620:
2621: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2622: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2623: END IF;
2624:
2625: end if;
2626:

Line 2631: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2627: else
2628:
2629: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2630:
2631: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2632: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2633: END IF;
2634:
2635: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2632: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2628:
2629: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2630:
2631: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2632: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2633: END IF;
2634:
2635: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2636:

Line 2637: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2633: END IF;
2634:
2635: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2636:
2637: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2638: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2639: END IF;
2640:
2641: if l_primary_res_grp is null then

Line 2638: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2634:
2635: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2636:
2637: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2638: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2639: END IF;
2640:
2641: if l_primary_res_grp is null then
2642:

Line 2645: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2641: if l_primary_res_grp is null then
2642:
2643: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2644:
2645: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2646: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2647: END IF;
2648:
2649: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 2646: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2642:
2643: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2644:
2645: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2646: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2647: END IF;
2648:
2649: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2650:

Line 2651: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2647: END IF;
2648:
2649: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2650:
2651: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2652: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2653: END IF;
2654:
2655: end if;

Line 2652: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2648:
2649: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2650:
2651: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2652: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2653: END IF;
2654:
2655: end if;
2656:

Line 2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2655: end if;
2656:
2657: end if;
2658:
2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');

Line 2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');

2656:
2657: end if;
2658:
2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2664: END IF;

Line 2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');

2657: end if;
2658:
2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2664: END IF;
2665:

Line 2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');

2658:
2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2664: END IF;
2665:
2666: l_sequence := NULL;

Line 2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');

2659: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2660: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2661: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2662: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2663: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2664: END IF;
2665:
2666: l_sequence := NULL;
2667:

Line 2723: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2719:
2720: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2721: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp;
2722: CLOSE C_Valid_Salesagent;
2723: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2724: aso_debug_pub.add('Opp_Qte_PS: Valid Salesagent: '||l_primary_salesagent,1,'N');
2725: END IF;
2726: END IF;
2727:

Line 2724: aso_debug_pub.add('Opp_Qte_PS: Valid Salesagent: '||l_primary_salesagent,1,'N');

2720: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2721: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp;
2722: CLOSE C_Valid_Salesagent;
2723: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2724: aso_debug_pub.add('Opp_Qte_PS: Valid Salesagent: '||l_primary_salesagent,1,'N');
2725: END IF;
2726: END IF;
2727:
2728: IF l_primary_salesagent IS NULL THEN

Line 2735: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2731: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
2732: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2733: CLOSE C_Get_Res_From_Srep;
2734:
2735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2736: aso_debug_pub.add('Opp_Qte_PS: Default SalesRep: '||l_primary_salesagent,1,'N');
2737: END IF;
2738: ELSE
2739: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2736: aso_debug_pub.add('Opp_Qte_PS: Default SalesRep: '||l_primary_salesagent,1,'N');

2732: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2733: CLOSE C_Get_Res_From_Srep;
2734:
2735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2736: aso_debug_pub.add('Opp_Qte_PS: Default SalesRep: '||l_primary_salesagent,1,'N');
2737: END IF;
2738: ELSE
2739: x_return_status := FND_API.G_RET_STS_ERROR;
2740: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

Line 2755: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2751: END IF; -- salesrep_prof
2752:
2753: l_primary_role := l_default_role_prof;
2754:
2755: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2756: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2757: END IF;
2758:
2759: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

Line 2756: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');

2752:
2753: l_primary_role := l_default_role_prof;
2754:
2755: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2756: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2757: END IF;
2758:
2759: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2760: p_application_id => 521);

Line 2762: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2758:
2759: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2760: p_application_id => 521);
2761:
2762: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2763: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2764: END IF;
2765:
2766: if l_obsolete_status = 'T' then

Line 2763: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');

2759: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2760: p_application_id => 521);
2761:
2762: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2763: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2764: END IF;
2765:
2766: if l_obsolete_status = 'T' then
2767:

Line 2770: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2766: if l_obsolete_status = 'T' then
2767:
2768: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2769:
2770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2771: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2772: END IF;
2773:
2774: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2771: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2767:
2768: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2769:
2770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2771: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2772: END IF;
2773:
2774: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2775:

Line 2776: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2772: END IF;
2773:
2774: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2775:
2776: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2777: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2778: END IF;
2779:
2780: if l_primary_res_grp is null then

Line 2777: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2773:
2774: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2775:
2776: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2777: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2778: END IF;
2779:
2780: if l_primary_res_grp is null then
2781:

Line 2784: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2780: if l_primary_res_grp is null then
2781:
2782: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2783:
2784: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2785: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2786: END IF;
2787:
2788: l_primary_res_grp := to_number(l_ots_grp_prof);

Line 2785: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2781:
2782: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2783:
2784: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2785: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2786: END IF;
2787:
2788: l_primary_res_grp := to_number(l_ots_grp_prof);
2789:

Line 2790: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2786: END IF;
2787:
2788: l_primary_res_grp := to_number(l_ots_grp_prof);
2789:
2790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2791: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2792: END IF;
2793:
2794: end if;

Line 2791: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2787:
2788: l_primary_res_grp := to_number(l_ots_grp_prof);
2789:
2790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2791: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2792: END IF;
2793:
2794: end if;
2795:

Line 2800: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2796: else
2797:
2798: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2799:
2800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2801: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2802: END IF;
2803:
2804: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

Line 2801: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2797:
2798: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2799:
2800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2801: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2802: END IF;
2803:
2804: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2805:

Line 2806: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2802: END IF;
2803:
2804: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2805:
2806: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2807: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2808: END IF;
2809:
2810: if l_primary_res_grp is null then

Line 2807: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2803:
2804: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2805:
2806: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2807: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2808: END IF;
2809:
2810: if l_primary_res_grp is null then
2811:

Line 2814: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2810: if l_primary_res_grp is null then
2811:
2812: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2813:
2814: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2815: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2816: END IF;
2817:
2818: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

Line 2815: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');

2811:
2812: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2813:
2814: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2815: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2816: END IF;
2817:
2818: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2819:

Line 2820: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2816: END IF;
2817:
2818: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2819:
2820: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2821: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2822: END IF;
2823:
2824: end if;

Line 2821: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');

2817:
2818: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2819:
2820: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2821: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2822: END IF;
2823:
2824: end if;
2825:

Line 2828: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2824: end if;
2825:
2826: end if;
2827:
2828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2829: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2830: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2831: END IF;
2832:

Line 2829: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');

2825:
2826: end if;
2827:
2828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2829: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2830: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2831: END IF;
2832:
2833: IF l_primary_role IS NULL THEN

Line 2830: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');

2826: end if;
2827:
2828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2829: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2830: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2831: END IF;
2832:
2833: IF l_primary_role IS NULL THEN
2834: OPEN C_Get_Resource_Role (l_primary_salesagent);

Line 2837: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2833: IF l_primary_role IS NULL THEN
2834: OPEN C_Get_Resource_Role (l_primary_salesagent);
2835: FETCH C_Get_Resource_Role INTO l_primary_role;
2836: CLOSE C_Get_Resource_Role;
2837: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2838: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2839: END IF;
2840: END IF;
2841:

Line 2838: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');

2834: OPEN C_Get_Resource_Role (l_primary_salesagent);
2835: FETCH C_Get_Resource_Role INTO l_primary_role;
2836: CLOSE C_Get_Resource_Role;
2837: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2838: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2839: END IF;
2840: END IF;
2841:
2842: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2842: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2838: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2839: END IF;
2840: END IF;
2841:
2842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2843: aso_debug_pub.add('Opp_Qte_PS: Before primary salesagent insert: ',1,'N');
2844: END IF;
2845: l_sequence := NULL;
2846:

Line 2843: aso_debug_pub.add('Opp_Qte_PS: Before primary salesagent insert: ',1,'N');

2839: END IF;
2840: END IF;
2841:
2842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2843: aso_debug_pub.add('Opp_Qte_PS: Before primary salesagent insert: ',1,'N');
2844: END IF;
2845: l_sequence := NULL;
2846:
2847: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

Line 2893: IF aso_debug_pub.g_debug_flag = 'Y' THEN

2889: );
2890:
2891: END IF;
2892:
2893: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2894: aso_debug_pub.add('Opp_Qte_PS: Update primary salesagent in Hdr ',1,'N');
2895: END IF;
2896: UPDATE ASO_QUOTE_HEADERS_ALL
2897: SET Resource_Id = l_primary_salesagent,

Line 2894: aso_debug_pub.add('Opp_Qte_PS: Update primary salesagent in Hdr ',1,'N');

2890:
2891: END IF;
2892:
2893: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2894: aso_debug_pub.add('Opp_Qte_PS: Update primary salesagent in Hdr ',1,'N');
2895: END IF;
2896: UPDATE ASO_QUOTE_HEADERS_ALL
2897: SET Resource_Id = l_primary_salesagent,
2898: Resource_Grp_Id = l_primary_res_grp,