DBA Data[Home] [Help]

APPS.PV_ASSIGN_UTIL_PVT dependencies on FND_MSG_PUB

Line 106: fnd_msg_pub.initialize;

102:
103: -- Initialize message list if p_init_msg_list is set to TRUE.
104: IF FND_API.to_Boolean( p_init_msg_list )
105: THEN
106: fnd_msg_pub.initialize;
107: END IF;
108:
109: -- Debug Message
110: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 110: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

106: fnd_msg_pub.initialize;
107: END IF;
108:
109: -- Debug Message
110: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
111: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
112: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
113: fnd_msg_pub.Add;
114: END IF;

Line 113: fnd_msg_pub.Add;

109: -- Debug Message
110: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
111: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
112: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
113: fnd_msg_pub.Add;
114: END IF;
115:
116: x_return_status := FND_API.G_RET_STS_SUCCESS ;
117:

Line 152: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

148: COMMIT WORK;
149: END IF;
150:
151: -- Standard call to get message count and if count is 1, get message info.
152: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
153: p_count => x_msg_count,
154: p_data => x_msg_data);
155: EXCEPTION
156:

Line 160: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

156:
157: WHEN FND_API.G_EXC_ERROR THEN
158:
159: x_return_status := FND_API.G_RET_STS_ERROR ;
160: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
161: p_count => x_msg_count,
162: p_data => x_msg_data);
163:
164: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 167: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

163:
164: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
165:
166: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
167: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
168: p_count => x_msg_count,
169: p_data => x_msg_data);
170:
171: WHEN OTHERS THEN

Line 174: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

170:
171: WHEN OTHERS THEN
172:
173: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
174: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
175: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
176: p_count => x_msg_count,
177: p_data => x_msg_data);
178:

Line 175: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

171: WHEN OTHERS THEN
172:
173: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
174: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
175: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
176: p_count => x_msg_count,
177: p_data => x_msg_data);
178:
179: END;

Line 218: fnd_msg_pub.initialize;

214:
215: -- Initialize message list if p_init_msg_list is set to TRUE.
216: IF FND_API.to_Boolean( p_init_msg_list )
217: THEN
218: fnd_msg_pub.initialize;
219: END IF;
220:
221: -- Debug Message
222: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 222: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

218: fnd_msg_pub.initialize;
219: END IF;
220:
221: -- Debug Message
222: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
223: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
224: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
225: fnd_msg_pub.Add;
226: END IF;

Line 225: fnd_msg_pub.Add;

221: -- Debug Message
222: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
223: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
224: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
225: fnd_msg_pub.Add;
226: END IF;
227:
228: x_return_status := FND_API.G_RET_STS_SUCCESS ;
229:

Line 261: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

257: l_message_name := 'PV_LG_RTNG_' || p_assignment_rec.status;
258: end if;
259:
260: if l_message_name is not null then
261: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
262: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
263: fnd_message.Set_token('TEXT', 'Logging routing message: ' || l_message_name ||
264: ' for lead_id:' || p_assignment_rec.lead_id || ' for partner_id:' || p_assignment_rec.partner_id);
265: fnd_msg_pub.Add;

Line 265: fnd_msg_pub.Add;

261: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
262: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
263: fnd_message.Set_token('TEXT', 'Logging routing message: ' || l_message_name ||
264: ' for lead_id:' || p_assignment_rec.lead_id || ' for partner_id:' || p_assignment_rec.partner_id);
265: fnd_msg_pub.Add;
266: END IF;
267:
268: PVX_Utility_PVT.create_history_log(
269: p_arc_history_for_entity_code => 'OPPORTUNITY',

Line 292: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

288: COMMIT WORK;
289: END IF;
290:
291: -- Standard call to get message count and if count is 1, get message info.
292: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
293: p_count => x_msg_count,
294: p_data => x_msg_data);
295: EXCEPTION
296:

Line 300: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

296:
297: WHEN FND_API.G_EXC_ERROR THEN
298:
299: x_return_status := FND_API.G_RET_STS_ERROR ;
300: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
301: p_count => x_msg_count,
302: p_data => x_msg_data);
303:
304: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 307: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

303:
304: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
305:
306: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
307: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
308: p_count => x_msg_count,
309: p_data => x_msg_data);
310:
311: WHEN OTHERS THEN

Line 314: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

310:
311: WHEN OTHERS THEN
312:
313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
314: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
315: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
316: p_count => x_msg_count,
317: p_data => x_msg_data);
318: end;

Line 315: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

311: WHEN OTHERS THEN
312:
313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
314: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
315: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
316: p_count => x_msg_count,
317: p_data => x_msg_data);
318: end;
319:

Line 354: FND_MSG_PUB.initialize;

350:
351: -- Initialize message list if p_init_msg_list is set to TRUE.
352: IF FND_API.to_Boolean( p_init_msg_list )
353: THEN
354: FND_MSG_PUB.initialize;
355: END IF;
356:
357: -- Debug Message
358: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 358: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

354: FND_MSG_PUB.initialize;
355: END IF;
356:
357: -- Debug Message
358: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
359: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
360: fnd_message.Set_Token('TEXT', 'In ' || l_api_name);
361: fnd_msg_pub.Add;
362: END IF;

Line 361: fnd_msg_pub.Add;

357: -- Debug Message
358: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
359: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
360: fnd_message.Set_Token('TEXT', 'In ' || l_api_name);
361: fnd_msg_pub.Add;
362: END IF;
363:
364: -- Initialize API return status to SUCCESS
365: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 469: FND_MSG_PUB.Count_And_Get

465: COMMIT WORK;
466: END IF;
467:
468: -- Standard call to get message count and if count is 1, get message info.
469: FND_MSG_PUB.Count_And_Get
470: ( p_count => x_msg_count,
471: p_data => x_msg_data
472: );
473:

Line 479: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

475:
476: WHEN FND_API.G_EXC_ERROR THEN
477:
478: x_return_status := FND_API.G_RET_STS_ERROR ;
479: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
480: p_count => x_msg_count,
481: p_data => x_msg_data);
482:
483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 486: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

482:
483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
484:
485: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
486: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
487: p_count => x_msg_count,
488: p_data => x_msg_data);
489:
490: WHEN OTHERS THEN

Line 493: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

489:
490: WHEN OTHERS THEN
491:
492: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
493: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
494: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
495: p_count => x_msg_count,
496: p_data => x_msg_data);
497:

Line 494: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

490: WHEN OTHERS THEN
491:
492: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
493: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
494: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
495: p_count => x_msg_count,
496: p_data => x_msg_data);
497:
498: End Create_party_notification;

Line 531: fnd_msg_pub.initialize;

527:
528: -- Initialize message list if p_init_msg_list is set to TRUE.
529: IF FND_API.to_Boolean( p_init_msg_list )
530: THEN
531: fnd_msg_pub.initialize;
532: END IF;
533:
534: -- Debug Message
535: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 535: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

531: fnd_msg_pub.initialize;
532: END IF;
533:
534: -- Debug Message
535: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
536: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
537: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
538: fnd_msg_pub.Add;
539: END IF;

Line 538: fnd_msg_pub.Add;

534: -- Debug Message
535: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
536: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
537: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
538: fnd_msg_pub.Add;
539: END IF;
540:
541: x_return_status := FND_API.G_RET_STS_SUCCESS ;
542:

Line 545: fnd_msg_pub.ADD;

541: x_return_status := FND_API.G_RET_STS_SUCCESS ;
542:
543: if p_assignment_rec.SOURCE_TYPE not in ('CAMPAIGN', 'MATCHING', 'TAP', 'SALESTEAM') then
544: fnd_message.SET_NAME('PV', 'PV_INVALID_SOURCE_TYPE');
545: fnd_msg_pub.ADD;
546:
547: raise FND_API.G_EXC_ERROR;
548: end if;
549:

Line 553: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

549:
550: select pv_lead_assignments_s.nextval into l_Lead_assignment_ID from sys.dual;
551:
552: -- Debug Message
553: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
554: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
555: fnd_message.Set_token('TEXT', 'p_assignment_rec.wf_item_type ' || p_assignment_rec.wf_item_type||
556: 'p_assignment_rec.wf_item_key ' || p_assignment_rec.wf_item_key||
557: 'p_assignment_rec.lead_id ' || p_assignment_rec.lead_id||

Line 559: fnd_msg_pub.Add;

555: fnd_message.Set_token('TEXT', 'p_assignment_rec.wf_item_type ' || p_assignment_rec.wf_item_type||
556: 'p_assignment_rec.wf_item_key ' || p_assignment_rec.wf_item_key||
557: 'p_assignment_rec.lead_id ' || p_assignment_rec.lead_id||
558: 'p_assignment_rec.partner_id ' || p_assignment_rec.partner_id);
559: fnd_msg_pub.Add;
560: END IF;
561:
562: insert into pv_lead_assignments(
563: LEAD_ASSIGNMENT_ID,

Line 631: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

627: end if;
628:
629: x_lead_assignment_id := l_lead_assignment_id;
630:
631: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
632: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
633: fnd_message.Set_token('TEXT', 'x_lead_assignment_id ' || x_lead_assignment_id);
634: fnd_msg_pub.Add;
635: END IF;

Line 634: fnd_msg_pub.Add;

630:
631: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
632: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
633: fnd_message.Set_token('TEXT', 'x_lead_assignment_id ' || x_lead_assignment_id);
634: fnd_msg_pub.Add;
635: END IF;
636:
637: IF FND_API.To_Boolean ( p_commit ) THEN
638: COMMIT WORK;

Line 642: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

638: COMMIT WORK;
639: END IF;
640:
641: -- Standard call to get message count and if count is 1, get message info.
642: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
643: p_count => x_msg_count,
644: p_data => x_msg_data);
645: EXCEPTION
646:

Line 650: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

646:
647: WHEN FND_API.G_EXC_ERROR THEN
648:
649: x_return_status := FND_API.G_RET_STS_ERROR ;
650: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
651: p_count => x_msg_count,
652: p_data => x_msg_data);
653:
654: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 657: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

653:
654: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
655:
656: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
657: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
658: p_count => x_msg_count,
659: p_data => x_msg_data);
660:
661: WHEN OTHERS THEN

Line 664: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

660:
661: WHEN OTHERS THEN
662:
663: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
664: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
665: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
666: p_count => x_msg_count,
667: p_data => x_msg_data);
668:

Line 665: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

661: WHEN OTHERS THEN
662:
663: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
664: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
665: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
666: p_count => x_msg_count,
667: p_data => x_msg_data);
668:
669: end create_lead_assignment_row;

Line 712: fnd_msg_pub.initialize;

708:
709: -- Initialize message list if p_init_msg_list is set to TRUE.
710: IF FND_API.to_Boolean( p_init_msg_list )
711: THEN
712: fnd_msg_pub.initialize;
713: END IF;
714:
715: -- Debug Message
716: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 716: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

712: fnd_msg_pub.initialize;
713: END IF;
714:
715: -- Debug Message
716: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
717: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
718: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
719: fnd_msg_pub.Add;
720: END IF;

Line 719: fnd_msg_pub.Add;

715: -- Debug Message
716: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
717: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
718: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
719: fnd_msg_pub.Add;
720: END IF;
721:
722: x_return_status := FND_API.G_RET_STS_SUCCESS ;
723:

Line 772: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

768: );
769:
770: x_itemkey := to_char(l_lead_workflow_id);
771:
772: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
773: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
774: fnd_message.Set_token('TEXT', 'Row created in pv_lead_workflows ');
775: fnd_msg_pub.Add;
776: END IF;

Line 775: fnd_msg_pub.Add;

771:
772: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
773: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
774: fnd_message.Set_token('TEXT', 'Row created in pv_lead_workflows ');
775: fnd_msg_pub.Add;
776: END IF;
777:
778: IF p_workflow_rec.routing_status = PV_ASSIGNMENT_PUB.g_r_status_failed_auto THEN
779:

Line 780: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

776: END IF;
777:
778: IF p_workflow_rec.routing_status = PV_ASSIGNMENT_PUB.g_r_status_failed_auto THEN
779:
780: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
781: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
782: fnd_message.Set_token('TEXT', 'Logging in routing history'||p_workflow_rec.routing_type);
783: fnd_msg_pub.Add;
784: END IF;

Line 783: fnd_msg_pub.Add;

779:
780: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
781: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
782: fnd_message.Set_token('TEXT', 'Logging in routing history'||p_workflow_rec.routing_type);
783: fnd_msg_pub.Add;
784: END IF;
785: l_user_id := nvl(p_workflow_rec.last_updated_by, fnd_global.user_id);
786:
787: OPEN lc_get_user_type (l_user_id);

Line 798: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

794: ELSIF l_user_category = PV_ASSIGNMENT_PUB.g_resource_party THEN
795: l_oppty_routing_log_rec.vendor_user_id := NULL;
796: l_oppty_routing_log_rec.pt_contact_user_id := l_user_id;
797: END IF;
798: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
799: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
800: fnd_message.Set_token('TEXT', 'Logging in routing history 2');
801: fnd_msg_pub.Add;
802: END IF;

Line 801: fnd_msg_pub.Add;

797: END IF;
798: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
799: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
800: fnd_message.Set_token('TEXT', 'Logging in routing history 2');
801: fnd_msg_pub.Add;
802: END IF;
803:
804: l_oppty_routing_log_rec.event := 'ASSIGN_FAIL';
805: l_oppty_routing_log_rec.lead_id := p_workflow_rec.Lead_ID;

Line 816: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

812: l_oppty_routing_log_rec.user_response := NULL;
813: l_oppty_routing_log_rec.reason_code := p_workflow_rec.failure_code;
814: l_oppty_routing_log_rec.user_type := 'LAM';
815:
816: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
817: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
818: fnd_message.Set_token('TEXT', 'Logging in routing history 3');
819: fnd_msg_pub.Add;
820: END IF;

Line 819: fnd_msg_pub.Add;

815:
816: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
817: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
818: fnd_message.Set_token('TEXT', 'Logging in routing history 3');
819: fnd_msg_pub.Add;
820: END IF;
821: pv_assignment_pvt.Create_Oppty_Routing_Log_Row (
822: p_api_version_number => 1.0,
823: p_init_msg_list => FND_API.G_FALSE,

Line 836: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

832: COMMIT WORK;
833: END IF;
834:
835: -- Standard call to get message count and if count is 1, get message info.
836: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
837: p_count => x_msg_count,
838: p_data => x_msg_data);
839: EXCEPTION
840:

Line 844: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

840:
841: WHEN FND_API.G_EXC_ERROR THEN
842:
843: x_return_status := FND_API.G_RET_STS_ERROR ;
844: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
845: p_count => x_msg_count,
846: p_data => x_msg_data);
847:
848: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 851: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

847:
848: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
849:
850: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
851: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
852: p_count => x_msg_count,
853: p_data => x_msg_data);
854:
855: WHEN OTHERS THEN

Line 858: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

854:
855: WHEN OTHERS THEN
856:
857: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
858: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
859: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
860: p_count => x_msg_count,
861: p_data => x_msg_data);
862:

Line 859: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

855: WHEN OTHERS THEN
856:
857: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
858: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
859: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
860: p_count => x_msg_count,
861: p_data => x_msg_data);
862:
863: end create_lead_workflow_row;

Line 893: fnd_msg_pub.initialize;

889:
890: -- Initialize message list if p_init_msg_list is set to TRUE.
891: IF FND_API.to_Boolean( p_init_msg_list )
892: THEN
893: fnd_msg_pub.initialize;
894: END IF;
895:
896: -- Debug Message
897: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 897: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

893: fnd_msg_pub.initialize;
894: END IF;
895:
896: -- Debug Message
897: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
898: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
899: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
900: fnd_msg_pub.Add;
901: END IF;

Line 900: fnd_msg_pub.Add;

896: -- Debug Message
897: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
898: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
899: fnd_message.Set_token('TEXT', 'In ' || l_api_name);
900: fnd_msg_pub.Add;
901: END IF;
902:
903: x_return_status := FND_API.G_RET_STS_SUCCESS ;
904:

Line 917: fnd_msg_pub.ADD;

913: -- Do not raise an exception in this case. Bug 3088598
914:
915: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
916: fnd_message.SET_token('TEXT', 'Deleted ' || sql%rowcount || ' rows. Should have deleted 1 row');
917: fnd_msg_pub.ADD;
918:
919: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
920:
921: end if;

Line 928: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

924: COMMIT WORK;
925: END IF;
926:
927: -- Standard call to get message count and if count is 1, get message info.
928: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
929: p_count => x_msg_count,
930: p_data => x_msg_data);
931: EXCEPTION
932:

Line 936: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

932:
933: WHEN FND_API.G_EXC_ERROR THEN
934:
935: x_return_status := FND_API.G_RET_STS_ERROR ;
936: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
937: p_count => x_msg_count,
938: p_data => x_msg_data);
939:
940: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 943: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

939:
940: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
941:
942: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
943: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
944: p_count => x_msg_count,
945: p_data => x_msg_data);
946:
947: WHEN OTHERS THEN

Line 950: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

946:
947: WHEN OTHERS THEN
948:
949: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
950: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
951: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
952: p_count => x_msg_count,
953: p_data => x_msg_data);
954:

Line 951: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

947: WHEN OTHERS THEN
948:
949: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
950: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
951: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
952: p_count => x_msg_count,
953: p_data => x_msg_data);
954:
955: end delete_lead_assignment_row;

Line 1203: fnd_msg_pub.initialize;

1199: END IF;
1200:
1201: -- Initialize message list if p_init_msg_list is set to TRUE.
1202: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1203: fnd_msg_pub.initialize;
1204: END IF;
1205:
1206: -- Debug Message
1207: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 1207: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1203: fnd_msg_pub.initialize;
1204: END IF;
1205:
1206: -- Debug Message
1207: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1208: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1209: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || '. Partner id: ' || p_partner_id || '. Mode: ' || p_mode);
1210: fnd_msg_pub.Add;
1211: END IF;

Line 1210: fnd_msg_pub.Add;

1206: -- Debug Message
1207: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1208: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1209: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || '. Partner id: ' || p_partner_id || '. Mode: ' || p_mode);
1210: fnd_msg_pub.Add;
1211: END IF;
1212:
1213: -- Initialize API return status to success
1214: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1228: fnd_msg_pub.ADD;

1224:
1225: fnd_message.SET_NAME('PV', 'PV_BAD_ID');
1226: fnd_message.SET_TOKEN('ID' ,p_partner_id);
1227:
1228: fnd_msg_pub.ADD;
1229: raise FND_API.G_EXC_ERROR;
1230:
1231: end if;
1232:

Line 1243: fnd_msg_pub.ADD;

1239: fnd_message.SET_NAME('PV', 'PV_INVALID_PARTY_TYPE');
1240: fnd_message.SET_TOKEN('PARTY_NAME', l_id_name);
1241: fnd_message.SET_TOKEN('RELATION_TYPE', l_id_type_meaning);
1242:
1243: fnd_msg_pub.ADD;
1244: raise FND_API.G_EXC_ERROR;
1245:
1246: end if;
1247:

Line 1257: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1253:
1254: for l_rs_rec in lc_get_ext_cms(pc_partner_id => p_partner_id, pc_vad_id => x_vad_id)
1255: loop
1256:
1257: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1258: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1259: fnd_message.Set_Token('TEXT', 'CM rs id: ' || l_rs_rec.rs_id || ' from ' || l_rs_rec .origin);
1260: fnd_msg_pub.Add;
1261: END IF;

Line 1260: fnd_msg_pub.Add;

1256:
1257: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1258: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1259: fnd_message.Set_Token('TEXT', 'CM rs id: ' || l_rs_rec.rs_id || ' from ' || l_rs_rec .origin);
1260: fnd_msg_pub.Add;
1261: END IF;
1262:
1263: if instr(l_all_cm_rs_id, ' ' || l_rs_rec.rs_id || ' ') = 0 then
1264:

Line 1273: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1269: l_cm_origin_tbl.extend;
1270: l_cm_origin_tbl(l_cm_origin_tbl.last) := l_rs_rec.origin;
1271:
1272: else
1273: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1274: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1275: fnd_message.Set_Token('TEXT', 'cm resource id: ' || l_rs_rec.rs_id || ' already selected' );
1276: fnd_msg_pub.Add;
1277: END IF;

Line 1276: fnd_msg_pub.Add;

1272: else
1273: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1274: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1275: fnd_message.Set_Token('TEXT', 'cm resource id: ' || l_rs_rec.rs_id || ' already selected' );
1276: fnd_msg_pub.Add;
1277: END IF;
1278: end if;
1279:
1280: end loop;

Line 1287: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1283:
1284: for l_rs_rec in lc_get_int_cms(pc_partner_id => p_partner_id)
1285: loop
1286:
1287: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1288: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1289: fnd_message.Set_Token('TEXT', 'CM rs id: ' || l_rs_rec.rs_id || ' from ' || l_rs_rec .origin);
1290: fnd_msg_pub.Add;
1291: END IF;

Line 1290: fnd_msg_pub.Add;

1286:
1287: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1288: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1289: fnd_message.Set_Token('TEXT', 'CM rs id: ' || l_rs_rec.rs_id || ' from ' || l_rs_rec .origin);
1290: fnd_msg_pub.Add;
1291: END IF;
1292:
1293: if instr(l_all_cm_rs_id, ' ' || l_rs_rec.rs_id || ' ') = 0 then
1294:

Line 1303: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1299: l_cm_origin_tbl.extend;
1300: l_cm_origin_tbl(l_cm_origin_tbl.last) := l_rs_rec.origin;
1301:
1302: else
1303: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1304: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1305: fnd_message.Set_Token('TEXT', 'cm resource id: ' || l_rs_rec.rs_id || ' already selected' );
1306: fnd_msg_pub.Add;
1307: END IF;

Line 1306: fnd_msg_pub.Add;

1302: else
1303: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1304: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1305: fnd_message.Set_Token('TEXT', 'cm resource id: ' || l_rs_rec.rs_id || ' already selected' );
1306: fnd_msg_pub.Add;
1307: END IF;
1308: end if;
1309:
1310: end loop;

Line 1315: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1311:
1312:
1313: if l_cm_rs_id_tbl.count = 0 then
1314:
1315: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1316: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1317: fnd_message.Set_Token('TEXT', 'No CM found in PARTNER TEAM, Trying PV_DEFAULT_CM');
1318: fnd_msg_pub.Add;
1319: END IF;

Line 1318: fnd_msg_pub.Add;

1314:
1315: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1316: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1317: fnd_message.Set_Token('TEXT', 'No CM found in PARTNER TEAM, Trying PV_DEFAULT_CM');
1318: fnd_msg_pub.Add;
1319: END IF;
1320:
1321: -- no cm found. Look for default cm from profile
1322:

Line 1334: fnd_msg_pub.ADD;

1330:
1331: fnd_message.SET_NAME('PV', 'PV_NO_CM_FOR_PT');
1332: fnd_message.SET_TOKEN('P_PARTNER' ,l_id_name);
1333:
1334: fnd_msg_pub.ADD;
1335: raise FND_API.G_EXC_ERROR;
1336:
1337: end if;
1338:

Line 1350: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1346: end if;
1347:
1348: for i in 1 .. l_cm_rs_id_tbl.count loop
1349:
1350: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1351: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1352: fnd_message.Set_Token('TEXT', 'Validating cm rs id: ' || l_cm_rs_id_tbl(i));
1353: fnd_msg_pub.Add;
1354: END IF;

Line 1353: fnd_msg_pub.Add;

1349:
1350: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1351: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1352: fnd_message.Set_Token('TEXT', 'Validating cm rs id: ' || l_cm_rs_id_tbl(i));
1353: fnd_msg_pub.Add;
1354: END IF;
1355:
1356: l_rs_id := null;
1357:

Line 1366: fnd_msg_pub.ADD;

1362: if l_rs_id is null then
1363:
1364: fnd_message.SET_NAME('PV', 'PV_CM_INVALID_RESOURCE_ID');
1365: fnd_message.SET_TOKEN('P_RESOURCE_ID' ,l_cm_rs_id_tbl(i));
1366: fnd_msg_pub.ADD;
1367: l_pt_ok_flag := false;
1368:
1369: elsif l_fnd_username is null then
1370:

Line 1373: fnd_msg_pub.ADD;

1369: elsif l_fnd_username is null then
1370:
1371: fnd_message.SET_NAME('PV', 'PV_NO_LOGON_ACCT');
1372: fnd_message.SET_TOKEN('P_USER' ,l_person_name);
1373: fnd_msg_pub.ADD;
1374: l_pt_ok_flag := false;
1375:
1376: end if;
1377:

Line 1413: if p_retrieve_mode in ('BOTH','CM') and fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1409: end if;
1410:
1411: end loop;
1412:
1413: if p_retrieve_mode in ('BOTH','CM') and fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1414: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1415: fnd_message.Set_Token('TEXT', 'CMs found: ' || l_cm_rs_id_tbl.count);
1416: fnd_msg_pub.Add;
1417: END IF;

Line 1416: fnd_msg_pub.Add;

1412:
1413: if p_retrieve_mode in ('BOTH','CM') and fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1414: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1415: fnd_message.Set_Token('TEXT', 'CMs found: ' || l_cm_rs_id_tbl.count);
1416: fnd_msg_pub.Add;
1417: END IF;
1418:
1419: if p_entity in ('LEAD','OPPORTUNITY') then
1420:

Line 1436: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1432: l_pt_user_rs_id_tbl(l_pt_user_rs_id_tbl.last) := l_pt_user_rs_id;
1433: end loop;
1434: close lc_preferred_pt_contact;
1435:
1436: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1437: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1438: fnd_message.Set_Token('TEXT', 'No. of pt contacts found in oppty salesteam: ' || l_pt_user_rs_id_tbl.count);
1439: fnd_msg_pub.Add;
1440: END IF;

Line 1439: fnd_msg_pub.Add;

1435:
1436: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1437: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1438: fnd_message.Set_Token('TEXT', 'No. of pt contacts found in oppty salesteam: ' || l_pt_user_rs_id_tbl.count);
1439: fnd_msg_pub.Add;
1440: END IF;
1441:
1442: for i in 1 .. l_pt_user_rs_id_tbl.count loop
1443: l_all_cm_rs_id := l_all_cm_rs_id || ' ' || l_pt_user_rs_id_tbl(i) || ' ';

Line 1457: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1453: l_pt_default_rs_id_tbl(l_pt_default_rs_id_tbl.last) := l_pt_user_rs_id;
1454: end loop;
1455: close lc_get_default_pt_contact;
1456:
1457: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1458: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1459: fnd_message.Set_Token('TEXT', 'No. of pt contacts with PV_OPPTY_CONTACT permission that has resource and' ||
1460: ' Valid login : ' || l_pt_default_rs_id_tbl.count);
1461: fnd_msg_pub.Add;

Line 1461: fnd_msg_pub.Add;

1457: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1458: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1459: fnd_message.Set_Token('TEXT', 'No. of pt contacts with PV_OPPTY_CONTACT permission that has resource and' ||
1460: ' Valid login : ' || l_pt_default_rs_id_tbl.count);
1461: fnd_msg_pub.Add;
1462: END IF;
1463:
1464: if l_pt_user_rs_id_tbl.count = 0 and l_pt_default_rs_id_tbl.count = 0 then
1465:

Line 1470: fnd_msg_pub.ADD;

1466: -- no partner contacts found
1467:
1468: fnd_message.SET_NAME('PV', 'PV_NO_CNTCT_FOR_PT');
1469: fnd_message.SET_TOKEN('P_PARTNER' , l_id_name);
1470: fnd_msg_pub.ADD;
1471: l_pt_ok_flag := false;
1472:
1473: end if;
1474:

Line 1486: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1482: l_pt_user_rs_id_tbl(l_pt_user_rs_id_tbl.last) := l_pt_default_rs_id_tbl(i);
1483:
1484: else
1485:
1486: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1487: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1488: fnd_message.Set_Token('TEXT', 'Default contact: resource id already there: '||l_pt_default_rs_id_tbl(i));
1489: fnd_msg_pub.Add;
1490: END IF;

Line 1489: fnd_msg_pub.Add;

1485:
1486: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1487: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1488: fnd_message.Set_Token('TEXT', 'Default contact: resource id already there: '||l_pt_default_rs_id_tbl(i));
1489: fnd_msg_pub.Add;
1490: END IF;
1491:
1492: end if;
1493:

Line 1500: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1496: for i in 1 .. l_pt_user_rs_id_tbl.count loop
1497:
1498: l_rs_id := null;
1499:
1500: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1501: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1502: fnd_message.Set_Token('TEXT', 'before retrieving the person details '|| l_pt_user_rs_id_tbl(i));
1503: fnd_msg_pub.Add;
1504: END IF;

Line 1503: fnd_msg_pub.Add;

1499:
1500: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1501: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1502: fnd_message.Set_Token('TEXT', 'before retrieving the person details '|| l_pt_user_rs_id_tbl(i));
1503: fnd_msg_pub.Add;
1504: END IF;
1505:
1506: open lc_get_person_details (pc_rs_id => l_pt_user_rs_id_tbl(i) );
1507: fetch lc_get_person_details into l_rs_id, l_usertype, l_person_id, l_person_name, l_fnd_user_id, l_fnd_username;

Line 1510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1506: open lc_get_person_details (pc_rs_id => l_pt_user_rs_id_tbl(i) );
1507: fetch lc_get_person_details into l_rs_id, l_usertype, l_person_id, l_person_name, l_fnd_user_id, l_fnd_username;
1508: close lc_get_person_details;
1509:
1510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1511: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1512: fnd_message.Set_Token('TEXT', 'Resource ID '||l_rs_id ||' '||l_person_name||' '|| l_fnd_username );
1513: fnd_msg_pub.Add;
1514: END IF;

Line 1513: fnd_msg_pub.Add;

1509:
1510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1511: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1512: fnd_message.Set_Token('TEXT', 'Resource ID '||l_rs_id ||' '||l_person_name||' '|| l_fnd_username );
1513: fnd_msg_pub.Add;
1514: END IF;
1515: if l_fnd_username is null then
1516:
1517: fnd_message.SET_NAME('PV', 'PV_PT_CONTACT_NO_LOGON');

Line 1519: fnd_msg_pub.ADD;

1515: if l_fnd_username is null then
1516:
1517: fnd_message.SET_NAME('PV', 'PV_PT_CONTACT_NO_LOGON');
1518: fnd_message.SET_TOKEN('P_PT_RESOURCE_ID' ,l_pt_user_rs_id_tbl(i));
1519: fnd_msg_pub.ADD;
1520: -- l_pt_ok_flag := false;
1521:
1522: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1523: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 1522: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1518: fnd_message.SET_TOKEN('P_PT_RESOURCE_ID' ,l_pt_user_rs_id_tbl(i));
1519: fnd_msg_pub.ADD;
1520: -- l_pt_ok_flag := false;
1521:
1522: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1523: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1524: fnd_message.Set_Token('TEXT', 'Resource ID '||l_pt_user_rs_id_tbl(i) ||
1525: ' set to zero since the partner contact does not have login' );
1526: fnd_msg_pub.Add;

Line 1526: fnd_msg_pub.Add;

1522: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1523: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1524: fnd_message.Set_Token('TEXT', 'Resource ID '||l_pt_user_rs_id_tbl(i) ||
1525: ' set to zero since the partner contact does not have login' );
1526: fnd_msg_pub.Add;
1527: END IF;
1528:
1529: l_pt_user_rs_id_tbl(i) := 0;
1530:

Line 1554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1550:
1551: end loop;
1552:
1553: IF l_pt_user_rs_id_tbl.count > 0 THEN
1554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1555: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1556: fnd_message.Set_Token('TEXT', 'There are '||l_pt_user_rs_id_tbl.count || ' contacts found for partner '||
1557: l_id_name);
1558: fnd_msg_pub.Add;

Line 1558: fnd_msg_pub.Add;

1554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1555: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1556: fnd_message.Set_Token('TEXT', 'There are '||l_pt_user_rs_id_tbl.count || ' contacts found for partner '||
1557: l_id_name);
1558: fnd_msg_pub.Add;
1559: END IF;
1560: ELSE
1561: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1562: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 1561: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1557: l_id_name);
1558: fnd_msg_pub.Add;
1559: END IF;
1560: ELSE
1561: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1562: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1563: fnd_message.Set_Token('TEXT', 'No contacts found for partner '||l_id_name);
1564: fnd_msg_pub.Add;
1565: END IF;

Line 1564: fnd_msg_pub.Add;

1560: ELSE
1561: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1562: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1563: fnd_message.Set_Token('TEXT', 'No contacts found for partner '||l_id_name);
1564: fnd_msg_pub.Add;
1565: END IF;
1566: END IF;
1567:
1568: end if; -- p_entity in 'LEAD','OPPORTUNITY'

Line 1585: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

1581: COMMIT WORK;
1582: END IF;
1583:
1584: -- Standard call to get message count and if count is 1, get message info.
1585: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
1586: p_count => x_msg_count,
1587: p_data => x_msg_data);
1588: EXCEPTION
1589:

Line 1593: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

1589:
1590: WHEN FND_API.G_EXC_ERROR THEN
1591:
1592: x_return_status := FND_API.G_RET_STS_ERROR ;
1593: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
1594: p_count => x_msg_count,
1595: p_data => x_msg_data);
1596:
1597: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1600: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

1596:
1597: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1598:
1599: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1600: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
1601: p_count => x_msg_count,
1602: p_data => x_msg_data);
1603:
1604: WHEN OTHERS THEN

Line 1607: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

1603:
1604: WHEN OTHERS THEN
1605:
1606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1607: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1608: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
1609: p_count => x_msg_count,
1610: p_data => x_msg_data);
1611:

Line 1608: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

1604: WHEN OTHERS THEN
1605:
1606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1607: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1608: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
1609: p_count => x_msg_count,
1610: p_data => x_msg_data);
1611:
1612: end get_partner_info;

Line 1833: fnd_msg_pub.initialize;

1829:
1830: -- Initialize message list if p_init_msg_list is set to TRUE.
1831: IF FND_API.to_Boolean( p_init_msg_list )
1832: THEN
1833: fnd_msg_pub.initialize;
1834: END IF;
1835:
1836: -- Debug Message
1837: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 1837: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1833: fnd_msg_pub.initialize;
1834: END IF;
1835:
1836: -- Debug Message
1837: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1838:
1839: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1840: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || ' for Lead id = ' || p_lead_id || '. Resource ID: ' || p_resource_id);
1841: fnd_msg_pub.Add;

Line 1841: fnd_msg_pub.Add;

1837: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1838:
1839: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1840: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || ' for Lead id = ' || p_lead_id || '. Resource ID: ' || p_resource_id);
1841: fnd_msg_pub.Add;
1842:
1843: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1844: fnd_message.Set_Token('TEXT', 'p_access_type is: ' || p_access_type || ': p_access_action is :' || p_access_action || ' :');
1845: fnd_msg_pub.Add;

Line 1845: fnd_msg_pub.Add;

1841: fnd_msg_pub.Add;
1842:
1843: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1844: fnd_message.Set_Token('TEXT', 'p_access_type is: ' || p_access_type || ': p_access_action is :' || p_access_action || ' :');
1845: fnd_msg_pub.Add;
1846:
1847:
1848: select 'Access Type: '||decode(p_access_type, 1, 'CM', 2, 'PT', 3, 'PT ORG') ||
1849: ' Access Action: '||decode(p_access_action, 1, 'ADD', 2, 'REMOVE') into l_debug_string from dual;

Line 1853: fnd_msg_pub.Add;

1849: ' Access Action: '||decode(p_access_action, 1, 'ADD', 2, 'REMOVE') into l_debug_string from dual;
1850:
1851: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1852: fnd_message.Set_Token('TEXT', l_debug_string);
1853: fnd_msg_pub.Add;
1854:
1855: END IF;
1856:
1857: -- Initialize API return status to success

Line 1888: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1884: l_access_exists_flag := FALSE;
1885: end if;
1886:
1887: -- Debug Message
1888: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1889: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1890:
1891: if l_access_exists_flag then
1892: fnd_message.Set_Token('TEXT', 'Access exist for ' || p_resource_id);

Line 1897: fnd_msg_pub.Add;

1893: else
1894: fnd_message.Set_Token('TEXT', 'Access does not exist for ' || p_resource_id);
1895: end if;
1896:
1897: fnd_msg_pub.Add;
1898:
1899: end if;
1900:
1901: if p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then

Line 1917: fnd_msg_pub.ADD;

1913:
1914: else
1915: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1916: fnd_message.SET_TOKEN('TEXT', 'Does not recognize person type: ' || l_person_category);
1917: fnd_msg_pub.ADD;
1918:
1919: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1920:
1921: end if;

Line 1923: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1919: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1920:
1921: end if;
1922:
1923: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1924: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1925: fnd_message.Set_token('TEXT', 'Person is a ' || l_person_category);
1926: fnd_msg_pub.Add;
1927: end if;

Line 1926: fnd_msg_pub.Add;

1922:
1923: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1924: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1925: fnd_message.Set_token('TEXT', 'Person is a ' || l_person_category);
1926: fnd_msg_pub.Add;
1927: end if;
1928:
1929: elsif p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS then
1930:

Line 1940: fnd_msg_pub.ADD;

1936: if lc_cursor%NOTFOUND then
1937:
1938: fnd_message.SET_NAME ('PV', 'PV_RESOURCE_NOT_FOUND');
1939: fnd_message.SET_TOKEN ('P_RESOURCE_ID' , p_resource_id);
1940: fnd_msg_pub.ADD;
1941:
1942: RAISE fnd_api.g_exc_error;
1943:
1944: end if;

Line 1964: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

1960: end;
1961:
1962: if l_sales_group_id is NULL and p_access_type <> pv_assignment_pub.G_PT_ORG_ACCESS then
1963:
1964: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1965: fnd_message.SET_NAME ('PV', 'PV_NO_DEFAULT_SALESGROUP');
1966: fnd_message.SET_TOKEN ('P_USER' , l_username);
1967: fnd_msg_pub.ADD;
1968: end if;

Line 1967: fnd_msg_pub.ADD;

1963:
1964: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1965: fnd_message.SET_NAME ('PV', 'PV_NO_DEFAULT_SALESGROUP');
1966: fnd_message.SET_TOKEN ('P_USER' , l_username);
1967: fnd_msg_pub.ADD;
1968: end if;
1969: -- RAISE fnd_api.g_exc_error;
1970:
1971: end if;

Line 1996: fnd_msg_pub.ADD;

1992:
1993: if l_am_rs_id is null then
1994: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
1995: fnd_message.SET_TOKEN('TEXT', 'Cannot identify Assignment manager or Opportunity creator');
1996: fnd_msg_pub.ADD;
1997: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1998: end if;
1999:
2000:

Line 2016: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2012: or
2013: (l_resoucre_nature= 'PART_OR_CONT')
2014: then -- means added by WF
2015:
2016: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2017: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2018: fnd_message.Set_token('TEXT', 'Removing Access for: ' || l_temp);
2019: fnd_msg_pub.Add;
2020: end if;

Line 2019: fnd_msg_pub.Add;

2015:
2016: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2017: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2018: fnd_message.Set_token('TEXT', 'Removing Access for: ' || l_temp);
2019: fnd_msg_pub.Add;
2020: end if;
2021:
2022: -- -------------------------------------------------------------------------------
2023: -- Check if this resource has quota sales credit associated with it.

Line 2103: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2099:
2100: ELSE
2101: Debug('l_sales_credit_count is not 0');
2102:
2103: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2104: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2105: fnd_message.Set_token('TEXT', 'Do not remove for: ' || l_temp ||
2106: '. It still has some sales credits associated with it.');
2107: fnd_msg_pub.Add;

Line 2107: fnd_msg_pub.Add;

2103: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2104: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2105: fnd_message.Set_token('TEXT', 'Do not remove for: ' || l_temp ||
2106: '. It still has some sales credits associated with it.');
2107: fnd_msg_pub.Add;
2108: END IF;
2109: END IF;
2110:
2111: else

Line 2113: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2109: END IF;
2110:
2111: else
2112: Debug('l_prm_keep_flag_tbl(i) is not Y') ;
2113: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2114: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2115: fnd_message.Set_token('TEXT', 'Do not remove for: ' || l_temp || '. Prm_keep_flag is not Y');
2116: fnd_msg_pub.Add;
2117: end if;

Line 2116: fnd_msg_pub.Add;

2112: Debug('l_prm_keep_flag_tbl(i) is not Y') ;
2113: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2114: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2115: fnd_message.Set_token('TEXT', 'Do not remove for: ' || l_temp || '. Prm_keep_flag is not Y');
2116: fnd_msg_pub.Add;
2117: end if;
2118:
2119: end if;
2120: end loop;

Line 2137: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2133: open lc_get_sql_text_attr_7;
2134: fetch lc_get_sql_text_attr_7 into l_sql_text_attr_7;
2135: close lc_get_sql_text_attr_7;
2136:
2137: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2138: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2139: fnd_message.Set_token('TEXT', ' SQL Text for attribute 7'|| l_sql_text_attr_7);
2140: fnd_msg_pub.Add;
2141: end if;

Line 2140: fnd_msg_pub.Add;

2136:
2137: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2138: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2139: fnd_message.Set_token('TEXT', ' SQL Text for attribute 7'|| l_sql_text_attr_7);
2140: fnd_msg_pub.Add;
2141: end if;
2142:
2143:
2144: for i in 1 .. l_access_id_tbl.count loop

Line 2146: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2142:
2143:
2144: for i in 1 .. l_access_id_tbl.count loop
2145:
2146: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2147: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2148: fnd_message.Set_token('TEXT', ' l_pt_ess_opp'|| l_pt_full_access_opp);
2149: fnd_msg_pub.Add;
2150: end if;

Line 2149: fnd_msg_pub.Add;

2145:
2146: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2147: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2148: fnd_message.Set_token('TEXT', ' l_pt_ess_opp'|| l_pt_full_access_opp);
2149: fnd_msg_pub.Add;
2150: end if;
2151:
2152:
2153: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN

Line 2155: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2151:
2152:
2153: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN
2154:
2155: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2156: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2157: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag, prm_keep_flag to Y for resource id: ' || p_resource_id );
2158: fnd_msg_pub.Add;
2159: end if;

Line 2158: fnd_msg_pub.Add;

2154:
2155: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2156: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2157: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag, prm_keep_flag to Y for resource id: ' || p_resource_id );
2158: fnd_msg_pub.Add;
2159: end if;
2160:
2161: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'Y', open_flag = l_open_flag
2162: where access_id = l_access_id_tbl(i);

Line 2167: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2163:
2164:
2165: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2166:
2167: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2168: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2169: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS or G_PT_ORG_ACCESS for resource id: ' || p_resource_id );
2170: fnd_msg_pub.Add;
2171: end if;

Line 2170: fnd_msg_pub.Add;

2166:
2167: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2168: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2169: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS or G_PT_ORG_ACCESS for resource id: ' || p_resource_id );
2170: fnd_msg_pub.Add;
2171: end if;
2172:
2173: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2174: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2173: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2169: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS or G_PT_ORG_ACCESS for resource id: ' || p_resource_id );
2170: fnd_msg_pub.Add;
2171: end if;
2172:
2173: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2174: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2175: fnd_message.Set_token('TEXT', 'Find the partner id of the resource with resource_id ' || p_resource_id );
2176: fnd_msg_pub.Add;
2177: end if;

Line 2176: fnd_msg_pub.Add;

2172:
2173: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2174: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2175: fnd_message.Set_token('TEXT', 'Find the partner id of the resource with resource_id ' || p_resource_id );
2176: fnd_msg_pub.Add;
2177: end if;
2178:
2179:
2180: IF p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS THEN

Line 2182: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2178:
2179:
2180: IF p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS THEN
2181:
2182: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2183: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2184: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');
2185: fnd_msg_pub.Add;
2186: end if;

Line 2185: fnd_msg_pub.Add;

2181:
2182: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2183: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2184: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');
2185: fnd_msg_pub.Add;
2186: end if;
2187:
2188: open lc_get_partner_id_org(p_resource_id);
2189: fetch lc_get_partner_id_org into l_current_partnerid_of_rel;

Line 2196: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2192:
2193:
2194: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN
2195:
2196: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2197: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2198: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');
2199: fnd_msg_pub.Add;
2200: end if;

Line 2199: fnd_msg_pub.Add;

2195:
2196: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2197: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2198: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');
2199: fnd_msg_pub.Add;
2200: end if;
2201:
2202: open lc_get_partner_id_org_contact(p_resource_id);
2203: fetch lc_get_partner_id_org_contact into l_current_partnerid_of_rel;

Line 2209: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2205:
2206:
2207: END IF;
2208:
2209: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2210: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2211: fnd_message.Set_token('TEXT', ' the partner id of the resource with resource_id ' || p_resource_id || ' is ' || l_current_partnerid_of_rel);
2212: fnd_msg_pub.Add;
2213: end if;

Line 2212: fnd_msg_pub.Add;

2208:
2209: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2210: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2211: fnd_message.Set_token('TEXT', ' the partner id of the resource with resource_id ' || p_resource_id || ' is ' || l_current_partnerid_of_rel);
2212: fnd_msg_pub.Add;
2213: end if;
2214:
2215:
2216:

Line 2217: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2213: end if;
2214:
2215:
2216:
2217: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2218: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2219: fnd_message.Set_token('TEXT', ' Executing the sql_text to get Allow Access Profile value for partner ' || l_current_partnerid_of_rel);
2220: fnd_msg_pub.Add;
2221: end if;

Line 2220: fnd_msg_pub.Add;

2216:
2217: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2218: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2219: fnd_message.Set_token('TEXT', ' Executing the sql_text to get Allow Access Profile value for partner ' || l_current_partnerid_of_rel);
2220: fnd_msg_pub.Add;
2221: end if;
2222:
2223: BEGIN
2224: EXECUTE IMMEDIATE l_sql_text_attr_7 INTO l_enable_full_access_value

Line 2228: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2224: EXECUTE IMMEDIATE l_sql_text_attr_7 INTO l_enable_full_access_value
2225: USING 7, 'PARTNER', l_current_partnerid_of_rel;
2226: EXCEPTION
2227: WHEN NO_DATA_FOUND THEN
2228: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2229: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2230: fnd_message.SET_TOKEN('TEXT', 'No Data found executing the sql_text for attribute id 7 ' || l_sql_text_attr_7);
2231: fnd_msg_pub.ADD;
2232: end if;

Line 2231: fnd_msg_pub.ADD;

2227: WHEN NO_DATA_FOUND THEN
2228: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2229: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2230: fnd_message.SET_TOKEN('TEXT', 'No Data found executing the sql_text for attribute id 7 ' || l_sql_text_attr_7);
2231: fnd_msg_pub.ADD;
2232: end if;
2233: END;
2234:
2235: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 2235: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2231: fnd_msg_pub.ADD;
2232: end if;
2233: END;
2234:
2235: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2236: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2237: fnd_message.Set_token('TEXT', ' Value of Allow Access Profile value for partner ' || l_current_partnerid_of_rel || ' is ' || l_enable_full_access_value);
2238: fnd_msg_pub.Add;
2239: end if;

Line 2238: fnd_msg_pub.Add;

2234:
2235: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2236: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2237: fnd_message.Set_token('TEXT', ' Value of Allow Access Profile value for partner ' || l_current_partnerid_of_rel || ' is ' || l_enable_full_access_value);
2238: fnd_msg_pub.Add;
2239: end if;
2240:
2241:
2242: IF(l_enable_full_access_value = 'Y') then

Line 2244: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2240:
2241:
2242: IF(l_enable_full_access_value = 'Y') then
2243:
2244: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2245: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2246: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is Y');
2247: fnd_msg_pub.Add;
2248: end if;

Line 2247: fnd_msg_pub.Add;

2243:
2244: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2245: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2246: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is Y');
2247: fnd_msg_pub.Add;
2248: end if;
2249:
2250:
2251: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

Line 2253: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2249:
2250:
2251: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2252:
2253: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2254: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2255: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to Y');
2256: fnd_msg_pub.Add;
2257: end if;

Line 2256: fnd_msg_pub.Add;

2252:
2253: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2254: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2255: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to Y');
2256: fnd_msg_pub.Add;
2257: end if;
2258:
2259: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'Y', open_flag = l_open_flag
2260: where access_id = l_access_id_tbl(i);

Line 2263: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2259: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'Y', open_flag = l_open_flag
2260: where access_id = l_access_id_tbl(i);
2261:
2262: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2263: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2264: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2265: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to Y for all partner contact levels');
2266: fnd_msg_pub.Add;
2267: end if;

Line 2266: fnd_msg_pub.Add;

2262: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2263: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2264: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2265: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to Y for all partner contact levels');
2266: fnd_msg_pub.Add;
2267: end if;
2268:
2269: open lc_get_pt_access (p_lead_id);
2270: loop

Line 2274: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2270: loop
2271: fetch lc_get_pt_access into l_pt_resource_id;
2272: exit when lc_get_pt_access%notfound;
2273:
2274: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2275: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2276: fnd_message.Set_token('TEXT', ' resource ID ' || l_pt_resource_id);
2277: fnd_msg_pub.Add;
2278: END IF;

Line 2277: fnd_msg_pub.Add;

2273:
2274: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2275: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2276: fnd_message.Set_token('TEXT', ' resource ID ' || l_pt_resource_id);
2277: fnd_msg_pub.Add;
2278: END IF;
2279:
2280:
2281: --For exisitng contatcs, we do nto need to update the team leader flag.

Line 2297: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2293: END IF;
2294:
2295: ELSIF(l_enable_full_access_value = 'N') then
2296:
2297: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2298: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2299: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is N');
2300: fnd_msg_pub.Add;
2301: end if;

Line 2300: fnd_msg_pub.Add;

2296:
2297: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2298: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2299: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is N');
2300: fnd_msg_pub.Add;
2301: end if;
2302:
2303: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2304:

Line 2305: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2301: end if;
2302:
2303: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2304:
2305: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2306: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2307: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to N');
2308: fnd_msg_pub.Add;
2309: end if;

Line 2308: fnd_msg_pub.Add;

2304:
2305: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2306: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2307: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to N');
2308: fnd_msg_pub.Add;
2309: end if;
2310:
2311: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'N', open_flag = l_open_flag
2312: where access_id = l_access_id_tbl(i);

Line 2316: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2312: where access_id = l_access_id_tbl(i);
2313:
2314: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2315:
2316: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2317: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2318: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to N for all partner contact levels');
2319: fnd_msg_pub.Add;
2320: end if;

Line 2319: fnd_msg_pub.Add;

2315:
2316: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2317: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2318: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to N for all partner contact levels');
2319: fnd_msg_pub.Add;
2320: end if;
2321:
2322: open lc_get_pt_access (p_lead_id);
2323: loop

Line 2327: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2323: loop
2324: fetch lc_get_pt_access into l_pt_resource_id;
2325: exit when lc_get_pt_access%notfound;
2326:
2327: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2328: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2329: fnd_message.Set_token('TEXT', ' resource ID ' || l_pt_resource_id);
2330: fnd_msg_pub.Add;
2331: END IF;

Line 2330: fnd_msg_pub.Add;

2326:
2327: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2328: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2329: fnd_message.Set_token('TEXT', ' resource ID ' || l_pt_resource_id);
2330: fnd_msg_pub.Add;
2331: END IF;
2332:
2333:
2334: --For exisitng contatcs, we do nto need to update the team leader flag.

Line 2349: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2345: END IF;
2346:
2347:
2348: ELSE -- FOr null value and othewr values
2349: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2350: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2351: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2352: fnd_msg_pub.Add;
2353: end if;

Line 2352: fnd_msg_pub.Add;

2348: ELSE -- FOr null value and othewr values
2349: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2350: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2351: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2352: fnd_msg_pub.Add;
2353: end if;
2354:
2355: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2356: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2355: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2351: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2352: fnd_msg_pub.Add;
2353: end if;
2354:
2355: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2356: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2357: fnd_message.Set_token('TEXT', ' Now the next level of security which is the profile options value would come into picture.');
2358: fnd_msg_pub.Add;
2359: end if;

Line 2358: fnd_msg_pub.Add;

2354:
2355: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2356: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2357: fnd_message.Set_token('TEXT', ' Now the next level of security which is the profile options value would come into picture.');
2358: fnd_msg_pub.Add;
2359: end if;
2360:
2361: IF l_pt_full_access_opp = 'Y' THEN
2362:

Line 2363: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2359: end if;
2360:
2361: IF l_pt_full_access_opp = 'Y' THEN
2362:
2363: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2364: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2365: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting prm_keep_flag to Y for resource id: ' || p_resource_id || ' if not lead owner');
2366: fnd_msg_pub.Add;
2367: end if;

Line 2366: fnd_msg_pub.Add;

2362:
2363: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2364: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2365: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting prm_keep_flag to Y for resource id: ' || p_resource_id || ' if not lead owner');
2366: fnd_msg_pub.Add;
2367: end if;
2368:
2369: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2370:

Line 2371: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2367: end if;
2368:
2369: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2370:
2371: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2372: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2373: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is N and making team_leader_flag to Y of PT ORG: ' || p_resource_id || ' if not lead owner');
2374: fnd_msg_pub.Add;
2375: end if;

Line 2374: fnd_msg_pub.Add;

2370:
2371: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2372: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2373: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is N and making team_leader_flag to Y of PT ORG: ' || p_resource_id || ' if not lead owner');
2374: fnd_msg_pub.Add;
2375: end if;
2376:
2377: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', open_flag = l_open_flag, team_leader_flag = 'Y'
2378: where access_id = l_access_id_tbl(i);

Line 2382: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2378: where access_id = l_access_id_tbl(i);
2379:
2380: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN
2381:
2382: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2383: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2384: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS , l_pt_full_access_opp is Y and not touching the team leader flag of Partner resource ID ' || l_pt_resource_id);
2385: fnd_msg_pub.Add;
2386: END IF;

Line 2385: fnd_msg_pub.Add;

2381:
2382: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2383: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2384: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS , l_pt_full_access_opp is Y and not touching the team leader flag of Partner resource ID ' || l_pt_resource_id);
2385: fnd_msg_pub.Add;
2386: END IF;
2387:
2388: --For exisitng contatcs, we do nto need to update the team leader flag.
2389: -- We need to leave it the way it was.

Line 2404: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2400: ELSE
2401: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2402:
2403:
2404: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2405: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2406: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is N and making team_leader_flag to N PT ORG: ' || p_resource_id || ' if not lead owner');
2407: fnd_msg_pub.Add;
2408: end if;

Line 2407: fnd_msg_pub.Add;

2403:
2404: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2405: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2406: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is N and making team_leader_flag to N PT ORG: ' || p_resource_id || ' if not lead owner');
2407: fnd_msg_pub.Add;
2408: end if;
2409:
2410: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'N', open_flag = l_open_flag
2411: where access_id = l_access_id_tbl(i);

Line 2421: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2417: loop
2418: fetch lc_get_pt_access into l_pt_resource_id;
2419: exit when lc_get_pt_access%notfound;
2420:
2421: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2422: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2423: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS , l_pt_full_access_opp is N and not touching the team leader flag of Partner resource ID ' || l_pt_resource_id);
2424: fnd_msg_pub.Add;
2425: END IF;

Line 2424: fnd_msg_pub.Add;

2420:
2421: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2422: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2423: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS , l_pt_full_access_opp is N and not touching the team leader flag of Partner resource ID ' || l_pt_resource_id);
2424: fnd_msg_pub.Add;
2425: END IF;
2426:
2427:
2428: --For exisitng contatcs, we do nto need to update the team leader flag.

Line 2465: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2461: open lc_get_sql_text_attr_7;
2462: fetch lc_get_sql_text_attr_7 into l_sql_text_attr_7;
2463: close lc_get_sql_text_attr_7;
2464:
2465: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2466: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2467: fnd_message.Set_token('TEXT', ' SQL Text for attribute 7'|| l_sql_text_attr_7);
2468: fnd_msg_pub.Add;
2469: end if;

Line 2468: fnd_msg_pub.Add;

2464:
2465: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2466: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2467: fnd_message.Set_token('TEXT', ' SQL Text for attribute 7'|| l_sql_text_attr_7);
2468: fnd_msg_pub.Add;
2469: end if;
2470:
2471:
2472:

Line 2475: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2471:
2472:
2473: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN
2474:
2475: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2476: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2477: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag to Y for resource id: ' || p_resource_id );
2478: fnd_msg_pub.Add;
2479: end if;

Line 2478: fnd_msg_pub.Add;

2474:
2475: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2476: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2477: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag to Y for resource id: ' || p_resource_id );
2478: fnd_msg_pub.Add;
2479: end if;
2480:
2481: l_sales_team_rec.Team_Leader_Flag := 'Y';
2482:

Line 2485: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2481: l_sales_team_rec.Team_Leader_Flag := 'Y';
2482:
2483: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2484:
2485: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2486: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2487: fnd_message.Set_token('TEXT', 'action type is ' || p_access_type || ' for resource id: ' || p_resource_id );
2488: fnd_msg_pub.Add;
2489: end if;

Line 2488: fnd_msg_pub.Add;

2484:
2485: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2486: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2487: fnd_message.Set_token('TEXT', 'action type is ' || p_access_type || ' for resource id: ' || p_resource_id );
2488: fnd_msg_pub.Add;
2489: end if;
2490:
2491: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2492: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2491: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2487: fnd_message.Set_token('TEXT', 'action type is ' || p_access_type || ' for resource id: ' || p_resource_id );
2488: fnd_msg_pub.Add;
2489: end if;
2490:
2491: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2492: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2493: fnd_message.Set_token('TEXT', 'Find the partner id of the resource with resource_id ' || p_resource_id );
2494: fnd_msg_pub.Add;
2495: end if;

Line 2494: fnd_msg_pub.Add;

2490:
2491: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2492: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2493: fnd_message.Set_token('TEXT', 'Find the partner id of the resource with resource_id ' || p_resource_id );
2494: fnd_msg_pub.Add;
2495: end if;
2496:
2497: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2498:

Line 2499: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2495: end if;
2496:
2497: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2498:
2499: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2500: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2501: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');
2502: fnd_msg_pub.Add;
2503: end if;

Line 2502: fnd_msg_pub.Add;

2498:
2499: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2500: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2501: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');
2502: fnd_msg_pub.Add;
2503: end if;
2504:
2505: open lc_get_partner_id_org(p_resource_id);
2506: fetch lc_get_partner_id_org into l_current_partnerid_of_rel;

Line 2510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2506: fetch lc_get_partner_id_org into l_current_partnerid_of_rel;
2507: close lc_get_partner_id_org;
2508:
2509: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2511: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2512: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');
2513: fnd_msg_pub.Add;
2514: end if;

Line 2513: fnd_msg_pub.Add;

2509: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2511: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2512: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');
2513: fnd_msg_pub.Add;
2514: end if;
2515:
2516: open lc_get_partner_id_org_contact(p_resource_id);
2517: fetch lc_get_partner_id_org_contact into l_current_partnerid_of_rel;

Line 2521: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2517: fetch lc_get_partner_id_org_contact into l_current_partnerid_of_rel;
2518: close lc_get_partner_id_org_contact;
2519: END IF;
2520:
2521: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2522: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2523: fnd_message.Set_token('TEXT', ' the partner id of the resource with resource_id ' || p_resource_id || ' is ' || l_current_partnerid_of_rel);
2524: fnd_msg_pub.Add;
2525: end if;

Line 2524: fnd_msg_pub.Add;

2520:
2521: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2522: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2523: fnd_message.Set_token('TEXT', ' the partner id of the resource with resource_id ' || p_resource_id || ' is ' || l_current_partnerid_of_rel);
2524: fnd_msg_pub.Add;
2525: end if;
2526:
2527: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2528: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2527: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2523: fnd_message.Set_token('TEXT', ' the partner id of the resource with resource_id ' || p_resource_id || ' is ' || l_current_partnerid_of_rel);
2524: fnd_msg_pub.Add;
2525: end if;
2526:
2527: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2528: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2529: fnd_message.Set_token('TEXT', ' Executing the sql_text to get Allow Access Profile value for partner ' || l_current_partnerid_of_rel);
2530: fnd_msg_pub.Add;
2531: end if;

Line 2530: fnd_msg_pub.Add;

2526:
2527: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2528: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2529: fnd_message.Set_token('TEXT', ' Executing the sql_text to get Allow Access Profile value for partner ' || l_current_partnerid_of_rel);
2530: fnd_msg_pub.Add;
2531: end if;
2532:
2533: BEGIN
2534: EXECUTE IMMEDIATE l_sql_text_attr_7 INTO l_enable_full_access_value

Line 2538: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2534: EXECUTE IMMEDIATE l_sql_text_attr_7 INTO l_enable_full_access_value
2535: USING 7, 'PARTNER', l_current_partnerid_of_rel;
2536: EXCEPTION
2537: WHEN NO_DATA_FOUND THEN
2538: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2539: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2540: fnd_message.SET_TOKEN('TEXT', 'No Data found executing sql_text for attribute id 7 ' || l_sql_text_attr_7);
2541: fnd_msg_pub.ADD;
2542: end if;

Line 2541: fnd_msg_pub.ADD;

2537: WHEN NO_DATA_FOUND THEN
2538: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2539: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2540: fnd_message.SET_TOKEN('TEXT', 'No Data found executing sql_text for attribute id 7 ' || l_sql_text_attr_7);
2541: fnd_msg_pub.ADD;
2542: end if;
2543: END;
2544:
2545: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 2545: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2541: fnd_msg_pub.ADD;
2542: end if;
2543: END;
2544:
2545: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2546: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2547: fnd_message.Set_token('TEXT', ' Value of Allow Access Profile value for partner ' || l_current_partnerid_of_rel || ' is ' || l_enable_full_access_value);
2548: fnd_msg_pub.Add;
2549: end if;

Line 2548: fnd_msg_pub.Add;

2544:
2545: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2546: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2547: fnd_message.Set_token('TEXT', ' Value of Allow Access Profile value for partner ' || l_current_partnerid_of_rel || ' is ' || l_enable_full_access_value);
2548: fnd_msg_pub.Add;
2549: end if;
2550:
2551:
2552: IF(l_enable_full_access_value = 'Y') then

Line 2554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2550:
2551:
2552: IF(l_enable_full_access_value = 'Y') then
2553:
2554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2555: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2556: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is Y and updatign team_leader_flag to Y');
2557: fnd_msg_pub.Add;
2558: end if;

Line 2557: fnd_msg_pub.Add;

2553:
2554: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2555: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2556: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is Y and updatign team_leader_flag to Y');
2557: fnd_msg_pub.Add;
2558: end if;
2559:
2560: l_sales_team_rec.Team_Leader_Flag := 'Y';
2561:

Line 2564: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2560: l_sales_team_rec.Team_Leader_Flag := 'Y';
2561:
2562: ELSIF(l_enable_full_access_value = 'N') then
2563:
2564: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2565: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2566: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is N and updating team leader flkag to N');
2567: fnd_msg_pub.Add;
2568: end if;

Line 2567: fnd_msg_pub.Add;

2563:
2564: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2565: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2566: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is N and updating team leader flkag to N');
2567: fnd_msg_pub.Add;
2568: end if;
2569:
2570: l_sales_team_rec.Team_Leader_Flag := 'N';
2571:

Line 2573: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2569:
2570: l_sales_team_rec.Team_Leader_Flag := 'N';
2571:
2572: ELSE -- FOr null value and othewr values
2573: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2574: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2575: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2576: fnd_msg_pub.Add;
2577: end if;

Line 2576: fnd_msg_pub.Add;

2572: ELSE -- FOr null value and othewr values
2573: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2574: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2575: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2576: fnd_msg_pub.Add;
2577: end if;
2578:
2579: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2580: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2579: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2575: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is null or other values');
2576: fnd_msg_pub.Add;
2577: end if;
2578:
2579: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2580: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2581: fnd_message.Set_token('TEXT', ' Now the next level of security which is the profile options value would come into picture.');
2582: fnd_msg_pub.Add;
2583: end if;

Line 2582: fnd_msg_pub.Add;

2578:
2579: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2580: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2581: fnd_message.Set_token('TEXT', ' Now the next level of security which is the profile options value would come into picture.');
2582: fnd_msg_pub.Add;
2583: end if;
2584:
2585: IF l_pt_full_access_opp = 'Y' THEN
2586:

Line 2587: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2583: end if;
2584:
2585: IF l_pt_full_access_opp = 'Y' THEN
2586:
2587: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2588: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2589: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting team_leader_flag to Y');
2590: fnd_msg_pub.Add;
2591: end if;

Line 2590: fnd_msg_pub.Add;

2586:
2587: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2588: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2589: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting team_leader_flag to Y');
2590: fnd_msg_pub.Add;
2591: end if;
2592:
2593: l_sales_team_rec.Team_Leader_Flag := 'Y';
2594:

Line 2597: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2593: l_sales_team_rec.Team_Leader_Flag := 'Y';
2594:
2595: ELSE
2596:
2597: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2598: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2599: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting team_leader_flag to N');
2600: fnd_msg_pub.Add;
2601: end if;

Line 2600: fnd_msg_pub.Add;

2596:
2597: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2598: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2599: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting team_leader_flag to N');
2600: fnd_msg_pub.Add;
2601: end if;
2602:
2603: l_sales_team_rec.Team_Leader_Flag := 'N';
2604:

Line 2714: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2710: COMMIT WORK;
2711: END IF;
2712:
2713: -- Debug Message
2714: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2715: fnd_message.Set_Name('PV', 'API:' || l_api_name || ': End');
2716: fnd_msg_pub.Add;
2717: END IF;
2718:

Line 2716: fnd_msg_pub.Add;

2712:
2713: -- Debug Message
2714: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2715: fnd_message.Set_Name('PV', 'API:' || l_api_name || ': End');
2716: fnd_msg_pub.Add;
2717: END IF;
2718:
2719: -- Standard call to get message count and if count is 1, get message info.
2720: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

Line 2720: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

2716: fnd_msg_pub.Add;
2717: END IF;
2718:
2719: -- Standard call to get message count and if count is 1, get message info.
2720: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
2721: p_count => x_msg_count,
2722: p_data => x_msg_data);
2723:
2724: EXCEPTION

Line 2730: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

2726: WHEN FND_API.G_EXC_ERROR THEN
2727:
2728: x_return_status := FND_API.G_RET_STS_ERROR ;
2729:
2730: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
2731: p_count => x_msg_count,
2732: p_data => x_msg_data);
2733:
2734: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 2738: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

2734: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2735:
2736: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2737:
2738: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
2739: p_count => x_msg_count,
2740: p_data => x_msg_data);
2741:
2742: WHEN OTHERS THEN

Line 2746: fnd_msg_pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

2742: WHEN OTHERS THEN
2743:
2744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2745:
2746: fnd_msg_pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
2747: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
2748: p_count => x_msg_count,
2749: p_data => x_msg_data);
2750:

Line 2747: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

2743:
2744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2745:
2746: fnd_msg_pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
2747: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
2748: p_count => x_msg_count,
2749: p_data => x_msg_data);
2750:
2751: end UpdateAccess;

Line 2785: fnd_msg_pub.initialize;

2781:
2782: -- Initialize message list if p_init_msg_list is set to TRUE.
2783: IF FND_API.to_Boolean( p_init_msg_list )
2784: THEN
2785: fnd_msg_pub.initialize;
2786: END IF;
2787:
2788: -- Debug Message
2789: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 2789: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

2785: fnd_msg_pub.initialize;
2786: END IF;
2787:
2788: -- Debug Message
2789: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2790: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2791: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || '. Lead id: ' || p_Lead_id);
2792: fnd_msg_pub.Add;
2793: END IF;

Line 2792: fnd_msg_pub.Add;

2788: -- Debug Message
2789: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2790: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2791: fnd_message.Set_Token('TEXT', 'In ' || l_api_name || '. Lead id: ' || p_Lead_id);
2792: fnd_msg_pub.Add;
2793: END IF;
2794:
2795: -- Initialize API return status to success
2796: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2812: fnd_msg_pub.Add;

2808: when TOO_MANY_ROWS then
2809:
2810: fnd_message.Set_Name('PV', 'PV_INVALID_ROUTING_ROW');
2811: fnd_message.Set_Token('P_LEAD_ID', p_lead_id);
2812: fnd_msg_pub.Add;
2813:
2814: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2815:
2816: when NO_DATA_FOUND then

Line 2834: fnd_msg_pub.ADD;

2830: pv_assignment_pub.g_r_status_withdrawn) then
2831:
2832: fnd_message.Set_Name('PV', 'PV_UNKNOWN_ROUTING_STAGE');
2833: fnd_message.SET_TOKEN('P_ROUTING', x_routing_status);
2834: fnd_msg_pub.ADD;
2835:
2836: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2837:
2838: elsif x_wf_status not in (pv_assignment_pub.g_wf_status_open, pv_assignment_pub.g_wf_status_closed) then

Line 2843: fnd_msg_pub.ADD;

2839:
2840: fnd_message.Set_Name('PV', 'PV_INVALID_WF_STATUS');
2841: fnd_message.SET_TOKEN('P_WF_STATUS', x_wf_status);
2842: fnd_message.Set_Token('P_LEAD_ID', p_lead_id);
2843: fnd_msg_pub.ADD;
2844:
2845: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2846:
2847: end if;

Line 2858: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

2854: COMMIT WORK;
2855: END IF;
2856:
2857: -- Standard call to get message count and if count is 1, get message info.
2858: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
2859: p_count => x_msg_count,
2860: p_data => x_msg_data);
2861: EXCEPTION
2862:

Line 2866: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

2862:
2863: WHEN FND_API.G_EXC_ERROR THEN
2864:
2865: x_return_status := FND_API.G_RET_STS_ERROR ;
2866: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
2867: p_count => x_msg_count,
2868: p_data => x_msg_data);
2869:
2870: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 2873: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

2869:
2870: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2871:
2872: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2873: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
2874: p_count => x_msg_count,
2875: p_data => x_msg_data);
2876:
2877: WHEN OTHERS THEN

Line 2880: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

2876:
2877: WHEN OTHERS THEN
2878:
2879: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2880: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
2881: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
2882: p_count => x_msg_count,
2883: p_data => x_msg_data);
2884: end GetWorkflowID;

Line 2881: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,

2877: WHEN OTHERS THEN
2878:
2879: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2880: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
2881: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_TRUE,
2882: p_count => x_msg_count,
2883: p_data => x_msg_data);
2884: end GetWorkflowID;
2885:

Line 3023: fnd_msg_pub.initialize;

3019: END IF;
3020:
3021: -- Initialize message list if p_init_msg_list is set to TRUE.
3022: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3023: fnd_msg_pub.initialize;
3024: END IF;
3025:
3026: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3027: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 3026: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

3022: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3023: fnd_msg_pub.initialize;
3024: END IF;
3025:
3026: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3027: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3028: fnd_message.Set_Token('TEXT', 'In ' || l_api_name);
3029: fnd_msg_pub.Add;
3030: END IF;

Line 3029: fnd_msg_pub.Add;

3025:
3026: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3027: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3028: fnd_message.Set_Token('TEXT', 'In ' || l_api_name);
3029: fnd_msg_pub.Add;
3030: END IF;
3031:
3032: x_return_status := FND_API.G_RET_STS_SUCCESS ;
3033:

Line 3042: fnd_msg_pub.ADD;

3038: if l_wf_error_msg is not null then
3039:
3040: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
3041: fnd_message.SET_TOKEN('TEXT' ,l_wf_error_msg);
3042: fnd_msg_pub.ADD;
3043:
3044: fnd_message.SET_NAME('PV', 'PV_MSG_FRM_CHK_FOR_ERR');
3045: fnd_message.SET_TOKEN('P_ITEM_TYPE' ,p_itemtype);
3046: fnd_message.SET_TOKEN('P_ITEM_KEY' ,p_itemkey);

Line 3052: fnd_msg_pub.Add;

3048: if fnd_profile.value('ASF_PROFILE_DEBUG_MSG_ON') = 'Y' then
3049:
3050: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3051: fnd_message.Set_Token('TEXT', l_wf_error_stack);
3052: fnd_msg_pub.Add;
3053:
3054: end if;
3055:
3056: raise FND_API.G_EXC_ERROR;

Line 3064: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

3060: COMMIT WORK;
3061: END IF;
3062:
3063: -- Standard call to get message count and if count is 1, get message info.
3064: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
3065: p_count => x_msg_count,
3066: p_data => x_msg_data);
3067: EXCEPTION
3068:

Line 3072: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

3068:
3069: WHEN FND_API.G_EXC_ERROR THEN
3070:
3071: x_return_status := FND_API.G_RET_STS_ERROR ;
3072: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
3073: p_count => x_msg_count,
3074: p_data => x_msg_data);
3075:
3076: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 3079: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

3075:
3076: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3077:
3078: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3079: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
3080: p_count => x_msg_count,
3081: p_data => x_msg_data);
3082:
3083: WHEN OTHERS THEN

Line 3086: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);

3082:
3083: WHEN OTHERS THEN
3084:
3085: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3086: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
3087: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
3088: p_count => x_msg_count,
3089: p_data => x_msg_data);
3090:

Line 3087: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,

3083: WHEN OTHERS THEN
3084:
3085: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3086: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
3087: fnd_msg_pub.Count_And_Get( p_encoded => FND_API.G_FALSE,
3088: p_count => x_msg_count,
3089: p_data => x_msg_data);
3090:
3091: end checkforErrors;

Line 3117: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

3113: )
3114: IS
3115:
3116: BEGIN
3117: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3118: FND_MESSAGE.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3119: FND_MESSAGE.Set_Token('TEXT', p_msg_string);
3120: FND_MSG_PUB.Add;
3121: END IF;

Line 3120: FND_MSG_PUB.Add;

3116: BEGIN
3117: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
3118: FND_MESSAGE.Set_Name('PV', 'PV_DEBUG_MESSAGE');
3119: FND_MESSAGE.Set_Token('TEXT', p_msg_string);
3120: FND_MSG_PUB.Add;
3121: END IF;
3122: END Debug;
3123: -- =================================End of Debug================================
3124:

Line 3154: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level) THEN

3150: p_token3_value IN VARCHAR2 := NULL
3151: )
3152: IS
3153: BEGIN
3154: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level) THEN
3155: FND_MESSAGE.Set_Name('PV', p_msg_name);
3156: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
3157:
3158: IF (p_token2 IS NOT NULL) THEN

Line 3166: FND_MSG_PUB.Add;

3162: IF (p_token3 IS NOT NULL) THEN
3163: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
3164: END IF;
3165:
3166: FND_MSG_PUB.Add;
3167: END IF;
3168: END Set_Message;
3169: -- ==============================End of Set_Message==============================
3170: