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 1347: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,

1343: l_log_exception BOOLEAN := FALSE;
1344:
1345: --Variables: Start of fix for bug 5125837
1346: TYPE Reg_Rec_Type IS RECORD (
1347: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1348: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1349: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1350: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1351:

Line 1348: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,

1344:
1345: --Variables: Start of fix for bug 5125837
1346: TYPE Reg_Rec_Type IS RECORD (
1347: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1348: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1349: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1350: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1351:
1352: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;

Line 1349: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,

1345: --Variables: Start of fix for bug 5125837
1346: TYPE Reg_Rec_Type IS RECORD (
1347: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1348: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1349: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1350: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1351:
1352: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;
1353:

Line 1350: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );

1346: TYPE Reg_Rec_Type IS RECORD (
1347: REGION_ID WSH_REGION_LOCATIONS.REGION_ID%TYPE,
1348: REGION_TYPE WSH_REGION_LOCATIONS.REGION_TYPE%TYPE,
1349: EXCEPTION_TYPE WSH_REGION_LOCATIONS.EXCEPTION_TYPE%TYPE,
1350: PARENT_REGION_FLAG WSH_REGION_LOCATIONS.PARENT_REGION_FLAG%TYPE );
1351:
1352: TYPE Reg_Tab_Type IS TABLE OF Reg_Rec_Type INDEX BY BINARY_INTEGER;
1353:
1354: l_region_detail_tab Reg_Tab_Type;

Line 1365: from wsh_region_locations

1361: /****
1362:
1363: CURSOR Check_Location_Exists(c_location_id IN NUMBER) IS
1364: select 'exists'
1365: from wsh_region_locations
1366: where location_id = c_location_id;
1367:
1368:
1369: CURSOR get_loc_region_count (p_location_id NUMBER) IS

Line 1371: FROM wsh_region_locations

1367:
1368:
1369: CURSOR get_loc_region_count (p_location_id NUMBER) IS
1370: SELECT count(*)
1371: FROM wsh_region_locations
1372: WHERE location_id = p_location_id
1373: AND ( ( region_id IN
1374: (
1375: SELECT wrt.region_id

Line 1491: from wsh_region_locations

1487: l_exists := null;
1488: BEGIN
1489: select region_id, region_type, exception_type, parent_region_flag
1490: BULK COLLECT INTO l_region_detail_tab
1491: from wsh_region_locations
1492: where location_id = p_location_id
1493: and ( ( region_id in
1494: ( select wrt.region_id
1495: from wsh_regions_tl wrt,

Line 1557: UPDATE wsh_region_locations

1553: THEN --{
1554:
1555: IF (l_region_detail_tab(1).Exception_Type = 'N') THEN
1556:
1557: UPDATE wsh_region_locations
1558: SET exception_type = 'Y',
1559: last_updated_by = fnd_global.user_id,
1560: last_update_date = sysdate,
1561: last_update_login = fnd_global.login_id

Line 1576: DELETE from wsh_region_locations where location_id = p_location_id

1572: -- better in terms of performance
1573:
1574: IF p_insert_flag THEN
1575: IF ( l_region_detail_tab.COUNT > 1 ) THEN
1576: DELETE from wsh_region_locations where location_id = p_location_id
1577: and ( ( region_id in (select wrt.region_id from wsh_regions_tl wrt,
1578: wsh_regions wr
1579: where wrt.region_id = wr.region_id
1580: and wrt.language = USERENV('LANG'))

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

1627:
1628: ELSE
1629:
1630: --Added for bug 5125837
1631: --Before looping check whether wsh_region_locations table contains only
1632: --one record where region_id and region_type is NULL.
1633:
1634: IF ( l_region_detail_tab.COUNT = 1 AND
1635: l_region_detail_tab(1).region_id is null AND

Line 1638: DELETE from wsh_region_locations where location_id = p_location_id

1634: IF ( l_region_detail_tab.COUNT = 1 AND
1635: l_region_detail_tab(1).region_id is null AND
1636: l_region_detail_tab(1).region_type is null )
1637: THEN
1638: DELETE from wsh_region_locations where location_id = p_location_id
1639: and ( ( region_id in (select wrt.region_id from wsh_regions_tl wrt,
1640: wsh_regions wr
1641: where wrt.region_id = wr.region_id
1642: and wrt.language = USERENV('LANG'))

Line 1690: UPDATE wsh_region_locations

1686: l_region_detail_tab(l_region_counter).exception_type = 'N' AND
1687: l_region_detail_tab(l_region_counter).parent_region_flag = l_parent_region)
1688: THEN --{
1689:
1690: UPDATE wsh_region_locations
1691: SET region_id = l_region_table(i).region_id,
1692: exception_type = 'N',
1693: parent_region_flag = l_parent_region,
1694: last_updated_by = fnd_global.user_id,

Line 1712: DELETE FROM wsh_region_locations

1708: l_insert := TRUE;
1709: EXIT;
1710: ELSE
1711:
1712: DELETE FROM wsh_region_locations
1713: WHERE location_id = p_location_id
1714: AND region_type = l_region_detail_tab(l_region_counter).region_type
1715: AND region_id in
1716: ( select wrt.region_id

Line 1812: UPDATE wsh_region_locations

1808: l_log_exception := TRUE;
1809: END IF;
1810:
1811: IF p_insert_flag THEN
1812: UPDATE wsh_region_locations
1813: SET exception_type = 'Y',
1814: --Added for bug 5125837
1815: last_update_date = sysdate,
1816: last_updated_by = FND_GLOBAL.user_id,

Line 1951: INSERT INTO WSH_REGION_LOCATIONS(

1947: BEGIN
1948:
1949: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
1950:
1951: INSERT INTO WSH_REGION_LOCATIONS(
1952: region_id,
1953: location_id,
1954: exception_type,
1955: region_type,

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

1977: EXCEPTION
1978:
1979: WHEN Others THEN
1980:
1981: WSH_UTIL_CORE.printmsg(' Insert into WSH_REGION_LOCATIONS failed : ' || sqlerrm);
1982: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1983:
1984: End Insert_Record;
1985:

Line 2439: | WSH_REGION_LOCATIONS happens |

2435: | This API is called by Create_Location/Update_Location |
2436: | Business Process - After Process User Hook. |
2437: | This ensures that the whenever HR location is created or |
2438: | updated, corresponding changes in WSH_LOCATIONS and |
2439: | WSH_REGION_LOCATIONS happens |
2440: +===========================================================================*/
2441:
2442: PROCEDURE Location_User_Hook_API(
2443: p_location_id IN NUMBER) IS

Line 2542: -- Create a record in WSH_REGION_LOCATIONS

2538: , x_sqlcode => l_sqlcode
2539: , x_sqlerr => l_sqlerr );
2540:
2541: --
2542: -- Create a record in WSH_REGION_LOCATIONS
2543: --
2544:
2545: OPEN Get_Internal_Locations;
2546: FETCH Get_Internal_Locations INTO

Line 3188: l_token := 'WSH_REGION_LOCATIONS';

3184: END ;
3185:
3186:
3187: BEGIN
3188: l_token := 'WSH_REGION_LOCATIONS';
3189: IF l_debug_on THEN
3190: wsh_debug_sv.LOG(l_module_name, 'Validating records in table', l_token);
3191: END IF;
3192: v_delete_permitted := NULL;

Line 3195: FROM WSH_REGION_LOCATIONS

3191: END IF;
3192: v_delete_permitted := NULL;
3193: SELECT 'N'
3194: INTO v_delete_permitted
3195: FROM WSH_REGION_LOCATIONS
3196: WHERE LOCATION_ID = P_LOCATION_ID
3197: AND REGION_ID IS NOT NULL
3198: AND ROWNUM = 1 ;
3199: