DBA Data[Home] [Help]

APPS.PN_SPACE_ASSIGN_CUST_PKG dependencies on PN_LOCATIONS_ALL

Line 76: FROM pn_locations_all

72: l_err_msg VARCHAR2(30);
73:
74: CURSOR org_cur IS
75: SELECT org_id
76: FROM pn_locations_all
77: WHERE location_id = x_location_id;
78:
79: l_org_id NUMBER;
80:

Line 974: -- 04-APR-06 Hareesha o Bug #5202023 Fetched org_id from pn_locations_all

970: -- 25-Aug-05 hareesha o Bug 4551557 - Modified csr_main cursor query to
971: -- include space assignments starting after the specified
972: -- end_date.
973: -- 28-NOV-05 pikhar o passed org_id in pn_mo_cache_utils.get_profile_value
974: -- 04-APR-06 Hareesha o Bug #5202023 Fetched org_id from pn_locations_all
975: -- instead of pn_space_assign_cust_all because
976: -- assignment_split could be called for
977: -- employee space assignment too.
978: -------------------------------------------------------------------------------

Line 982: PROCEDURE assignment_split(p_location_id IN PN_LOCATIONS_ALL.location_id%TYPE,

978: -------------------------------------------------------------------------------
979:
980: -- 102403 -- date track space assignment
981:
982: PROCEDURE assignment_split(p_location_id IN PN_LOCATIONS_ALL.location_id%TYPE,
983: p_start_date IN pn_locations_all.active_start_date%TYPE,
984: p_end_date IN pn_locations_all.active_end_date%TYPE
985: ) IS
986:

Line 983: p_start_date IN pn_locations_all.active_start_date%TYPE,

979:
980: -- 102403 -- date track space assignment
981:
982: PROCEDURE assignment_split(p_location_id IN PN_LOCATIONS_ALL.location_id%TYPE,
983: p_start_date IN pn_locations_all.active_start_date%TYPE,
984: p_end_date IN pn_locations_all.active_end_date%TYPE
985: ) IS
986:
987: -------------------------------------------------------------------------------------

Line 984: p_end_date IN pn_locations_all.active_end_date%TYPE

980: -- 102403 -- date track space assignment
981:
982: PROCEDURE assignment_split(p_location_id IN PN_LOCATIONS_ALL.location_id%TYPE,
983: p_start_date IN pn_locations_all.active_start_date%TYPE,
984: p_end_date IN pn_locations_all.active_end_date%TYPE
985: ) IS
986:
987: -------------------------------------------------------------------------------------
988: -- This cursor is used to get customers and employees assigned to a location and their date info

Line 1036: FROM pn_locations_all

1032: ,max(NVL(active_end_date, to_date('12/31/4712','MM/DD/YYYY'))) end_date
1033: ,assignable_area allocated_area
1034: ,location_id
1035: ,'LOCN.' assign_type_id
1036: FROM pn_locations_all
1037: WHERE location_id = p_location_id
1038: AND active_start_date <= p_end_date
1039: AND active_end_date >= p_start_date
1040: GROUP BY assignable_area,location_id

Line 1105: CURSOR csr_location_area(p_location_id PN_LOCATIONS_ALL.location_id%TYPE

1101: -------------------------------------------------------------------------------------
1102: -- This cursor is used to get the latest area for a location based on the assignment dates
1103: -- after the split to update the assignments with the right area
1104: -------------------------------------------------------------------------------------
1105: CURSOR csr_location_area(p_location_id PN_LOCATIONS_ALL.location_id%TYPE
1106: ,p_start_date PN_LOCATIONS_ALL.active_start_date%TYPE
1107: ,p_end_date PN_LOCATIONS_ALL.active_end_date%TYPE) IS
1108: SELECT assignable_area
1109: FROM pn_locations_all

Line 1106: ,p_start_date PN_LOCATIONS_ALL.active_start_date%TYPE

1102: -- This cursor is used to get the latest area for a location based on the assignment dates
1103: -- after the split to update the assignments with the right area
1104: -------------------------------------------------------------------------------------
1105: CURSOR csr_location_area(p_location_id PN_LOCATIONS_ALL.location_id%TYPE
1106: ,p_start_date PN_LOCATIONS_ALL.active_start_date%TYPE
1107: ,p_end_date PN_LOCATIONS_ALL.active_end_date%TYPE) IS
1108: SELECT assignable_area
1109: FROM pn_locations_all
1110: WHERE location_id = p_location_id

Line 1107: ,p_end_date PN_LOCATIONS_ALL.active_end_date%TYPE) IS

1103: -- after the split to update the assignments with the right area
1104: -------------------------------------------------------------------------------------
1105: CURSOR csr_location_area(p_location_id PN_LOCATIONS_ALL.location_id%TYPE
1106: ,p_start_date PN_LOCATIONS_ALL.active_start_date%TYPE
1107: ,p_end_date PN_LOCATIONS_ALL.active_end_date%TYPE) IS
1108: SELECT assignable_area
1109: FROM pn_locations_all
1110: WHERE location_id = p_location_id
1111: AND p_start_date between active_start_date

Line 1109: FROM pn_locations_all

1105: CURSOR csr_location_area(p_location_id PN_LOCATIONS_ALL.location_id%TYPE
1106: ,p_start_date PN_LOCATIONS_ALL.active_start_date%TYPE
1107: ,p_end_date PN_LOCATIONS_ALL.active_end_date%TYPE) IS
1108: SELECT assignable_area
1109: FROM pn_locations_all
1110: WHERE location_id = p_location_id
1111: AND p_start_date between active_start_date
1112: AND NVL(active_end_date,to_date('12/31/4712','MM/DD/YYYY'))
1113: ;

Line 1122: l_assignable_area PN_LOCATIONS_ALL.assignable_area%TYPE := 0;

1118: p_date1 DATE := NULL;
1119: l_start_date DATE := NULL;
1120: l_end_date DATE := NULL;
1121: i NUMBER := 0;
1122: l_assignable_area PN_LOCATIONS_ALL.assignable_area%TYPE := 0;
1123: l_allocated_area NUMBER;
1124: l_return_status VARCHAR2(100) := NULL;
1125: l_profile VARCHAR2(1);
1126:

Line 1129: FROM pn_locations_all

1125: l_profile VARCHAR2(1);
1126:
1127: CURSOR org_cur IS
1128: SELECT org_id
1129: FROM pn_locations_all
1130: WHERE location_id = p_location_id;
1131:
1132: /* S.N. Bug 456550 */
1133: CURSOR office_sec_cur(b_location_id number) IS

Line 1137: FROM pn_locations_all loc

1133: CURSOR office_sec_cur(b_location_id number) IS
1134: SELECT 1 FROM DUAL
1135: WHERE EXISTS
1136: (SELECT '1'
1137: FROM pn_locations_all loc
1138: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1139: AND loc.location_id = b_location_id
1140: );
1141: /* E.N. Bug 456550 */

Line 1443: FROM pn_locations_all loc

1439: WHERE emp.location_id = x_location_id
1440: AND (emp.emp_assign_start_date <= x_end_date AND
1441: NVL(emp.emp_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1442: AND EXISTS (SELECT '1'
1443: FROM pn_locations_all loc
1444: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1445: AND loc.location_id = emp.location_id);
1446:
1447: l_emp_updated := SQL%ROWCOUNT;

Line 1457: FROM pn_locations_all loc

1453: WHERE cust.location_id = x_location_id
1454: AND (cust.cust_assign_start_date <= x_end_date AND
1455: NVL(cust.cust_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1456: AND EXISTS (SELECT '1'
1457: FROM pn_locations_all loc
1458: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1459: AND loc.location_id = cust.location_id);
1460:
1461: l_cust_updated := SQL%ROWCOUNT;

Line 1480: FROM pn_locations_all loc

1476: WHERE emp.location_id = x_location_id
1477: AND (emp.emp_assign_start_date <= x_end_date AND
1478: NVL(emp.emp_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1479: AND EXISTS (SELECT '1'
1480: FROM pn_locations_all loc
1481: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1482: AND loc.location_id = emp.location_id)
1483: AND ROWNUM < 2;
1484:

Line 1494: FROM pn_locations_all loc

1490: WHERE cust.location_id = x_location_id
1491: AND (cust.cust_assign_start_date <= x_end_date AND
1492: NVL(cust.cust_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1493: AND EXISTS (SELECT '1'
1494: FROM pn_locations_all loc
1495: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1496: AND loc.location_id = cust.location_id)
1497: AND ROWNUM < 2;
1498:

Line 1549: FROM pn_locations_all loc

1545: WHERE emp.location_id = x_location_id
1546: AND (emp.emp_assign_start_date <= NVL(x_end_date,to_date('12/31/4712','mm/dd/yyyy')) AND
1547: NVL(emp.emp_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1548: AND EXISTS (SELECT '1'
1549: FROM pn_locations_all loc
1550: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1551: AND loc.location_id = emp.location_id);
1552:
1553: SELECT COUNT(*)

Line 1560: FROM pn_locations_all loc

1556: WHERE cust.location_id = x_location_id
1557: AND (cust.cust_assign_start_date <= NVL(x_end_date,to_date('12/31/4712','mm/dd/yyyy')) AND
1558: NVL(cust.cust_assign_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1559: AND EXISTS (SELECT '1'
1560: FROM pn_locations_all loc
1561: WHERE loc.location_type_lookup_code in ('OFFICE','SECTION')
1562: AND loc.location_id = cust.location_id);
1563:
1564: l_utilized := NVL(l_utilized_emp,0) + NVL(l_utilized_cust,0);

Line 1605: FROM pn_locations_all

1601: BEGIN
1602:
1603: SELECT COUNT(*)
1604: INTO l_location_count
1605: FROM pn_locations_all
1606: WHERE location_id = x_location_id
1607: AND (active_start_date <= NVL(x_end_date,to_date('12/31/4712','mm/dd/yyyy')) AND
1608: NVL(active_end_date,to_date('12/31/4712','mm/dd/yyyy')) >= x_start_date)
1609: ;

Line 1677: p_location_id IN pn_locations_all.location_id%TYPE )

1673: -- pn_space_assign_cust with _ALL table.
1674: -------------------------------------------------------------------------------
1675:
1676: PROCEDURE Defrag_Contig_Assign (
1677: p_location_id IN pn_locations_all.location_id%TYPE )
1678: IS
1679: -------------------------------------------------------------------------------------
1680: -- The foll. cursors are used to get customers and employees assigned to a location
1681: -- after split and redistribution ordered in such a way that records with contiguous