DBA Data[Home] [Help]

APPS.HZ_PURGE dependencies on HZ_RELATIONSHIPS

Line 16: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name, decode(entity_name,'HZ_PARTY_RELATIONSHIPS','RELATIONSHIP_ID',pk_column_name) pk_column_name,

12: and nvl(validate_purge_flag,'Y') <> 'N'; --5125968
13: --and entity_name in (select table_name from fnd_tables);
14:
15: cursor x1(app_id number) is --4500011
16: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name, decode(entity_name,'HZ_PARTY_RELATIONSHIPS','RELATIONSHIP_ID',pk_column_name) pk_column_name,
17: decode(entity_name,'HZ_PARTY_RELATIONSHIPS', join_clause || ' AND subject_table_name = ''HZ_PARTIES'' AND object_table_name = ''HZ_PARTIES''
18: AND directional_flag = ''F''', join_clause) join_clause, parent_entity_name,fk_data_type
19: from hz_merge_dictionary where parent_entity_name like 'HZ_%' and dict_application_id = app_id
20: and fk_column_name IS NOT NULL and entity_name not in ('AS_CHANGED_ACCOUNTS_ALL','POS_PARTIES_V','POS_PARTY_SITES_V','WSH_LOCATION_OWNERS','ZX_PARTY_TAX_PROFILE','CE_BANKS_MERGE_V','CE_BANK_BRANCHES_MERGE_V','WSH_SUPPLIER_SF_SITES_V')

Line 24: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,

20: and fk_column_name IS NOT NULL and entity_name not in ('AS_CHANGED_ACCOUNTS_ALL','POS_PARTIES_V','POS_PARTY_SITES_V','WSH_LOCATION_OWNERS','ZX_PARTY_TAX_PROFILE','CE_BANKS_MERGE_V','CE_BANK_BRANCHES_MERGE_V','WSH_SUPPLIER_SF_SITES_V')
21: and nvl(validate_purge_flag,'Y') <> 'N'; --5125968
22:
23: cursor x4(app_id number) is --4500011
24: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,
25: decode(entity_name,'HZ_PARTY_RELATIONSHIPS','RELATIONSHIP_ID',pk_column_name) pk_column_name,
26: decode(entity_name,'HZ_PARTY_RELATIONSHIPS', join_clause || ' AND subject_table_name = ''HZ_PARTIES'' AND object_table_name = ''HZ_PARTIES''
27: AND directional_flag = ''F''', join_clause) join_clause,
28: parent_entity_name, fk_data_type

Line 825: --if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null

821: (select candidate_party_id from hz_purge_candidates where batch_id=batchid and status='IDENTIFIED');
822: log(' HZ_PARTIES : Deleted '||SQL%ROWCOUNT||' rows',conc_prg);
823: fnd_file.close;
824:
825: --if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null
826:
827: execute immediate 'update hz_relationships set party_id=null where party_id in
828: (select pur_cand.candidate_party_id from hz_purge_candidates pur_cand, hz_parties parties where pur_cand.batch_id=:1 and
829: pur_cand.candidate_party_id = parties.party_id and parties.party_type=''PARTY_RELATIONSHIP'' )' using batchid;

Line 827: execute immediate 'update hz_relationships set party_id=null where party_id in

823: fnd_file.close;
824:
825: --if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null
826:
827: execute immediate 'update hz_relationships set party_id=null where party_id in
828: (select pur_cand.candidate_party_id from hz_purge_candidates pur_cand, hz_parties parties where pur_cand.batch_id=:1 and
829: pur_cand.candidate_party_id = parties.party_id and parties.party_type=''PARTY_RELATIONSHIP'' )' using batchid;
830:
831:

Line 832: delete from hz_parties where party_id in (select party_id from hz_relationships

828: (select pur_cand.candidate_party_id from hz_purge_candidates pur_cand, hz_parties parties where pur_cand.batch_id=:1 and
829: pur_cand.candidate_party_id = parties.party_id and parties.party_type=''PARTY_RELATIONSHIP'' )' using batchid;
830:
831:
832: delete from hz_parties where party_id in (select party_id from hz_relationships
833: where (subject_id in (select candidate_party_id
834: from hz_purge_candidates
835: where batch_id=batchid and status='IDENTIFIED')
836: or object_id in (select candidate_party_id

Line 845: delete from hz_relationships where (subject_id in (select candidate_party_id

841:
842:
843: -- bug 4947069
844:
845: delete from hz_relationships where (subject_id in (select candidate_party_id
846: from hz_purge_candidates
847: where batch_id=batchid and status='IDENTIFIED')
848: or object_id in (select candidate_party_id
849: from hz_purge_candidates

Line 1092: /* if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null */

1088: HZ_BES_BO_UTIL_PKG.del_obj_hierarchy(p_party_id);
1089:
1090: END IF;
1091:
1092: /* if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null */
1093: execute immediate 'update hz_relationships set party_id=null where party_id=:1 and party_id in
1094: (select party_id from hz_parties where party_type = ''PARTY_RELATIONSHIP'')' using p_party_id;
1095:
1096: delete from hz_parties where party_id in (select party_id from hz_relationships

Line 1093: execute immediate 'update hz_relationships set party_id=null where party_id=:1 and party_id in

1089:
1090: END IF;
1091:
1092: /* if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null */
1093: execute immediate 'update hz_relationships set party_id=null where party_id=:1 and party_id in
1094: (select party_id from hz_parties where party_type = ''PARTY_RELATIONSHIP'')' using p_party_id;
1095:
1096: delete from hz_parties where party_id in (select party_id from hz_relationships
1097: where (subject_id = p_party_id or object_id = p_party_id))

Line 1096: delete from hz_parties where party_id in (select party_id from hz_relationships

1092: /* if the purged party is of type 'RELATIONSHIP' then set the corresponding value in the hz_relationships to null */
1093: execute immediate 'update hz_relationships set party_id=null where party_id=:1 and party_id in
1094: (select party_id from hz_parties where party_type = ''PARTY_RELATIONSHIP'')' using p_party_id;
1095:
1096: delete from hz_parties where party_id in (select party_id from hz_relationships
1097: where (subject_id = p_party_id or object_id = p_party_id))
1098: and status = 'M';
1099:
1100: -- bug 4947069

Line 1102: delete from hz_relationships where (subject_id = p_party_id or object_id = p_party_id) and status = 'M';

1098: and status = 'M';
1099:
1100: -- bug 4947069
1101:
1102: delete from hz_relationships where (subject_id = p_party_id or object_id = p_party_id) and status = 'M';
1103:
1104:
1105: /* update status to 'PURGED' in hz_purge_candidates for the purged parties */
1106: update hz_purge_candidates set status='PURGED' where candidate_party_id=p_party_id;

Line 1457: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,

1453: cnt2 NUMBER := 0;
1454: cnt3 NUMBER := 0;
1455:
1456: cursor x2(parent varchar2) is --4500011
1457: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,
1458: decode(entity_name,'HZ_PARTY_RELATIONSHIPS','RELATIONSHIP_ID',pk_column_name) pk_column_name,
1459: decode(entity_name,'HZ_PARTY_RELATIONSHIPS', join_clause || ' AND subject_table_name = ''HZ_PARTIES'' AND object_table_name = ''HZ_PARTIES''
1460: AND directional_flag = ''F''', join_clause) join_clause, parent_entity_name,fk_data_type
1461: from hz_merge_dictionary where entity_name = parent;

Line 1464: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,

1460: AND directional_flag = ''F''', join_clause) join_clause, parent_entity_name,fk_data_type
1461: from hz_merge_dictionary where entity_name = parent;
1462:
1463: cursor x3(parent2 varchar2) is --4500011
1464: select decode(entity_name,'HZ_PARTY_RELATIONSHIPS','HZ_RELATIONSHIPS',entity_name) entity_name, fk_column_name,
1465: decode(entity_name,'HZ_PARTY_RELATIONSHIPS','RELATIONSHIP_ID',pk_column_name) pk_column_name,
1466: decode(entity_name,'HZ_PARTY_RELATIONSHIPS', join_clause || ' AND subject_table_name = ''HZ_PARTIES'' AND object_table_name = ''HZ_PARTIES''
1467: AND directional_flag = ''F''', join_clause) join_clause,
1468: parent_entity_name,fk_data_type