DBA Data[Home] [Help]

APPS.ASN_MIG_SALES_CREDITS_PVT dependencies on AS_LEADS_ALL

Line 97: -- Get maximum number of possible rows in as_leads_all

93: 'Disable AS_SALES_CREDITS_BIUD trigger');
94: END IF;
95:
96: --
97: -- Get maximum number of possible rows in as_leads_all
98: --
99: OPEN c1;
100: FETCH c1 INTO l_max_num_rows;
101: CLOSE c1;

Line 470: 'Updating owner in as_leads_all');

466: -- Log
467: IF (p_debug_flag = 'Y' AND
468: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
469: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
470: 'Updating owner in as_leads_all');
471: END IF;
472:
473: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
474: UPDATE

Line 475: as_leads_all ALA

471: END IF;
472:
473: FORALL i IN l_sales_credit_ids.FIRST..l_sales_credit_ids.LAST
474: UPDATE
475: as_leads_all ALA
476: SET
477: ALA.owner_salesforce_id = l_salesforce_ids(i)
478: ,ALA.owner_sales_group_id = l_sales_group_ids(i) ,
479: last_updated_by = FND_GLOBAL.user_id,

Line 494: 'Updated owner in as_leads_all: number of rows =' ||

490: -- Log
491: IF (p_debug_flag = 'Y' AND
492: FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
493: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module_name,
494: 'Updated owner in as_leads_all: number of rows =' ||
495: sql%ROWCOUNT);
496: END IF;
497:
498: --

Line 1457: FROM AS_LEADS_ALL

1453: l_temp_bool BOOLEAN;
1454:
1455: CURSOR c_customer(c_lead_id NUMBER) IS
1456: SELECT customer_id
1457: FROM AS_LEADS_ALL
1458: WHERE lead_id = c_lead_id;
1459:
1460: CURSOR c_lines(c_lead_id NUMBER,c_lead_line_id NUMBER) IS
1461: SELECT *

Line 1881: -- Get maximum number of possible rows in as_leads_all

1877: 'Disable AS_SALES_CREDITS_BIUD trigger');
1878: END IF;
1879:
1880: --
1881: -- Get maximum number of possible rows in as_leads_all
1882: --
1883: OPEN c1;
1884: FETCH c1 INTO l_max_num_rows;
1885: CLOSE c1;

Line 2200: FROM as_leads_all lead, as_statuses_vl status

2196: CURSOR c_lead(p_lead_id NUMBER) IS
2197: SELECT lead.description, lead.customer_id, lead.address_id, lead.owner_salesforce_id,
2198: lead.owner_sales_group_id, lead.status ,lead.win_probability, status.win_loss_indicator,
2199: status.forecast_rollup_flag ,status.OPP_OPEN_STATUS_FLAG
2200: FROM as_leads_all lead, as_statuses_vl status
2201: WHERE lead_id = p_lead_id
2202: AND lead.status = status.status_code(+);
2203:
2204: -- Ordering by preferred candidates for owner in Sales Team

Line 2275: FROM as_leads_all opps, as_sales_credits ascr

2271: CURSOR c_add_sales_team (p_lead_id NUMBER , p_credit_type_id NUMBER) IS
2272: SELECT DISTINCT opps.lead_id, opps.customer_id, opps.address_id,
2273: ascr.salesforce_id, ascr.person_id,
2274: ascr.SALESGROUP_ID
2275: FROM as_leads_all opps, as_sales_credits ascr
2276: WHERE opps.lead_id = ascr.lead_id
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 (

Line 2685: UPDATE as_leads_all

2681: END IF;
2682:
2683: IF l_found_owner THEN
2684:
2685: UPDATE as_leads_all
2686: SET owner_salesforce_id = l_org_owner_sf_id,
2687: owner_sales_group_id = l_org_owner_sg_id,
2688: last_updated_by = FND_GLOBAL.user_id,
2689: last_update_date = sysdate,

Line 2909: FROM as_leads_all ala

2905: where ascr.lead_id = l_lead_id(i)
2906: and NVL(DEFAULTED_FROM_OWNER_FLAG,'N') <> 'Y'
2907: and (SALESFORCE_ID ,SALESGROUP_ID) in
2908: (SELECT owner_salesforce_id,owner_sales_group_id
2909: FROM as_leads_all ala
2910: WHERE ala.lead_id = l_lead_id(i) )
2911: and credit_type_id = l_forecast_credit_type_id;
2912:
2913: -- Reassign partner non-quota credits to Opp owner