DBA Data[Home] [Help]

APPS.HZ_MERGE_ENTITY_ATTRI_PVT dependencies on HZ_MERGE_ENTITY_ATTRIBUTES

Line 95: from HZ_MERGE_ENTITY_ATTRIBUTES

91: x_return_status OUT NOCOPY VARCHAR2
92: ) is
93: cursor get_org_rec_csr is
94: select attribute_name, attribute_value, attribute_type, attribute_party_id
95: from HZ_MERGE_ENTITY_ATTRIBUTES
96: where merge_to_party_id = p_merge_to_party_id
97: and entity_name = 'HZ_ORGANIZATION_PROFILES'
98: and merge_batch_id = p_merge_batch_id;
99:

Line 506: from HZ_MERGE_ENTITY_ATTRIBUTES

502: x_return_status OUT NOCOPY VARCHAR2
503: ) is
504: cursor get_person_rec_csr is
505: select attribute_name, attribute_value, attribute_type
506: from HZ_MERGE_ENTITY_ATTRIBUTES
507: where merge_to_party_id = p_merge_to_party_id
508: and entity_name = 'HZ_PERSON_PROFILES'
509: and merge_batch_id = p_merge_batch_id;
510:

Line 837: from HZ_MERGE_ENTITY_ATTRIBUTES

833: where party_id = p_merge_to_party_id;
834:
835: cursor get_attri_party_csr is
836: select attribute_party_id
837: from HZ_MERGE_ENTITY_ATTRIBUTES
838: where merge_to_party_id = p_merge_to_party_id
839: and entity_name = 'HZ_ORGANIZATION_PROFILES'
840: and merge_batch_id = p_merge_batch_id
841: and attribute_name = 'BUSINESS_REPORT';

Line 935: update HZ_MERGE_ENTITY_ATTRIBUTES

931: end if;
932: l_party_id := get_InternalFlagPartyId(p_merge_batch_id,p_entity_name);
933:
934: if l_party_id is not null then
935: update HZ_MERGE_ENTITY_ATTRIBUTES
936: set attribute_value = 'Y',
937: attribute_party_id = l_party_id,
938: last_update_date = SYSDATE,
939: last_update_login = FND_GLOBAL.LOGIN_ID,

Line 1027: update hz_merge_entity_attributes

1023: l_value := get_attribute_value(l_group_attribute_name,p_candidate_party_id,p_entity_name);
1024:
1025: if p_proc_type = 'C'
1026: then
1027: update hz_merge_entity_attributes
1028: set attribute_value = l_value, -- l_value has already formatted
1029: --attribute_value = decode(attribute_type,'D',to_char(to_date(l_value),'YYYY/MM/DD'),l_value), -- Bug No:3729832
1030: attribute_party_id = p_candidate_party_id,
1031: derived_last_update_date = p_derived_last_update_date,

Line 1042: update hz_merge_entity_attributes

1038: and entity_name = p_entity_name
1039: and merge_to_party_id =p_merge_to_party_id
1040: and attribute_value is null;
1041: else
1042: update hz_merge_entity_attributes
1043: set attribute_value = l_value, -- l_value has already formatted
1044: --attribute_value = decode(attribute_type,'D',to_char(to_date(l_value),'YYYY/MM/DD'),l_value), -- Bug No:3729832
1045: attribute_party_id = p_candidate_party_id,
1046: derived_last_update_date = p_derived_last_update_date,

Line 1075: from hz_merge_entity_attributes attri, ar_lookups c, ar_lookups t

1071:
1072: -- get master party attributes where leader is null
1073: cursor get_leader_attribute_name_csr(p_lookup_type varchar2) is
1074: select attri.attribute_name
1075: from hz_merge_entity_attributes attri, ar_lookups c, ar_lookups t
1076: where attri.attribute_name = c.lookup_code
1077: and c.lookup_type = t.lookup_code
1078: and t.lookup_type = p_lookup_type
1079: and attribute_value is null and substrb(c.externally_visible_flag,10,1) = 'L'

Line 1384: update hz_merge_entity_attributes

1380: loop
1381: fetch get_business_report_party_csr into l_from_party_id, l_last_update_date;
1382: exit when get_business_report_party_csr%NOTFOUND;
1383:
1384: update hz_merge_entity_attributes
1385: set attribute_party_id = l_from_party_id,
1386: last_update_date = SYSDATE,
1387: last_update_login = FND_GLOBAL.LOGIN_ID,
1388: last_updated_by = FND_GLOBAL.USER_ID,

Line 1505: insert into hz_merge_entity_attributes(

1501: END;
1502: if l_col_name <> 'BUSINESS_REPORT'
1503: then
1504: l_derived_date := get_party_last_upd_date(l_attri_party_id,p_entity_name);
1505: insert into hz_merge_entity_attributes(
1506: MERGE_BATCH_ID,
1507: MERGE_TO_PARTY_ID,
1508: ATTRIBUTE_NAME,
1509: ATTRIBUTE_VALUE,

Line 1672: insert into hz_merge_entity_attributes(

1668: fetch get_entity_attri_csr into l_col_name,l_col_type;
1669: exit when get_entity_attri_csr %NOTFOUND;
1670: if l_col_name = 'BUSINESS_REPORT'
1671: then
1672: insert into hz_merge_entity_attributes(
1673: MERGE_BATCH_ID,
1674: MERGE_TO_PARTY_ID,
1675: ATTRIBUTE_NAME,
1676: ATTRIBUTE_VALUE,

Line 1712: str := 'insert into hz_merge_entity_attributes( '||

1708: else
1709: -- need to use d-sql to get to_char(l_col_name) from entity table
1710: -- ex. select to_char(SIC_CODE) from hz_organization_profiles to get attribute_value
1711:
1712: str := 'insert into hz_merge_entity_attributes( '||
1713: 'MERGE_BATCH_ID,'||
1714: 'MERGE_TO_PARTY_ID,'||
1715: 'ATTRIBUTE_NAME,'||
1716: 'ATTRIBUTE_VALUE,'||

Line 1762: update HZ_MERGE_ENTITY_ATTRIBUTES

1758: if p_entity_name = 'HZ_PERSON_PROFILES' then
1759: l_party_id :=null;
1760: l_party_id := get_healthCarePartyId(p_merge_batch_id);
1761: if l_party_id is not null then
1762: update HZ_MERGE_ENTITY_ATTRIBUTES
1763: set attribute_value = 'CTB_PERSON_REGISTRY_SERVICES',
1764: attribute_party_id = l_party_id,
1765: last_update_date = SYSDATE,
1766: last_update_login = FND_GLOBAL.LOGIN_ID,

Line 1778: update HZ_MERGE_ENTITY_ATTRIBUTES

1774: end if;
1775: l_party_id := get_InternalFlagPartyId(p_merge_batch_id,p_entity_name);
1776:
1777: if l_party_id is not null then
1778: update HZ_MERGE_ENTITY_ATTRIBUTES
1779: set attribute_value = 'Y',
1780: attribute_party_id = l_party_id,
1781: last_update_date = SYSDATE,
1782: last_update_login = FND_GLOBAL.LOGIN_ID,

Line 1864: from HZ_MERGE_ENTITY_ATTRIBUTES

1860: x_msg_data OUT NOCOPY VARCHAR2
1861: ) is
1862: cursor get_obj_version_number_csr is
1863: select object_version_number
1864: from HZ_MERGE_ENTITY_ATTRIBUTES
1865: where merge_batch_id = p_merge_batch_id
1866: and merge_to_party_id = p_merge_to_party_id
1867: and entity_name = p_entity_name
1868: and attribute_name = p_attribute_name;

Line 1914: FND_MESSAGE.SET_TOKEN('TABLE', 'HZ_MERGE_ENTITY_ATTRIBUTES');

1910: IF (l_object_version_number <> px_object_version_number) THEN
1911: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1912: -- row has been changed by another user.
1913: FND_MESSAGE.SET_NAME('AR', 'HZ_API_RECORD_CHANGED');
1914: FND_MESSAGE.SET_TOKEN('TABLE', 'HZ_MERGE_ENTITY_ATTRIBUTES');
1915: FND_MSG_PUB.ADD;
1916: RAISE FND_API.G_EXC_ERROR;
1917: END IF;
1918: END IF;

Line 1935: update HZ_MERGE_ENTITY_ATTRIBUTES

1931: close get_per_last_update_date_csr;
1932: end if;
1933: if p_attribute_name in ('KNOWN_AS','KNOWN_AS2','KNOWN_AS3','KNOWN_AS4','KNOWN_AS5')
1934: then
1935: update HZ_MERGE_ENTITY_ATTRIBUTES
1936: set attribute_value = p_attribute_value,
1937: attribute_party_id = p_attribute_party_id,
1938: derived_last_update_date = decode(p_attribute_party_id,null,SYSDATE,l_last_update_date),
1939: last_update_date = SYSDATE,

Line 1957: update HZ_MERGE_ENTITY_ATTRIBUTES

1953: p_merge_to_party_id =>p_merge_to_party_id,
1954: p_derived_last_update_date => l_last_update_date,
1955: p_entity_name => p_entity_name,
1956: p_proc_type => 'U');
1957: update HZ_MERGE_ENTITY_ATTRIBUTES
1958: set object_version_number = px_object_version_number
1959: where attribute_name = p_attribute_name
1960: and merge_batch_id = p_merge_batch_id
1961: and merge_to_party_id = p_merge_to_party_id

Line 2115: from hz_merge_entity_attributes

2111: function is_attri_party_data_changed(p_merge_batch_id in varchar2,p_entity_name in varchar2) return
2112: varchar2 is
2113: cursor org_party_data_changed_csr(l_attribute_party_id number) is
2114: select 'x'
2115: from hz_merge_entity_attributes
2116: where merge_batch_id = p_merge_batch_id
2117: and attribute_name <> 'BUSINESS_REPORT'
2118: and attribute_party_id = l_attribute_party_id and rownum = 1
2119: and derived_last_update_date <> (select last_update_date

Line 2126: from hz_merge_entity_attributes

2122: and sysdate between effective_start_date and nvl(effective_end_date,sysdate));
2123:
2124: cursor person_party_data_changed_csr(l_attribute_party_id number) is
2125: select 'x'
2126: from hz_merge_entity_attributes
2127: where merge_batch_id = p_merge_batch_id
2128: and attribute_party_id = l_attribute_party_id and rownum = 1
2129: and derived_last_update_date <> (select last_update_date
2130: from hz_person_profiles

Line 2135: from hz_merge_entity_attributes

2131: where party_Id = l_attribute_party_id
2132: and sysdate between effective_start_date and nvl(effective_end_date,sysdate));
2133: cursor get_attri_party_id_csr is
2134: select distinct attribute_party_id
2135: from hz_merge_entity_attributes
2136: where merge_batch_id = p_merge_batch_id;
2137:
2138: l_tmp varchar2(1);
2139: l_attribute_party_id number;

Line 2173: /* sync up attribute values in hz_merge_entity_attributes and hz_organization/person_profiles*/

2169: return 'N';
2170:
2171: end is_attri_party_data_changed;
2172:
2173: /* sync up attribute values in hz_merge_entity_attributes and hz_organization/person_profiles*/
2174: PROCEDURE sync_merge_attributes(
2175: p_merge_batch_id IN NUMBER,
2176: p_merge_to_party_id IN NUMBER,
2177: p_entity_name IN VARCHAR2,

Line 2184: from hz_merge_entity_attributes

2180: x_msg_data OUT NOCOPY VARCHAR2
2181: ) is
2182: cursor get_attri_party_id_csr is
2183: select distinct attribute_party_id, derived_last_update_date
2184: from hz_merge_entity_attributes
2185: where merge_batch_id = p_merge_batch_id
2186: and merge_to_party_id = p_merge_to_party_id
2187: and attribute_name <> 'BUSINESS_REPORT';
2188:

Line 2191: from hz_merge_entity_attributes attri

2187: and attribute_name <> 'BUSINESS_REPORT';
2188:
2189: cursor get_dirty_attri_names_csr(l_attribute_party_id number) is
2190: select attribute_name, entity_name
2191: from hz_merge_entity_attributes attri
2192: where merge_batch_id = p_merge_batch_id
2193: and merge_to_party_id = p_merge_to_party_id
2194: and attribute_party_id = l_attribute_party_id
2195: and attribute_name <> 'BUSINESS_REPORT';

Line 2199: from hz_merge_entity_attributes

2195: and attribute_name <> 'BUSINESS_REPORT';
2196:
2197: cursor attri_party_id_count_csr is
2198: select count(distinct attribute_party_id)
2199: from hz_merge_entity_attributes
2200: where merge_batch_id = p_merge_batch_id
2201: and merge_to_party_id = p_merge_to_party_id
2202: and attribute_party_id <> p_merge_to_party_id;
2203:

Line 2227: delete from hz_merge_entity_attributes

2223: close attri_party_id_count_csr;
2224:
2225: if l_count = 0 -- only orig default(master party) is there, we can re-default.
2226: then
2227: delete from hz_merge_entity_attributes
2228: where merge_batch_id = p_merge_batch_id;
2229:
2230: create_merge_attributes(
2231: p_merge_batch_id => p_merge_batch_id,

Line 2255: update hz_merge_entity_attributes

2251:
2252: --dbms_output.put_line('l_value = '||l_value);
2253: --dbms_output.put_line('l_attribute_name = '||l_attribute_name);
2254:
2255: update hz_merge_entity_attributes
2256: set attribute_value = l_value, -- value formatted already
2257: derived_last_update_date = l_party_last_upd_date,
2258: last_update_date = SYSDATE,
2259: last_update_login = FND_GLOBAL.LOGIN_ID,