DBA Data[Home] [Help]

APPS.JTF_TTY_NA_GEO_TERR_PVT dependencies on JTF_TTY_TERR_GRP_ROLES

Line 472: , jtf_tty_terr_grp_roles tgr

468: SELECT ra.access_type
469: FROM
470: jtf_tty_named_acct_rsc nar
471: , jtf_tty_terr_grp_accts tga
472: , jtf_tty_terr_grp_roles tgr
473: , jtf_tty_role_access ra
474: WHERE tga.terr_group_account_id = nar.terr_group_account_id
475: AND nar.terr_group_account_id = LP_terr_group_account_id
476: AND nar.rsc_role_code = tgr.role_code

Line 484: , jtf_tty_terr_grp_roles tgr

480: SELECT ra.access_type
481: FROM
482: jtf_tty_named_acct_rsc nar
483: , jtf_tty_terr_grp_accts tga
484: , jtf_tty_terr_grp_roles tgr
485: , jtf_tty_role_access ra
486: WHERE tga.terr_group_account_id = nar.terr_group_account_id
487: AND nar.terr_group_account_id = LP_terr_group_account_id
488: AND nar.rsc_role_code = tgr.role_code

Line 500: , jtf_tty_terr_grp_roles b

496: /* Access Types for a Territory Group */
497: CURSOR na_access(l_terr_group_id number) IS
498: SELECT distinct a.access_type
499: from jtf_tty_role_access a
500: , jtf_tty_terr_grp_roles b
501: where a.terr_group_role_id = b.terr_group_role_id
502: and b.terr_group_id = l_terr_group_id;
503:
504: /* Access Types for a particular Role within a Territory Group */

Line 509: , jtf_tty_terr_grp_roles b

505: CURSOR NON_OVLY_role_access( lp_terr_group_id number
506: , lp_role varchar2) IS
507: SELECT distinct a.access_type
508: from jtf_tty_role_access a
509: , jtf_tty_terr_grp_roles b
510: where a.terr_group_role_id = b.terr_group_role_id
511: and b.terr_group_id = lp_terr_group_id
512: and b.role_code = lp_role
513: AND NOT EXISTS (

Line 525: , jtf_tty_terr_grp_roles b

521: /* Access Types for a particular Role within a Territory Group */
522: CURSOR role_access(l_terr_group_id number,l_role varchar2) IS
523: SELECT distinct a.access_type
524: from jtf_tty_role_access a
525: , jtf_tty_terr_grp_roles b
526: where a.terr_group_role_id = b.terr_group_role_id
527: and b.terr_group_id = l_terr_group_id
528: and b.role_code = l_role
529: order by a.access_type ;

Line 537: , jtf_tty_terr_grp_roles b

533: SELECT b.role_code role_code
534: --,a.interest_type_id
535: ,b.terr_group_id
536: from jtf_tty_role_prod_int a
537: , jtf_tty_terr_grp_roles b
538: where a.terr_group_role_id(+) = b.terr_group_role_id
539: and b.terr_group_id = l_terr_group_id
540: and a.terr_group_role_id is null
541: order by b.role_code;

Line 551: , jtf_tty_terr_grp_roles b

547: b.role_code role_code
548: , r.role_name role_name
549: from jtf_rs_roles_vl r
550: , jtf_tty_role_prod_int a
551: , jtf_tty_terr_grp_roles b
552: where r.role_code = b.role_code
553: and a.terr_group_role_id = b.terr_group_role_id
554: and b.terr_group_id = lp_terr_group_id
555: AND EXISTS (

Line 568: , jtf_tty_terr_grp_roles b

564: /* Product Interest for a Role */
565: CURSOR role_pi_interest(l_terr_group_id number,l_role varchar2) IS
566: SELECT a.interest_type_id
567: from jtf_tty_role_prod_int a
568: , jtf_tty_terr_grp_roles b
569: where a.terr_group_role_id = b.terr_group_role_id
570: and b.terr_group_id = l_terr_group_id
571: and b.role_code = l_role;
572:

Line 669: , jtf_tty_terr_grp_roles tgr

665: ** Interest defined, exists for this Named Account */
666: SELECT NULL
667: FROM jtf_tty_named_acct_rsc nar
668: , jtf_tty_role_prod_int rpi
669: , jtf_tty_terr_grp_roles tgr
670: WHERE rpi.terr_group_role_id = tgr.terr_group_role_id
671: AND tgr.terr_group_id = C.TERR_GROUP_ID
672: AND tgr.role_code = nar.rsc_role_code
673: AND nar.terr_group_account_id = C.TERR_GROUP_ACCOUNT_ID );

Line 701: , jtf_tty_terr_grp_roles tgr

697: ** Interest defined, exists for this Named Account */
698: SELECT NULL
699: FROM jtf_tty_named_acct_rsc nar
700: , jtf_tty_role_prod_int rpi
701: , jtf_tty_terr_grp_roles tgr
702: WHERE rpi.terr_group_role_id = tgr.terr_group_role_id
703: AND tgr.terr_group_id = C.TERR_GROUP_ID
704: AND tgr.role_code = nar.rsc_role_code
705: AND nar.terr_group_account_id = C.TERR_GROUP_ACCOUNT_ID );

Line 780: , jtf_tty_terr_grp_roles b

776: ** do not have Product Interest defined */
777: CURSOR role_no_pi(l_terr_group_id number) IS
778: SELECT distinct b.role_code
779: from jtf_tty_role_access a
780: , jtf_tty_terr_grp_roles b
781: , jtf_tty_role_prod_int c
782: where a.terr_group_role_id = b.terr_group_role_id
783: and b.terr_group_id = l_terr_group_id
784: and a.access_type = 'ACCOUNT'

Line 788: , jtf_tty_terr_grp_roles d

784: and a.access_type = 'ACCOUNT'
785: and c.terr_group_role_id = b.terr_group_role_id
786: and not exists ( SELECT 1
787: from jtf_tty_role_prod_int e
788: , jtf_tty_terr_grp_roles d
789: where e.terr_group_role_id (+) = d.terr_group_role_id
790: and d.terr_group_id = b.terr_group_id
791: and d.role_code = b.role_code
792: and e.interest_type_id is null);

Line 849: SELECT JTF_TTY_TERR_GRP_ROLES_S.nextval

845:
846: l_ovnon_flag:='Y';
847: i :=i +1;
848:
849: SELECT JTF_TTY_TERR_GRP_ROLES_S.nextval
850: into l_id
851: FROM DUAL;
852:
853: l_overnon_role_tbl(i).grp_role_id:= l_id;

Line 856: INSERT into JTF_TTY_TERR_GRP_ROLES(

852:
853: l_overnon_role_tbl(i).grp_role_id:= l_id;
854: --
855:
856: INSERT into JTF_TTY_TERR_GRP_ROLES(
857: TERR_GROUP_ROLE_ID
858: , OBJECT_VERSION_NUMBER
859: , TERR_GROUP_ID
860: , ROLE_CODE

Line 2240: delete from jtf_tty_terr_grp_roles

2236: if l_ovnon_flag = 'Y' then
2237:
2238: for i in l_overnon_role_tbl.first.. l_overnon_role_tbl.last
2239: loop
2240: delete from jtf_tty_terr_grp_roles
2241: where TERR_GROUP_ROLE_ID=l_overnon_role_tbl(i).grp_role_id;
2242: --dbms_output.put_line('deleted');
2243: delete from jtf_tty_role_access
2244: where TERR_GROUP_ROLE_ID=l_overnon_role_tbl(i).grp_role_id;

Line 2271: , jtf_tty_terr_grp_roles b

2267: SELECT COUNT( DISTINCT b.role_code )
2268: into l_pi_count
2269: from jtf_rs_roles_vl r
2270: , jtf_tty_role_prod_int a
2271: , jtf_tty_terr_grp_roles b
2272: where r.role_code = b.role_code
2273: and a.terr_group_role_id = b.terr_group_role_id
2274: and b.terr_group_id = TERR_GROUP.TERR_GROUP_ID
2275: AND EXISTS (

Line 3804: , jtf_tty_terr_grp_roles tgr

3800: CURSOR get_NON_OVLY_geo_trans(l_geo_territory_id NUMBER) IS
3801: SELECT ra.access_type
3802: FROM
3803: JTF_TTY_GEO_TERR_RSC grsc
3804: , jtf_tty_terr_grp_roles tgr
3805: , jtf_tty_role_access ra
3806: WHERE grsc.GEO_TERRITORY_ID = l_geo_territory_id
3807: AND grsc.rsc_role_code = tgr.role_code
3808: AND ra.terr_group_role_id = tgr.terr_group_role_id

Line 3814: , jtf_tty_terr_grp_roles tgr

3810: UNION
3811: SELECT ra.access_type
3812: FROM
3813: JTF_TTY_GEO_TERR_RSC grsc
3814: , jtf_tty_terr_grp_roles tgr
3815: , jtf_tty_role_access ra
3816: WHERE grsc.GEO_TERRITORY_ID = l_geo_territory_id
3817: AND grsc.rsc_role_code = tgr.role_code
3818: AND ra.terr_group_role_id = tgr.terr_group_role_id

Line 3944: , jtf_tty_terr_grp_roles b

3940: CURSOR NON_OVLY_role_access( lp_terr_group_id number
3941: , lp_role varchar2) IS
3942: SELECT distinct a.access_type
3943: from jtf_tty_role_access a
3944: , jtf_tty_terr_grp_roles b
3945: where a.terr_group_role_id = b.terr_group_role_id
3946: and b.terr_group_id = lp_terr_group_id
3947: and b.role_code = lp_role
3948: AND NOT EXISTS (

Line 3961: , jtf_tty_terr_grp_roles b

3957: SELECT b.role_code role_code
3958: --,a.interest_type_id
3959: ,b.terr_group_id
3960: from jtf_tty_role_prod_int a
3961: , jtf_tty_terr_grp_roles b
3962: where a.terr_group_role_id(+) = b.terr_group_role_id
3963: and b.terr_group_id = l_terr_group_id
3964: and a.terr_group_role_id is null
3965: order by b.role_code;

Line 4028: , jtf_tty_terr_grp_roles tgr

4024: ** Interest defined, exists for this Named Account */
4025: SELECT NULL
4026: FROM jtf_tty_geo_terr_rsc grsc
4027: , jtf_tty_role_prod_int rpi
4028: , jtf_tty_terr_grp_roles tgr
4029: WHERE rpi.terr_group_role_id = tgr.terr_group_role_id
4030: AND tgr.terr_group_id = gterr.TERR_GROUP_ID
4031: AND tgr.role_code = grsc.rsc_role_code
4032: AND grsc.geo_territory_id = gterr.geo_territory_id );

Line 4043: , jtf_tty_terr_grp_roles b

4039: b.role_code role_code
4040: , r.role_name role_name
4041: from jtf_rs_roles_vl r
4042: , jtf_tty_role_prod_int a
4043: , jtf_tty_terr_grp_roles b
4044: where r.role_code = b.role_code
4045: and a.terr_group_role_id = b.terr_group_role_id
4046: and b.terr_group_id = lp_terr_group_id
4047: AND EXISTS (

Line 4061: , jtf_tty_terr_grp_roles b

4057: /* Access Types for a particular Role within a Territory Group */
4058: CURSOR role_access(l_terr_group_id number,l_role varchar2) IS
4059: SELECT distinct a.access_type
4060: from jtf_tty_role_access a
4061: , jtf_tty_terr_grp_roles b
4062: where a.terr_group_role_id = b.terr_group_role_id
4063: and b.terr_group_id = l_terr_group_id
4064: and b.role_code = l_role
4065: order by a.access_type ;

Line 4071: , jtf_tty_terr_grp_roles b

4067: /* Product Interest for a Role */
4068: CURSOR role_pi_interest(l_terr_group_id number,l_role varchar2) IS
4069: SELECT a.interest_type_id
4070: from jtf_tty_role_prod_int a
4071: , jtf_tty_terr_grp_roles b
4072: where a.terr_group_role_id = b.terr_group_role_id
4073: and b.terr_group_id = l_terr_group_id
4074: and b.role_code = l_role;
4075:

Line 4446: , jtf_tty_terr_grp_roles b

4442: SELECT COUNT( DISTINCT b.role_code )
4443: into l_pi_count
4444: from jtf_rs_roles_vl r
4445: , jtf_tty_role_prod_int a
4446: , jtf_tty_terr_grp_roles b
4447: where r.role_code = b.role_code
4448: and a.terr_group_role_id = b.terr_group_role_id
4449: and b.terr_group_id = p_terr_group_rec.TERR_GROUP_ID
4450: AND EXISTS (