DBA Data[Home] [Help]

APPS.HZ_GEOGRAPHY_PUB dependencies on HZ_GEOGRAPHY_IDENTIFIERS

Line 498: FROM hz_geography_identifiers

494:
495: -- check if the name is duplicated with in the parent of p_child_id
496: -- Added Subtype and language check for bug 4703418 on 28-Nov-2005 (Nishant)
497: SELECT count(*) INTO l_count
498: FROM hz_geography_identifiers
499: WHERE identifier_type='NAME'
500: AND identifier_subtype = p_child_identifier_subtype
501: AND language_code = p_child_language
502: AND UPPER(identifier_value) = UPPER(p_child_name)

Line 542: FROM hz_geography_identifiers

538:
539: -- check if the name is duplicated with in the parent of p_child_id
540: -- Added Subtype and language check for bug 4703418 on 28-Nov-2005 (Nishant)
541: SELECT count(*) INTO l_count
542: FROM hz_geography_identifiers
543: WHERE identifier_type='CODE'
544: AND identifier_subtype = p_child_identifier_subtype
545: AND language_code = p_child_language
546: AND identifier_value = UPPER(p_child_code)

Line 687: FROM hz_geography_identifiers

683: ); */
684: BEGIN
685: SELECT identifier_subtype,language_code INTO
686: l_identifier_subtype,l_language_code
687: FROM hz_geography_identifiers
688: WHERE geography_id = p_master_relation_rec.geography_id
689: AND identifier_type = 'NAME'
690: AND primary_flag = 'Y'
691: AND geography_use = 'MASTER_REF';

Line 723: FROM hz_geography_identifiers

719: ); */
720: BEGIN
721: SELECT identifier_subtype,language_code INTO
722: l_identifier_subtype,l_language_code
723: FROM hz_geography_identifiers
724: WHERE geography_id = p_master_relation_rec.geography_id
725: AND identifier_type = 'CODE'
726: AND primary_flag = 'Y'
727: AND geography_use = 'MASTER_REF';

Line 1244: FROM hz_geography_identifiers

1240: CLOSE c_get_all_parents;
1241: ELSE
1242: -- Bug 5411429 : check for the duplicate name/code for Country geographies.
1243: SELECT count(*) INTO l_count
1244: FROM hz_geography_identifiers
1245: WHERE identifier_type = p_geo_identifier_rec.identifier_type
1246: AND identifier_subtype = l_identifier_subtype
1247: AND language_code = p_geo_identifier_rec.language_code
1248: AND UPPER(identifier_value) = UPPER(p_geo_identifier_rec.identifier_value)

Line 1279: hz_geography_identifiers

1275:
1276: IF (p_geo_identifier_rec.identifier_type = 'NAME' AND p_geo_identifier_rec.identifier_subtype <> 'STANDARD_NAME') THEN
1277:
1278: SELECT count(*) INTO l_count from
1279: hz_geography_identifiers
1280: WHERE geography_id = p_geo_identifier_rec.geography_id
1281: AND language_code = l_language_code;
1282:
1283: IF l_count = 0 THEN

Line 1292: FROM hz_geography_identifiers

1288: IF p_geo_identifier_rec.primary_flag = 'Y' THEN
1289: IF (p_geo_identifier_rec.identifier_type='NAME' AND p_geo_identifier_rec.identifier_subtype = 'STANDARD_NAME') THEN
1290: -- check if there exists a STANDARD_NAME + Primary Flag = Y
1291: SELECT count(*) INTO l_count
1292: FROM hz_geography_identifiers
1293: WHERE geography_id = p_geo_identifier_rec.geography_id
1294: AND identifier_type = 'NAME'
1295: AND identifier_subtype = 'STANDARD_NAME'
1296: AND primary_flag = 'Y'

Line 1301: UPDATE hz_geography_identifiers

1297: AND language_code = l_language_code;
1298:
1299: IF l_count > 0 THEN
1300: -- update STANDARD_NAME+Y to STANDARD_NAME+N
1301: UPDATE hz_geography_identifiers
1302: SET primary_flag = 'N'
1303: WHERE geography_id = p_geo_identifier_rec.geography_id
1304: AND identifier_type = 'NAME'
1305: AND identifier_subtype = 'STANDARD_NAME'

Line 1315: FROM HZ_GEOGRAPHY_IDENTIFIERS

1311: END IF;
1312:
1313: --check if there exists a primary row already for this geography_id
1314: SELECT count(*) INTO l_count
1315: FROM HZ_GEOGRAPHY_IDENTIFIERS
1316: WHERE geography_id = p_geo_identifier_rec.geography_id
1317: AND identifier_type = p_geo_identifier_rec.identifier_type
1318: AND primary_flag='Y';
1319:

Line 1322: UPDATE hz_geography_identifiers

1318: AND primary_flag='Y';
1319:
1320: IF l_count > 0 THEN
1321: -- set the primary_flag of the existing primary identifier to 'N'
1322: UPDATE hz_geography_identifiers
1323: SET primary_flag = 'N'
1324: WHERE geography_id=p_geo_identifier_rec.geography_id
1325: AND identifier_type = p_geo_identifier_rec.identifier_type
1326: AND primary_flag = 'Y';

Line 1333: -- call table handler to insert the row in hz_geography_identifiers

1329: END IF;
1330:
1331: ----dbms_output.put_line('before identifier insert');
1332:
1333: -- call table handler to insert the row in hz_geography_identifiers
1334:
1335: HZ_GEOGRAPHY_IDENTIFIERS_PKG.insert_row(
1336: x_rowid => l_rowid,
1337: x_geography_id => p_geo_identifier_rec.geography_id,

Line 1335: HZ_GEOGRAPHY_IDENTIFIERS_PKG.insert_row(

1331: ----dbms_output.put_line('before identifier insert');
1332:
1333: -- call table handler to insert the row in hz_geography_identifiers
1334:
1335: HZ_GEOGRAPHY_IDENTIFIERS_PKG.insert_row(
1336: x_rowid => l_rowid,
1337: x_geography_id => p_geo_identifier_rec.geography_id,
1338: x_identifier_subtype => l_identifier_subtype,
1339: x_identifier_value => l_identifier_value,

Line 1505: FROM hz_geography_identifiers

1501: BEGIN
1502:
1503: SELECT rowid,geography_type,geography_use,primary_flag,object_version_number
1504: INTO l_rowid,l_geography_type,l_geography_use,l_old_primary_flag,l_object_version_number
1505: FROM hz_geography_identifiers
1506: WHERE geography_id = p_geo_identifier_rec.geography_id
1507: AND identifier_type = p_geo_identifier_rec.identifier_type
1508: AND identifier_subtype = p_geo_identifier_rec.identifier_subtype
1509: AND identifier_value = p_geo_identifier_rec.identifier_value

Line 1516: FND_MESSAGE.SET_TOKEN('TABLE', 'hz_geography_identifiers');

1512:
1513: --validate object_version_number
1514: IF l_object_version_number <> p_object_version_number THEN
1515: FND_MESSAGE.SET_NAME('AR', 'HZ_API_RECORD_CHANGED');
1516: FND_MESSAGE.SET_TOKEN('TABLE', 'hz_geography_identifiers');
1517: FND_MSG_PUB.ADD;
1518: RAISE FND_API.G_EXC_ERROR;
1519: ELSE
1520: p_object_version_number := l_object_version_number + 1;

Line 1596: FROM hz_geography_identifiers

1592: IF p_geo_identifier_rec.identifier_type = 'NAME' THEN
1593: -- check if the name is duplicated with in the parent of p_child_id
1594: -- Added Subtype and language check for bug 4703418 on 28-Nov-2005 (Nishant)
1595: SELECT count(*) INTO l_count
1596: FROM hz_geography_identifiers
1597: WHERE identifier_type='NAME'
1598: AND identifier_subtype = l_new_geo_subtype
1599: AND language_code = p_geo_identifier_rec.language_code
1600: AND UPPER(identifier_value) = UPPER(l_new_geo_value)

Line 1625: FROM hz_geography_identifiers

1621: ELSIF p_geo_identifier_rec.identifier_type = 'CODE' THEN
1622: -- check if the name is duplicated with in the parent of p_child_id
1623: -- Added Subtype and language check for bug 4703418 on 28-Nov-2005 (Nishant)
1624: SELECT count(*) INTO l_count
1625: FROM hz_geography_identifiers
1626: WHERE identifier_type='CODE'
1627: AND identifier_subtype = l_new_geo_subtype
1628: AND language_code = p_geo_identifier_rec.language_code
1629: AND identifier_value = UPPER(l_new_geo_value)

Line 1656: FROM hz_geography_identifiers

1652: CLOSE c_get_all_parents;
1653: ELSE
1654: -- Bug 5411429 : check for the duplicate name/code for Country geographies.
1655: SELECT count(*) INTO l_count
1656: FROM hz_geography_identifiers
1657: WHERE identifier_type = p_geo_identifier_rec.identifier_type
1658: AND identifier_subtype = l_new_geo_subtype
1659: AND language_code = p_geo_identifier_rec.language_code
1660: AND UPPER(identifier_value) = UPPER(l_new_geo_value)

Line 1691: FROM HZ_GEOGRAPHY_IDENTIFIERS

1687: IF (l_old_primary_flag = 'N' AND p_geo_identifier_rec.primary_flag = 'Y') THEN
1688:
1689: --check if there exists a primary row already for this geography_id
1690: SELECT count(*) INTO l_count
1691: FROM HZ_GEOGRAPHY_IDENTIFIERS
1692: WHERE geography_id = p_geo_identifier_rec.geography_id
1693: AND identifier_type = p_geo_identifier_rec.identifier_type
1694: AND primary_flag='Y'
1695: AND language_code = p_geo_identifier_rec.language_code;

Line 1700: UPDATE hz_geography_identifiers

1696:
1697: -- --dbms_output.put_line ( 'l_count for primary row '||to_char(l_count));
1698: IF l_count > 0 THEN
1699: -- set the primary_flag of the existing primary identifier to 'N'
1700: UPDATE hz_geography_identifiers
1701: SET primary_flag = 'N'
1702: WHERE geography_id=p_geo_identifier_rec.geography_id
1703: AND identifier_type = p_geo_identifier_rec.identifier_type
1704: AND primary_flag = 'Y'

Line 1710: hz_geography_identifiers_pkg.update_row(

1706: -- --dbms_output.put_line ( 'After update of primary from Y to N');
1707: END IF;
1708: END IF;
1709:
1710: hz_geography_identifiers_pkg.update_row(
1711: x_rowid => l_rowid,
1712: x_geography_id => p_geo_identifier_rec.geography_id,
1713: x_identifier_subtype => l_new_geo_subtype,
1714: x_identifier_value => l_new_geo_value,

Line 1791: FROM hz_geography_identifiers

1787: l_delete_flag := 'Y';
1788:
1789: -- primary identifier can not be deleted
1790: SELECT primary_flag INTO l_primary_flag
1791: FROM hz_geography_identifiers
1792: WHERE geography_id = p_geography_id
1793: AND identifier_type = p_identifier_type
1794: AND identifier_subtype = p_identifier_subtype
1795: AND identifier_value = p_identifier_value

Line 1810: from hz_geography_identifiers

1806: -- If a STANDARD_NAME is being deleted , if there exists another name mark it as STANDARD and delete
1807: -- this row else if another name doesn't exist then delete the row.
1808: IF (p_identifier_type = 'NAME' AND p_identifier_subtype = 'STANDARD_NAME') THEN
1809: select count(*) INTO l_count
1810: from hz_geography_identifiers
1811: where geography_id = p_geography_id
1812: AND language_code = p_language_code
1813: AND identifier_type = 'NAME'
1814: ;

Line 1817: UPDATE hz_geography_identifiers

1813: AND identifier_type = 'NAME'
1814: ;
1815: IF l_count > 1 THEN
1816: -- update an identifier to STANDARD
1817: UPDATE hz_geography_identifiers
1818: SET identifier_subtype = 'STANDARD_NAME'
1819: WHERE geography_id = p_geography_id
1820: AND identifier_type= p_identifier_type
1821: AND identifier_subtype <> p_identifier_subtype

Line 1832: HZ_GEOGRAPHY_IDENTIFIERS_PKG.delete_row(

1828: END IF;
1829: END IF;
1830:
1831: IF l_delete_flag = 'Y' THEN
1832: HZ_GEOGRAPHY_IDENTIFIERS_PKG.delete_row(
1833: x_geography_id => p_geography_id,
1834: x_identifier_subtype => p_identifier_subtype,
1835: x_identifier_value => p_identifier_value,
1836: x_language_code => p_language_code,

Line 2005: -- create an identifier for this geography in HZ_GEOGRAPHY_IDENTIFIERS

2001: END IF;
2002: END;
2003:
2004:
2005: -- create an identifier for this geography in HZ_GEOGRAPHY_IDENTIFIERS
2006: -- construct Identifier record for identifier_type 'NAME'/'CODE'
2007: l_geo_identifier_rec.geography_id := x_geography_id;
2008: l_geo_identifier_rec.identifier_subtype := 'STANDARD_NAME';
2009: l_geo_identifier_rec.identifier_value := p_master_geography_rec.geography_name;

Line 2395: FROM hz_geography_identifiers id

2391:
2392: -- check if this geography already exists for given parent
2393: SELECT COUNT(*)
2394: INTO l_count
2395: FROM hz_geography_identifiers id
2396: WHERE UPPER(id.identifier_value) = l_master_geography_rec.geography_name
2397: AND id.geography_use = 'MASTER_REF'
2398: AND id.identifier_type = 'NAME'
2399: AND id.identifier_subtype = 'STANDARD_NAME'

Line 3503: IF p_index_name = 'HZ_GEOGRAPHY_IDENTIFIERS_U1' THEN

3499: WHEN DUP_VAL_ON_INDEX THEN
3500: ROLLBACK TO create_geo_identifier;
3501: x_return_status := FND_API.G_RET_STS_ERROR;
3502: HZ_UTILITY_V2PUB.find_index_name(p_index_name);
3503: IF p_index_name = 'HZ_GEOGRAPHY_IDENTIFIERS_U1' THEN
3504: FND_MESSAGE.SET_NAME('AR', 'HZ_API_DUPLICATE_COLUMN');
3505: FND_MESSAGE.SET_TOKEN('COLUMN', 'geography_id,identifier_type,identifier_subtype,identifier_value,language_code');
3506: FND_MSG_PUB.ADD;
3507: END IF;