31: g_nonindexed_Descriptions NoIndex_Varchar100_Tbl_Type := NoIndex_Varchar100_Tbl_Type();
32:
33: g_dup_locations STRINGARRAY;
34:
35: g_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type;
36: g_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type;
37: g_cur_index NUMBER;
38: g_names_exist BOOLEAN;
39:
32:
33: g_dup_locations STRINGARRAY;
34:
35: g_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type;
36: g_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type;
37: g_cur_index NUMBER;
38: g_names_exist BOOLEAN;
39:
40: -----------------------------------------------------------------------------
574: -- is used to make more efficient.
575: --
576: -- PARAMETERS :
577: -- IN Parameters:
578: -- 1. p_location_ids WSH_LOCATIONS_PKG.ID_Tbl_Type (Required)
579: -- The location ids for the facilities.
580: --
581: -- 2. p_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type (Not Required)
582: -- Corresponding company names for each
577: -- IN Parameters:
578: -- 1. p_location_ids WSH_LOCATIONS_PKG.ID_Tbl_Type (Required)
579: -- The location ids for the facilities.
580: --
581: -- 2. p_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type (Not Required)
582: -- Corresponding company names for each
583: -- location ID.
584: -- 3. p_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type (Not Required)
585: -- Corresponding site names for the
580: --
581: -- 2. p_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type (Not Required)
582: -- Corresponding company names for each
583: -- location ID.
584: -- 3. p_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type (Not Required)
585: -- Corresponding site names for the
586: -- location ids, if applicable.
587: --
588: -- OUT Parameters : x_return_status VARCHAR2
595: -- Previous version 1.0
596: -- Initial version 1.0
597: -- End of comments
598: -----------------------------------------------------------------------------------
599: PROCEDURE Create_Facilities (p_location_ids IN WSH_LOCATIONS_PKG.ID_Tbl_Type,
600: p_company_names IN WSH_LOCATIONS_PKG.Address_Tbl_Type,
601: p_site_names IN WSH_LOCATIONS_PKG.LocationCode_Tbl_Type,
602: x_return_status OUT NOCOPY VARCHAR2,
603: x_error_msg OUT NOCOPY VARCHAR2) IS
596: -- Initial version 1.0
597: -- End of comments
598: -----------------------------------------------------------------------------------
599: PROCEDURE Create_Facilities (p_location_ids IN WSH_LOCATIONS_PKG.ID_Tbl_Type,
600: p_company_names IN WSH_LOCATIONS_PKG.Address_Tbl_Type,
601: p_site_names IN WSH_LOCATIONS_PKG.LocationCode_Tbl_Type,
602: x_return_status OUT NOCOPY VARCHAR2,
603: x_error_msg OUT NOCOPY VARCHAR2) IS
604:
597: -- End of comments
598: -----------------------------------------------------------------------------------
599: PROCEDURE Create_Facilities (p_location_ids IN WSH_LOCATIONS_PKG.ID_Tbl_Type,
600: p_company_names IN WSH_LOCATIONS_PKG.Address_Tbl_Type,
601: p_site_names IN WSH_LOCATIONS_PKG.LocationCode_Tbl_Type,
602: x_return_status OUT NOCOPY VARCHAR2,
603: x_error_msg OUT NOCOPY VARCHAR2) IS
604:
605: CURSOR get_location_owner(c_location_id IN NUMBER) IS
1079: x_error_msg OUT NOCOPY VARCHAR2) IS
1080:
1081: l_module_name CONSTANT VARCHAR2(100) := 'fte.plsql.' || G_PKG_NAME || '.CREATE_FACILITY';
1082: l_debug_on BOOLEAN;
1083: l_location_id_tab WSH_LOCATIONS_PKG.ID_Tbl_Type;
1084: l_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type;
1085: l_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type;
1086:
1087: BEGIN
1080:
1081: l_module_name CONSTANT VARCHAR2(100) := 'fte.plsql.' || G_PKG_NAME || '.CREATE_FACILITY';
1082: l_debug_on BOOLEAN;
1083: l_location_id_tab WSH_LOCATIONS_PKG.ID_Tbl_Type;
1084: l_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type;
1085: l_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type;
1086:
1087: BEGIN
1088: Init_Debug(l_module_name);
1081: l_module_name CONSTANT VARCHAR2(100) := 'fte.plsql.' || G_PKG_NAME || '.CREATE_FACILITY';
1082: l_debug_on BOOLEAN;
1083: l_location_id_tab WSH_LOCATIONS_PKG.ID_Tbl_Type;
1084: l_site_names WSH_LOCATIONS_PKG.LocationCode_Tbl_Type;
1085: l_company_names WSH_LOCATIONS_PKG.Address_Tbl_Type;
1086:
1087: BEGIN
1088: Init_Debug(l_module_name);
1089:
1289: x_timezone OUT NOCOPY VARCHAR2,
1290: x_geometry OUT NOCOPY MDSYS.SDO_GEOMETRY
1291: ) is
1292:
1293: l_location WSH_LOCATIONS_PKG.LOCATION_REC_TYPE;
1294: x_error_msg VARCHAR2(100);
1295: l_module_name CONSTANT VARCHAR2(100) := 'fte.plsql.' || G_PKG_NAME || '.' || 'Get_Fac_Lat_Long_and_TimeZone';
1296: BEGIN
1297: l_location.COUNTRY := p_country;