DBA Data[Home] [Help]

APPS.CN_GET_COMM_SUMM_DATA_PVT dependencies on CN_SALESREPS

Line 33: cn_salesreps s,cn_srp_plan_assigns assign WHERE re.resource_id = s.resource_id

29: l_rolequery_result number;
30:
31: l_query varchar2(4000) :=
32: 'SELECT distinct s.name, s.salesrep_id FROM jtf_rs_resource_extns re,
33: cn_salesreps s,cn_srp_plan_assigns assign WHERE re.resource_id = s.resource_id
34: and s.org_id = assign.org_id and re.category <> ''TBH''
35: and s.salesrep_id > 0 and s.salesrep_id = assign.salesrep_id
36: and :b1 <= nvl(assign.end_date, :b2)
37: and :b3 >= assign.start_date and s.org_id = :b4';

Line 163: from cn_salesreps

159:
160: cursor get_info is
161: select name, employee_number, cost_center,
162: charge_to_cost_center, assigned_to_user_name
163: from cn_salesreps
164: where salesrep_id = p_salesrep_id and org_id=p_org_id;
165:
166: BEGIN
167: open get_info;

Line 206: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE

202: l_count NUMBER :=0;
203: cursor cur_salesreps
204: is
205: SELECT DISTINCT S.SALESREP_ID,S.ORG_ID
206: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE
207: RM.PARENT_RESOURCE_ID=(SELECT R.RESOURCE_ID
208: FROM JTF_RS_RESOURCE_EXTNS R WHERE R.USER_ID = FND_GLOBAL.USER_ID)
209: AND RM.RESOURCE_ID=S.RESOURCE_ID
210: AND RM.HIERARCHY_TYPE IN ('MGR_TO_REP', 'REP_TO_REP', 'MGR_TO_MGR')

Line 248: from cn_salesreps

244: employee_number,
245: cost_center,
246: charge_to_cost_center,
247: assigned_to_user_name
248: from cn_salesreps
249: where org_id = c_org_id
250: AND assigned_to_user_id = c_analyst_id;
251:
252: cursor cur_salesreps2(c_org_id in number) is

Line 260: from cn_salesreps

256: employee_number,
257: cost_center,
258: charge_to_cost_center,
259: assigned_to_user_name
260: from cn_salesreps
261: where org_id = c_org_id;
262:
263: TYPE cur_salesreps1_type IS TABLE OF cur_salesreps1%ROWTYPE;
264: cur_salesreps1_tbl cur_salesreps1_type;

Line 644: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE

640: AND assign.org_id = cp.org_id
641: and assign.org_id = c_org_id
642: AND assign.salesrep_id in
643: (SELECT DISTINCT S.SALESREP_ID
644: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE
645: RM.PARENT_RESOURCE_ID=(SELECT R.RESOURCE_ID
646: FROM JTF_RS_RESOURCE_EXTNS R WHERE R.USER_ID = FND_GLOBAL.USER_ID)
647: AND RM.RESOURCE_ID=S.RESOURCE_ID
648: AND RM.HIERARCHY_TYPE IN ('MGR_TO_REP', 'REP_TO_REP', 'MGR_TO_MGR')

Line 744: (SELECT SALESREP_ID FROM CN_SALESREPS where org_id = c_org_id

740: AND assign.comp_plan_id = cp.comp_plan_id
741: AND assign.org_id = cp.org_id
742: and assign.org_id = c_org_id
743: AND assign.salesrep_id in
744: (SELECT SALESREP_ID FROM CN_SALESREPS where org_id = c_org_id
745: AND ((c_analyst_id <> -99 AND assigned_to_user_id = c_analyst_id) OR c_analyst_id = -99))
746: ORDER BY assign.start_date ;
747:
748: TYPE get_all_plans_type IS TABLE OF get_all_plans%ROWTYPE;

Line 917: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE

913: AND assign.comp_plan_id = cp.comp_plan_id
914: AND assign.org_id = cp.org_id
915: and assign.org_id = c_org_id
916: AND assign.salesrep_id in (SELECT DISTINCT S.SALESREP_ID
917: FROM JTF_RS_REP_MANAGERS RM,JTF_RS_GROUP_USAGES U, CN_SALESREPS S WHERE
918: RM.PARENT_RESOURCE_ID=(SELECT R.RESOURCE_ID
919: FROM JTF_RS_RESOURCE_EXTNS R WHERE R.USER_ID = FND_GLOBAL.USER_ID)
920: AND RM.RESOURCE_ID=S.RESOURCE_ID
921: AND RM.HIERARCHY_TYPE IN ('MGR_TO_REP', 'REP_TO_REP', 'MGR_TO_MGR')

Line 1045: (SELECT SALESREP_ID FROM CN_SALESREPS where org_id = c_org_id

1041: AND assign.comp_plan_id = cp.comp_plan_id
1042: AND assign.org_id = cp.org_id
1043: and assign.org_id = c_org_id
1044: AND assign.salesrep_id in
1045: (SELECT SALESREP_ID FROM CN_SALESREPS where org_id = c_org_id
1046: AND ((c_analyst_id <> -99 AND assigned_to_user_id = c_analyst_id) OR c_analyst_id = -99))
1047: ORDER BY assign.start_date;
1048:
1049: cursor quota_groups(c_org_id NUMBER)