DBA Data[Home] [Help]

APPS.JTF_TTY_GEN_TERR_PVT dependencies on JTF_TTY_ACCT_QUAL_MAPS

Line 433: /* in jtf_tty_acct_qual_maps for the territory group */

429: DELETE FROM JTF_TERR_ALL WHERE TERR_GROUP_ACCOUNT_ID = p_terr_grp_acct_id;
430: /* if the user has deleted the TGA or update the mapping */
431: /* then delete the customer key name values from jtf_terr_values_all */
432: /* corresponding to the catch-all territory which are not present */
433: /* in jtf_tty_acct_qual_maps for the territory group */
434: /* but we do not need to do this if only sales team has been updated */
435: IF (p_change_type <> 'SALES_TEAM_UPDATE') THEN
436: DELETE FROM jtf_terr_values_all jtv
437: WHERE NOT EXISTS

Line 440: ,jtf_tty_acct_qual_maps B

436: DELETE FROM jtf_terr_values_all jtv
437: WHERE NOT EXISTS
438: (SELECT 1
439: FROM jtf_tty_terr_grp_accts A
440: ,jtf_tty_acct_qual_maps B
441: WHERE A.named_account_id = B.named_account_id
442: AND A.terr_group_id = p_terr_group_id
443: AND B.qual_usg_id = -1012
444: AND B.COMPARISON_OPERATOR = jtv.COMPARISON_OPERATOR

Line 539: /* in jtf_tty_acct_qual_maps for the territory group */

535:
536: /* if the user has deleted the TGA or update the mapping */
537: /* then delete the customer key name values from jtf_terr_values_all */
538: /* corresponding to the catch-all territory which are not present */
539: /* in jtf_tty_acct_qual_maps for the territory group */
540: /* but we do not need to do this if only sales team has been updated */
541:
542: IF (p_change_type <> 'SALES_TEAM_UPDATE') THEN
543: forall idx in p_terrGrpId_tbl.FIRST .. p_terrGrpId_tbl.LAST

Line 548: ,jtf_tty_acct_qual_maps B

544: DELETE from jtf_terr_values_all jtv
545: WHERE NOT EXISTS
546: (SELECT 1
547: FROM jtf_tty_terr_grp_accts A
548: ,jtf_tty_acct_qual_maps B
549: WHERE A.named_account_id = B.named_account_id
550: AND A.terr_group_id = p_terrGrpId_tbl(idx)
551: AND B.qual_usg_id = -1012
552: AND B.COMPARISON_OPERATOR = jtv.COMPARISON_OPERATOR

Line 4540: FROM jtf_tty_acct_qual_maps d

4536: AND a.status = 'A'
4537: AND EXISTS (
4538: /* Named Account has at least 1 Mapping Rule */
4539: SELECT 1
4540: FROM jtf_tty_acct_qual_maps d
4541: WHERE d.named_account_id = c.named_account_id )
4542: AND EXISTS (
4543: /* Salesperson exists for this Named Account */
4544: SELECT NULL

Line 4593: FROM jtf_tty_acct_qual_maps d

4589: AND a.status = 'A'
4590: AND EXISTS (
4591: /* Named Account has at least 1 Mapping Rule */
4592: SELECT 1
4593: FROM jtf_tty_acct_qual_maps d
4594: WHERE d.named_account_id = c.named_account_id )
4595: AND EXISTS (
4596: /* Salesperson, with Role that has a Product
4597: ** Interest defined, exists for this Named Account */

Line 4615: FROM jtf_tty_acct_qual_maps b

4611: SELECT b.qual_usg_id
4612: , b.comparison_operator
4613: , b.value1_char
4614: , b.value2_char
4615: FROM jtf_tty_acct_qual_maps b
4616: WHERE b.qual_usg_id IN (-1007, -1012)
4617: AND b.named_account_id = l_na_id
4618: ORDER BY b.qual_usg_id;
4619:

Line 4666: , jtf_tty_acct_qual_maps b

4662: CURSOR catchall_cust(l_terr_group_acct_id NUMBER) IS
4663: SELECT DISTINCT b.comparison_operator
4664: ,b.value1_char
4665: FROM jtf_tty_terr_grp_accts a
4666: , jtf_tty_acct_qual_maps b
4667: WHERE a.named_account_id = b.named_account_id
4668: AND a.terr_group_account_id = l_terr_group_acct_id
4669: AND b.qual_usg_id = -1012
4670: ORDER BY b.comparison_operator,b.value1_char;

Line 7274: FROM jtf_tty_acct_qual_maps d

7270: AND a.status = 'A'
7271: AND EXISTS (
7272: /* Named Account has at least 1 Mapping Rule */
7273: SELECT 1
7274: FROM jtf_tty_acct_qual_maps d
7275: WHERE d.named_account_id = c.named_account_id )
7276: AND EXISTS (
7277: /* Salesperson exists for this Named Account */
7278: SELECT NULL

Line 7356: FROM jtf_tty_acct_qual_maps d

7352: AND a.status = 'A'
7353: AND EXISTS (
7354: /* Named Account has at least 1 Mapping Rule */
7355: SELECT 1
7356: FROM jtf_tty_acct_qual_maps d
7357: WHERE d.named_account_id = c.named_account_id )
7358: AND EXISTS (
7359: /* Salesperson, with Role that has a Product
7360: ** Interest defined, exists for this Named Account */

Line 7378: FROM jtf_tty_acct_qual_maps b

7374: SELECT b.qual_usg_id
7375: , b.comparison_operator
7376: , b.value1_char
7377: , b.value2_char
7378: FROM jtf_tty_acct_qual_maps b
7379: WHERE b.qual_usg_id IN (-1007, -1012)
7380: AND b.named_account_id = l_na_id
7381: ORDER BY b.qual_usg_id;
7382:

Line 7412: , jtf_tty_acct_qual_maps b

7408: CURSOR catchall_cust(l_terr_group_id NUMBER) IS
7409: SELECT DISTINCT b.comparison_operator
7410: ,b.value1_char
7411: FROM jtf_tty_terr_grp_accts a
7412: , jtf_tty_acct_qual_maps b
7413: WHERE a.named_account_id = b.named_account_id
7414: AND a.terr_group_id = l_terr_group_id
7415: AND b.qual_usg_id = -1012
7416: ORDER BY b.comparison_operator,b.value1_char;