DBA Data[Home] [Help]

APPS.HZ_PURGE dependencies on WSH_LOCATION_OWNERS

Line 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')

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')
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,

Line 771: delete from wsh_location_owners wlo

767: (select candidate_party_id from hz_purge_candidates where batch_id=batchid and status='IDENTIFIED');
768: log(' AS_CHANGED_ACCOUNTS_ALL : Deleted '||SQL%ROWCOUNT||' rows',conc_prg);
769:
770:
771: delete from wsh_location_owners wlo
772: where wlo.owner_party_id in (select candidate_party_id
773: from hz_purge_candidates
774: where batch_id=batchid and status='IDENTIFIED')
775: and exists (

Line 777: from wsh_location_owners wlo1

773: from hz_purge_candidates
774: where batch_id=batchid and status='IDENTIFIED')
775: and exists (
776: select 'x'
777: from wsh_location_owners wlo1
778: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
779:
780: update wsh_location_owners wlo
781: set wlo.owner_party_id = -1

Line 780: update wsh_location_owners wlo

776: select 'x'
777: from wsh_location_owners wlo1
778: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
779:
780: update wsh_location_owners wlo
781: set wlo.owner_party_id = -1
782: where wlo.owner_party_id in (select candidate_party_id
783: from hz_purge_candidates
784: where batch_id=batchid and status='IDENTIFIED'

Line 788: from wsh_location_owners wlo1

784: where batch_id=batchid and status='IDENTIFIED'
785: and rownum = 1 )-- if more than one party has same location, only update one.
786: and not exists (
787: select 'x'
788: from wsh_location_owners wlo1
789: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
790:
791: -- delete wsh again to catch the ones are not deletled from first delete and not updated from second update
792: -- make sure to keep the ones owner_party_id = -1

Line 794: delete from wsh_location_owners wlo

790:
791: -- delete wsh again to catch the ones are not deletled from first delete and not updated from second update
792: -- make sure to keep the ones owner_party_id = -1
793:
794: delete from wsh_location_owners wlo
795: where wlo.owner_party_id in (select candidate_party_id
796: from hz_purge_candidates
797: where batch_id=batchid and status='IDENTIFIED')
798: and wlo.owner_party_id <> -1;

Line 1039: delete from wsh_location_owners wlo

1035: null;
1036: end;
1037: DELETE from AS_CHANGED_ACCOUNTS_ALL where CUSTOMER_ID = p_party_id;
1038:
1039: delete from wsh_location_owners wlo
1040: where wlo.owner_party_id = p_party_id
1041: and exists (
1042: select 'x'
1043: from wsh_location_owners wlo1

Line 1043: from wsh_location_owners wlo1

1039: delete from wsh_location_owners wlo
1040: where wlo.owner_party_id = p_party_id
1041: and exists (
1042: select 'x'
1043: from wsh_location_owners wlo1
1044: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
1045:
1046: update wsh_location_owners wlo
1047: set wlo.owner_party_id = -1

Line 1046: update wsh_location_owners wlo

1042: select 'x'
1043: from wsh_location_owners wlo1
1044: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
1045:
1046: update wsh_location_owners wlo
1047: set wlo.owner_party_id = -1
1048: where wlo.owner_party_id = p_party_id
1049: and not exists (
1050: select 'x'

Line 1051: from wsh_location_owners wlo1

1047: set wlo.owner_party_id = -1
1048: where wlo.owner_party_id = p_party_id
1049: and not exists (
1050: select 'x'
1051: from wsh_location_owners wlo1
1052: where wlo1.wsh_location_id = wlo.wsh_location_id and wlo1.owner_party_id = -1);
1053:
1054: Delete from zx_party_tax_profile PTP
1055: where ptp.party_type_code = 'THIRD_PARTY'