DBA Data[Home] [Help]

APPS.JTF_TTY_NACCT_SALES_PUB dependencies on JTF_TTY_NAMED_ACCT_RSC

Line 164: from jtf_tty_named_acct_rsc narsc ,

160: and nai.named_account_id = gai.named_account_id
161: and gai.terr_group_account_id = cl_terr_group_account_id
162: -- subsidiaries that are owned by user
163: and exists( select 'Y'
164: from jtf_tty_named_acct_rsc narsc ,
165: jtf_tty_my_resources_v repdn
166: -- jtf_tty_named_accts na,
167: -- jtf_tty_terr_grp_accts ga
168: where narsc.terr_group_account_id = gao.terr_group_account_id

Line 323: **** Changes made only to JTF_TTY_NAMED_ACCT_RSC

319: END IF; -- l_find_subs = 'Y' ?
320:
321: /***********************************************************
322: **** PHASE I: DATAMODEL MODIFICATIONS
323: **** Changes made only to JTF_TTY_NAMED_ACCT_RSC
324: **** JTF_TTY_ACCT_RSC_DN
325: ************************************************************/
326: --dbms_output.put_line('PHASE I ');
327:

Line 360: from jtf_tty_named_acct_rsc

356: -- DOES RECORD PROCESSED EXIST? Bug: 2729383
357: select count(*) into l_acct_rsc_exist_count
358: from (
359: select account_resource_id
360: from jtf_tty_named_acct_rsc
361: where resource_id = lp_resource_id
362: and rsc_group_id = lp_group_id
363: and rsc_role_code = lp_role_code
364: and terr_group_account_id = l_terr_group_account_id

Line 373: from jtf_tty_named_acct_rsc

369: -- DOES RECORD PROCESSED EXIST? Bug: 2729383
370: select count(*) into l_acct_rsc_exist_count
371: from (
372: select account_resource_id
373: from jtf_tty_named_acct_rsc
374: where resource_id = lp_resource_id
375: and rsc_group_id = lp_group_id
376: and rsc_role_code = lp_role_code
377: and terr_group_account_id = l_terr_group_account_id

Line 405: -- insert into jtf_tty_named_acct_rsc

401:
402: -- test if record already exists for this rsc/grp/role with assign Y
403:
404:
405: -- insert into jtf_tty_named_acct_rsc
406: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id
407: from dual;
408:
409: --dbms_output.put_line('inserting to jtf_tty_named_acct_rsc ');

Line 406: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id

402: -- test if record already exists for this rsc/grp/role with assign Y
403:
404:
405: -- insert into jtf_tty_named_acct_rsc
406: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id
407: from dual;
408:
409: --dbms_output.put_line('inserting to jtf_tty_named_acct_rsc ');
410: --dbms_output.put_line(' ' || ' //new_seq_acct_rsc_id=' || new_seq_acct_rsc_id ||

Line 409: --dbms_output.put_line('inserting to jtf_tty_named_acct_rsc ');

405: -- insert into jtf_tty_named_acct_rsc
406: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id
407: from dual;
408:
409: --dbms_output.put_line('inserting to jtf_tty_named_acct_rsc ');
410: --dbms_output.put_line(' ' || ' //new_seq_acct_rsc_id=' || new_seq_acct_rsc_id ||
411: --' //l_terr_group_account_id=' || l_terr_group_account_id ||' //lp_resource_id=' ||
412: -- lp_resource_id ||' //lp_group_id=' || lp_group_id
413: --|| l_assign_flag ||' //lp_resource_type=' || lp_resource_type );

Line 416: insert into jtf_tty_named_acct_rsc (

412: -- lp_resource_id ||' //lp_group_id=' || lp_group_id
413: --|| l_assign_flag ||' //lp_resource_type=' || lp_resource_type );
414:
415: -- assigned flag Y because user is assigning this individual, may be himself.
416: insert into jtf_tty_named_acct_rsc (
417: account_resource_id,
418: object_version_number,
419: terr_group_account_id,
420: resource_id,

Line 446: -- delete user for this account from JTF_TTY_NAMED_ACCT_RSC

442: sysdate --last_update_date
443: );
444:
445: -- if user exists as an account resource w/assign_flag = N then
446: -- delete user for this account from JTF_TTY_NAMED_ACCT_RSC
447: --dbms_output.put_line('deleting from JTF_TTY_NAMED_ACCT_RSC:' || '//lp_group_id:'
448: --|| lp_group_id ||'//p_role_code:' ||lp_role_code ||'//l_terr_group_account_id:'
449: --||l_terr_group_account_id || '//lp_user_resource_id:' || lp_user_resource_id);
450: -- Bug: 2726632

Line 447: --dbms_output.put_line('deleting from JTF_TTY_NAMED_ACCT_RSC:' || '//lp_group_id:'

443: );
444:
445: -- if user exists as an account resource w/assign_flag = N then
446: -- delete user for this account from JTF_TTY_NAMED_ACCT_RSC
447: --dbms_output.put_line('deleting from JTF_TTY_NAMED_ACCT_RSC:' || '//lp_group_id:'
448: --|| lp_group_id ||'//p_role_code:' ||lp_role_code ||'//l_terr_group_account_id:'
449: --||l_terr_group_account_id || '//lp_user_resource_id:' || lp_user_resource_id);
450: -- Bug: 2726632
451: -- Bug: 2732533

Line 487: delete from jtf_tty_named_acct_rsc

483: , sysdate
484: , l_login_id
485: );
486:
487: delete from jtf_tty_named_acct_rsc
488: where 1=1
489: --and rsc_group_id = lp_group_id
490: --and rsc_role_code = lp_role_code
491: and terr_group_account_id = l_terr_group_account_id

Line 568: --dbms_output.put_line('DELETING FROM jtf_tty_named_acct_rsc ');

564: lp_resource_type := G_REM_SALESREP_TBL(i).resource_type;
565: lp_mgr_resource_id := G_REM_SALESREP_TBL(i).mgr_resource_id;
566:
567: -- delete resource to be removed from sales team
568: --dbms_output.put_line('DELETING FROM jtf_tty_named_acct_rsc ');
569: --dbms_output.put_line(' ' ||
570: -- ' //l_terr_group_account_id=' || l_terr_group_account_id ||
571: -- ' //lp_resource_id=' || lp_resource_id ||
572: -- ' //lp_group_id=' || lp_group_id ||

Line 575: delete from jtf_tty_named_acct_rsc

571: -- ' //lp_resource_id=' || lp_resource_id ||
572: -- ' //lp_group_id=' || lp_group_id ||
573: -- ' //lp_role_code=' || lp_role_code || '//');
574:
575: delete from jtf_tty_named_acct_rsc
576: where rsc_group_id = lp_group_id
577: and rsc_role_code = lp_role_code
578: and terr_group_account_id = l_terr_group_account_id
579: and resource_id = lp_resource_id;

Line 593: from jtf_tty_named_acct_rsc ar

589: -- ACHANDA : bug 3265188 : change the IN clause to EXISTS to improve performance
590:
591:
592: select count(*) INTO l_directs_on_account
593: from jtf_tty_named_acct_rsc ar
594: where ar.terr_group_account_id = l_terr_group_account_id
595: and exists (
596: select 1
597: from jtf_tty_my_resources_v grv

Line 612: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id

608:
609: --dbms_output.put_line('l_directs_on_account = ' || l_directs_on_account);
610:
611: IF l_directs_on_account = 0 THEN
612: select jtf_tty_named_acct_rsc_s.nextval into new_seq_acct_rsc_id
613: from dual;
614:
615: lp_mgr_group_id := G_REM_SALESREP_TBL(i).mgr_group_id;
616: lp_mgr_role_code := G_REM_SALESREP_TBL(i).mgr_role_code;

Line 620: insert into jtf_tty_named_acct_rsc (

616: lp_mgr_role_code := G_REM_SALESREP_TBL(i).mgr_role_code;
617:
618: -- assigned flag N because user did not assign himself.
619: -- It is an auto assign to user when none of his directs are assigned.
620: insert into jtf_tty_named_acct_rsc (
621: account_resource_id,
622: object_version_number,
623: terr_group_account_id,
624: resource_id,

Line 662: -- delete subordinates from JTF_TTY_NAMED_ACCT_RSC

658: --bug 2828011: do not remove directs if user removing self.
659: IF lp_mgr_resource_id <> lp_resource_id THEN
660:
661: FOR crd IN c_rsc_directs(lp_resource_id, lp_group_id) LOOP
662: -- delete subordinates from JTF_TTY_NAMED_ACCT_RSC
663: DELETE FROM JTF_TTY_NAMED_ACCT_RSC
664: WHERE rsc_role_code = lp_role_code
665: AND terr_group_account_id = l_terr_group_account_id
666: AND resource_id = crd.resource_id;

Line 663: DELETE FROM JTF_TTY_NAMED_ACCT_RSC

659: IF lp_mgr_resource_id <> lp_resource_id THEN
660:
661: FOR crd IN c_rsc_directs(lp_resource_id, lp_group_id) LOOP
662: -- delete subordinates from JTF_TTY_NAMED_ACCT_RSC
663: DELETE FROM JTF_TTY_NAMED_ACCT_RSC
664: WHERE rsc_role_code = lp_role_code
665: AND terr_group_account_id = l_terr_group_account_id
666: AND resource_id = crd.resource_id;
667:

Line 711: from jtf_tty_named_acct_rsc

707: l_terr_group_account_id := G_AFFECT_PARTY_TBL(i).terr_group_account_id;
708:
709: -- set l_assigned_rsc_exists:0 if no assigned rsc exists, 1 otherwise
710: select count(*) into l_assigned_rsc_exists
711: from jtf_tty_named_acct_rsc
712: where terr_group_account_id = l_terr_group_account_id
713: and assigned_flag = 'Y'
714: and rownum < 2;
715: