DBA Data[Home] [Help]

APPS.CS_SR_PARTY_MERGE_PKG dependencies on CS_INCIDENTS_ALL_B

Line 14: -- The following procedure merges CS_INCIDENTS_ALL_B columns:

10: TYPE NUM_TBL IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
11: TYPE VARCHAR2_30_TBL IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
12:
13:
14: -- The following procedure merges CS_INCIDENTS_ALL_B columns:
15: -- customer_id
16: -- bill_to_contact_id
17: -- ship_to_contact_id
18: -- bill_to_party_id - added for 11.5.9

Line 43: FROM cs_incidents_all_b

39: ship_to_contact_id,
40: bill_to_party_id,
41: ship_to_party_id,
42: last_update_program_code
43: FROM cs_incidents_all_b
44: WHERE p_from_fk_id in (customer_id, bill_to_contact_id, ship_to_contact_id,
45: bill_to_party_id, ship_to_party_id )
46: FOR UPDATE NOWAIT;
47:

Line 104: -- In the case of CS_INCIDENTS_ALL_B table, if party id 1000 gets merged to party

100: -- dependent record to the new parent. Before transferring check if a similar
101: -- dependent record exists on the new parent. If a duplicate exists then do
102: -- not transfer and return the id of the duplicate record as the Merged To Id
103:
104: -- In the case of CS_INCIDENTS_ALL_B table, if party id 1000 gets merged to party
105: -- id 2000 then, we have to update all records with customer_id = 1000 to 2000
106:
107: IF p_from_fk_id <> p_to_fk_id THEN
108:

Line 112: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);

108:
109: BEGIN
110: -- obtain lock on records to be updated.
111: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
112: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);
113:
114: OPEN c1;
115: LOOP -- Loop for BULK selecting and processing the BULK selection in a batch of 1000
116:

Line 140: UPDATE cs_incidents_all_b

136: -- RETURN;
137: -- END IF;
138:
139: FORALL i IN 1..l_rowid_tbl.COUNT
140: UPDATE cs_incidents_all_b
141: SET customer_id = decode(customer_id, p_from_fk_id,
142: p_to_fk_id, customer_id),
143: bill_to_contact_id = decode(bill_to_contact_id, p_from_fk_id,
144: p_to_fk_id, bill_to_contact_id),

Line 232: 'CS_INCIDENTS_ALL_B for customer_id / bill_to_contact_id ' ||

228: EXCEPTION
229: WHEN resource_busy THEN
230: arp_message.set_line(g_proc_name || '.' || l_api_name ||
231: '; Could not obtain lock for records in table ' ||
232: 'CS_INCIDENTS_ALL_B for customer_id / bill_to_contact_id ' ||
233: '/ ship_to_contact_id / bill_to_party_id / ship_to_part_id = '
234: || p_from_fk_id );
235: x_return_status := FND_API.G_RET_STS_ERROR;
236: raise;

Line 283: -- The following procedure merges CS_INCIDENTS_ALL_B columns:

279: x_return_status := FND_API.G_RET_STS_SUCCESS;
280: END CS_INC_ALL_MERGE_SHIP_TO_CONT;
281:
282:
283: -- The following procedure merges CS_INCIDENTS_ALL_B columns:
284: -- bill_to_site_use_id
285: -- ship_to_site_use_id
286: -- The above columns are FKs to HZ_PARTY_SITE_USES.
287: --old proc. PROCEDURE CS_INC_ALL_MERGE_BILL_SITE_USE (

Line 305: FROM cs_incidents_all_b

301: SELECT rowid,incident_id ,
302: bill_to_site_use_id ,
303: ship_to_site_use_id,
304: last_update_program_code
305: FROM cs_incidents_all_b
306: WHERE p_from_fk_id in (bill_to_site_use_id, ship_to_site_use_id)
307: FOR UPDATE NOWAIT;
308:
309: l_merge_reason_code VARCHAR2(30);

Line 359: -- In the case of CS_INCIDENTS_ALL_B table, we store bill_to_site_use_id which is a forign key to

355: -- dependent record to the new parent. Before transferring check if a similar
356: -- dependent record exists on the new parent. If a duplicate exists then do
357: -- not transfer and return the id of the duplicate record as the Merged To Id
358:
359: -- In the case of CS_INCIDENTS_ALL_B table, we store bill_to_site_use_id which is a forign key to
360: -- to HZ_PARTY_SITE_USES.PARTY_SITE_USE_ID. If the party who is tied to this site has been merged,
361: -- then, it is possible that this site use id is being transferred under the new party or it
362: -- may have been deleted if its a duplicate party_site_use_id
363:

Line 368: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);

364: IF p_from_fk_id <> p_to_fk_id THEN
365: BEGIN
366: -- obtain lock on records to be updated.
367: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
368: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);
369:
370: OPEN c1;
371: LOOP
372: FETCH c1 bulk collect

Line 393: UPDATE cs_incidents_all_b

389: RETURN;
390: END IF;
391:
392: FORALL i IN 1..l_rowid_tbl.COUNT
393: UPDATE cs_incidents_all_b
394: SET bill_to_site_use_id = decode(bill_to_site_use_id, p_from_fk_id, p_to_fk_id,
395: bill_to_site_use_id ),
396: ship_to_site_use_id = decode(ship_to_site_use_id, p_from_fk_id, p_to_fk_id,
397: ship_to_site_use_id ),

Line 482: 'CS_INCIDENTS_ALL_B for bill_to_site_use_id / ship_to_site_use_id / '

478: EXCEPTION
479: WHEN resource_busy THEN
480: arp_message.set_line(g_proc_name || '.' || l_api_name ||
481: '; Could not obtain lock for records in table ' ||
482: 'CS_INCIDENTS_ALL_B for bill_to_site_use_id / ship_to_site_use_id / '
483: || p_from_fk_id );
484: x_return_status := FND_API.G_RET_STS_ERROR;
485: RAISE;
486:

Line 531: -- The following procedure merges CS_INCIDENTS_ALL_B columns:

527: x_return_status := FND_API.G_RET_STS_SUCCESS;
528: END CS_INC_ALL_MERGE_SHIP_SITE_USE;
529:
530:
531: -- The following procedure merges CS_INCIDENTS_ALL_B columns:
532: -- site_id
533: -- customer_site_id
534: -- bill_to_site_id - added from 11.5.9
535: -- ship_to_site_id - added from 11.5.9

Line 563: FROM cs_incidents_all_b

559: install_site_id,
560: incident_location_id ,
561: incident_location_type,
562: last_update_program_code
563: FROM cs_incidents_all_b
564: WHERE p_from_fk_id IN (site_id, customer_site_id, install_site_use_id,
565: bill_to_site_id, ship_to_site_id, install_site_id)
566: OR (incident_location_type = 'HZ_PARTY_SITE' AND incident_location_id = p_from_fk_id)
567: FOR UPDATE NOWAIT;

Line 571: -- FROM cs_incidents_all_b

567: FOR UPDATE NOWAIT;
568:
569: -- CURSOR c2 IS -- This cursor is not required since the audit record creation id done using main cursor.
570: -- SELECT incident_id , site_id , last_update_program_code
571: -- FROM cs_incidents_all_b
572: -- WHERE site_id = p_from_fk_id ;
573:
574: l_merge_reason_code VARCHAR2(30);
575: l_api_name VARCHAR2(30) := 'CS_INC_ALL_MERGE_SITE_ID';

Line 633: -- In the case of CS_INCIDENTS_ALL_B table, we store install_site_use_id which is a forign key to

629: -- dependent record exists on the new parent. If a duplicate exists then do
630: -- not transfer and return the id of the duplicate record as the Merged To Id
631:
632:
633: -- In the case of CS_INCIDENTS_ALL_B table, we store install_site_use_id which is a forign key to
634: -- to HZ_PARTY_SITES.PARTY_SITE_ID. If the party who is tied to this site has been merged,
635: -- then, it is possible that this site use id is being transferred under the new party or it
636: -- may have been deleted if its a duplicate party_site_use_id
637:

Line 643: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);

639: IF p_from_fk_id <> p_to_fk_id THEN
640: BEGIN
641: -- obtain lock on records to be updated.
642: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
643: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);
644:
645: OPEN C1;
646: LOOP -- Bulk fetch loop for 1000 records
647: FETCH C1 BULK COLLECT

Line 681: UPDATE cs_incidents_all_b

677: -- CLOSE c2;
678:
679:
680: FORALL i IN 1..l_rowid_tbl.COUNT
681: UPDATE cs_incidents_all_b
682: SET site_id = decode(site_id, p_from_fk_id, p_to_fk_id, site_id),
683: customer_site_id = decode(customer_site_id, p_from_fk_id, p_to_fk_id,
684: customer_site_id),
685: bill_to_site_id = decode(bill_to_site_id , p_from_fk_id, p_to_fk_id,

Line 837: 'CS_INCIDENTS_ALL_B for site_id / customer_site_id / ' ||

833: EXCEPTION
834: WHEN resource_busy THEN
835: arp_message.set_line(g_proc_name || '.' || l_api_name ||
836: '; Could not obtain lock for records in table ' ||
837: 'CS_INCIDENTS_ALL_B for site_id / customer_site_id / ' ||
838: 'install_site_use_id / bill_to_site_id / ship_to_site_id / '||
839: 'install_site_id = ' || p_from_fk_id );
840: x_return_status := FND_API.G_RET_STS_ERROR;
841: RAISE;

Line 934: -- In the case of CS_INCIDENTS_ALL_B table, if party id 1000 gets merged to party

930: -- dependent record to the new parent. Before transferring check if a similar
931: -- dependent record exists on the new parent. If a duplicate exists then do
932: -- not transfer and return the id of the duplicate record as the Merged To Id
933:
934: -- In the case of CS_INCIDENTS_ALL_B table, if party id 1000 gets merged to party
935: -- id 2000 then, we have to update all records with bill_to_contact_id = 1000 to 2000
936:
937: if p_from_fk_id <> p_to_fk_id then
938: begin

Line 1101: -- In the case of CS_INCIDENTS_ALL_B table, if site id 1000 gets merged to site

1097: -- dependent record to the new parent. Before transferring check if a similar
1098: -- dependent record exists on the new parent. If a duplicate exists then do
1099: -- not transfer and return the id of the duplicate record as the Merged To Id
1100:
1101: -- In the case of CS_INCIDENTS_ALL_B table, if site id 1000 gets merged to site
1102: -- id 2000 then, we have to update all records with site_id = 1000 to 2000
1103:
1104: if p_from_fk_id <> p_to_fk_id then
1105: begin

Line 1963: -- cs_incidents_all_b.customer_phone_id -> hz_contact_points.contact_point_id

1959: END CS_CONTACTS_MERGE_CONT_POINTS;
1960:
1961: -- New procedure added for party merge for the following contact points added
1962: -- for the SR customer in 11.5.9
1963: -- cs_incidents_all_b.customer_phone_id -> hz_contact_points.contact_point_id
1964: -- cs_incidents_all_b.customer_email_id -> hz_contact_points.contact_point_id
1965:
1966: PROCEDURE CS_INC_ALL_MERGE_CONT_POINTS (
1967: p_entity_name IN VARCHAR2,

Line 1964: -- cs_incidents_all_b.customer_email_id -> hz_contact_points.contact_point_id

1960:
1961: -- New procedure added for party merge for the following contact points added
1962: -- for the SR customer in 11.5.9
1963: -- cs_incidents_all_b.customer_phone_id -> hz_contact_points.contact_point_id
1964: -- cs_incidents_all_b.customer_email_id -> hz_contact_points.contact_point_id
1965:
1966: PROCEDURE CS_INC_ALL_MERGE_CONT_POINTS (
1967: p_entity_name IN VARCHAR2,
1968: p_from_id IN NUMBER,

Line 1984: FROM cs_incidents_all_b

1980: incident_id ,
1981: customer_phone_id ,
1982: customer_email_id ,
1983: last_update_program_code
1984: FROM cs_incidents_all_b
1985: WHERE p_from_fk_id IN ( customer_phone_id, customer_email_id )
1986: FOR update nowait;
1987:
1988: l_merge_reason_code VARCHAR2(30);

Line 2042: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);

2038: IF p_from_fk_id <> p_to_fk_id THEN
2039: BEGIN
2040: -- obtain lock on records to be updated.
2041: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
2042: arp_message.set_token('TABLE_NAME', 'CS_INCIDENTS_ALL_B', FALSE);
2043:
2044: OPEN c1;
2045: LOOP -- loop to batch process 1000 records
2046: FETCH c1 bulk collect

Line 2068: UPDATE cs_incidents_all_b

2064: EXIT;
2065: END IF ;
2066:
2067: FORALL i IN 1..l_rowid_tbl.COUNT
2068: UPDATE cs_incidents_all_b
2069: SET customer_phone_id = decode(customer_phone_id, p_from_fk_id, p_to_fk_id,
2070: customer_phone_id ),
2071: customer_email_id = decode(customer_email_id, p_from_fk_id, p_to_fk_id,
2072: customer_email_id ),

Line 2162: 'CS_INCIDENTS_ALL_B for customer_phone_id / customer_email_id = '

2158: EXCEPTION
2159: WHEN resource_busy THEN
2160: arp_message.set_line(g_proc_name || '.' || l_api_name ||
2161: '; Could not obtain lock for records in table ' ||
2162: 'CS_INCIDENTS_ALL_B for customer_phone_id / customer_email_id = '
2163: || p_from_fk_id );
2164: x_return_status := FND_API.G_RET_STS_ERROR;
2165: RAISE;
2166: