DBA Data[Home] [Help]

APPS.JTF_TERR_NA_MERGE_PUB dependencies on JTF_TTY_TERR_GRP_ACCTS

Line 231: FROM jtf_tty_terr_grp_accts tga, jtf_tty_terr_groups tg

227: WHERE party_id = p_party_id;
228:
229: CURSOR c_get_tga_details (p_na_id NUMBER) IS
230: SELECT tga.terr_group_account_id, tga.terr_group_id, tg.matching_rule_code
231: FROM jtf_tty_terr_grp_accts tga, jtf_tty_terr_groups tg
232: WHERE tga.terr_group_id = tg.terr_group_id
233: AND tga.named_account_id = p_na_id;
234:
235: BEGIN

Line 343: from jtf_tty_terr_grp_accts jtga_outer

339: /* find out whether any non-overlapping Territory groups exist for the from and to parties */
340: BEGIN
341: select 'N'
342: into l_dist_terr_region
343: from jtf_tty_terr_grp_accts jtga_outer
344: where jtga_outer.named_account_id = p_to_na_id
345: and jtga_outer.terr_group_id = tga_rec.terr_group_id
346: and rownum < 2;
347:

Line 372: DELETE FROM jtf_tty_terr_grp_accts

368: DELETE FROM jtf_tty_named_acct_rsc
369: WHERE terr_group_account_id = tga_rec.terr_group_account_id;
370:
371: /* Delete the terr_group accounts for the from party */
372: DELETE FROM jtf_tty_terr_grp_accts
373: WHERE terr_group_account_id = tga_rec.terr_group_account_id;
374:
375: if ( tga_rec.matching_rule_code = '1' ) then
376: UPDATE jtf_tty_acct_qual_maps

Line 389: UPDATE jtf_tty_terr_grp_accts jtga

385: FND_FILE.PUT_LINE(FND_FILE.LOG,' S2: Merge From Named Account To Named Account (Distinct Territory Region) ');
386: FND_FILE.PUT_LINE(FND_FILE.LOG,' S2: territory group id : ' || to_char(l_terr_group_id));
387:
388: /* point the non-overlapping FROM named account to the TO named account */
389: UPDATE jtf_tty_terr_grp_accts jtga
390: SET jtga.named_account_id = p_to_na_id
391: WHERE jtga.terr_group_account_id = tga_rec.terr_group_account_id;
392:
393: l_acct_qual_maps_exist := 'N';

Line 471: FROM jtf_tty_terr_grp_accts tga,

467: l_to_party_na_exists := 'N';
468: BEGIN
469: SELECT 'Y'
470: INTO l_to_party_na_exists
471: FROM jtf_tty_terr_grp_accts tga,
472: jtf_tty_named_accts jna
473: WHERE jna.named_account_id = tga.named_account_id
474: AND jna.party_id = l_to_party_id
475: AND tga.terr_group_id = tga_rec.terr_group_id

Line 503: DELETE FROM jtf_tty_terr_grp_accts

499: DELETE FROM jtf_tty_named_acct_rsc
500: WHERE terr_group_account_id = tga_rec.terr_group_account_id;
501:
502: /* Delete the terr_group accounts for the from party */
503: DELETE FROM jtf_tty_terr_grp_accts
504: WHERE terr_group_account_id = tga_rec.terr_group_account_id;
505:
506: /*
507: DELETE FROM jtf_tty_acct_qual_maps