DBA Data[Home] [Help]

APPS.JTF_TERR_ENGINE_GEN_PVT dependencies on JTF_TTY_TERR_GRP_ROLES

Line 474: , jtf_tty_terr_grp_roles tgr

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

Line 486: , jtf_tty_terr_grp_roles tgr

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

Line 502: , jtf_tty_terr_grp_roles b

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

Line 511: , jtf_tty_terr_grp_roles b

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

Line 527: , jtf_tty_terr_grp_roles b

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

Line 539: , jtf_tty_terr_grp_roles b

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

Line 553: , jtf_tty_terr_grp_roles b

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

Line 570: , jtf_tty_terr_grp_roles b

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

Line 671: , jtf_tty_terr_grp_roles tgr

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

Line 703: , jtf_tty_terr_grp_roles tgr

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

Line 782: , jtf_tty_terr_grp_roles b

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

Line 790: , jtf_tty_terr_grp_roles d

786: and a.access_type = 'ACCOUNT'
787: and c.terr_group_role_id = b.terr_group_role_id
788: and not exists ( SELECT 1
789: from jtf_tty_role_prod_int e
790: , jtf_tty_terr_grp_roles d
791: where e.terr_group_role_id (+) = d.terr_group_role_id
792: and d.terr_group_id = b.terr_group_id
793: and d.role_code = b.role_code
794: 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 2229: delete from jtf_tty_terr_grp_roles

2225: if l_ovnon_flag = 'Y' then
2226:
2227: for i in l_overnon_role_tbl.first.. l_overnon_role_tbl.last
2228: loop
2229: delete from jtf_tty_terr_grp_roles
2230: where TERR_GROUP_ROLE_ID=l_overnon_role_tbl(i).grp_role_id;
2231: --dbms_output.put_line('deleted');
2232: delete from jtf_tty_role_access
2233: where TERR_GROUP_ROLE_ID=l_overnon_role_tbl(i).grp_role_id;

Line 2260: , jtf_tty_terr_grp_roles b

2256: SELECT COUNT( DISTINCT b.role_code )
2257: into l_pi_count
2258: from jtf_rs_roles_vl r
2259: , jtf_tty_role_prod_int a
2260: , jtf_tty_terr_grp_roles b
2261: where r.role_code = b.role_code
2262: and a.terr_group_role_id = b.terr_group_role_id
2263: and b.terr_group_id = TERR_GROUP.TERR_GROUP_ID
2264: AND EXISTS (