DBA Data[Home] [Help]

APPS.ASN_MIG_SALES_CREDITS_PVT dependencies on AS_ACCESSES_ALL

Line 37: -- Update full access flag in as_accesses_all for this opportunity

33: -- Removed check for open status flag while updating forecast date to null
34: -- gasriniv 25/01/2005 Cloned the delete of duplicate so that it is fired for all opportunites
35: -- BUG FIX 4139294
36: -- gasriniv 01/02/2005 Default Best Forecast Worst columns for non revenue credits also bug#4151483
37: -- Update full access flag in as_accesses_all for this opportunity
38: -- bug#4150276 and as per wenxia's email 28 Jan 2005 18:30:21 -0800
39: -- gasriniv 02/02/2005 Added logic to merged duplicate credits if they exists for all opportunities
40: -- **********************************************************************************************************
41:

Line 499: -- Update as_accesses_all to have owner flag reset for the person

495: sql%ROWCOUNT);
496: END IF;
497:
498: --
499: -- Update as_accesses_all to have owner flag reset for the person
500: -- previously marked as owner
501: --
502:
503: -- Log

Line 507: 'Updating as_accesses_all to have owner flag reset');

503: -- Log
504: IF (p_debug_flag = 'Y' AND
505: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
506: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
507: 'Updating as_accesses_all to have owner flag reset');
508: END IF;
509:
510: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
511: UPDATE

Line 512: as_accesses_all ACS

508: END IF;
509:
510: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
511: UPDATE
512: as_accesses_all ACS
513: SET
514: owner_flag = 'N',
515: last_updated_by = FND_GLOBAL.user_id,
516: last_update_date = sysdate,

Line 527: 'Updated as_accesses_all to have owner flag reset = ' ||

523: -- Log
524: IF (p_debug_flag = 'Y' AND
525: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
526: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
527: 'Updated as_accesses_all to have owner flag reset = ' ||
528: sql%ROWCOUNT);
529: END IF;
530:
531: --

Line 532: -- Update as_accesses_all to have owner flag set for the new owner

528: sql%ROWCOUNT);
529: END IF;
530:
531: --
532: -- Update as_accesses_all to have owner flag set for the new owner
533: --
534:
535: -- Log
536: IF (p_debug_flag = 'Y' AND

Line 539: 'Updating as_accesses_all to have owner flag set for new owner');

535: -- Log
536: IF (p_debug_flag = 'Y' AND
537: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
538: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
539: 'Updating as_accesses_all to have owner flag set for new owner');
540: END IF;
541:
542: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
543: UPDATE

Line 544: as_accesses_all ACS

540: END IF;
541:
542: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
543: UPDATE
544: as_accesses_all ACS
545: SET
546: owner_flag = 'Y'
547: ,freeze_flag = 'Y' ,
548: last_updated_by = FND_GLOBAL.user_id,

Line 563: 'Updated as_accesses_all to have owner flag set for new owner = ' ||

559: -- Log
560: IF (p_debug_flag = 'Y' AND
561: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
562: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
563: 'Updated as_accesses_all to have owner flag set for new owner = ' ||
564: sql%ROWCOUNT);
565: END IF;
566:
567: --

Line 568: -- Insert into as_accesses_all if the new owner does not exist in the

564: sql%ROWCOUNT);
565: END IF;
566:
567: --
568: -- Insert into as_accesses_all if the new owner does not exist in the
569: -- sales team
570: --
571:
572: -- Log

Line 576: 'Inserting into as_accesses_all');

572: -- Log
573: IF (p_debug_flag = 'Y' AND
574: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
575: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
576: 'Inserting into as_accesses_all');
577: END IF;
578:
579: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
580: INSERT INTO

Line 581: as_accesses_all

577: END IF;
578:
579: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
580: INSERT INTO
581: as_accesses_all
582: (
583: access_id
584: ,last_update_date
585: ,last_updated_by

Line 631: AND NOT EXISTS (SELECT 1 FROM as_accesses_all ACS

627: FROM
628: dual
629: WHERE
630: l_ranks(i) = 1
631: AND NOT EXISTS (SELECT 1 FROM as_accesses_all ACS
632: WHERE ACS.lead_id IS NOT NULL
633: AND ACS.lead_id = l_lead_ids(i)
634: AND l_ranks(i) = 1
635: AND ACS.salesforce_id = l_salesforce_ids(i)

Line 643: 'Inserted into as_accesses_all = ' ||

639: -- Log
640: IF (p_debug_flag = 'Y' AND
641: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
642: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
643: 'Inserted into as_accesses_all = ' ||
644: sql%ROWCOUNT);
645: END IF;
646:
647: -- Commit

Line 2207: FROM as_accesses_all

2203:
2204: -- Ordering by preferred candidates for owner in Sales Team
2205: CURSOR c_salesteam(p_lead_id NUMBER) IS
2206: SELECT access_id, salesforce_id, sales_group_id, owner_flag
2207: FROM as_accesses_all
2208: WHERE lead_id = p_lead_id AND partner_customer_id IS NULL
2209: AND partner_cont_party_id IS NULL
2210: ORDER BY nvl(owner_flag, 'N') DESC,
2211: nvl(team_leader_flag, 'N') DESC,

Line 2281: FROM as_accesses_all acc

2277: AND opps.lead_id = p_lead_id
2278: --AND ascr.credit_type_id = p_credit_type_id --- both quota and non-revenue credit receivers should be in the sales team
2279: AND NOT EXISTS (
2280: SELECT 'x'
2281: FROM as_accesses_all acc
2282: WHERE opps.lead_id = acc.lead_id
2283: AND acc.SALESFORCE_ID = ascr.SALESFORCE_ID
2284: and NVL(acc.SALES_GROUP_ID,-99) = NVL(ascr.SALESGROUP_ID,-99));
2285:

Line 2494: -- Update full access flag in as_accesses_all for this opportunity

2490: AND ascr.salesgroup_id = duplines.salesgroup_id
2491: AND ascr.credit_type_id = duplines.credit_type_id
2492: AND ascr.SALES_CREDIT_ID <> maxid);
2493:
2494: -- Update full access flag in as_accesses_all for this opportunity
2495: -- bug#4150276 and as per wenxia's email 28 Jan 2005 18:30:21 -0800
2496: FORALL I IN l_lead_id.first..l_lead_id.last
2497: UPDATE as_accesses_all acc
2498: SET acc.team_leader_flag = 'Y',

Line 2497: UPDATE as_accesses_all acc

2493:
2494: -- Update full access flag in as_accesses_all for this opportunity
2495: -- bug#4150276 and as per wenxia's email 28 Jan 2005 18:30:21 -0800
2496: FORALL I IN l_lead_id.first..l_lead_id.last
2497: UPDATE as_accesses_all acc
2498: SET acc.team_leader_flag = 'Y',
2499: last_updated_by = FND_GLOBAL.user_id,
2500: last_update_date = sysdate,
2501: last_update_login = FND_GLOBAL.conc_login_id

Line 2588: UPDATE as_accesses_all

2584:
2585: l_org_owner_sf_id := l_sf_id;
2586: l_org_owner_sg_id := l_sg_id;
2587: -- Reset current owner flag.
2588: UPDATE as_accesses_all
2589: SET owner_flag = 'N' ,
2590: last_updated_by = FND_GLOBAL.user_id,
2591: last_update_date = sysdate,
2592: last_update_login = FND_GLOBAL.conc_login_id

Line 2596: UPDATE as_accesses_all

2592: last_update_login = FND_GLOBAL.conc_login_id
2593: WHERE lead_id = l_lead_id(j) AND owner_flag = 'Y';
2594:
2595: -- Reassign owner flag;
2596: UPDATE as_accesses_all
2597: SET owner_flag = 'Y', team_leader_flag = 'Y',
2598: freeze_flag = 'Y',
2599: last_updated_by = FND_GLOBAL.user_id,
2600: last_update_date = sysdate,

Line 2609: as_accesses_all

2605:
2606: IF SQL%NOTFOUND THEN
2607:
2608: INSERT INTO
2609: as_accesses_all
2610: (
2611: access_id
2612: ,last_update_date
2613: ,last_updated_by

Line 2673: UPDATE AS_ACCESSES_ALL

2669: l_found_owner := TRUE;
2670: l_org_owner_sf_id := l_steam_sf_id;
2671: l_org_owner_sg_id := l_steam_sg_id;
2672:
2673: UPDATE AS_ACCESSES_ALL
2674: SET owner_flag = 'Y', team_leader_flag = 'Y',
2675: freeze_flag = 'Y',
2676: last_updated_by = FND_GLOBAL.user_id,
2677: last_update_date = sysdate,

Line 2834: INSERT INTO AS_ACCESSES_ALL

2830: OPEN c_get_access_id;
2831: FETCH c_get_access_id INTO l_access_pk_id;
2832: CLOSE c_get_access_id;
2833:
2834: INSERT INTO AS_ACCESSES_ALL
2835: (ACCESS_ID,
2836: ACCESS_TYPE,
2837: SALESFORCE_ID,
2838: SALES_GROUP_ID,