DBA Data[Home] [Help]

APPS.ASO_SALES_TEAM_PVT dependencies on ASO_DEBUG_PUB

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

177: */
178: --Commented Code End Yogeshwar (MOAC)
179: BEGIN
180:
181: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
182:
183: -- Standard Start of API savepoint
184: SAVEPOINT ASSIGN_SALES_TEAM_PVT;
185:

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

204:
205: --
206: -- API body
207: --
208: IF aso_debug_pub.g_debug_flag = 'Y' THEN
209: aso_debug_pub.add('Begin Sales_Team_Assign',1,'Y');
210: END IF;
211: -- BASIC VALIDATIONS
212:

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

205: --
206: -- API body
207: --
208: IF aso_debug_pub.g_debug_flag = 'Y' THEN
209: aso_debug_pub.add('Begin Sales_Team_Assign',1,'Y');
210: END IF;
211: -- BASIC VALIDATIONS
212:
213: -- Check if profiles are set

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

212:
213: -- Check if profiles are set
214: IF (NVL(FND_PROFILE.Value('ASO_API_ENABLE_SECURITY'),'N') = 'N') OR (l_sales_team_prof = 'NONE') THEN
215:
216: IF aso_debug_pub.g_debug_flag = 'Y' THEN
217: aso_debug_pub.add('API_Enable_Sec is N or sales_team_prof is None: ',1,'Y');
218: END IF;
219:
220: RAISE Leave_Proc;

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

213: -- Check if profiles are set
214: IF (NVL(FND_PROFILE.Value('ASO_API_ENABLE_SECURITY'),'N') = 'N') OR (l_sales_team_prof = 'NONE') THEN
215:
216: IF aso_debug_pub.g_debug_flag = 'Y' THEN
217: aso_debug_pub.add('API_Enable_Sec is N or sales_team_prof is None: ',1,'Y');
218: END IF;
219:
220: RAISE Leave_Proc;
221:

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

284: END IF;
285: -- End: Check if a concurrent lock exists
286: -- END BASIC VALIDATIONS
287:
288: IF aso_debug_pub.g_debug_flag = 'Y' THEN
289: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
290: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
291: END IF;
292:

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

285: -- End: Check if a concurrent lock exists
286: -- END BASIC VALIDATIONS
287:
288: IF aso_debug_pub.g_debug_flag = 'Y' THEN
289: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
290: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
291: END IF;
292:
293: DELETE FROM ASO_STEAM_TEMP;

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

286: -- END BASIC VALIDATIONS
287:
288: IF aso_debug_pub.g_debug_flag = 'Y' THEN
289: aso_debug_pub.add('Operation_Code: '||P_Operation,1,'Y');
290: aso_debug_pub.add('Before Truncating Temp Table',1,'Y');
291: END IF;
292:
293: DELETE FROM ASO_STEAM_TEMP;
294:

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

308:
309: l_qte_header_rec := P_Qte_Header_Rec;
310:
311: END IF;
312: IF aso_debug_pub.g_debug_flag = 'Y' THEN
313: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
314: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
315: END IF;
316:

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

309: l_qte_header_rec := P_Qte_Header_Rec;
310:
311: END IF;
312: IF aso_debug_pub.g_debug_flag = 'Y' THEN
313: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
314: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
315: END IF;
316:
317: ASO_SALES_TEAM_PVT.Get_Sales_Team (

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

310:
311: END IF;
312: IF aso_debug_pub.g_debug_flag = 'Y' THEN
313: aso_debug_pub.add('Quote_Number: '||l_qte_header_rec.Quote_Number,1,'Y');
314: aso_debug_pub.add('Reassign_Flag: '||l_Reassign_Flag,1,'Y');
315: END IF;
316:
317: ASO_SALES_TEAM_PVT.Get_Sales_Team (
318: P_Init_Msg_List => FND_API.G_FALSE,

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

322: x_msg_count => x_msg_count,
323: x_msg_data => x_msg_data
324: );
325:
326: IF aso_debug_pub.g_debug_flag = 'Y' THEN
327: aso_debug_pub.add('After ASO_SALES_TEAM_PVT.get_sales_team: '||x_return_status,1,'Y');
328: END IF;
329:
330: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

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

323: x_msg_data => x_msg_data
324: );
325:
326: IF aso_debug_pub.g_debug_flag = 'Y' THEN
327: aso_debug_pub.add('After ASO_SALES_TEAM_PVT.get_sales_team: '||x_return_status,1,'Y');
328: END IF;
329:
330: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
331: RAISE FND_API.G_EXC_ERROR;

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

339: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
340: FND_MESSAGE.Set_Name('ASO', 'ASO_NO_SALES_TEAM');
341: FND_MSG_PUB.ADD;
342: END IF;
343: IF aso_debug_pub.g_debug_flag = 'Y' THEN
344: aso_debug_pub.add('After ASO_SALES_TEAM_PVT Added MSG: ',1,'Y');
345: END IF;
346:
347: X_Qte_Header_Rec := P_Qte_Header_Rec;

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

340: FND_MESSAGE.Set_Name('ASO', 'ASO_NO_SALES_TEAM');
341: FND_MSG_PUB.ADD;
342: END IF;
343: IF aso_debug_pub.g_debug_flag = 'Y' THEN
344: aso_debug_pub.add('After ASO_SALES_TEAM_PVT Added MSG: ',1,'Y');
345: END IF;
346:
347: X_Qte_Header_Rec := P_Qte_Header_Rec;
348: RAISE Leave_Proc;

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

348: RAISE Leave_Proc;
349: ELSE
350: IF P_Operation = 'UPDATE' THEN -- istore case
351:
352: IF aso_debug_pub.g_debug_flag = 'Y' THEN
353: aso_debug_pub.add('Before Update_Primary_SalesAgent(oprn=update): ',1,'Y');
354: END IF;
355: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
356: P_Init_Msg_List => FND_API.G_FALSE,

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

349: ELSE
350: IF P_Operation = 'UPDATE' THEN -- istore case
351:
352: IF aso_debug_pub.g_debug_flag = 'Y' THEN
353: aso_debug_pub.add('Before Update_Primary_SalesAgent(oprn=update): ',1,'Y');
354: END IF;
355: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
356: P_Init_Msg_List => FND_API.G_FALSE,
357: P_Qte_Header_Rec => l_Qte_Header_Rec,

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

363: x_msg_count => x_msg_count,
364: x_msg_data => x_msg_data
365: );
366:
367: IF aso_debug_pub.g_debug_flag = 'Y' THEN
368: aso_debug_pub.add('After Update_Primary_SalesInfo(oprn=update): '||x_return_status,1,'Y');
369: END IF;
370:
371: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

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

364: x_msg_data => x_msg_data
365: );
366:
367: IF aso_debug_pub.g_debug_flag = 'Y' THEN
368: aso_debug_pub.add('After Update_Primary_SalesInfo(oprn=update): '||x_return_status,1,'Y');
369: END IF;
370:
371: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
372: RAISE FND_API.G_EXC_ERROR;

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

382: OPEN C_Get_Creator_Res(G_USER_ID);
383: FETCH C_Get_Creator_Res INTO l_creator_res;
384: CLOSE C_Get_Creator_Res;
385:
386: IF aso_debug_pub.g_debug_flag = 'Y' THEN
387: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
388: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
389: END IF;
390: IF l_creator_res IS NOT NULL THEN

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

383: FETCH C_Get_Creator_Res INTO l_creator_res;
384: CLOSE C_Get_Creator_Res;
385:
386: IF aso_debug_pub.g_debug_flag = 'Y' THEN
387: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
388: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
389: END IF;
390: IF l_creator_res IS NOT NULL THEN
391:

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

384: CLOSE C_Get_Creator_Res;
385:
386: IF aso_debug_pub.g_debug_flag = 'Y' THEN
387: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:P_Operation: '||P_Operation,1,'Y');
388: aso_debug_pub.add('After ASO_SALES_TEAM_PVT No res returned:l_creator_res: '||l_creator_res,1,'Y');
389: END IF;
390: IF l_creator_res IS NOT NULL THEN
391:
392: -- Role Defaulting Logic

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

390: IF l_creator_res IS NOT NULL THEN
391:
392: -- Role Defaulting Logic
393:
394: IF aso_debug_pub.g_debug_flag = 'Y' THEN
395: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
396: END IF;
397:
398: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

391:
392: -- Role Defaulting Logic
393:
394: IF aso_debug_pub.g_debug_flag = 'Y' THEN
395: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
396: END IF;
397:
398: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
399: p_application_id => 521);

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

397:
398: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
399: p_application_id => 521);
400:
401: IF aso_debug_pub.g_debug_flag = 'Y' THEN
402: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
403: END IF;
404:
405: if l_obsolete_status = 'T' then

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

398: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
399: p_application_id => 521);
400:
401: IF aso_debug_pub.g_debug_flag = 'Y' THEN
402: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
403: END IF;
404:
405: if l_obsolete_status = 'T' then
406:

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

407: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE');
408:
409: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
410:
411: IF aso_debug_pub.g_debug_flag = 'Y' THEN
412: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
413: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
414: END IF;
415:

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

408:
409: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
410:
411: IF aso_debug_pub.g_debug_flag = 'Y' THEN
412: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
413: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
414: END IF;
415:
416: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

409: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
410:
411: IF aso_debug_pub.g_debug_flag = 'Y' THEN
412: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
413: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
414: END IF;
415:
416: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
417:

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

414: END IF;
415:
416: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
417:
418: IF aso_debug_pub.g_debug_flag = 'Y' THEN
419: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
420: END IF;
421:
422: if l_creator_grp is null then

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

415:
416: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
417:
418: IF aso_debug_pub.g_debug_flag = 'Y' THEN
419: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
420: END IF;
421:
422: if l_creator_grp is null then
423:

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

422: if l_creator_grp is null then
423:
424: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
425:
426: IF aso_debug_pub.g_debug_flag = 'Y' THEN
427: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
428: END IF;
429:
430: l_creator_grp := to_number(l_ots_grp_prof);

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

423:
424: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
425:
426: IF aso_debug_pub.g_debug_flag = 'Y' THEN
427: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
428: END IF;
429:
430: l_creator_grp := to_number(l_ots_grp_prof);
431:

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

428: END IF;
429:
430: l_creator_grp := to_number(l_ots_grp_prof);
431:
432: IF aso_debug_pub.g_debug_flag = 'Y' THEN
433: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
434: END IF;
435:
436: end if;

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

429:
430: l_creator_grp := to_number(l_ots_grp_prof);
431:
432: IF aso_debug_pub.g_debug_flag = 'Y' THEN
433: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
434: END IF;
435:
436: end if;
437:

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

440: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE_AND_GROUP');
441:
442: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
443:
444: IF aso_debug_pub.g_debug_flag = 'Y' THEN
445: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
446: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
447: END IF;
448:

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

441:
442: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
443:
444: IF aso_debug_pub.g_debug_flag = 'Y' THEN
445: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
446: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
447: END IF;
448:
449: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

442: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
443:
444: IF aso_debug_pub.g_debug_flag = 'Y' THEN
445: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
446: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
447: END IF;
448:
449: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
450:

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

447: END IF;
448:
449: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
450:
451: IF aso_debug_pub.g_debug_flag = 'Y' THEN
452: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
453: END IF;
454:
455: if l_creator_grp is null then

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

448:
449: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
450:
451: IF aso_debug_pub.g_debug_flag = 'Y' THEN
452: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
453: END IF;
454:
455: if l_creator_grp is null then
456:

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

455: if l_creator_grp is null then
456:
457: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
458:
459: IF aso_debug_pub.g_debug_flag = 'Y' THEN
460: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
461: END IF;
462:
463: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

456:
457: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
458:
459: IF aso_debug_pub.g_debug_flag = 'Y' THEN
460: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
461: END IF;
462:
463: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
464:

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

461: END IF;
462:
463: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
464:
465: IF aso_debug_pub.g_debug_flag = 'Y' THEN
466: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
467: END IF;
468:
469: end if;

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

462:
463: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
464:
465: IF aso_debug_pub.g_debug_flag = 'Y' THEN
466: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
467: END IF;
468:
469: end if;
470:

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

471: end if;
472:
473: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
474:
475: IF aso_debug_pub.g_debug_flag = 'Y' THEN
476: aso_debug_pub.add(' nores:create:l_role_prof: ' || l_role_prof, 1, 'N');
477: END IF;
478:
479: OPEN C_Get_Role_From_Code (l_role_prof);

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

472:
473: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
474:
475: IF aso_debug_pub.g_debug_flag = 'Y' THEN
476: aso_debug_pub.add(' nores:create:l_role_prof: ' || l_role_prof, 1, 'N');
477: END IF;
478:
479: OPEN C_Get_Role_From_Code (l_role_prof);
480: FETCH C_Get_Role_From_Code INTO l_creator_role;

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

480: FETCH C_Get_Role_From_Code INTO l_creator_role;
481: CLOSE C_Get_Role_From_Code;
482:
483: IF l_creator_role IS NULL THEN
484: IF aso_debug_pub.g_debug_flag = 'Y' THEN
485: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
486: END IF;
487:
488: OPEN C_Get_Resource_Role (l_creator_res);

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

481: CLOSE C_Get_Role_From_Code;
482:
483: IF l_creator_role IS NULL THEN
484: IF aso_debug_pub.g_debug_flag = 'Y' THEN
485: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
486: END IF;
487:
488: OPEN C_Get_Resource_Role (l_creator_res);
489: FETCH C_Get_Resource_Role INTO l_creator_role;

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

490: CLOSE C_Get_Resource_Role;
491:
492: END IF;
493:
494: IF aso_debug_pub.g_debug_flag = 'Y' THEN
495: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
496: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
497: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
498: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');

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

491:
492: END IF;
493:
494: IF aso_debug_pub.g_debug_flag = 'Y' THEN
495: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
496: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
497: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
498: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
499: END IF;

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

492: END IF;
493:
494: IF aso_debug_pub.g_debug_flag = 'Y' THEN
495: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
496: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
497: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
498: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
499: END IF;
500:

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

493:
494: IF aso_debug_pub.g_debug_flag = 'Y' THEN
495: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
496: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
497: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
498: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
499: END IF;
500:
501: l_sequence := NULL;

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

494: IF aso_debug_pub.g_debug_flag = 'Y' THEN
495: aso_debug_pub.add('nores:create:Role Profile: '||l_ots_role_prof,1,'Y');
496: aso_debug_pub.add('nores:create:Role Profile: '||l_role_prof,1,'Y');
497: aso_debug_pub.add('nores:create:Creator Role: '||l_creator_role,1,'Y');
498: aso_debug_pub.add('nores:create:Creator Group: '||l_creator_grp,1,'Y');
499: END IF;
500:
501: l_sequence := NULL;
502:

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

547: OPEN C_Valid_SalesRep (l_creator_res);
548: FETCH C_Valid_SalesRep INTO l_valid;
549: CLOSE C_Valid_SalesRep;
550:
551: IF aso_debug_pub.g_debug_flag = 'Y' THEN
552: aso_debug_pub.add('nores:create:Creator Valid SalesRep : '||l_valid,1,'Y');
553: END IF;
554:
555: IF l_valid = 'Y' THEN

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

548: FETCH C_Valid_SalesRep INTO l_valid;
549: CLOSE C_Valid_SalesRep;
550:
551: IF aso_debug_pub.g_debug_flag = 'Y' THEN
552: aso_debug_pub.add('nores:create:Creator Valid SalesRep : '||l_valid,1,'Y');
553: END IF;
554:
555: IF l_valid = 'Y' THEN
556: l_primary_salesagent := l_creator_res;

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

565: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
566: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
567: CLOSE C_Get_Res_From_Srep;
568:
569: IF aso_debug_pub.g_debug_flag = 'Y' THEN
570: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
571: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
572: END IF;
573: ELSE

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

566: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
567: CLOSE C_Get_Res_From_Srep;
568:
569: IF aso_debug_pub.g_debug_flag = 'Y' THEN
570: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
571: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
572: END IF;
573: ELSE
574: x_return_status := FND_API.G_RET_STS_ERROR;

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

567: CLOSE C_Get_Res_From_Srep;
568:
569: IF aso_debug_pub.g_debug_flag = 'Y' THEN
570: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
571: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default SalesGrp: '||l_primary_res_grp,1,'N');
572: END IF;
573: ELSE
574: x_return_status := FND_API.G_RET_STS_ERROR;
575: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

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

586: END IF; -- salesrep_prof
587:
588: l_primary_role := l_default_role_prof;
589:
590: IF aso_debug_pub.g_debug_flag = 'Y' THEN
591: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
592: END IF;
593:
594: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

587:
588: l_primary_role := l_default_role_prof;
589:
590: IF aso_debug_pub.g_debug_flag = 'Y' THEN
591: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
592: END IF;
593:
594: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
595: p_application_id => 521);

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

593:
594: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
595: p_application_id => 521);
596:
597: IF aso_debug_pub.g_debug_flag = 'Y' THEN
598: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
599: END IF;
600:
601: if l_obsolete_status = 'T' then

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

594: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
595: p_application_id => 521);
596:
597: IF aso_debug_pub.g_debug_flag = 'Y' THEN
598: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
599: END IF;
600:
601: if l_obsolete_status = 'T' then
602:

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

601: if l_obsolete_status = 'T' then
602:
603: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
604:
605: IF aso_debug_pub.g_debug_flag = 'Y' THEN
606: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
607: END IF;
608:
609: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

602:
603: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
604:
605: IF aso_debug_pub.g_debug_flag = 'Y' THEN
606: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
607: END IF;
608:
609: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
610:

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

607: END IF;
608:
609: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
610:
611: IF aso_debug_pub.g_debug_flag = 'Y' THEN
612: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
613: END IF;
614:
615: if l_primary_res_grp is null then

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

608:
609: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
610:
611: IF aso_debug_pub.g_debug_flag = 'Y' THEN
612: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
613: END IF;
614:
615: if l_primary_res_grp is null then
616:

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

615: if l_primary_res_grp is null then
616:
617: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
618:
619: IF aso_debug_pub.g_debug_flag = 'Y' THEN
620: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
621: END IF;
622:
623: l_primary_res_grp := to_number(l_ots_grp_prof);

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

616:
617: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
618:
619: IF aso_debug_pub.g_debug_flag = 'Y' THEN
620: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
621: END IF;
622:
623: l_primary_res_grp := to_number(l_ots_grp_prof);
624:

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

621: END IF;
622:
623: l_primary_res_grp := to_number(l_ots_grp_prof);
624:
625: IF aso_debug_pub.g_debug_flag = 'Y' THEN
626: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
627: END IF;
628:
629: end if;

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

622:
623: l_primary_res_grp := to_number(l_ots_grp_prof);
624:
625: IF aso_debug_pub.g_debug_flag = 'Y' THEN
626: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
627: END IF;
628:
629: end if;
630:

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

631: else
632:
633: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
634:
635: IF aso_debug_pub.g_debug_flag = 'Y' THEN
636: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
637: END IF;
638:
639: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

632:
633: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
634:
635: IF aso_debug_pub.g_debug_flag = 'Y' THEN
636: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
637: END IF;
638:
639: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
640:

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

637: END IF;
638:
639: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
640:
641: IF aso_debug_pub.g_debug_flag = 'Y' THEN
642: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
643: END IF;
644:
645: if l_primary_res_grp is null then

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

638:
639: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
640:
641: IF aso_debug_pub.g_debug_flag = 'Y' THEN
642: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
643: END IF;
644:
645: if l_primary_res_grp is null then
646:

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

645: if l_primary_res_grp is null then
646:
647: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
648:
649: IF aso_debug_pub.g_debug_flag = 'Y' THEN
650: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
651: END IF;
652:
653: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

646:
647: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
648:
649: IF aso_debug_pub.g_debug_flag = 'Y' THEN
650: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
651: END IF;
652:
653: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
654:

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

651: END IF;
652:
653: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
654:
655: IF aso_debug_pub.g_debug_flag = 'Y' THEN
656: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
657: END IF;
658:
659: end if;

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

652:
653: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
654:
655: IF aso_debug_pub.g_debug_flag = 'Y' THEN
656: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
657: END IF;
658:
659: end if;
660:

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

659: end if;
660:
661: end if;
662:
663: IF aso_debug_pub.g_debug_flag = 'Y' THEN
664: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
665: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
666: END IF;
667:

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

660:
661: end if;
662:
663: IF aso_debug_pub.g_debug_flag = 'Y' THEN
664: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
665: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
666: END IF;
667:
668: END IF; -- salesagent is NULL

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

661: end if;
662:
663: IF aso_debug_pub.g_debug_flag = 'Y' THEN
664: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
665: aso_debug_pub.add('nores:create:Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
666: END IF;
667:
668: END IF; -- salesagent is NULL
669:

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

671: OPEN C_Get_Resource_Role (l_primary_salesagent);
672: FETCH C_Get_Resource_Role INTO l_primary_role;
673: CLOSE C_Get_Resource_Role;
674:
675: IF aso_debug_pub.g_debug_flag = 'Y' THEN
676: aso_debug_pub.add('nores:create:Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
677: END IF;
678: END IF;
679:

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

672: FETCH C_Get_Resource_Role INTO l_primary_role;
673: CLOSE C_Get_Resource_Role;
674:
675: IF aso_debug_pub.g_debug_flag = 'Y' THEN
676: aso_debug_pub.add('nores:create:Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
677: END IF;
678: END IF;
679:
680: IF l_valid IS NULL OR l_valid <> 'Y' THEN

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

677: END IF;
678: END IF;
679:
680: IF l_valid IS NULL OR l_valid <> 'Y' THEN
681: IF aso_debug_pub.g_debug_flag = 'Y' THEN
682: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert:l_valid '||l_valid,1,'N');
683: END IF;
684: l_sequence := NULL;
685:

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

678: END IF;
679:
680: IF l_valid IS NULL OR l_valid <> 'Y' THEN
681: IF aso_debug_pub.g_debug_flag = 'Y' THEN
682: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert:l_valid '||l_valid,1,'N');
683: END IF;
684: l_sequence := NULL;
685:
686: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

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

728: );
729:
730: END IF;
731:
732: IF aso_debug_pub.g_debug_flag = 'Y' THEN
733: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert in qte_hdr ',1,'N');
734: END IF;
735:
736: UPDATE ASO_QUOTE_HEADERS_ALL

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

729:
730: END IF;
731:
732: IF aso_debug_pub.g_debug_flag = 'Y' THEN
733: aso_debug_pub.add('nores:create:Assign_Sales_Team: Before primary salesagent insert in qte_hdr ',1,'N');
734: END IF;
735:
736: UPDATE ASO_QUOTE_HEADERS_ALL
737: SET Resource_Id = l_primary_salesagent,

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

753:
754: END IF; -- p_operation ELSE
755: END IF; -- res count = 0
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('Before Temp_Insert'||NVL(lx_gen_return_Rec.resource_id.COUNT,0),1,'Y');
759: END IF;
760:
761: FORALL i IN lx_gen_return_Rec.resource_id.FIRST..lx_gen_return_Rec.resource_id.LAST

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

754: END IF; -- p_operation ELSE
755: END IF; -- res count = 0
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('Before Temp_Insert'||NVL(lx_gen_return_Rec.resource_id.COUNT,0),1,'Y');
759: END IF;
760:
761: FORALL i IN lx_gen_return_Rec.resource_id.FIRST..lx_gen_return_Rec.resource_id.LAST
762: INSERT INTO ASO_STEAM_TEMP ( Access_Id,

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

790: FROM JTF_RS_ROLES_B A
791: WHERE A.Role_Code = NVL(lx_gen_return_Rec.role(i),A.Role_Code)
792: AND rownum = 1;
793:
794: IF aso_debug_pub.g_debug_flag = 'Y' THEN
795: aso_debug_pub.add('After Temp Insert',1,'Y');
796: END IF;
797:
798: IF l_Reassign_Flag = 'Y' THEN

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

791: WHERE A.Role_Code = NVL(lx_gen_return_Rec.role(i),A.Role_Code)
792: AND rownum = 1;
793:
794: IF aso_debug_pub.g_debug_flag = 'Y' THEN
795: aso_debug_pub.add('After Temp Insert',1,'Y');
796: END IF;
797:
798: IF l_Reassign_Flag = 'Y' THEN
799:

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

796: END IF;
797:
798: IF l_Reassign_Flag = 'Y' THEN
799:
800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
801: select count(*) into i from aso_steam_temp;
802: aso_debug_pub.add('count: '||i,1,'Y');
803:
804: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');

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

798: IF l_Reassign_Flag = 'Y' THEN
799:
800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
801: select count(*) into i from aso_steam_temp;
802: aso_debug_pub.add('count: '||i,1,'Y');
803:
804: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');
805: END IF;
806: DELETE FROM ASO_QUOTE_ACCESSES C

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

800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
801: select count(*) into i from aso_steam_temp;
802: aso_debug_pub.add('count: '||i,1,'Y');
803:
804: aso_debug_pub.add('Before Delete Not Kept Existing Res ',1,'Y');
805: END IF;
806: DELETE FROM ASO_QUOTE_ACCESSES C
807: WHERE C.resource_id NOT IN
808: (SELECT A.resource_id

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

814: OR NVL(A.keep_flag,'N') = 'Y')
815: AND A.Quote_Number = l_qte_header_rec.quote_number)
816: AND C.Quote_Number = l_qte_header_rec.quote_number;
817:
818: IF aso_debug_pub.g_debug_flag = 'Y' THEN
819: select count(*) into i from aso_steam_temp;
820: aso_debug_pub.add('count: '||i,1,'Y');
821:
822: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');

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

816: AND C.Quote_Number = l_qte_header_rec.quote_number;
817:
818: IF aso_debug_pub.g_debug_flag = 'Y' THEN
819: select count(*) into i from aso_steam_temp;
820: aso_debug_pub.add('count: '||i,1,'Y');
821:
822: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');
823: END IF;
824: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);

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

818: IF aso_debug_pub.g_debug_flag = 'Y' THEN
819: select count(*) into i from aso_steam_temp;
820: aso_debug_pub.add('count: '||i,1,'Y');
821:
822: aso_debug_pub.add('Before Delete Kept Res ',1,'Y');
823: END IF;
824: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);
825: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
826: CLOSE C_Get_All_Resource;

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

824: OPEN C_Get_All_Resource(l_Qte_Header_Rec.Quote_Number);
825: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
826: CLOSE C_Get_All_Resource;
827:
828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
829: aso_debug_pub.add('Keep_Res_Id.COUNT: '||NVL(Keep_Res_Id.COUNT,0),1,'Y');
830: END IF;
831: IF NVL(Keep_Res_Id.COUNT,0) > 0 THEN
832: FORALL i IN Keep_Res_Id.FIRST..Keep_Res_Id.LAST

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

825: FETCH C_Get_All_Resource BULK COLLECT INTO Keep_Res_Id;
826: CLOSE C_Get_All_Resource;
827:
828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
829: aso_debug_pub.add('Keep_Res_Id.COUNT: '||NVL(Keep_Res_Id.COUNT,0),1,'Y');
830: END IF;
831: IF NVL(Keep_Res_Id.COUNT,0) > 0 THEN
832: FORALL i IN Keep_Res_Id.FIRST..Keep_Res_Id.LAST
833: DELETE FROM ASO_STEAM_TEMP

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

834: WHERE Resource_Id = Keep_Res_Id(i);
835: END IF;
836: END IF;
837:
838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
839: select count(*) into i from aso_steam_temp;
840: aso_debug_pub.add('count: '||i,1,'Y');
841:
842: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');

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

836: END IF;
837:
838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
839: select count(*) into i from aso_steam_temp;
840: aso_debug_pub.add('count: '||i,1,'Y');
841:
842: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');
843: END IF;
844: DELETE FROM ASO_STEAM_TEMP

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

838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
839: select count(*) into i from aso_steam_temp;
840: aso_debug_pub.add('count: '||i,1,'Y');
841:
842: aso_debug_pub.add('Before Delete Invalid Roles ',1,'Y');
843: END IF;
844: DELETE FROM ASO_STEAM_TEMP
845: WHERE Role_Id IS NOT NULL
846: AND Role_Id NOT IN ( SELECT Role_Id

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

846: AND Role_Id NOT IN ( SELECT Role_Id
847: FROM JTF_RS_ROLES_B
848: WHERE Role_Type_Code IN ('TELESALES', 'SALES','FIELDSALES','PRM'));
849:
850: IF aso_debug_pub.g_debug_flag = 'Y' THEN
851: select count(*) into i from aso_steam_temp;
852: aso_debug_pub.add('count: '||i,1,'Y');
853:
854: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');

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

848: WHERE Role_Type_Code IN ('TELESALES', 'SALES','FIELDSALES','PRM'));
849:
850: IF aso_debug_pub.g_debug_flag = 'Y' THEN
851: select count(*) into i from aso_steam_temp;
852: aso_debug_pub.add('count: '||i,1,'Y');
853:
854: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');
855: END IF;
856: l_dynamic := 'DELETE FROM ASO_STEAM_TEMP '||

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

850: IF aso_debug_pub.g_debug_flag = 'Y' THEN
851: select count(*) into i from aso_steam_temp;
852: aso_debug_pub.add('count: '||i,1,'Y');
853:
854: aso_debug_pub.add('Before Delete Duplicate Res/Roles/Grp combos ',1,'Y');
855: END IF;
856: l_dynamic := 'DELETE FROM ASO_STEAM_TEMP '||
857: 'WHERE rowid NOT IN ( SELECT rowid '||
858: 'FROM ( SELECT rowid, dense_rank() OVER '||

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

863: 'WHERE Rank_Val = 1 )';
864:
865: EXECUTE IMMEDIATE l_dynamic;
866:
867: IF aso_debug_pub.g_debug_flag = 'Y' THEN
868: select count(*) into i from aso_steam_temp;
869: aso_debug_pub.add('count: '||i,1,'Y');
870:
871: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');

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

865: EXECUTE IMMEDIATE l_dynamic;
866:
867: IF aso_debug_pub.g_debug_flag = 'Y' THEN
868: select count(*) into i from aso_steam_temp;
869: aso_debug_pub.add('count: '||i,1,'Y');
870:
871: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');
872: END IF;
873: DELETE FROM ASO_STEAM_TEMP

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

867: IF aso_debug_pub.g_debug_flag = 'Y' THEN
868: select count(*) into i from aso_steam_temp;
869: aso_debug_pub.add('count: '||i,1,'Y');
870:
871: aso_debug_pub.add('Before Delete Duplicate Resources ',1,'Y');
872: END IF;
873: DELETE FROM ASO_STEAM_TEMP
874: WHERE rowid IN (
875: SELECT rowid FROM ASO_STEAM_TEMP

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

877: MINUS
878: SELECT min(rowid) FROM ASO_STEAM_TEMP
879: GROUP BY Resource_Id);
880:
881: IF aso_debug_pub.g_debug_flag = 'Y' THEN
882: select count(*) into i from aso_steam_temp;
883: aso_debug_pub.add('count: '||i,1,'Y');
884:
885: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');

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

879: GROUP BY Resource_Id);
880:
881: IF aso_debug_pub.g_debug_flag = 'Y' THEN
882: select count(*) into i from aso_steam_temp;
883: aso_debug_pub.add('count: '||i,1,'Y');
884:
885: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');
886: END IF;
887: INSERT INTO ASO_QUOTE_ACCESSES ( ACCESS_ID,

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

881: IF aso_debug_pub.g_debug_flag = 'Y' THEN
882: select count(*) into i from aso_steam_temp;
883: aso_debug_pub.add('count: '||i,1,'Y');
884:
885: aso_debug_pub.add('Before Insert into Quote_Accesses ',1,'Y');
886: END IF;
887: INSERT INTO ASO_QUOTE_ACCESSES ( ACCESS_ID,
888: QUOTE_NUMBER,
889: RESOURCE_ID,

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

912: Role_Id
913: FROM ASO_STEAM_TEMP
914: WHERE Quote_Number = l_Qte_Header_Rec.Quote_Number;
915:
916: IF aso_debug_pub.g_debug_flag = 'Y' THEN
917: aso_debug_pub.add('After Insert into Quote_Accesses ',1,'Y');
918: END IF;
919:
920: IF P_Operation = 'CREATE' THEN

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

913: FROM ASO_STEAM_TEMP
914: WHERE Quote_Number = l_Qte_Header_Rec.Quote_Number;
915:
916: IF aso_debug_pub.g_debug_flag = 'Y' THEN
917: aso_debug_pub.add('After Insert into Quote_Accesses ',1,'Y');
918: END IF;
919:
920: IF P_Operation = 'CREATE' THEN
921:

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

922: OPEN C_Get_Creator_Res(G_USER_ID);
923: FETCH C_Get_Creator_Res INTO l_creator_res;
924: CLOSE C_Get_Creator_Res;
925:
926: IF aso_debug_pub.g_debug_flag = 'Y' THEN
927: aso_debug_pub.add('Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
928: END IF;
929:
930: IF l_creator_res IS NOT NULL THEN

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

923: FETCH C_Get_Creator_Res INTO l_creator_res;
924: CLOSE C_Get_Creator_Res;
925:
926: IF aso_debug_pub.g_debug_flag = 'Y' THEN
927: aso_debug_pub.add('Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
928: END IF;
929:
930: IF l_creator_res IS NOT NULL THEN
931:

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

931:
932: OPEN C_Check_Creator_Res(l_Qte_Header_Rec.Quote_Number, l_creator_res);
933: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
934: CLOSE C_Check_Creator_Res;
935: IF aso_debug_pub.g_debug_flag = 'Y' THEN
936: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
937: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
938: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
939: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');

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

932: OPEN C_Check_Creator_Res(l_Qte_Header_Rec.Quote_Number, l_creator_res);
933: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
934: CLOSE C_Check_Creator_Res;
935: IF aso_debug_pub.g_debug_flag = 'Y' THEN
936: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
937: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
938: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
939: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
940: END IF;

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

933: FETCH C_Check_Creator_Res INTO l_creator_found, l_creator_grp;
934: CLOSE C_Check_Creator_Res;
935: IF aso_debug_pub.g_debug_flag = 'Y' THEN
936: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
937: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
938: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
939: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
940: END IF;
941:

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

934: CLOSE C_Check_Creator_Res;
935: IF aso_debug_pub.g_debug_flag = 'Y' THEN
936: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
937: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
938: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
939: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
940: END IF;
941:
942: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN

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

935: IF aso_debug_pub.g_debug_flag = 'Y' THEN
936: aso_debug_pub.add('Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
937: aso_debug_pub.add('Fetch Creator Res: '||l_creator_res,1,'Y');
938: aso_debug_pub.add('Fetch Creator Grp: '||l_creator_grp,1,'Y');
939: aso_debug_pub.add('Creator Found: '||l_creator_found,1,'Y');
940: END IF;
941:
942: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
943: -- Role Defaulting Logic

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

941:
942: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
943: -- Role Defaulting Logic
944:
945: IF aso_debug_pub.g_debug_flag = 'Y' THEN
946: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
947: END IF;
948:
949: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

942: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
943: -- Role Defaulting Logic
944:
945: IF aso_debug_pub.g_debug_flag = 'Y' THEN
946: aso_debug_pub.add('Assign_Sales_Team: Before calling Get_Profile_Obsolete_Status', 1, 'N');
947: END IF;
948:
949: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
950: p_application_id => 521);

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

948:
949: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
950: p_application_id => 521);
951:
952: IF aso_debug_pub.g_debug_flag = 'Y' THEN
953: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
954: END IF;
955:
956: if l_obsolete_status = 'T' then

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

949: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
950: p_application_id => 521);
951:
952: IF aso_debug_pub.g_debug_flag = 'Y' THEN
953: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
954: END IF;
955:
956: if l_obsolete_status = 'T' then
957:

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

958: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE');
959:
960: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
961:
962: IF aso_debug_pub.g_debug_flag = 'Y' THEN
963: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
964: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
965: END IF;
966:

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

959:
960: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
961:
962: IF aso_debug_pub.g_debug_flag = 'Y' THEN
963: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
964: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
965: END IF;
966:
967: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

960: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
961:
962: IF aso_debug_pub.g_debug_flag = 'Y' THEN
963: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
964: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
965: END IF;
966:
967: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
968:

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

965: END IF;
966:
967: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
968:
969: IF aso_debug_pub.g_debug_flag = 'Y' THEN
970: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
971: END IF;
972:
973: if l_creator_grp is null then

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

966:
967: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
968:
969: IF aso_debug_pub.g_debug_flag = 'Y' THEN
970: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
971: END IF;
972:
973: if l_creator_grp is null then
974:

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

973: if l_creator_grp is null then
974:
975: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
976:
977: IF aso_debug_pub.g_debug_flag = 'Y' THEN
978: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
979: END IF;
980:
981: l_creator_grp := to_number(l_ots_grp_prof);

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

974:
975: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
976:
977: IF aso_debug_pub.g_debug_flag = 'Y' THEN
978: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
979: END IF;
980:
981: l_creator_grp := to_number(l_ots_grp_prof);
982:

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

979: END IF;
980:
981: l_creator_grp := to_number(l_ots_grp_prof);
982:
983: IF aso_debug_pub.g_debug_flag = 'Y' THEN
984: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
985: END IF;
986:
987: end if;

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

980:
981: l_creator_grp := to_number(l_ots_grp_prof);
982:
983: IF aso_debug_pub.g_debug_flag = 'Y' THEN
984: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
985: END IF;
986:
987: end if;
988:

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

991: l_ots_role_prof := fnd_profile.value('AST_DEFAULT_ROLE_AND_GROUP');
992:
993: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
994:
995: IF aso_debug_pub.g_debug_flag = 'Y' THEN
996: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
997: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
998: END IF;
999:

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

992:
993: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
994:
995: IF aso_debug_pub.g_debug_flag = 'Y' THEN
996: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
997: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
998: END IF;
999:
1000: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

993: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
994:
995: IF aso_debug_pub.g_debug_flag = 'Y' THEN
996: aso_debug_pub.add('l_ots_role_prof: ' || l_ots_role_prof, 1, 'N');
997: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
998: END IF;
999:
1000: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1001:

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

998: END IF;
999:
1000: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1001:
1002: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1003: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1004: END IF;
1005:
1006: if l_creator_grp is null then

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

999:
1000: l_creator_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1001:
1002: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1003: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1004: END IF;
1005:
1006: if l_creator_grp is null then
1007:

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

1006: if l_creator_grp is null then
1007:
1008: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1009:
1010: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1011: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1012: END IF;
1013:
1014: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

1007:
1008: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1009:
1010: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1011: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1012: END IF;
1013:
1014: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1015:

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

1012: END IF;
1013:
1014: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1015:
1016: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1017: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1018: END IF;
1019:
1020: end if;

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

1013:
1014: l_creator_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1015:
1016: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1017: aso_debug_pub.add('l_creator_grp: ' || l_creator_grp, 1, 'N');
1018: END IF;
1019:
1020: end if;
1021:

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

1022: end if;
1023:
1024: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
1025:
1026: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1027: aso_debug_pub.add('l_role_prof: ' || l_role_prof, 1, 'N');
1028: END IF;
1029:
1030: OPEN C_Get_Role_From_Code (l_role_prof);

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

1023:
1024: l_role_prof := SUBSTR(l_ots_role_prof, 1, INSTR(l_ots_role_prof, ':')-1);
1025:
1026: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1027: aso_debug_pub.add('l_role_prof: ' || l_role_prof, 1, 'N');
1028: END IF;
1029:
1030: OPEN C_Get_Role_From_Code (l_role_prof);
1031: FETCH C_Get_Role_From_Code INTO l_creator_role;

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

1031: FETCH C_Get_Role_From_Code INTO l_creator_role;
1032: CLOSE C_Get_Role_From_Code;
1033:
1034: IF l_creator_role IS NULL THEN
1035: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1036: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
1037: END IF;
1038:
1039: OPEN C_Get_Resource_Role (l_creator_res);

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

1032: CLOSE C_Get_Role_From_Code;
1033:
1034: IF l_creator_role IS NULL THEN
1035: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1036: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_creator_role,1,'N');
1037: END IF;
1038:
1039: OPEN C_Get_Resource_Role (l_creator_res);
1040: FETCH C_Get_Resource_Role INTO l_creator_role;

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

1041: CLOSE C_Get_Resource_Role;
1042:
1043: END IF;
1044:
1045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1046: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1047: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1048: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1049: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');

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

1042:
1043: END IF;
1044:
1045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1046: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1047: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1048: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1049: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1050: END IF;

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

1043: END IF;
1044:
1045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1046: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1047: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1048: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1049: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1050: END IF;
1051:

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

1044:
1045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1046: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1047: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1048: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1049: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1050: END IF;
1051:
1052: l_sequence := NULL;

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

1045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1046: aso_debug_pub.add('Role Profile: '||l_ots_role_prof,1,'Y');
1047: aso_debug_pub.add('Role Profile: '||l_role_prof,1,'Y');
1048: aso_debug_pub.add('Creator Role: '||l_creator_role,1,'Y');
1049: aso_debug_pub.add('Creator Group: '||l_creator_grp,1,'Y');
1050: END IF;
1051:
1052: l_sequence := NULL;
1053:

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

1100: OPEN C_Valid_SalesRep (l_creator_res);
1101: FETCH C_Valid_SalesRep INTO l_valid;
1102: CLOSE C_Valid_SalesRep;
1103:
1104: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1105: aso_debug_pub.add('Creator Valid SalesRep : '||l_valid,1,'Y');
1106: END IF;
1107:
1108: IF l_valid = 'Y' THEN

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

1101: FETCH C_Valid_SalesRep INTO l_valid;
1102: CLOSE C_Valid_SalesRep;
1103:
1104: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1105: aso_debug_pub.add('Creator Valid SalesRep : '||l_valid,1,'Y');
1106: END IF;
1107:
1108: IF l_valid = 'Y' THEN
1109: l_primary_salesagent := l_creator_res;

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

1112: END IF; -- creator_res is not null
1113:
1114: END IF; -- CREATE
1115:
1116: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1117: aso_debug_pub.add('Before Update_Primary_SalesAgent: ',1,'Y');
1118: END IF;
1119: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
1120: P_Init_Msg_List => FND_API.G_FALSE,

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

1113:
1114: END IF; -- CREATE
1115:
1116: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1117: aso_debug_pub.add('Before Update_Primary_SalesAgent: ',1,'Y');
1118: END IF;
1119: ASO_SALES_TEAM_PVT.Update_Primary_SalesInfo (
1120: P_Init_Msg_List => FND_API.G_FALSE,
1121: P_Qte_Header_Rec => l_Qte_Header_Rec,

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

1127: x_msg_count => x_msg_count,
1128: x_msg_data => x_msg_data
1129: );
1130:
1131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1132: aso_debug_pub.add('After Update_Primary_SalesInfo: '||x_return_status,1,'Y');
1133: END IF;
1134:
1135: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

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

1128: x_msg_data => x_msg_data
1129: );
1130:
1131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1132: aso_debug_pub.add('After Update_Primary_SalesInfo: '||x_return_status,1,'Y');
1133: END IF;
1134:
1135: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1136: RAISE FND_API.G_EXC_ERROR;

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

1143: -- Release 12 TAP Changes
1144: -- Girish Sachdeva 8/30/2005
1145: -- Adding the call to insert record in the ASO_CHANGED_QUOTES
1146:
1147: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1148: aso_debug_pub.add('ASO_SALES_TEAM_PVT.Assign_Sales_Team : Calling ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES, quote number : ' || l_Qte_Header_Rec.Quote_Number, 1, 'Y');
1149: END IF;
1150:
1151: -- Call to insert record in ASO_CHANGED_QUOTES

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

1144: -- Girish Sachdeva 8/30/2005
1145: -- Adding the call to insert record in the ASO_CHANGED_QUOTES
1146:
1147: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1148: aso_debug_pub.add('ASO_SALES_TEAM_PVT.Assign_Sales_Team : Calling ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES, quote number : ' || l_Qte_Header_Rec.Quote_Number, 1, 'Y');
1149: END IF;
1150:
1151: -- Call to insert record in ASO_CHANGED_QUOTES
1152: ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES(l_Qte_Header_Rec.Quote_Number);

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

1325: lp_gen_bulk_rec.SQUAL_NUM10(1) := null;
1326: lp_gen_bulk_rec.SQUAL_NUM50(1) := P_qte_header_rec.quote_header_id;
1327: -- End: Instantiate input rec
1328:
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

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

1326: lp_gen_bulk_rec.SQUAL_NUM50(1) := P_qte_header_rec.quote_header_id;
1327: -- End: Instantiate input rec
1328:
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');

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

1327: -- End: Instantiate input rec
1328:
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');

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

1328:
1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');

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

1329: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');

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

1330: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');

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

1331: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');

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

1332: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');

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

1333: aso_debug_pub.add('Assign_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');

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

1334: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.party_name: '||C_Party_Rec.party_name,1,'N');
1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');

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

1335: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.category_code: '||C_Party_Rec.category_code,1,'N');
1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');

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

1336: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.SIC: '||C_Party_Rec.SIC_Code_Type||': '||C_Party_Rec.SIC_Code,1,'N');
1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');

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

1337: aso_debug_pub.add('Assign_Sales_Team: C_Party_Rec.employees_total: '||C_Party_Rec.employees_total,1,'N');
1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1345:

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

1338: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.city: '||C_Party_Site_Rec.city,1,'N');
1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1345:
1346: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');

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

1339: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.county: '||C_Party_Site_Rec.county,1,'N');
1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1345:
1346: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1347: END IF;

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

1340: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.state: '||C_Party_Site_Rec.state,1,'N');
1341: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.country: '||C_Party_Site_Rec.country,1,'N');
1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1345:
1346: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1347: END IF;
1348:

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

1342: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.province: '||C_Party_Site_Rec.province,1,'N');
1343: aso_debug_pub.add('Assign_Sales_Team: C_Party_Site_Rec.postal_code: '||C_Party_Site_Rec.postal_code,1,'N');
1344: aso_debug_pub.add('Assign_Sales_Team: C_Cust_Cont_Rec.Phone_Area_Code: '||C_Cust_Cont_Rec.Phone_Area_Code,1,'N');
1345:
1346: aso_debug_pub.add('Before Calling JTF_TERR_ASSIGN_PUB.get_winners',1,'Y');
1347: END IF;
1348:
1349: -- Call the JTF Terr Assignment API
1350: JTF_TERR_ASSIGN_PUB.get_winners

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

1367:
1368: x_winners_rec => x_winners_rec
1369: );
1370:
1371: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1372: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1373: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP

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

1368: x_winners_rec => x_winners_rec
1369: );
1370:
1371: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1372: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1373: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');

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

1369: );
1370:
1371: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1372: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1373: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');

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

1372: aso_debug_pub.add('Assign_Sales_Team: X_Return_Status: '||X_Return_Status,1,'N');
1373: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');

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

1373: aso_debug_pub.add('Assign_Sales_Team: x_winners_rec.count: '||x_winners_rec.Resource_Id.count,1,'N');
1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1381: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');

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

1374: IF x_winners_rec.Resource_Id.count > 0 THEN
1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1381: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1382: END LOOP;

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

1375: FOR i IN x_winners_rec.Resource_Id.FIRST..x_winners_rec.Resource_Id.LAST LOOP
1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1381: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1382: END LOOP;
1383: END IF;

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

1376: aso_debug_pub.add('Assign_Sales_Team: Trans_Object_Id: '||x_winners_rec.Trans_Object_Id(i),1,'N');
1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1381: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1382: END LOOP;
1383: END IF;
1384: END IF;

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

1377: aso_debug_pub.add('Assign_Sales_Team: Terr_Id: '||x_winners_rec.Terr_Id(i),1,'N');
1378: aso_debug_pub.add('Assign_Sales_Team: Resource_Id: '||x_winners_rec.Resource_Id(i),1,'N');
1379: aso_debug_pub.add('Assign_Sales_Team: Full_Access_Flag: '||x_winners_rec.Full_Access_Flag(i),1,'N');
1380: aso_debug_pub.add('Assign_Sales_Team: Group_Id: '||x_winners_rec.Group_Id(i),1,'N');
1381: aso_debug_pub.add('Assign_Sales_Team: Role: '||x_winners_rec.Role(i),1,'N');
1382: END LOOP;
1383: END IF;
1384: END IF;
1385:

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

1459: lp_bulk_trans_id.trans_object_id4 := jtf_terr_number_list(null);
1460: lp_bulk_trans_id.trans_object_id5 := jtf_terr_number_list(null);
1461: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1462:
1463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');

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

1460: lp_bulk_trans_id.trans_object_id5 := jtf_terr_number_list(null);
1461: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1462:
1463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1468: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');

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

1461: lp_bulk_trans_id.txn_date := jtf_terr_date_list(null);
1462:
1463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1468: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1469: aso_utility_pvt.print_login_info();

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

1462:
1463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1468: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1469: aso_utility_pvt.print_login_info();
1470: END IF;

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

1463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1468: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1469: aso_utility_pvt.print_login_info();
1470: END IF;
1471:

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

1464: aso_debug_pub.add('Get_Sales_Team: P_Qte_Header_Rec.quote_header_id: '||P_qte_header_rec.quote_header_id,1,'N');
1465: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.party_id: '||P_qte_header_rec.party_id,1,'N');
1466: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.cust_party_id: '||P_qte_header_rec.cust_party_id,1,'N');
1467: aso_debug_pub.add('Get_Sales_Team: P_qte_header_rec.sold_to_party_site_id: '||P_qte_header_rec.sold_to_party_site_id,1,'N');
1468: aso_debug_pub.add('Before Calling JTY_ASSIGN_REALTIME_PUB.get_winners',1,'Y');
1469: aso_utility_pvt.print_login_info();
1470: END IF;
1471:
1472: -- Call the new JTF Terr Assignment API

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

1487: X_msg_data => x_msg_data,
1488: X_winners_rec => X_Winners_Rec
1489: );
1490:
1491: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1492: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1493: aso_utility_pvt.print_login_info();
1494: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN

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

1488: X_winners_rec => X_Winners_Rec
1489: );
1490:
1491: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1492: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1493: aso_utility_pvt.print_login_info();
1494: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP

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

1490:
1491: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1492: aso_debug_pub.add('Get_Sales_Team: x_return_status '||x_return_status,1,'N');
1493: aso_utility_pvt.print_login_info();
1494: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');

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

1493: aso_utility_pvt.print_login_info();
1494: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');

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

1494: aso_debug_pub.add('Get_Sales_Team: lx_bulk_winners_rec.count: '||X_Winners_Rec.Resource_Id.count,1,'N');
1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1502: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');

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

1495: IF X_Winners_Rec.Resource_Id.count > 0 THEN
1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1502: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1503: END LOOP;

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

1496: FOR i IN X_Winners_Rec.Resource_Id.FIRST..X_Winners_Rec.Resource_Id.LAST LOOP
1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1502: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1503: END LOOP;
1504: END IF;

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

1497: aso_debug_pub.add('Get_Sales_Team: Trans_Object_Id: '||X_Winners_Rec.Trans_Object_Id(i),1,'N');
1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1502: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1503: END LOOP;
1504: END IF;
1505: END IF;

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

1498: aso_debug_pub.add('Get_Sales_Team: Terr_Id: '||X_Winners_Rec.Terr_Id(i),1,'N');
1499: aso_debug_pub.add('Get_Sales_Team: Resource_Id: '||X_Winners_Rec.Resource_Id(i),1,'N');
1500: aso_debug_pub.add('Get_Sales_Team: Full_Access_Flag: '||X_Winners_Rec.Full_Access_Flag(i),1,'N');
1501: aso_debug_pub.add('Get_Sales_Team: Group_Id: '||X_Winners_Rec.Group_Id(i),1,'N');
1502: aso_debug_pub.add('Get_Sales_Team: Role: '||X_Winners_Rec.Role(i),1,'N');
1503: END LOOP;
1504: END IF;
1505: END IF;
1506:

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

1657: l_primary_salesagent := p_primary_salesagent;
1658: l_primary_res_grp := p_primary_salesgrp;
1659: x_qte_header_rec := p_qte_header_rec;
1660:
1661: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1662: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_salesagent,1,'N');
1663: END IF;
1664:
1665: IF l_primary_salesagent IS NULL THEN

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

1658: l_primary_res_grp := p_primary_salesgrp;
1659: x_qte_header_rec := p_qte_header_rec;
1660:
1661: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1662: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_salesagent,1,'N');
1663: END IF;
1664:
1665: IF l_primary_salesagent IS NULL THEN
1666: IF p_reassign_flag = 'Y' THEN

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

1672: OPEN C_Primary_Res_Kept(l_Primary_res, P_qte_header_rec.Quote_Number);
1673: FETCH C_Primary_Res_Kept INTO l_primary_res_kept;
1674: CLOSE C_Primary_Res_Kept;
1675:
1676: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1677: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
1678: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
1679: END IF;
1680:

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

1673: FETCH C_Primary_Res_Kept INTO l_primary_res_kept;
1674: CLOSE C_Primary_Res_Kept;
1675:
1676: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1677: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
1678: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
1679: END IF;
1680:
1681: IF l_primary_res_kept = 'Y' THEN

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

1674: CLOSE C_Primary_Res_Kept;
1675:
1676: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1677: aso_debug_pub.add('Assign_Sales_Team: l_primary_salesagent: '||l_primary_res,1,'N');
1678: aso_debug_pub.add('Assign_Sales_Team: Primary Res kept: '||l_primary_res_kept,1,'N');
1679: END IF;
1680:
1681: IF l_primary_res_kept = 'Y' THEN
1682: l_primary_salesagent := l_primary_res;

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

1689:
1690: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
1691: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp, l_primary_role;
1692: CLOSE C_Valid_Salesagent;
1693: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1694: aso_debug_pub.add('Assign_Sales_Team: Valid Salesagent: '||l_primary_salesagent,1,'N');
1695: END IF;
1696:
1697: IF l_primary_salesagent IS NOT NULL THEN

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

1690: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
1691: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp, l_primary_role;
1692: CLOSE C_Valid_Salesagent;
1693: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1694: aso_debug_pub.add('Assign_Sales_Team: Valid Salesagent: '||l_primary_salesagent,1,'N');
1695: END IF;
1696:
1697: IF l_primary_salesagent IS NOT NULL THEN
1698: l_primary_res_kept := 'Y';

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

1705:
1706: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
1707: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
1708: CLOSE C_Get_Res_From_Srep;
1709: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1710: aso_debug_pub.add('Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
1711: END IF;
1712: ELSE
1713: x_return_status := FND_API.G_RET_STS_ERROR;

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

1706: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
1707: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
1708: CLOSE C_Get_Res_From_Srep;
1709: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1710: aso_debug_pub.add('Assign_Sales_Team: Default SalesRep: '||l_primary_salesagent,1,'N');
1711: END IF;
1712: ELSE
1713: x_return_status := FND_API.G_RET_STS_ERROR;
1714: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

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

1724: END IF; -- salesrep_prof
1725:
1726: l_primary_role := l_default_role_prof;
1727:
1728: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1729: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
1730: END IF;
1731:
1732: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

1725:
1726: l_primary_role := l_default_role_prof;
1727:
1728: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1729: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
1730: END IF;
1731:
1732: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1733: p_application_id => 521);

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

1731:
1732: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1733: p_application_id => 521);
1734:
1735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1736: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
1737: END IF;
1738:
1739: if l_obsolete_status = 'T' then

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

1732: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
1733: p_application_id => 521);
1734:
1735: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1736: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
1737: END IF;
1738:
1739: if l_obsolete_status = 'T' then
1740:

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

1739: if l_obsolete_status = 'T' then
1740:
1741: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1742:
1743: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1744: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1745: END IF;
1746:
1747: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

1740:
1741: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1742:
1743: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1744: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1745: END IF;
1746:
1747: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1748:

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

1745: END IF;
1746:
1747: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1748:
1749: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1750: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1751: END IF;
1752:
1753: if l_primary_res_grp is null then

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

1746:
1747: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1748:
1749: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1750: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1751: END IF;
1752:
1753: if l_primary_res_grp is null then
1754:

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

1753: if l_primary_res_grp is null then
1754:
1755: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
1756:
1757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1758: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1759: END IF;
1760:
1761: l_primary_res_grp := to_number(l_ots_grp_prof);

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

1754:
1755: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
1756:
1757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1758: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1759: END IF;
1760:
1761: l_primary_res_grp := to_number(l_ots_grp_prof);
1762:

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

1759: END IF;
1760:
1761: l_primary_res_grp := to_number(l_ots_grp_prof);
1762:
1763: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1764: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1765: END IF;
1766:
1767: end if;

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

1760:
1761: l_primary_res_grp := to_number(l_ots_grp_prof);
1762:
1763: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1764: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1765: END IF;
1766:
1767: end if;
1768:

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

1769: else
1770:
1771: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1772:
1773: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1774: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1775: END IF;
1776:
1777: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

1770:
1771: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
1772:
1773: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1774: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1775: END IF;
1776:
1777: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1778:

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

1775: END IF;
1776:
1777: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1778:
1779: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1780: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1781: END IF;
1782:
1783: if l_primary_res_grp is null then

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

1776:
1777: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
1778:
1779: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1780: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1781: END IF;
1782:
1783: if l_primary_res_grp is null then
1784:

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

1783: if l_primary_res_grp is null then
1784:
1785: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1786:
1787: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1788: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1789: END IF;
1790:
1791: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

1784:
1785: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
1786:
1787: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1788: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
1789: END IF;
1790:
1791: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1792:

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

1789: END IF;
1790:
1791: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1792:
1793: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1794: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1795: END IF;
1796:
1797: end if;

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

1790:
1791: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
1792:
1793: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1794: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
1795: END IF;
1796:
1797: end if;
1798:

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

1797: end if;
1798:
1799: end if;
1800:
1801: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1802: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
1803: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
1804: END IF;
1805:

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

1798:
1799: end if;
1800:
1801: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1802: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
1803: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
1804: END IF;
1805:
1806: END IF; -- salesagent is NULL

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

1799: end if;
1800:
1801: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1802: aso_debug_pub.add('Assign_Sales_Team: Default Role: '||l_primary_role,1,'N');
1803: aso_debug_pub.add('Assign_Sales_Team: Default Grp: '||l_primary_res_grp,1,'N');
1804: END IF;
1805:
1806: END IF; -- salesagent is NULL
1807:

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

1809: OPEN C_Get_Resource_Role (l_primary_salesagent);
1810: FETCH C_Get_Resource_Role INTO l_primary_role;
1811: CLOSE C_Get_Resource_Role;
1812:
1813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1814: aso_debug_pub.add('Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
1815: END IF;
1816: END IF;
1817:

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

1810: FETCH C_Get_Resource_Role INTO l_primary_role;
1811: CLOSE C_Get_Resource_Role;
1812:
1813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1814: aso_debug_pub.add('Assign_Sales_Team: Role From Res: '||l_primary_role,1,'N');
1815: END IF;
1816: END IF;
1817:
1818:

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

1815: END IF;
1816: END IF;
1817:
1818:
1819: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1820: aso_debug_pub.add('Assign_Sales_Team: l_primary_res_kept: '||l_primary_res_kept,1,'N');
1821: END IF;
1822:
1823: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN

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

1816: END IF;
1817:
1818:
1819: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1820: aso_debug_pub.add('Assign_Sales_Team: l_primary_res_kept: '||l_primary_res_kept,1,'N');
1821: END IF;
1822:
1823: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
1824:

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

1821: END IF;
1822:
1823: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
1824:
1825: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1826: aso_debug_pub.add('Assign_Sales_Team: Before primary salesagent insert: ',1,'N');
1827: END IF;
1828: l_sequence := NULL;
1829:

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

1822:
1823: IF (l_primary_res_kept IS NULL OR l_primary_res_kept <> 'Y') THEN
1824:
1825: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1826: aso_debug_pub.add('Assign_Sales_Team: Before primary salesagent insert: ',1,'N');
1827: END IF;
1828: l_sequence := NULL;
1829:
1830: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

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

1872: );
1873: END IF; -- primary_res_kept <> Y
1874: END IF; -- primary_res_kept <> Y
1875: END IF;
1876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1877: aso_debug_pub.add('Assign_Sales_Team: Update primary salesagent in Hdr ',1,'N');
1878: END IF;
1879: UPDATE ASO_QUOTE_HEADERS_ALL
1880: SET Resource_Id = l_primary_salesagent,

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

1873: END IF; -- primary_res_kept <> Y
1874: END IF; -- primary_res_kept <> Y
1875: END IF;
1876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1877: aso_debug_pub.add('Assign_Sales_Team: Update primary salesagent in Hdr ',1,'N');
1878: END IF;
1879: UPDATE ASO_QUOTE_HEADERS_ALL
1880: SET Resource_Id = l_primary_salesagent,
1881: Resource_Grp_Id = l_primary_res_grp,

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

2058: */
2059: --Commented Code End Yogeshwar (MOAC)
2060: BEGIN
2061:
2062: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2063:
2064: -- Standard Start of API savepoint
2065: SAVEPOINT OPP_QUOTE_PRIMARY_SALESREP_PVT;
2066:

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

2085:
2086: --
2087: -- API body
2088: --
2089: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2090: aso_debug_pub.add('Begin Opp_Quote_Primary_SalesRep',1,'Y');
2091: END IF;
2092:
2093: x_qte_header_rec := p_qte_header_rec;

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

2086: --
2087: -- API body
2088: --
2089: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2090: aso_debug_pub.add('Begin Opp_Quote_Primary_SalesRep',1,'Y');
2091: END IF;
2092:
2093: x_qte_header_rec := p_qte_header_rec;
2094:

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

2095: OPEN C_Get_Creator_Res(G_USER_ID);
2096: FETCH C_Get_Creator_Res INTO l_creator_res;
2097: CLOSE C_Get_Creator_Res;
2098:
2099: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2100: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
2101: END IF;
2102:
2103: IF l_creator_res IS NOT NULL THEN

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

2096: FETCH C_Get_Creator_Res INTO l_creator_res;
2097: CLOSE C_Get_Creator_Res;
2098:
2099: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2100: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:l_creator_res: '||l_creator_res,1,'Y');
2101: END IF;
2102:
2103: IF l_creator_res IS NOT NULL THEN
2104:

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

2105: OPEN C_Valid_SalesRep (l_creator_res);
2106: FETCH C_Valid_SalesRep INTO l_valid;
2107: CLOSE C_Valid_SalesRep;
2108:
2109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2110: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2111: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2112: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2113: END IF;

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

2106: FETCH C_Valid_SalesRep INTO l_valid;
2107: CLOSE C_Valid_SalesRep;
2108:
2109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2110: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2111: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2112: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2113: END IF;
2114:

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

2107: CLOSE C_Valid_SalesRep;
2108:
2109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2110: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2111: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2112: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2113: END IF;
2114:
2115: IF l_valid = 'Y' THEN

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

2108:
2109: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2110: aso_debug_pub.add('Opp_Qte_PS: Before Creator Res:G_USER_ID: '||G_USER_ID,1,'Y');
2111: aso_debug_pub.add('Opp_Qte_PS: Creator Resource : '||l_creator_res,1,'Y');
2112: aso_debug_pub.add('Opp_Qte_PS: Creator Valid SalesRep : '||l_valid,1,'Y');
2113: END IF;
2114:
2115: IF l_valid = 'Y' THEN
2116:

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

2118:
2119: OPEN C_Check_Creator_Res(P_Qte_Header_Rec.Quote_Number, l_creator_res);
2120: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2121: CLOSE C_Check_Creator_Res;
2122: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2123: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2124: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2125: END IF;
2126:

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

2119: OPEN C_Check_Creator_Res(P_Qte_Header_Rec.Quote_Number, l_creator_res);
2120: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2121: CLOSE C_Check_Creator_Res;
2122: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2123: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2124: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2125: END IF;
2126:
2127: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN

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

2120: FETCH C_Check_Creator_Res INTO l_creator_found, l_primary_res_grp;
2121: CLOSE C_Check_Creator_Res;
2122: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2123: aso_debug_pub.add('Opp_Qte_PS: Fetch Creator Grp: '||l_primary_res_grp,1,'Y');
2124: aso_debug_pub.add('Opp_Qte_PS: Creator Found: '||l_creator_found,1,'Y');
2125: END IF;
2126:
2127: IF l_creator_found IS NULL OR l_creator_found <> 'Y' THEN
2128: -- Role Defaulting Logic

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

2132: FETCH C_Get_Role_From_Code INTO l_primary_role;
2133: CLOSE C_Get_Role_From_Code;
2134:
2135: IF l_primary_role IS NULL THEN
2136: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2137: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_primary_role,1,'N');
2138: END IF;
2139:
2140: OPEN C_Get_Resource_Role (l_creator_res);

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

2133: CLOSE C_Get_Role_From_Code;
2134:
2135: IF l_primary_role IS NULL THEN
2136: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2137: aso_debug_pub.add('nores:create:Creator Role From Res: '||l_primary_role,1,'N');
2138: END IF;
2139:
2140: OPEN C_Get_Resource_Role (l_creator_res);
2141: FETCH C_Get_Resource_Role INTO l_primary_role;

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

2143:
2144: END IF;
2145:
2146:
2147: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2148: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2149: END IF;
2150:
2151: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

2144: END IF;
2145:
2146:
2147: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2148: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2149: END IF;
2150:
2151: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2152: p_application_id => 521);

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

2150:
2151: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2152: p_application_id => 521);
2153:
2154: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2155: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2156: END IF;
2157:
2158: if l_obsolete_status = 'T' then

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

2151: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2152: p_application_id => 521);
2153:
2154: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2155: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2156: END IF;
2157:
2158: if l_obsolete_status = 'T' then
2159:

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

2158: if l_obsolete_status = 'T' then
2159:
2160: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2161:
2162: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2163: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2164: END IF;
2165:
2166: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

2159:
2160: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2161:
2162: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2163: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2164: END IF;
2165:
2166: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2167:

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

2164: END IF;
2165:
2166: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2167:
2168: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2169: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2170: END IF;
2171:
2172: if l_primary_res_grp is null then

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

2165:
2166: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2167:
2168: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2169: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2170: END IF;
2171:
2172: if l_primary_res_grp is null then
2173:

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

2172: if l_primary_res_grp is null then
2173:
2174: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2175:
2176: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2177: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2178: END IF;
2179:
2180: l_primary_res_grp := to_number(l_ots_grp_prof);

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

2173:
2174: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2175:
2176: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2177: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2178: END IF;
2179:
2180: l_primary_res_grp := to_number(l_ots_grp_prof);
2181:

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

2178: END IF;
2179:
2180: l_primary_res_grp := to_number(l_ots_grp_prof);
2181:
2182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2183: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2184: END IF;
2185:
2186: end if;

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

2179:
2180: l_primary_res_grp := to_number(l_ots_grp_prof);
2181:
2182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2183: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2184: END IF;
2185:
2186: end if;
2187:

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

2188: else
2189:
2190: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2191:
2192: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2193: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2194: END IF;
2195:
2196: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

2189:
2190: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2191:
2192: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2193: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2194: END IF;
2195:
2196: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2197:

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

2194: END IF;
2195:
2196: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2197:
2198: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2199: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2200: END IF;
2201:
2202: if l_primary_res_grp is null then

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

2195:
2196: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2197:
2198: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2199: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2200: END IF;
2201:
2202: if l_primary_res_grp is null then
2203:

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

2202: if l_primary_res_grp is null then
2203:
2204: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2205:
2206: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2207: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2208: END IF;
2209:
2210: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

2203:
2204: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2205:
2206: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2207: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2208: END IF;
2209:
2210: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2211:

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

2208: END IF;
2209:
2210: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2211:
2212: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2213: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2214: END IF;
2215:
2216: end if;

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

2209:
2210: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2211:
2212: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2213: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2214: END IF;
2215:
2216: end if;
2217:

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

2216: end if;
2217:
2218: end if;
2219:
2220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2221: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2222: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2223: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2224: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');

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

2217:
2218: end if;
2219:
2220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2221: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2222: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2223: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2224: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2225: END IF;

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

2218: end if;
2219:
2220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2221: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2222: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2223: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2224: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2225: END IF;
2226:

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

2219:
2220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2221: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2222: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2223: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2224: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2225: END IF;
2226:
2227: l_sequence := NULL;

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

2220: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2221: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_ots_role_prof,1,'Y');
2222: aso_debug_pub.add('Opp_Qte_PS: Role Profile: '||l_role_prof,1,'Y');
2223: aso_debug_pub.add('Opp_Qte_PS: Creator Role : '||l_primary_role,1,'Y');
2224: aso_debug_pub.add('Opp_Qte_PS: Creator Group : '||l_primary_res_grp,1,'Y');
2225: END IF;
2226:
2227: l_sequence := NULL;
2228:

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

2280:
2281: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2282: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp;
2283: CLOSE C_Valid_Salesagent;
2284: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2285: aso_debug_pub.add('Opp_Qte_PS: Valid Salesagent: '||l_primary_salesagent,1,'N');
2286: END IF;
2287: END IF;
2288:

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

2281: OPEN C_Valid_Salesagent(P_qte_header_rec.Quote_Number);
2282: FETCH C_Valid_Salesagent INTO l_primary_salesagent, l_primary_res_grp;
2283: CLOSE C_Valid_Salesagent;
2284: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2285: aso_debug_pub.add('Opp_Qte_PS: Valid Salesagent: '||l_primary_salesagent,1,'N');
2286: END IF;
2287: END IF;
2288:
2289: IF l_primary_salesagent IS NULL THEN

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

2292: OPEN C_Get_Res_From_Srep (l_default_salesrep_prof);
2293: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2294: CLOSE C_Get_Res_From_Srep;
2295:
2296: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2297: aso_debug_pub.add('Opp_Qte_PS: Default SalesRep: '||l_primary_salesagent,1,'N');
2298: END IF;
2299: ELSE
2300: x_return_status := FND_API.G_RET_STS_ERROR;

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

2293: FETCH C_Get_Res_From_Srep INTO l_primary_salesagent;
2294: CLOSE C_Get_Res_From_Srep;
2295:
2296: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2297: aso_debug_pub.add('Opp_Qte_PS: Default SalesRep: '||l_primary_salesagent,1,'N');
2298: END IF;
2299: ELSE
2300: x_return_status := FND_API.G_RET_STS_ERROR;
2301: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

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

2312: END IF; -- salesrep_prof
2313:
2314: l_primary_role := l_default_role_prof;
2315:
2316: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2317: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2318: END IF;
2319:
2320: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',

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

2313:
2314: l_primary_role := l_default_role_prof;
2315:
2316: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2317: aso_debug_pub.add('Before calling Get_Profile_Obsolete_Status', 1, 'N');
2318: END IF;
2319:
2320: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2321: p_application_id => 521);

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

2319:
2320: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2321: p_application_id => 521);
2322:
2323: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2324: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2325: END IF;
2326:
2327: if l_obsolete_status = 'T' then

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

2320: l_obsolete_status := aso_utility_pvt.Get_Profile_Obsolete_Status(p_profile_name => 'AST_DEFAULT_ROLE_AND_GROUP',
2321: p_application_id => 521);
2322:
2323: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2324: aso_debug_pub.add('After calling Get_Profile_Obsolete_Status: l_obsolete_status: ' || l_obsolete_status, 1, 'N');
2325: END IF;
2326:
2327: if l_obsolete_status = 'T' then
2328:

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

2327: if l_obsolete_status = 'T' then
2328:
2329: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2330:
2331: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2332: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2333: END IF;
2334:
2335: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

2328:
2329: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2330:
2331: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2332: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2333: END IF;
2334:
2335: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2336:

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

2333: END IF;
2334:
2335: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2336:
2337: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2338: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2339: END IF;
2340:
2341: if l_primary_res_grp is null then

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

2334:
2335: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2336:
2337: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2338: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2339: END IF;
2340:
2341: if l_primary_res_grp is null then
2342:

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

2341: if l_primary_res_grp is null then
2342:
2343: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2344:
2345: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2346: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2347: END IF;
2348:
2349: l_primary_res_grp := to_number(l_ots_grp_prof);

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

2342:
2343: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_GROUP', G_USER_ID, NULL, 521);
2344:
2345: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2346: aso_debug_pub.add('l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2347: END IF;
2348:
2349: l_primary_res_grp := to_number(l_ots_grp_prof);
2350:

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

2347: END IF;
2348:
2349: l_primary_res_grp := to_number(l_ots_grp_prof);
2350:
2351: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2352: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2353: END IF;
2354:
2355: end if;

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

2348:
2349: l_primary_res_grp := to_number(l_ots_grp_prof);
2350:
2351: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2352: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2353: END IF;
2354:
2355: end if;
2356:

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

2357: else
2358:
2359: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2360:
2361: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2362: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2363: END IF;
2364:
2365: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);

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

2358:
2359: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'ASF_DEFAULT_GROUP_ROLE', G_USER_ID, NULL, 522);
2360:
2361: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2362: aso_debug_pub.add('ASF_DEFAULT_GROUP_ROLE value: l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2363: END IF;
2364:
2365: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2366:

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

2363: END IF;
2364:
2365: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2366:
2367: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2368: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2369: END IF;
2370:
2371: if l_primary_res_grp is null then

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

2364:
2365: l_primary_res_grp := SUBSTR(l_ots_grp_prof, 1, INSTR(l_ots_grp_prof,'(')-1);
2366:
2367: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2368: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2369: END IF;
2370:
2371: if l_primary_res_grp is null then
2372:

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

2371: if l_primary_res_grp is null then
2372:
2373: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2374:
2375: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2376: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2377: END IF;
2378:
2379: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));

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

2372:
2373: l_ots_grp_prof := FND_PROFILE.Value_Specific( 'AST_DEFAULT_ROLE_AND_GROUP', G_USER_ID, NULL, 521);
2374:
2375: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2376: aso_debug_pub.add('AST_DEFAULT_ROLE_AND_GROUP value :l_ots_grp_prof: ' || l_ots_grp_prof, 1, 'N');
2377: END IF;
2378:
2379: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2380:

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

2377: END IF;
2378:
2379: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2380:
2381: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2382: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2383: END IF;
2384:
2385: end if;

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

2378:
2379: l_primary_res_grp := substr(l_ots_grp_prof, instr(l_ots_grp_prof,':', -1) + 1, length(l_ots_grp_prof));
2380:
2381: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2382: aso_debug_pub.add('l_primary_res_grp: ' || l_primary_res_grp, 1, 'N');
2383: END IF;
2384:
2385: end if;
2386:

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

2385: end if;
2386:
2387: end if;
2388:
2389: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2390: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2391: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2392: END IF;
2393:

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

2386:
2387: end if;
2388:
2389: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2390: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2391: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2392: END IF;
2393:
2394: IF l_primary_role IS NULL THEN

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

2387: end if;
2388:
2389: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2390: aso_debug_pub.add('Opp_Qte_PS: Default Role: '||l_primary_role,1,'N');
2391: aso_debug_pub.add('Opp_Qte_PS: Default Grp: '||l_primary_res_grp,1,'N');
2392: END IF;
2393:
2394: IF l_primary_role IS NULL THEN
2395: OPEN C_Get_Resource_Role (l_primary_salesagent);

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

2394: IF l_primary_role IS NULL THEN
2395: OPEN C_Get_Resource_Role (l_primary_salesagent);
2396: FETCH C_Get_Resource_Role INTO l_primary_role;
2397: CLOSE C_Get_Resource_Role;
2398: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2399: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2400: END IF;
2401: END IF;
2402:

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

2395: OPEN C_Get_Resource_Role (l_primary_salesagent);
2396: FETCH C_Get_Resource_Role INTO l_primary_role;
2397: CLOSE C_Get_Resource_Role;
2398: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2399: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2400: END IF;
2401: END IF;
2402:
2403: IF aso_debug_pub.g_debug_flag = 'Y' THEN

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

2399: aso_debug_pub.add('Opp_Qte_PS: Role From Res: '||l_primary_role,1,'N');
2400: END IF;
2401: END IF;
2402:
2403: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2404: aso_debug_pub.add('Opp_Qte_PS: Before primary salesagent insert: ',1,'N');
2405: END IF;
2406: l_sequence := NULL;
2407:

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

2400: END IF;
2401: END IF;
2402:
2403: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2404: aso_debug_pub.add('Opp_Qte_PS: Before primary salesagent insert: ',1,'N');
2405: END IF;
2406: l_sequence := NULL;
2407:
2408: ASO_QUOTE_ACCESSES_PKG.Insert_Row(

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

2450: );
2451:
2452: END IF;
2453:
2454: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2455: aso_debug_pub.add('Opp_Qte_PS: Update primary salesagent in Hdr ',1,'N');
2456: END IF;
2457: UPDATE ASO_QUOTE_HEADERS_ALL
2458: SET Resource_Id = l_primary_salesagent,

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

2451:
2452: END IF;
2453:
2454: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2455: aso_debug_pub.add('Opp_Qte_PS: Update primary salesagent in Hdr ',1,'N');
2456: END IF;
2457: UPDATE ASO_QUOTE_HEADERS_ALL
2458: SET Resource_Id = l_primary_salesagent,
2459: Resource_Grp_Id = l_primary_res_grp,