DBA Data[Home] [Help]

APPS.JTF_TTY_WEBADI_NADOC_PKG dependencies on JTF_TTY_NAMED_ACCT_RSC

Line 163: , jtf_tty_named_acct_rsc narsc

159: , rol.role_code role_code
160: FROM jtf_rs_resource_extns_vl rsc
161: , jtf_rs_groups_vl grp
162: , jtf_rs_roles_vl rol
163: , jtf_tty_named_acct_rsc narsc
164: , jtf_tty_terr_grp_accts ga
165: -- , jtf_tty_named_accts na
166: WHERE rsc.resource_id = narsc.resource_id
167: AND grp.group_id = narsc.rsc_group_id

Line 319: ' from jtf_tty_named_acct_rsc narsc, ' ||

315: ' where ' ||
316: ' ga.terr_group_account_id IN ' ||
317: ' ( ' ||
318: ' select /*+ NO_MERGE */ narsc.terr_group_account_id ' ||
319: ' from jtf_tty_named_acct_rsc narsc, ' ||
320: ' jtf_tty_srch_my_resources_v repdn ' ||
321: ' where current_user_id = :P_USERID ' ||
322: ' and narsc.rsc_group_id = repdn.group_id ' ||
323: ' and narsc.resource_id = repdn.resource_id ' ||

Line 403: ' from jtf_tty_named_acct_rsc narsc, '||

399: IF P_SEARCHVALUE IS NULL OR trim(P_SEARCHVALUE) IS NULL OR SUBSTR(trim(P_SEARCHVALUE),1,1) = '%' THEN
400:
401: l_na_query := l_na_query ||
402: ' where gaid IN ( select /*+ NO_MERGE */ narsc.terr_group_account_id ' ||
403: ' from jtf_tty_named_acct_rsc narsc, '||
404: ' jtf_tty_srch_my_resources_v repdn '||
405: ' where narsc.resource_id = repdn.resource_id '||
406: ' and narsc.rsc_group_id = repdn.group_id '||
407: ' and repdn.current_user_id = :P_USERID ) ' ||

Line 414: ' from jtf_tty_named_acct_rsc narsc, '||

410:
411: ELSE
412: l_na_query := l_na_query ||
413: ' where EXISTS ( select narsc.terr_group_account_id '||
414: ' from jtf_tty_named_acct_rsc narsc, '||
415: ' jtf_tty_srch_my_resources_v repdn '||
416: ' where narsc.resource_id = repdn.resource_id '||
417: ' and narsc.rsc_group_id = repdn.group_id '||
418: ' and narsc.terr_group_account_id = gaid '||

Line 687: ' from jtf_tty_named_acct_rsc narsc1, '||

683: P_SALES_ROLE IS NULL AND trim(P_SALES_ROLE ) IS NULL THEN
684:
685: l_na_query := l_na_query ||
686: ' select /*+ NO_MERGE */ narsc1.terr_group_account_id '||
687: ' from jtf_tty_named_acct_rsc narsc1, '||
688: '( SELECT dir.resource_id, ' ||
689: ' MY_GRPS.group_id , ' ||
690: ' MY_GRPS.CURRENT_USER_ID ' ||
691: ' FROM jtf_rs_group_members grpmemo , ' ||

Line 735: ' from jtf_tty_named_acct_rsc narsc1, '||

731: (P_SALES_ROLE IS NULL OR trim(P_SALES_ROLE ) IS NULL) THEN
732:
733: l_na_query := l_na_query ||
734: ' select narsc1.terr_group_account_id '||
735: ' from jtf_tty_named_acct_rsc narsc1, '||
736: ' jtf_rs_group_members mem1, '||
737: ' jtf_rs_groups_denorm grpdn1 '||
738: ' where narsc1.resource_id = mem1.resource_id '||
739: ' and narsc1.rsc_group_id = mem1.group_id '||

Line 752: ' from jtf_tty_named_acct_rsc narsc1,'||

748: (P_SALESPERSON IS NULL OR trim(P_SALESPERSON) IS NULL) AND
749: (P_SALES_GROUP IS NULL OR trim(P_SALES_GROUP) IS NULL) THEN
750: l_na_query := l_na_query ||
751: ' select narsc1.terr_group_account_id'||
752: ' from jtf_tty_named_acct_rsc narsc1,'||
753: ' jtf_tty_my_resources_v repdn1,'||
754: ' jtf_rs_rep_managers repmgr1,'||
755: ' jtf_rs_groups_denorm grpdn1 '||
756: ' where narsc1.resource_id = repmgr1.resource_id'||

Line 770: ' from jtf_tty_named_acct_rsc narsc1, '||

766: (P_SALES_GROUP IS NOT NULL AND trim(P_SALES_GROUP) IS NOT NULL) AND
767: (P_SALES_ROLE IS NULL OR trim(P_SALES_ROLE) IS NULL) THEN
768: l_na_query := l_na_query ||
769: ' select narsc1.terr_group_account_id '||
770: ' from jtf_tty_named_acct_rsc narsc1, '||
771: ' jtf_tty_my_resources_v repdn1 '||
772: ' where narsc1.resource_id = repdn1.resource_id '||
773: ' and narsc1.rsc_group_id = repdn1.group_id '||
774: ' and repdn1.current_user_id = :P_SALESPERSON '||

Line 783: ' from jtf_tty_named_acct_rsc narsc1, '||

779: (P_SALES_GROUP IS NULL OR trim(P_SALES_GROUP) IS NULL) AND
780: (P_SALES_ROLE IS NOT NULL AND trim(P_SALES_ROLE) IS NOT NULL) THEN
781: l_na_query := l_na_query ||
782: ' select narsc1.terr_group_account_id '||
783: ' from jtf_tty_named_acct_rsc narsc1, '||
784: ' jtf_tty_my_resources_v repdn1 '||
785: ' where narsc1.resource_id = repdn1.resource_id '||
786: ' and narsc1.rsc_group_id = repdn1.group_id '||
787: ' and repdn1.current_user_id = :P_SALESPERSON '||

Line 796: ' from jtf_tty_named_acct_rsc narsc1, '||

792: (P_SALES_GROUP IS NOT NULL AND trim(P_SALES_GROUP) IS NOT NULL) AND
793: (P_SALES_ROLE IS NOT NULL AND trim(P_SALES_ROLE) IS NOT NULL) THEN
794: l_na_query := l_na_query ||
795: ' select narsc1.terr_group_account_id '||
796: ' from jtf_tty_named_acct_rsc narsc1, '||
797: ' jtf_tty_my_resources_v repdn1, '||
798: ' jtf_rs_rep_managers repmgr1, '||
799: ' jtf_rs_groups_denorm grpdn1 '||
800: ' where narsc1.resource_id = repmgr1.resource_id '||

Line 814: ' from jtf_tty_named_acct_rsc narsc1, '||

810: (P_SALES_GROUP IS NOT NULL AND trim(P_SALES_GROUP) IS NOT NULL) AND
811: (P_SALES_ROLE IS NOT NULL AND trim(P_SALES_ROLE) IS NOT NULL) THEN
812: l_na_query := l_na_query ||
813: ' select narsc1.terr_group_account_id '||
814: ' from jtf_tty_named_acct_rsc narsc1, '||
815: ' jtf_tty_my_resources_v repdn1 '||
816: ' where narsc1.resource_id = repdn1.resource_id '||
817: ' and narsc1.rsc_group_id = repdn1.group_id '||
818: ' and repdn1.current_user_id = :P_SALESPERSON ' ||

Line 841: ' from jtf_tty_named_acct_rsc narsc1, '||

837: IF P_ASSIGNED_STATUS='2' THEN
838: IF P_ISADMINFLAG = 'Y' THEN
839: l_na_query := l_na_query ||
840: ' ( select narsc1.terr_group_account_id '||
841: ' from jtf_tty_named_acct_rsc narsc1, '||
842: ' jtf_tty_my_directs_v dir '||
843: ' where narsc1.resource_id = dir.resource_id '||
844: ' and narsc1.rsc_group_id = dir.group_id '||
845: ' and dir.group_id = dir.parent_group_id '||

Line 851: ' from jtf_tty_named_acct_rsc narsc1, '||

847: ' and dir.current_user_id = :P_USERID ';
848: ELSE
849: l_na_query := l_na_query ||
850: '( select narsc1.terr_group_account_id '||
851: ' from jtf_tty_named_acct_rsc narsc1, '||
852: ' jtf_rs_resource_extns rsc1 '||
853: ' where narsc1.resource_id = rsc1.resource_id '||
854: ' and narsc1.assigned_flag = ''N'' '||
855: ' and rsc1.user_id = :P_USERID ';

Line 866: ' from jtf_tty_named_acct_rsc narsc, '||

862:
863: ELSE -- P_ASSIGNED_STATUS<>'2'
864: l_na_query := l_na_query ||
865: ' ( select narsc.terr_group_account_id '||
866: ' from jtf_tty_named_acct_rsc narsc, '||
867: ' jtf_tty_srch_my_resources_v repdn '||
868: ' where narsc.resource_id = repdn.resource_id '||
869: ' and narsc.rsc_group_id = repdn.group_id '||
870: ' and repdn.current_user_id = :P_USERID ';

Line 879: ' from jtf_tty_named_acct_rsc narsc1, '||

875:
876: IF P_ISADMINFLAG = 'Y' THEN
877: l_na_query := l_na_query ||
878: ' and not exists ( select ''Y'' '||
879: ' from jtf_tty_named_acct_rsc narsc1, '||
880: ' jtf_tty_my_directs_v dir '||
881: ' where narsc1.resource_id = dir.resource_id '||
882: ' and narsc1.rsc_group_id = dir.group_id '||
883: ' and dir.group_id = dir.parent_group_id '||

Line 890: ' from jtf_tty_named_acct_rsc narsc1, '||

886: ' and dir.current_user_id = :P_USERID ';
887: ELSE
888: l_na_query := l_na_query ||
889: ' and not exists ( select ''Y'' '||
890: ' from jtf_tty_named_acct_rsc narsc1, '||
891: ' jtf_rs_resource_extns rsc1 '||
892: ' where narsc1.resource_id = rsc1.resource_id '||
893: ' and narsc1.terr_group_account_id = narsc.terr_group_account_id '||
894: ' and narsc1.assigned_flag = ''N'' '||

Line 915: ' from jtf_tty_named_acct_rsc narsc1, '||

911: ' ga.terr_group_account_id IN (select /*+ NO_MERGE */ narsc1.terr_group_account_id ';
912: END IF;
913:
914: l_na_query := l_na_query ||
915: ' from jtf_tty_named_acct_rsc narsc1, '||
916: ' jtf_tty_srch_my_resources_v repdn '||
917: ' where narsc1.resource_id = repdn.resource_id '||
918: ' and narsc1.rsc_group_id = repdn.group_id '||
919: ' and repdn.current_user_id = :P_USERID ';

Line 988: || ' jtf_tty_named_acct_rsc narsc, '

984: || ' FROM jtf_tty_webadi_interface jtw ' --JTF_TTY_WEBADI_INT_GT
985: || ' WHERE jtw.user_id = ' ||p_userid
986: || ' ) sub, '
987: || ' jtf_rs_roles_vl rol, '
988: || ' jtf_tty_named_acct_rsc narsc, '
989: || ' jtf_tty_terr_grp_accts ga '
990: || ' WHERE rol.role_code = narsc.rsc_role_code '
991: || ' AND narsc.terr_group_account_id = ga.terr_group_account_id '
992: || ' AND ga.named_account_id = sub.jtf_tty_webadi_int_id '