DBA Data[Home] [Help]

APPS.JTF_TERR_DEFINITION_REPORT_PVT dependencies on JTF_TERR

Line 1: PACKAGE BODY JTF_TERR_DEFINITION_REPORT_PVT AS

1: PACKAGE BODY JTF_TERR_DEFINITION_REPORT_PVT AS
2: /* $Header: jtftrrdb.pls 120.0 2005/06/02 18:21:49 appldev ship $ */
3:
4: /*----------------------------------------------------------------
5: PROCEDURE report_wrapper

Line 35: from jtf_terr j

31:
32: -- cursor of result territory searches with resource and qualifier restrictions
33: CURSOR cur_terr is
34: select j.terr_id, wf_notification.substitutespecialchars(j.name) name, j.rank
35: from jtf_terr j
36: where NVL(j.end_date_active, sysdate) >= sysdate
37: AND j.start_date_active <= sysdate
38: AND EXISTS
39: ( select jtr.terr_id

Line 40: from jtf_terr_rsc jtr, jtf_terr_qual jtq --, jtf_terr_usgs jtu

36: where NVL(j.end_date_active, sysdate) >= sysdate
37: AND j.start_date_active <= sysdate
38: AND EXISTS
39: ( select jtr.terr_id
40: from jtf_terr_rsc jtr, jtf_terr_qual jtq --, jtf_terr_usgs jtu
41: where jtr.terr_id = jtq.terr_id
42: and jtr.resource_id = decode(l_srp,-1,jtr.resource_id,l_srp)
43: and jtq.qual_usg_id = decode(l_qual, -1, jtq.qual_usg_id, l_qual)
44: --and jtu.source_id = decode(l_usg, -1, jtu.source_id, l_usg)

Line 51: from jtf_terr_resources_v jtrv

47:
48: -- cursor to get salesreps DELIVERY
49: CURSOR c_get_salesrep(ci_terr_id NUMBER) IS
50: select distinct resource_id, wf_notification.substitutespecialchars(resource_name) resource_name
51: from jtf_terr_resources_v jtrv
52: where jtrv.terr_id = ci_terr_id
53: order by resource_name;
54:
55: -- cursor to get dynamic qualifiers

Line 62: FROM jtf_terr_qualifiers_v

58: TERR_ID,
59: QUAL_USG_ID,
60: ORG_ID,
61: wf_notification.substitutespecialchars(qualifier_name) qualifier_name
62: FROM jtf_terr_qualifiers_v
63: WHERE terr_id = p_template_terr_id;
64:
65: -- cursor to get values for dynamic qualifier values
66: CURSOR c_get_terr_values (p_terr_qual_id NUMBER) IS

Line 88: FROM jtf_terr_values_desc_v j1

84: , VALUE2_ID
85: , wf_notification.substitutespecialchars(VALUE2_DESC) VALUE2_DESC
86: , VALUE3_ID
87: , wf_notification.substitutespecialchars(VALUE3_DESC) VALUE3_DESC
88: FROM jtf_terr_values_desc_v j1
89: WHERE j1.terr_qual_id = p_terr_qual_id
90: ORDER BY j1.LOW_VALUE_CHAR_DESC, j1.COMPARISON_OPERATOR;
91:
92: BEGIN

Line 100: if (icx_sec.validateSession(c_function_code => 'JTF_TERR_DFN_RPT', c_validate_only => 'Y')) then

96: --l_usg := p_usg;
97: l_response := p_response;
98: fnd_client_info.set_org_context(fnd_profile.value('ORG_ID'));
99:
100: if (icx_sec.validateSession(c_function_code => 'JTF_TERR_DFN_RPT', c_validate_only => 'Y')) then
101:
102: if l_response = 'Excel' then
103: xls(l_srp,
104: l_qual);

Line 113: htp.formOpen( curl => l_agent||'/'||'jtf_terr_definition_report.xls', cmethod => 'POST', cattributes => ' name="excel"');

109: htp.title('Territory Definitions');
110:
111: htp.headClose;
112: htp.bodyopen(cattributes=>'bgcolor="#CCCCCC"');
113: htp.formOpen( curl => l_agent||'/'||'jtf_terr_definition_report.xls', cmethod => 'POST', cattributes => ' name="excel"');
114: htp.formHidden( cname => 'p_srp', cvalue => l_srp);
115: --htp.formHidden( cname => 'p_sgrp', cvalue => l_sgrp);
116: htp.formHidden( cname => 'p_qual', cvalue => l_qual);
117: htp.formClose;

Line 371: select terr_id, wf_notification.substitutespecialchars(name) name, rank from jtf_terr_all

367: p_territory_type_id as_territories.territory_type_id%type ;
368:
369: -- cursor of result territory searches with resource and qualifier restrictions
370: CURSOR cur_terr is
371: select terr_id, wf_notification.substitutespecialchars(name) name, rank from jtf_terr_all
372: where terr_id in
373: (select jtr.terr_id from jtf_terr_rsc jtr, jtf_terr_qual jtq
374: where jtr.terr_id = jtq.terr_id
375: and jtr.resource_id = decode(l_srp,-1,jtr.resource_id,l_srp)

Line 373: (select jtr.terr_id from jtf_terr_rsc jtr, jtf_terr_qual jtq

369: -- cursor of result territory searches with resource and qualifier restrictions
370: CURSOR cur_terr is
371: select terr_id, wf_notification.substitutespecialchars(name) name, rank from jtf_terr_all
372: where terr_id in
373: (select jtr.terr_id from jtf_terr_rsc jtr, jtf_terr_qual jtq
374: where jtr.terr_id = jtq.terr_id
375: and jtr.resource_id = decode(l_srp,-1,jtr.resource_id,l_srp)
376: and jtq.qual_usg_id = decode(l_qual, -1, jtq.qual_usg_id, l_qual));
377:

Line 381: from jtf_terr_resources_v jtrv

377:
378: -- cursor to get salesreps DELIVERY
379: CURSOR c_get_salesrep(ci_terr_id NUMBER) IS
380: select distinct resource_id, wf_notification.substitutespecialchars(resource_name) resource_name
381: from jtf_terr_resources_v jtrv
382: where jtrv.terr_id = ci_terr_id
383: order by resource_name;
384:
385: -- cursor to get dynamic qualifiers

Line 392: FROM jtf_terr_qualifiers_v

388: TERR_ID,
389: QUAL_USG_ID,
390: ORG_ID,
391: wf_notification.substitutespecialchars(qualifier_name) qualifier_name
392: FROM jtf_terr_qualifiers_v
393: WHERE terr_id = p_template_terr_id;
394:
395: -- cursor to get values for dynamic qualifier values
396: CURSOR c_get_terr_values (p_terr_qual_id NUMBER) IS

Line 411: FROM jtf_terr_values_desc_v j1

407: , j1.LOW_VALUE_CHAR_ID
408: , wf_notification.substitutespecialchars(j1.CNR_GROUP_NAME) CNR_GROUP_NAME
409: , wf_notification.substitutespecialchars(DISPLAY_TYPE) DISPLAY_TYPE
410: , wf_notification.substitutespecialchars(CONVERT_TO_ID_FLAG) CONVERT_TO_ID_FLAG
411: FROM jtf_terr_values_desc_v j1
412: WHERE j1.terr_qual_id = p_terr_qual_id
413: ORDER BY j1.LOW_VALUE_CHAR_DESC, j1.COMPARISON_OPERATOR;
414:
415: BEGIN