DBA Data[Home] [Help]

APPS.JTY_WEBADI_OTH_TERR_UPDATE_PKG dependencies on JTF_TERR_ALL

Line 179: from jtf_terr_all

175: l_parent := l_terr;
176: --dbms_output.put_line('l_instr = 0, l_parent: '||l_parent);
177:
178: select count(*) into l_count
179: from jtf_terr_all
180: where name = l_parent
181: and parent_territory_id = l_anc_id
182: and org_id = l_hierarchy_tbl(c).org_id;
183:

Line 196: from jtf_terr_all

192: and interface_type = p_intf_type;
193: when 1 then
194: -- lowest level parent_id found, update interface table
195: select terr_id into l_parent_id
196: from jtf_terr_all
197: where org_id = l_hierarchy_tbl(c).org_id
198: and name = l_parent
199: and parent_territory_id = l_anc_id;
200:

Line 270: from jtf_terr_all

266: l_parent := substr(l_terr,1,l_instr -1);
267: --dbms_output.put_line('l_parent: '||l_parent);
268:
269: select count(*) into l_count
270: from jtf_terr_all
271: where name = l_parent
272: and parent_territory_id = l_anc_id
273: and org_id = l_hierarchy_tbl(c).org_id;
274:

Line 289: from jtf_terr_all

285: and interface_type = p_intf_type;
286: exit;
287: when 1 then
288: select terr_id into l_parent_id
289: from jtf_terr_all
290: where org_id = l_hierarchy_tbl(c).org_id
291: and name = l_parent
292: and parent_territory_id = l_anc_id;
293: else

Line 365: FROM jtf_terr_all

361: --dbms_output.put_line('l_instr = 0, l_parent: '||l_parent);
362:
363: SELECT COUNT(*)
364: INTO l_count
365: FROM jtf_terr_all
366: WHERE name = l_parent
367: AND parent_territory_id = l_anc_id
368: AND org_id = p_org_id;
369:

Line 374: FROM jtf_terr_all

370: IF (l_count = 1 OR l_count = 0 ) THEN
371: -- lowest level parent_id found, update interface table
372: SELECT terr_id
373: INTO l_parent_id
374: FROM jtf_terr_all
375: WHERE org_id = p_org_id
376: AND name = l_parent
377: AND parent_territory_id = l_anc_id;
378:

Line 384: FROM jtf_terr_all j

380: -- This fix is to avoid error ORA-01436: CONNECT BY loop in user data
381: BEGIN
382: SELECT COUNT(*)
383: INTO l_return_csr
384: FROM jtf_terr_all j
385: WHERE j.terr_id = l_parent_id -- new parent territory id
386: CONNECT BY PRIOR j.terr_id = j.parent_territory_id
387: START WITH j.terr_id = p_terr_id; -- territory_id
388:

Line 390: UPDATE jtf_terr_all

386: CONNECT BY PRIOR j.terr_id = j.parent_territory_id
387: START WITH j.terr_id = p_terr_id; -- territory_id
388:
389: IF (l_return_csr = 0 )THEN
390: UPDATE jtf_terr_all
391: SET parent_territory_id = l_parent_id
392: WHERE terr_id = p_terr_id;
393: ELSE
394: x_return_status := fnd_api.g_ret_sts_error;

Line 445: FROM jtf_terr_all

441: --dbms_output.put_line('l_parent: '||l_parent);
442:
443: SELECT COUNT(*)
444: INTO l_count
445: FROM jtf_terr_all
446: WHERE name = l_parent
447: AND parent_territory_id = l_anc_id
448: AND org_id = p_org_id;
449:

Line 453: FROM jtf_terr_all

449:
450: IF l_count = 1 THEN
451: SELECT terr_id
452: INTO l_parent_id
453: FROM jtf_terr_all
454: WHERE org_id = p_org_id
455: AND name = l_parent
456: AND parent_territory_id = l_anc_id;
457:

Line 1321: FROM jtf_terr_all jt

1317: update JTY_WEBADI_OTH_TERR_INTF jwot
1318: set jwot.status = x_return_status,
1319: jwot.error_msg = X_Msg_Data
1320: where not exists ( SELECT 1
1321: FROM jtf_terr_all jt
1322: WHERE jt.TERRITORY_TYPE_ID = jwot.TERR_TYPE_ID
1323: and jt.terr_id = jwot.TERR_ID
1324: AND jt.ORG_ID = jwot.ORG_ID )
1325: and jwot.user_sequence = p_user_sequence

Line 1581: from JTF_TERR_ALL jta

1577: and NOT(jwot.TERR_START_DATE between NVL(jwot2.terr_start_date,SYSDATE)
1578: and NVL(jwot2.TERR_END_DATE, ADD_MONTHS(NVL(jwot2.TERR_START_DATE,SYSDATE), 12)))
1579: and jwot.parent_terr_name = jwot2.terr_name)
1580: or exists ( select 1
1581: from JTF_TERR_ALL jta
1582: where jwot.parent_terr_id = jta.terr_id
1583: and NOT(jwot.TERR_START_DATE between jta.START_DATE_ACTIVE and jta.END_DATE_ACTIVE))
1584: );
1585:

Line 1607: from JTF_TERR_ALL jta

1603: and NOT (jwot.TERR_END_DATE between NVL(jwot2.terr_start_date,SYSDATE)
1604: and NVL(jwot2.TERR_END_DATE, ADD_MONTHS(NVL(jwot2.TERR_START_DATE,SYSDATE), 12)))
1605: and jwot.parent_terr_name = jwot2.terr_name)
1606: or exists ( select 1
1607: from JTF_TERR_ALL jta
1608: where jwot.parent_terr_id = jta.terr_id
1609: and NOT(jwot.TERR_END_DATE between jta.START_DATE_ACTIVE and jta.END_DATE_ACTIVE))
1610: );
1611:

Line 1630: from JTF_TERR_ALL jta

1626: and jwot.action_flag='C'
1627: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1628: and jwot.status is null
1629: and exists( select 1
1630: from JTF_TERR_ALL jta
1631: where jta.name = jwot.terr_name
1632: and ( jwot.terr_start_date BETWEEN jta.start_date_active AND jta.end_date_Active
1633: or jwot.terr_end_date BETWEEN jta.start_date_active AND jta.end_date_Active
1634: )

Line 1647: from JTF_TERR_ALL jta

1643: and jwot.action_flag='U'
1644: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1645: and jwot.status is null
1646: and exists( select 1
1647: from JTF_TERR_ALL jta
1648: where jta.name = jwot.terr_name
1649: and jta.terr_id <> jwot.terr_id
1650: and ( jwot.terr_start_date BETWEEN jta.start_date_active AND jta.end_date_Active
1651: or jwot.terr_end_date BETWEEN jta.start_date_active AND jta.end_date_Active

Line 1787: from jtf_terr_all jta

1783: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1784: SET (TERR_ID, TERR_START_DATE, TERR_END_DATE) =
1785: (select jta.terr_id, NVL(jwot.TERR_START_DATE,jta.START_DATE_ACTIVE)
1786: , NVL(jwot.TERR_END_DATE,jta.END_DATE_ACTIVE)
1787: from jtf_terr_all jta
1788: where jta.terr_id = jwot.terr_id
1789: --and jta.parent_territory_id = jwot.parent_terr_id
1790: and rownum = 1)
1791: where status is null

Line 1795: from jtf_terr_all jta

1791: where status is null
1792: and interface_type = l_intf_type
1793: and user_sequence = p_user_sequence
1794: and exists (select 1
1795: from jtf_terr_all jta
1796: where jta.terr_id = jwot.terr_id
1797: --and jta.parent_territory_id = jwot.parent_terr_id
1798: ) ;
1799:

Line 4187: DELETE from JTF_TERR_ALL WHERE TERR_ID = l_del_terr_rec.terr_id(i);

4183: DELETE from JTF_TERR_RSC_ALL Where TERR_ID = l_del_terr_rec.terr_id(i);
4184:
4185: forall i in l_del_terr_rec.terr_id.first..l_del_terr_rec.terr_id.last
4186: --Delete Territory record
4187: DELETE from JTF_TERR_ALL WHERE TERR_ID = l_del_terr_rec.terr_id(i);
4188:
4189: -- update all records including the qual and rsc which will be deleted
4190: forall i in l_del_terr_rec.terr_id.first..l_del_terr_rec.terr_id.last
4191: update JTY_WEBADI_OTH_TERR_INTF

Line 4831: INSERT INTO JTF_TERR_ALL(

4827:
4828: if (p_action_flag = 'C' and l_terr_all_rec.NAME.count > 0) then
4829: --forall i in l_terr_all_rec.NAME.first..l_terr_all_rec.NAME.last
4830: for i in l_terr_all_rec.NAME.first..l_terr_all_rec.NAME.last LOOP
4831: INSERT INTO JTF_TERR_ALL(
4832: TERR_ID, LAST_UPDATE_DATE, LAST_UPDATED_BY,
4833: CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN,
4834: APPLICATION_SHORT_NAME, NAME, ENABLED_FLAG,
4835: START_DATE_ACTIVE, RANK, END_DATE_ACTIVE, DESCRIPTION,

Line 4964: Update JTF_TERR_ALL

4960: x_return_status := FND_API.G_RET_STS_SUCCESS;
4961: if (p_action_flag = 'U' and l_terr_all_rec.TERR_ID.count > 0) then
4962:
4963: forall i in l_terr_all_rec.TERR_ID.first..l_terr_all_rec.TERR_ID.last
4964: Update JTF_TERR_ALL
4965: SET
4966: LAST_UPDATE_DATE = l_terr_all_rec.LAST_UPDATE_DATE(i),
4967: LAST_UPDATED_BY = l_terr_all_rec.LAST_UPDATED_BY(i),
4968: LAST_UPDATE_LOGIN = l_terr_all_rec.LAST_UPDATE_LOGIN(i),