DBA Data[Home] [Help]

APPS.ARP_CMERGE_ARCUS dependencies on HZ_CUST_ACCT_SITES_ALL

Line 335: hz_cust_acct_sites_all site --SSUptake

331: where org_id = l_org_id --SSUptake
332: and site_use_id in (
333: SELECT site_use_id
334: FROM hz_cust_site_uses_all su, --SSUptake
335: hz_cust_acct_sites_all site --SSUptake
336: WHERE su.org_id = l_org_id --SSUptake
337: AND su.org_id = site.org_id --SSUptake
338: AND site.cust_acct_site_id = su.cust_acct_site_id
339: AND su.site_use_code='SHIP_TO'

Line 692: FROM hz_cust_acct_sites_all yt, ra_customer_merges m --SSUptake

688:
689: --cursor c1 is used in 'inactivate' mode.
690: CURSOR c1 IS
691: SELECT yt.cust_acct_site_id
692: FROM hz_cust_acct_sites_all yt, ra_customer_merges m --SSUptake
693: WHERE yt.cust_acct_site_id = m.duplicate_address_id
694: AND m.org_id = yt.org_id --SSUptake
695: AND m.request_id = req_id
696: AND m.process_flag = 'N'

Line 710: FROM hz_cust_acct_sites_all yt, ra_customer_merges m --SSUptake

706:
707: --cursor c2 is used in 'delete' mode.
708: CURSOR c2 IS
709: SELECT yt.cust_acct_site_id
710: FROM hz_cust_acct_sites_all yt, ra_customer_merges m --SSUptake
711: WHERE m.request_id = req_id
712: AND m.process_flag = 'N'
713: AND m.set_number = set_num
714: AND m.delete_duplicate_flag = 'Y'

Line 765: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake

761: arp_message.set_token( 'TABLE_NAME', 'HZ_CUST_ACCT_SITES', FALSE );
762:
763: --inactivate customer account site
764:
765: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake
766: SET status = 'I',
767: last_update_date = sysdate,
768: last_updated_by = hz_utility_v2pub.user_id,--arp_standard.profile.user_id,
769: last_update_login =hz_utility_v2pub.last_update_login,-- arp_standard.profile.last_update_login,

Line 800: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake

796:
797: arp_message.set_name( 'AR', 'AR_UPDATING_TABLE');
798: arp_message.set_token( 'TABLE_NAME', 'HZ_CUST_ACCT_SITES', FALSE );
799:
800: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake
801: SET bill_to_flag = null,
802: last_update_date = sysdate,
803: last_updated_by = hz_utility_v2pub.user_id,--arp_standard.profile.user_id,
804: last_update_login =hz_utility_v2pub.last_update_login,-- arp_standard.profile.last_update_login,

Line 837: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake

833:
834: arp_message.set_name( 'AR', 'AR_UPDATING_TABLE' );
835: arp_message.set_token( 'TABLE_NAME', 'HZ_CUST_ACCT_SITES', FALSE );
836:
837: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake
838: SET ship_to_flag = null,
839: last_update_date = sysdate,
840: last_updated_by = hz_utility_v2pub.user_id,--arp_standard.profile.user_id,
841: last_update_login =hz_utility_v2pub.last_update_login,-- arp_standard.profile.last_update_login,

Line 874: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake

870:
871: arp_message.set_name( 'AR', 'AR_UPDATING_TABLE' );
872: arp_message.set_token( 'TABLE_NAME', 'HZ_CUST_ACCT_SITES', FALSE );
873:
874: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake
875: SET market_flag = null,
876: last_update_date = sysdate,
877: last_updated_by = hz_utility_v2pub.user_id,--arp_standard.profile.user_id,
878: last_update_login = hz_utility_v2pub.last_update_login,--arp_standard.profile.last_update_login,

Line 916: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake

912: arp_message.set_token( 'TABLE_NAME', 'HZ_CUST_ACCT_SITES', FALSE );
913:
914: --'delete' customer account site
915:
916: UPDATE HZ_CUST_ACCT_SITES_ALL yt --SSUptake
917: SET status = 'D'
918: WHERE EXISTS (
919: SELECT 'Y'
920: FROM ra_customer_merges m

Line 950: p_owner_table_name =>'HZ_CUST_ACCT_SITES_ALL',

946: p_init_msg_list => FND_API.G_FALSE,
947: p_validation_level => FND_API.G_VALID_LEVEL_NONE,
948: p_old_owner_table_id => x_from_address_id,
949: p_new_owner_table_id => x_to_address_id,
950: p_owner_table_name =>'HZ_CUST_ACCT_SITES_ALL',
951: p_orig_system => null,
952: p_orig_system_reference => null,
953: p_reason_code => 'MERGED',
954: x_return_status => x_return_status,

Line 1017: | HZ_CUST_ACCT_SITES_ALL.

1013: | MODIFICATION HISTORY
1014: | Jianying Huang 25-OCT-00 Customer account is global while account
1015: | site is stripped by operating unit. We need to
1016: | check if this account has (active)sites in
1017: | HZ_CUST_ACCT_SITES_ALL.
1018: | Jianying Huang 20-DEC-00 Bug 1535542: Since we need to change
1019: | the merging order, merge HZ tables before merging
1020: | products, we need to mark deleted rows here
1021: | first and physically delete them after merging one

Line 1056: FROM hz_cust_acct_sites_all addr

1052: AND m.delete_duplicate_flag = 'N'
1053: /* no active addresses */
1054: AND NOT EXISTS (
1055: SELECT 'active addresses exist'
1056: FROM hz_cust_acct_sites_all addr
1057: WHERE addr.cust_account_id = yt.cust_account_id
1058: AND addr.status = 'A' )
1059: FOR UPDATE NOWAIT;
1060:

Line 1073: FROM hz_cust_acct_sites_all addr

1069: AND m.delete_duplicate_flag = 'Y'
1070: /* no addresses */
1071: AND NOT EXISTS (
1072: SELECT 'addresses exist'
1073: FROM hz_cust_acct_sites_all addr
1074: WHERE addr.cust_account_id = yt.cust_account_id
1075: AND addr.status <> 'D' )
1076: FOR UPDATE NOWAIT;
1077:

Line 1087: FROM hz_cust_acct_sites_all addr

1083: AND m.set_number = set_num
1084: AND (m.delete_duplicate_flag = 'N' OR m.delete_duplicate_flag = 'Y')
1085: AND NOT EXISTS (
1086: SELECT 'addresses exist'
1087: FROM hz_cust_acct_sites_all addr
1088: WHERE addr.cust_account_id = m.duplicate_id
1089: AND addr.status = 'A');
1090:
1091:

Line 1136: FROM hz_cust_acct_sites_all addr

1132: AND m.delete_duplicate_flag = 'N' )
1133: /* no active addresses */
1134: AND NOT EXISTS (
1135: SELECT 'active addresses exist'
1136: FROM hz_cust_acct_sites_all addr
1137: WHERE addr.cust_account_id = yt.cust_account_id
1138: AND addr.status = 'A' );
1139:
1140: g_count := sql%rowcount;

Line 1167: FROM hz_cust_acct_sites_all addr

1163: AND m.delete_duplicate_flag = 'Y' )
1164: /* no addresses */
1165: AND NOT EXISTS (
1166: SELECT 'addresses exist'
1167: FROM hz_cust_acct_sites_all addr
1168: WHERE addr.cust_account_id = yt.cust_account_id
1169: AND addr.status <> 'D' );
1170:
1171: g_count := sql%rowcount;

Line 1259: | HZ_CUST_ACCT_SITES_ALL.

1255: | MODIFICATION HISTORY
1256: | Jianying Huang 25-OCT-00 Customer account is global while account
1257: | site is stripped by operating unit. We need to
1258: | check if this account has (active)sites in
1259: | HZ_CUST_ACCT_SITES_ALL.
1260: | Jianying Huang 12-DEC-00 Modified cursor c1 and c2. Replace 'active
1261: | account sites exist' with 'active accounts exist'
1262: | Jianying Huang 20-DEC-00 Bug 1535542: Since we need to change
1263: | the merging order, merge HZ tables before merging

Line 1762: | HZ_CUST_ACCT_SITES_ALL.

1758: | MODIFICATION HISTORY
1759: | Jianying Huang 25-OCT-00 Customer account is global while account
1760: | site is stripped by operating unit. We need to
1761: | check if this account has (active)sites in
1762: | HZ_CUST_ACCT_SITES_ALL.
1763: | Jianying Huang 12-DEC-00 Modified cursor c2. Replace 'active addresses
1764: | exist' with 'active accounts exist'
1765: | Jianying Huang 20-DEC-00 Bug 1535542: Since we need to change
1766: | the merging order, merge HZ tables before merging

Line 2596: | HZ_CUST_ACCT_SITES_ALL.

2592: | MODIFICATION HISTORY
2593: | Jianying Huang 25-OCT-00 Customer account is global while account
2594: | site is stripped by operating unit. We need to
2595: | check if this account has (active)sites in
2596: | HZ_CUST_ACCT_SITES_ALL.
2597: | Jianying Huang 12-DEC-00 Remove cursor c2 and c4 because we
2598: | do not delete rows in hz_cust_contact_points.
2599: | Jianying Huang 16-DEC-00 As per discussion with Gautam Prothia,
2600: | since we changed veiw RA_PHONES (see bug 1487607),

Line 4337: FROM HZ_CUST_ACCT_SITES_ALL addr, ra_customer_merges m --SSUptake

4333: FOR UPDATE NOWAIT;
4334:
4335: CURSOR cust_sites IS
4336: SELECT cust_acct_site_id
4337: FROM HZ_CUST_ACCT_SITES_ALL addr, ra_customer_merges m --SSUptake
4338: WHERE cust_acct_site_id = m.duplicate_address_id
4339: AND m.org_id = addr.org_id --SSUptake
4340: AND m.process_flag = 'N'
4341: AND m.request_id = req_id

Line 4504: owner_table_name = 'HZ_CUST_ACCT_SITES_ALL' and

4500: OPEN cust_sites;
4501: CLOSE cust_sites;
4502:
4503: delete from hz_orig_sys_references where
4504: owner_table_name = 'HZ_CUST_ACCT_SITES_ALL' and
4505: owner_table_id in (
4506: select cust_acct_site_id from hz_cust_acct_sites_all sites --SSuptake
4507: where status = 'D'
4508: and EXISTS

Line 4506: select cust_acct_site_id from hz_cust_acct_sites_all sites --SSuptake

4502:
4503: delete from hz_orig_sys_references where
4504: owner_table_name = 'HZ_CUST_ACCT_SITES_ALL' and
4505: owner_table_id in (
4506: select cust_acct_site_id from hz_cust_acct_sites_all sites --SSuptake
4507: where status = 'D'
4508: and EXISTS
4509: ( SELECT 'Y'
4510: FROM ra_customer_merges m

Line 4518: DELETE FROM HZ_CUST_ACCT_SITES_ALL yt --SSUptake

4514: AND m.request_id = req_id
4515: AND m.set_number = set_num
4516: AND m.delete_duplicate_flag = 'Y' ));
4517:
4518: DELETE FROM HZ_CUST_ACCT_SITES_ALL yt --SSUptake
4519: WHERE EXISTS (
4520: SELECT 'Y'
4521: FROM ra_customer_merges m
4522: WHERE m.duplicate_address_id = yt.cust_acct_site_id

Line 4785: | column in hz_cust_acct_sites_all.

4781: | 'create site/site use' in different scenario.
4782: | Jianying Huang 07-DEC-00 Bug 1227593: Added column 'ADDRESSEE'
4783: | when we create new party site.
4784: | Jianying Huang 07-DEC-OO Should not copy tp_header_id. It is an unique
4785: | column in hz_cust_acct_sites_all.
4786: | Jianying Huang 12-DEC-00 Check 'x_return_status' after call
4787: | 'create_cust_prof_amt'
4788: | Jianying Huang 20-DEC-00 Bug 1535542: Since we will call customer merge
4789: | before merging prEoducts, we should move 'createSites'

Line 5073: FROM hz_cust_acct_sites_all --SSUptake

5069: l_gen_loc := 'Y';
5070: l_exist := 'N';
5071: --Select merge-from's party site id.
5072: SELECT party_site_id INTO l_duplicate_party_site_id
5073: FROM hz_cust_acct_sites_all --SSUptake
5074: WHERE cust_acct_site_id = l_duplicate_address_id
5075: and org_id = m_org_id; --SSUptake
5076:
5077: --Select merge-from's address

Line 5100: FROM hz_cust_acct_sites_all --SSUptake

5096:
5097: BEGIN
5098:
5099: SELECT 'Y' INTO l_exist
5100: FROM hz_cust_acct_sites_all --SSUptake
5101: WHERE cust_account_id = l_customer_id
5102: AND org_id = m_org_id --SSUptake
5103: AND party_site_id IN (
5104: SELECT party_site_id

Line 5399: --Should not copy tp related columns. They are unique columns in hz_cust_acct_sites_all.

5395: customer_category_code,
5396: language,
5397: key_account_flag,
5398:
5399: --Should not copy tp related columns. They are unique columns in hz_cust_acct_sites_all.
5400: -- tp_header_id,
5401: -- ece_tp_location_code,
5402:
5403: --Bug:2098728 obsoleted service_territory_id,

Line 5522: FROM hz_cust_acct_sites_all cas --SSUptake

5518: --pick up the one with minum id and same business purpose, if exists
5519:
5520:
5521: SELECT MIN(cust_acct_site_id) INTO l_customer_address_id
5522: FROM hz_cust_acct_sites_all cas --SSUptake
5523: WHERE cust_account_id = l_customer_id
5524: AND org_id = m_org_id --SSUptake
5525: AND party_site_id IN (
5526: SELECT party_site_id

Line 5542: FROM hz_cust_acct_sites_all cas --SSUptake

5538:
5539: IF l_customer_address_id IS NULL THEN
5540:
5541: SELECT MIN(cust_acct_site_id) INTO l_customer_address_id
5542: FROM hz_cust_acct_sites_all cas --SSUptake
5543: WHERE cust_account_id = l_customer_id
5544: and org_id = m_org_id --SSUptake
5545: AND party_site_id IN (
5546: SELECT party_site_id

Line 6148: where CUST_ACCT_SITE_ID in (select CUST_ACCT_SITE_ID from hz_cust_acct_sites_all

6144: IF cust_site_use_rec.primary_flag = 'Y' THEN
6145: BEGIN
6146: Select NULL INTO cust_site_use_rec.primary_flag
6147: from hz_cust_site_uses_all
6148: where CUST_ACCT_SITE_ID in (select CUST_ACCT_SITE_ID from hz_cust_acct_sites_all
6149: Where cust_account_id = l_customer_id
6150: AND org_id = site_use_org_id)
6151: AND SITE_USE_CODE = cust_site_use_rec.site_use_code
6152: AND PRIMARY_FLAG = 'Y'

Line 7433: ---------Insert into hz_cust_acct_sites_all_m--------------

7429: OR (pa.site_use_id = duplicate_site_id);
7430:
7431: arp_message.set_line(SQL%ROWCOUNT||' '|| 'Row(s) inserted in HZ_CUST_PROFILE_AMTS_M');
7432:
7433: ---------Insert into hz_cust_acct_sites_all_m--------------
7434: INSERT INTO hz_cust_acct_sites_all_m(
7435: customer_merge_header_id,
7436: cust_acct_site_id ,
7437: cust_account_id ,

Line 7434: INSERT INTO hz_cust_acct_sites_all_m(

7430:
7431: arp_message.set_line(SQL%ROWCOUNT||' '|| 'Row(s) inserted in HZ_CUST_PROFILE_AMTS_M');
7432:
7433: ---------Insert into hz_cust_acct_sites_all_m--------------
7434: INSERT INTO hz_cust_acct_sites_all_m(
7435: customer_merge_header_id,
7436: cust_acct_site_id ,
7437: cust_account_id ,
7438: party_site_id ,

Line 7597: and cm.set_number = set_num ) m,hz_cust_acct_sites_all acs

7593: FROM (select distinct duplicate_id,duplicate_address_id,customer_merge_header_id,org_id
7594: from ra_customer_merges cm
7595: where cm.process_flag = 'N'
7596: and cm.request_id = req_id
7597: and cm.set_number = set_num ) m,hz_cust_acct_sites_all acs
7598: WHERE acs.cust_acct_site_id = duplicate_address_id
7599: AND acs.org_id = m.org_id ;
7600:
7601: arp_message.set_line(SQL%ROWCOUNT||' '|| 'Row(s) inserted in HZ_CUST_ACCT_SITES_ALL_M');

Line 7601: arp_message.set_line(SQL%ROWCOUNT||' '|| 'Row(s) inserted in HZ_CUST_ACCT_SITES_ALL_M');

7597: and cm.set_number = set_num ) m,hz_cust_acct_sites_all acs
7598: WHERE acs.cust_acct_site_id = duplicate_address_id
7599: AND acs.org_id = m.org_id ;
7600:
7601: arp_message.set_line(SQL%ROWCOUNT||' '|| 'Row(s) inserted in HZ_CUST_ACCT_SITES_ALL_M');
7602:
7603: ---------Insert into hz_cust_site_uses_all_m--------------
7604: INSERT INTO hz_cust_site_uses_all_m(
7605: customer_merge_header_id,