DBA Data[Home] [Help]

APPS.JTF_TTY_GEO_TERRGP dependencies on JTF_TTY_GEO_TERR_RSC

Line 120: delete from jtf_tty_geo_terr_rsc where geo_territory_id = l_geo_terr_id;

116: delete from jtf_tty_geo_grp_values where terr_group_id = l_terr_grp_id;
117:
118: delete from jtf_tty_terr_groups where terr_group_id = l_terr_grp_id;
119:
120: delete from jtf_tty_geo_terr_rsc where geo_territory_id = l_geo_terr_id;
121:
122: delete from jtf_tty_geo_terr where geo_territory_id = l_geo_terr_id;
123:
124:

Line 229: insert into jtf_tty_geo_terr_rsc

225: END;
226:
227: BEGIN
228:
229: insert into jtf_tty_geo_terr_rsc
230: (geo_terr_resource_id,
231: object_version_number,
232: geo_territory_id,
233: resource_id,

Line 243: SELECT jtf_tty_geo_terr_rsc_s.nextval

239: creation_date,
240: last_updated_by,
241: last_update_date,
242: LAST_UPDATE_LOGIN)
243: SELECT jtf_tty_geo_terr_rsc_s.nextval
244: , 1
245: , l_geo_terr_id
246: , resource_id
247: , group_id

Line 582: DELETE from JTF_TTY_GEO_TERR_RSC

578: WHERE t.terr_group_id = p_terr_gp_id);
579:
580: /* delete all the geo territories assignments for the geo terr group */
581:
582: DELETE from JTF_TTY_GEO_TERR_RSC
583: WHERE geo_territory_id IN
584: (SELECT t.geo_territory_id
585: FROM jtf_tty_geo_terr t
586: WHERE t.terr_group_id = p_terr_gp_id);

Line 725: insert into jtf_tty_geo_terr_rsc

721: sysdate,
722: p_user_id,
723: sysdate);
724: /* Assign the top level territory to all the geo terr gp owners */
725: insert into jtf_tty_geo_terr_rsc
726: (geo_terr_resource_id,
727: object_version_number,
728: geo_territory_id,
729: resource_id,

Line 737: SELECT jtf_tty_geo_terr_rsc_s.nextval,

733: created_by,
734: creation_date,
735: last_updated_by,
736: last_update_date)
737: SELECT jtf_tty_geo_terr_rsc_s.nextval,
738: 1,
739: p_geo_territory_id,
740: tgo.resource_id,
741: tgo.rsc_group_id,

Line 833: FROM jtf_tty_geo_terr_rsc gtr,

829: SELECT gtr.resource_id,
830: gtr.rsc_group_id,
831: gtr.rsc_role_code,
832: gtr.geo_territory_id
833: FROM jtf_tty_geo_terr_rsc gtr,
834: jtf_tty_geo_terr gt
835: WHERE gt.terr_group_id = p_terr_gp_id
836: AND gt.geo_territory_id = gtr.geo_territory_id
837: AND gt.owner_resource_id = -999

Line 849: FROM jtf_tty_geo_terr_rsc gtr,

845: gtr.rsc_group_id,
846: gtr.rsc_role_code,
847: gtr.geo_territory_id,
848: gtr.resource_id replaced_owner_resource_id
849: FROM jtf_tty_geo_terr_rsc gtr,
850: jtf_tty_geo_terr gt,
851: jtf_tty_terr_grp_owners tgo1
852: WHERE gt.terr_group_id = p_terr_gp_id
853: AND gt.geo_territory_id = gtr.geo_territory_id

Line 871: FROM jtf_tty_geo_terr_rsc gtr

867: AND tgo.terr_group_id = p_terr_gp_id
868: AND gt.owner_resource_id = -999
869: AND (tgo.resource_id, tgo.rsc_group_id, tgo.rsc_role_code)
870: NOT IN (SELECT gtr.resource_id, gtr.rsc_group_id, gtr.rsc_role_code
871: FROM jtf_tty_geo_terr_rsc gtr
872: WHERE gt.geo_territory_id = gtr.geo_territory_id);
873: BEGIN
874: for removed_owners IN removed_owners_c LOOP
875: delete_geo_terr_rsc(removed_owners.geo_territory_id,

Line 934: DELETE from JTF_TTY_GEO_TERR_RSC gtr

930: AND gt1.parent_geo_terr_id = p_territory_id);
931:
932: /* Delete for the geo terrs assignments by the given resource and down
933: * from the given territory */
934: DELETE from JTF_TTY_GEO_TERR_RSC gtr
935: WHERE gtr.geo_territory_id IN
936: (SELECT gt.geo_territory_id
937: FROM JTF_TTY_GEO_TERR gt
938: START WITH gt.geo_territory_id IN

Line 948: DELETE from JTF_TTY_GEO_TERR_RSC gtr

944: AND gt1.parent_geo_terr_id = p_territory_id)
945: CONNECT BY PRIOR gt.geo_territory_id = gt.parent_geo_terr_id);
946: /* Delete geo terrs assignments created by the given resource
947: * from the given territory */
948: DELETE from JTF_TTY_GEO_TERR_RSC gtr
949: WHERE gtr.geo_territory_id IN
950: (SELECT gt1.geo_territory_id
951: FROM JTF_TTY_GEO_TERR gt1
952: WHERE gt1.owner_resource_id = p_resource_id

Line 956: DELETE from JTF_TTY_GEO_TERR_RSC gtr

952: WHERE gt1.owner_resource_id = p_resource_id
953: AND gt1.owner_rsc_group_id = p_rsc_group_id
954: AND gt1.owner_rsc_role_code = p_rsc_role_code
955: AND gt1.parent_geo_terr_id = p_territory_id);
956: DELETE from JTF_TTY_GEO_TERR_RSC gtr
957: WHERE gtr.geo_territory_id = p_territory_id
958: AND gtr.resource_id = p_resource_id
959: AND gtr.rsc_group_id = p_rsc_group_id
960: AND gtr.rsc_role_code = p_rsc_role_code;

Line 1002: insert into jtf_tty_geo_terr_rsc

998: BEGIN
999: p_user_id := fnd_global.user_id;
1000:
1001: /* Assign the top level territory to the geo terr gp owner/sales rep */
1002: insert into jtf_tty_geo_terr_rsc
1003: (geo_terr_resource_id,
1004: object_version_number,
1005: geo_territory_id,
1006: resource_id,

Line 1014: VALUES(jtf_tty_geo_terr_rsc_s.nextval,

1010: created_by,
1011: creation_date,
1012: last_updated_by,
1013: last_update_date)
1014: VALUES(jtf_tty_geo_terr_rsc_s.nextval,
1015: 1,
1016: p_territory_id,
1017: p_resource_id,
1018: p_rsc_group_id,

Line 1053: DELETE from JTF_TTY_GEO_TERR_RSC gtr

1049: and owner_resource_id = p_replaced_owner_resource_id;
1050:
1051: -- delete the replaced owner from geo terr assignment
1052: -- the territory is assigned to the new owner by assign geo terr api
1053: DELETE from JTF_TTY_GEO_TERR_RSC gtr
1054: WHERE gtr.geo_territory_id = p_territory_id
1055: AND gtr.resource_id = p_replaced_owner_resource_id
1056: AND gtr.rsc_group_id = p_rsc_group_id
1057: AND gtr.rsc_role_code = p_rsc_role_code;