DBA Data[Home] [Help]

APPS.WSH_MAP_LOCATION_REGION_PKG dependencies on WSH_REGION_LOCATIONS

Line 18: -- Tables to be used for bulk operations on WSH_REGION_LOCATIONS in APIs, insert_records/ update_records / delete_records

14:
15: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_MAP_LOCATION_REGION_PKG';
16:
17: -- Bug 4722963
18: -- Tables to be used for bulk operations on WSH_REGION_LOCATIONS in APIs, insert_records/ update_records / delete_records
19: l_location_id_tab TableNumbers;
20: l_region_id_tab TableNumbers;
21: l_region_type_tab TableNumbers;
22: l_exceptions_tab TableVarchar;

Line 457: | This API bulk inserts data into WSH_REGION_LOCATIONS table |

453: | PROCEDURE |
454: | Insert_records |
455: | |
456: | DESCRIPTION |
457: | This API bulk inserts data into WSH_REGION_LOCATIONS table |
458: | |
459: +===========================================================================*/
460:
461: PROCEDURE Insert_records

Line 487: INSERT INTO WSH_REGION_LOCATIONS(

483: END IF;
484:
485: FORALL i IN l_location_id_tab.first .. l_location_id_tab.last
486:
487: INSERT INTO WSH_REGION_LOCATIONS(
488: region_id,
489: location_id,
490: exception_type,
491: region_type,

Line 535: | This API bulk delete records from WSH_REGION_LOCATIONS table |

531: | PROCEDURE |
532: | Delete_records |
533: | |
534: | DESCRIPTION |
535: | This API bulk delete records from WSH_REGION_LOCATIONS table |
536: | |
537: +===========================================================================*/
538:
539: PROCEDURE Delete_records

Line 565: DELETE from wsh_region_locations where location_id = l_del_loc_id_tab(i)

561: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
562:
563: FORALL i IN l_del_loc_id_tab.first .. l_del_loc_id_tab.last
564:
565: DELETE from wsh_region_locations where location_id = l_del_loc_id_tab(i)
566: and ( ( region_id in (select wrt.region_id from wsh_regions_tl wrt,
567: wsh_regions wr
568: where wrt.region_id = wr.region_id
569: and wrt.language = USERENV('LANG'))

Line 593: | This API updates records in WSH_REGION_LOCATIONS table |

589: | PROCEDURE |
590: | Update_records |
591: | |
592: | DESCRIPTION |
593: | This API updates records in WSH_REGION_LOCATIONS table |
594: | |
595: +===========================================================================*/
596:
597:

Line 627: UPDATE wsh_region_locations

623: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
624:
625: FORALL cnt IN l_upd_loc_id_tab.first .. l_upd_loc_id_tab.last
626:
627: UPDATE wsh_region_locations
628: SET exception_type = 'Y'
629: WHERE location_id = l_upd_loc_id_tab(cnt)
630: and region_id in (select wrt.region_id from wsh_regions_tl wrt,
631: wsh_regions wr

Line 692: | WSH_REGION_LOCATIONS table. |

688: | Process_records |
689: | |
690: | DESCRIPTION |
691: | This API inserts/updates/deletes records in |
692: | WSH_REGION_LOCATIONS table. |
693: | Calls APIs Insert_records/Update_records and delete_records |
694: | |
695: +===========================================================================*/
696:

Line 1363: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,

1359: l_log_exception BOOLEAN := FALSE;
1360:
1361: --Variables: Start of fix for bug 5125837
1362: TYPE Reg_Rec_Type IS RECORD (
1363: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1364: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1365: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1366: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1367:

Line 1364: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,

1360:
1361: --Variables: Start of fix for bug 5125837
1362: TYPE Reg_Rec_Type IS RECORD (
1363: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1364: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1365: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1366: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1367:
1368: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;

Line 1365: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,

1361: --Variables: Start of fix for bug 5125837
1362: TYPE Reg_Rec_Type IS RECORD (
1363: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1364: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1365: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1366: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1367:
1368: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;
1369:

Line 1366: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );

1362: TYPE Reg_Rec_Type IS RECORD (
1363: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1364: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1365: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1366: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1367:
1368: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;
1369:
1370: l_region_detail_tab Reg_Tab_Type;

Line 1381: from wsh_region_locations

1377: /****
1378:
1379: CURSOR Check_Location_Exists(c_location_id IN NUMBER) IS
1380: select 'exists'
1381: from wsh_region_locations
1382: where location_id = c_location_id;
1383:
1384:
1385: CURSOR get_loc_region_count (p_location_id NUMBER) IS

Line 1387: FROM wsh_region_locations

1383:
1384:
1385: CURSOR get_loc_region_count (p_location_id NUMBER) IS
1386: SELECT count(*)
1387: FROM wsh_region_locations
1388: WHERE location_id = p_location_id
1389: AND ( ( region_id IN
1390: (
1391: SELECT wrt.region_id

Line 1507: from wsh_region_locations

1503: l_exists := null;
1504: BEGIN
1505: select region_id, region_type, exception_type, parent_region_flag
1506: BULK COLLECT INTO l_region_detail_tab
1507: from wsh_region_locations
1508: where location_id = p_location_id
1509: and ( ( region_id in
1510: ( select wrt.region_id
1511: from wsh_regions_tl wrt,

Line 1573: UPDATE wsh_region_locations

1569: THEN --{
1570:
1571: IF (l_region_detail_tab(1).Exception_Type = 'N') THEN
1572:
1573: UPDATE wsh_region_locations
1574: SET exception_type = 'Y',
1575: last_updated_by = fnd_global.user_id,
1576: last_update_date = sysdate,
1577: last_update_login = fnd_global.login_id

Line 1592: DELETE from wsh_region_locations where location_id = p_location_id

1588: -- better in terms of performance
1589:
1590: IF p_insert_flag THEN
1591: IF ( l_region_detail_tab.COUNT > 1 ) THEN
1592: DELETE from wsh_region_locations where location_id = p_location_id
1593: and ( ( region_id in (select wrt.region_id from wsh_regions_tl wrt,
1594: wsh_regions wr
1595: where wrt.region_id = wr.region_id
1596: and wrt.language = USERENV('LANG'))

Line 1647: --Before looping check whether wsh_region_locations table contains only

1643:
1644: ELSE
1645:
1646: --Added for bug 5125837
1647: --Before looping check whether wsh_region_locations table contains only
1648: --one record where region_id and region_type is NULL.
1649:
1650: IF ( l_region_detail_tab.COUNT = 1 AND
1651: l_region_detail_tab(1).region_id is null AND

Line 1654: DELETE from wsh_region_locations where location_id = p_location_id

1650: IF ( l_region_detail_tab.COUNT = 1 AND
1651: l_region_detail_tab(1).region_id is null AND
1652: l_region_detail_tab(1).region_type is null )
1653: THEN
1654: DELETE from wsh_region_locations where location_id = p_location_id
1655: and ( ( region_id in (select wrt.region_id from wsh_regions_tl wrt,
1656: wsh_regions wr
1657: where wrt.region_id = wr.region_id
1658: and wrt.language = USERENV('LANG'))

Line 1706: UPDATE wsh_region_locations

1702: l_region_detail_tab(l_region_counter).exception_type = 'N' AND
1703: l_region_detail_tab(l_region_counter).parent_region_flag = l_parent_region)
1704: THEN --{
1705:
1706: UPDATE wsh_region_locations
1707: SET region_id = l_region_table(i).region_id,
1708: exception_type = 'N',
1709: parent_region_flag = l_parent_region,
1710: last_updated_by = fnd_global.user_id,

Line 1728: DELETE FROM wsh_region_locations

1724: l_insert := TRUE;
1725: EXIT;
1726: ELSE
1727:
1728: DELETE FROM wsh_region_locations
1729: WHERE location_id = p_location_id
1730: AND region_type = l_region_detail_tab(l_region_counter).region_type
1731: AND region_id in
1732: ( select wrt.region_id

Line 1828: UPDATE wsh_region_locations

1824: l_log_exception := TRUE;
1825: END IF;
1826:
1827: IF p_insert_flag THEN
1828: UPDATE wsh_region_locations
1829: SET exception_type = 'Y',
1830: --Added for bug 5125837
1831: last_update_date = sysdate,
1832: last_updated_by = FND_GLOBAL.user_id,

Line 1967: INSERT INTO WSH_REGION_LOCATIONS(

1963: BEGIN
1964:
1965: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
1966:
1967: INSERT INTO WSH_REGION_LOCATIONS(
1968: region_id,
1969: location_id,
1970: exception_type,
1971: region_type,

Line 1997: WSH_UTIL_CORE.printmsg(' Insert into WSH_REGION_LOCATIONS failed : ' || sqlerrm);

1993: EXCEPTION
1994:
1995: WHEN Others THEN
1996:
1997: WSH_UTIL_CORE.printmsg(' Insert into WSH_REGION_LOCATIONS failed : ' || sqlerrm);
1998: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1999:
2000: End Insert_Record;
2001:

Line 2455: | WSH_REGION_LOCATIONS happens |

2451: | This API is called by Create_Location/Update_Location |
2452: | Business Process - After Process User Hook. |
2453: | This ensures that the whenever HR location is created or |
2454: | updated, corresponding changes in WSH_LOCATIONS and |
2455: | WSH_REGION_LOCATIONS happens |
2456: +===========================================================================*/
2457:
2458: PROCEDURE Location_User_Hook_API(
2459: p_location_id IN NUMBER) IS

Line 2558: -- Create a record in WSH_REGION_LOCATIONS

2554: , x_sqlcode => l_sqlcode
2555: , x_sqlerr => l_sqlerr );
2556:
2557: --
2558: -- Create a record in WSH_REGION_LOCATIONS
2559: --
2560:
2561: OPEN Get_Internal_Locations;
2562: FETCH Get_Internal_Locations INTO

Line 3204: l_token := 'WSH_REGION_LOCATIONS';

3200: END ;
3201:
3202:
3203: BEGIN
3204: l_token := 'WSH_REGION_LOCATIONS';
3205: IF l_debug_on THEN
3206: wsh_debug_sv.LOG(l_module_name, 'Validating records in table', l_token);
3207: END IF;
3208: v_delete_permitted := NULL;

Line 3211: FROM WSH_REGION_LOCATIONS

3207: END IF;
3208: v_delete_permitted := NULL;
3209: SELECT 'N'
3210: INTO v_delete_permitted
3211: FROM WSH_REGION_LOCATIONS
3212: WHERE LOCATION_ID = P_LOCATION_ID
3213: AND REGION_ID IS NOT NULL
3214: AND ROWNUM = 1 ;
3215: