DBA Data[Home] [Help]

APPS.CN_CALC_POPULATE_PVT dependencies on CN_COMP_PLANS_ALL

Line 300: and exists (select /*+ no_unnest */ 1 from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)

296: and rr.role_id = spa.role_id
297: and rr.role_resource_id = mem.group_member_id
298: and rr.role_resource_type = 'RS_GROUP_MEMBER'
299: and nvl(rr.delete_flag, 'N') <> 'Y'
300: and exists (select /*+ no_unnest */ 1 from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)
301: and rr.start_date_active <= p_end_date
302: and nvl(rr.end_date_active, p_end_date) >= p_start_date
303: and rr.start_date_active <= nvl(spa.end_date, p_end_date)
304: and nvl(rr.end_date_active, nvl(spa.end_date, p_end_date)) >= spa.start_date

Line 363: and exists (select 1 from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)

359: and rr.start_date_active <= p_end_date
360: and nvl(rr.end_date_active, p_end_date) >= p_start_date
361: and rr.start_date_active <= nvl(spa.end_date, p_end_date)
362: and nvl(rr.end_date_active, nvl(spa.end_date, p_end_date)) >= spa.start_date
363: and exists (select 1 from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)
364: and sqa.srp_plan_assign_id = spa.srp_plan_assign_id
365: and q.quota_id = sqa.quota_id
366: and q.start_date <= p_end_date
367: and nvl(q.end_date, p_end_date) >= p_start_date

Line 418: and exists (select comp_plan_id from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)

414: FROM cn_srp_plan_assigns_all spa
415: WHERE spa.role_id = l_role_id
416: AND spa.salesrep_id = l_salesrep_id
417: AND spa.org_id = g_org_id
418: and exists (select comp_plan_id from cn_comp_plans_all where status_code = 'COMPLETE' AND comp_plan_id = spa.comp_plan_id)
419: AND l_processed_date >= spa.start_date
420: AND ( spa.end_date IS NULL OR spa.end_date >= l_processed_date );
421:
422: CURSOR l_quota_rule_no_hier_csr ( l_quota_id NUMBER, l_revenue_class_id NUMBER ) IS