DBA Data[Home] [Help]

PACKAGE: APPS.CS_SR_PARTY_MERGE_PKG

Source


1 PACKAGE CS_SR_PARTY_MERGE_PKG AUTHID CURRENT_USER AS
2 /* $Header: cssrpmgs.pls 115.7 2004/01/22 01:37:13 spusegao noship $ */
3 -- Start of Comments
4 -- Package name     : CS_SR_PARTY_MERGE_PKG
5 --
6 -- Purpose          : Merges duplicate parties in Service tables. The
7 --                    Service tables that need to be considered for
8 --                    Party Merge are:
9 --                    CS_INCIDENTS_ALL_B
10 --                    CS_HZ_SR_CONTACT_POINTS
11 --                    CS_INCIDENTS_AUDIT_B
12 
13 -- History
14 -- MM-DD-YYYY    NAME          MODIFICATIONS
15 -- 10-10-2000    asequeir      Created.
16 -- 07-02-2002    dejoseph      Made changes for SR Party Merge performance bug 2271992.
17 --                             - Created the following procedure so that the same proc. is
18 --                               not used by more than one FK. This gets rid of the decode
19 --                               as well as the 'or' predicate in the update statement.
20 --                               - cs_inc_all_merge_bill_to_cont
21 --                               - cs_inc_all_merge_ship_to_cont
22 --                               - cs_inc_all_merge_ct_site_id
23 --                               - cs_inc_all_merge_inst_site_use
24 --                               - cs_audit_merge_old_bill_cont
25 --                               - cs_audit_merge_ship_to_cont
26 --                               - cs_audit_merge_old_ship_cont
27 --                               - cs_audit_merge_old_site_id
28 --                             - Added the dbdrv and checkfile commands.
29 -- 08-29-2002   dejoseph       - Cont'd of performance fixes for bug 2271992
30 --                               Procedure name that has changed:
31 --                               - CS_INC_ALL_MERGE_BILL_SITE_USE to
32 --                                 CS_INC_ALL_MERGE_SITE_USES
33 --
34 -- End of Comments
35 
36    --   *******************************************************
37    --    Start of Comments
38    --   *******************************************************
39    --   API Name:  CS_INC_ALL_MERGE_PARTY
40    --   Purpose :  Merges customer_id in CS_INCIDENTS_ALL_B  table
41    --   Type    :  Private
42    --   Pre-Req :  None.
43    --   Parameters:
44    --   IN - All IN parameters are REQUIRED.
45    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
46    --     p_from_id             NUMBER   - Id of the record that is being merged
47    --     p_from_fk_id          NUMBER   - Id of the Old Parent
48    --     p_to_fk_id            NUMBER   - Id of the New Parent
49    --     p_parent_entity_name  VARCHAR2 - Parent entity name
50    --     p_batch_id            NUMBER   - Id of the Batch
51    --     p_batch_party_id      NUMBER   - Id of the batch and party record
52    --   OUT:
53    --     x_to_id               NUMBER   - Id of the record under the new parent
54    --                                      that its merged to
55    --     x_return_status       VARCHAR2 - Return the status of the procedure
56    --
57    --   Version : Current version 1.0
58    --
59    --   End of Comments
60    --
61 PROCEDURE CS_INC_ALL_MERGE_PARTY(
62     p_entity_name                IN   VARCHAR2,
63     p_from_id                    IN   NUMBER,
64     x_to_id                      OUT  NOCOPY NUMBER,
65     p_from_fk_id                 IN   NUMBER,
66     p_to_fk_id                   IN   NUMBER,
67     p_parent_entity_name         IN   VARCHAR2,
68     p_batch_id                   IN   NUMBER,
69     p_batch_party_id             IN   NUMBER,
70     x_return_status              OUT  NOCOPY VARCHAR2);
71 
72 
73    --   *******************************************************
74    --    Start of Comments
75    --   *******************************************************
76    --   API Name:  CS_INC_ALL_MERGE_BILL_TO_CONT
77    --   Purpose :  Merges bill_to_contact_id in CS_INCIDENTS_ALL_B  table
78    --   Type    :  Private
79    --   Pre-Req :  None.
80    --   Parameters:
81    --   IN - All IN parameters are REQUIRED.
82    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
83    --     p_from_id             NUMBER   - Id of the record that is being merged
84    --     p_from_fk_id          NUMBER   - Id of the Old Parent
85    --     p_to_fk_id            NUMBER   - Id of the New Parent
86    --     p_parent_entity_name  VARCHAR2 - Parent entity name
87    --     p_batch_id            NUMBER   - Id of the Batch
88    --     p_batch_party_id      NUMBER   - Id of the batch and party record
89    --   OUT:
90    --     x_to_id               NUMBER   - Id of the record under the new parent
91    --                                      that its merged to
92    --     x_return_status       VARCHAR2 - Return the status of the procedure
93    --
94    --   Version : Current version 1.0
95    --
96    --   End of Comments
97    --
98 PROCEDURE CS_INC_ALL_MERGE_BILL_TO_CONT(
99     p_entity_name                IN   VARCHAR2,
100     p_from_id                    IN   NUMBER,
101     x_to_id                      OUT  NOCOPY NUMBER,
102     p_from_fk_id                 IN   NUMBER,
103     p_to_fk_id                   IN   NUMBER,
104     p_parent_entity_name         IN   VARCHAR2,
105     p_batch_id                   IN   NUMBER,
106     p_batch_party_id             IN   NUMBER,
107     x_return_status              OUT  NOCOPY VARCHAR2);
108 
109 
110    --   *******************************************************
111    --    Start of Comments
112    --   *******************************************************
113    --   API Name:  CS_INC_ALL_MERGE_SHIP_TO_CONT
114    --   Purpose :  Merges ship_to_contact_id in CS_INCIDENTS_ALL_B  table
115    --   Type    :  Private
116    --   Pre-Req :  None.
117    --   Parameters:
118    --   IN - All IN parameters are REQUIRED.
119    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
120    --     p_from_id             NUMBER   - Id of the record that is being merged
121    --     p_from_fk_id          NUMBER   - Id of the Old Parent
122    --     p_to_fk_id            NUMBER   - Id of the New Parent
123    --     p_parent_entity_name  VARCHAR2 - Parent entity name
124    --     p_batch_id            NUMBER   - Id of the Batch
125    --     p_batch_party_id      NUMBER   - Id of the batch and party record
126    --   OUT:
127    --     x_to_id               NUMBER   - Id of the record under the new parent
128    --                                      that its merged to
129    --     x_return_status       VARCHAR2 - Return the status of the procedure
130    --
131    --   Version : Current version 1.0
132    --
133    --   End of Comments
134    --
135 PROCEDURE CS_INC_ALL_MERGE_SHIP_TO_CONT(
136     p_entity_name                IN   VARCHAR2,
137     p_from_id                    IN   NUMBER,
138     x_to_id                      OUT  NOCOPY NUMBER,
139     p_from_fk_id                 IN   NUMBER,
140     p_to_fk_id                   IN   NUMBER,
141     p_parent_entity_name         IN   VARCHAR2,
142     p_batch_id                   IN   NUMBER,
143     p_batch_party_id             IN   NUMBER,
144     x_return_status              OUT  NOCOPY VARCHAR2);
145 
146 
147    --   *******************************************************
148    --    Start of Comments
149    --   *******************************************************
150    --   API Name:  CS_INC_ALL_MERGE_SITE_USES
151    --   Purpose :  Performs bill_to_site_use merge in CS_INCIDENTS_ALL_B table.
152    --   Type    :  Private
153    --   Pre-Req :  None.
154    --   Parameters:
155    --   IN - All IN parameters are REQUIRED.
156    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
157    --     p_from_id             NUMBER   - Id of the record that is being merged
158    --     p_from_fk_id          NUMBER   - Id of the Old Parent
159    --     p_to_fk_id            NUMBER   - Id of the New Parent
160    --     p_parent_entity_name  VARCHAR2 - Parent entity name
161    --     p_batch_id            NUMBER   - Id of the Batch
162    --     p_batch_party_id      NUMBER   - Id of the batch and party record
163    --   OUT:
164    --     x_to_id               NUMBER   - Id of the record under the new parent
165    --                                      that its merged to
166    --     x_return_status       VARCHAR2 - Return the status of the procedure
167    --
168    --   Version : Current version 1.0
169    --
170    --   End of Comments
171    --
172 PROCEDURE CS_INC_ALL_MERGE_SITE_USES (
173     p_entity_name                IN   VARCHAR2,
174     p_from_id                    IN   NUMBER,
175     x_to_id                      OUT  NOCOPY NUMBER,
176     p_from_fk_id                 IN   NUMBER,
177     p_to_fk_id                   IN   NUMBER,
178     p_parent_entity_name         IN   VARCHAR2,
179     p_batch_id                   IN   NUMBER,
180     p_batch_party_id             IN   NUMBER,
181     x_return_status              OUT  NOCOPY VARCHAR2);
182 
183 
184    --   *******************************************************
185    --    Start of Comments
186    --   *******************************************************
187    --   API Name:  CS_INC_ALL_MERGE_SHIP_SITE_USE
188    --   Purpose :  Performs ship_to-site_use merge in CS_INCIDENTS_ALL_B table.
189    --   Type    :  Private
190    --   Pre-Req :  None.
191    --   Parameters:
192    --   IN - All IN parameters are REQUIRED.
193    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
194    --     p_from_id             NUMBER   - Id of the record that is being merged
195    --     p_from_fk_id          NUMBER   - Id of the Old Parent
196    --     p_to_fk_id            NUMBER   - Id of the New Parent
197    --     p_parent_entity_name  VARCHAR2 - Parent entity name
198    --     p_batch_id            NUMBER   - Id of the Batch
199    --     p_batch_party_id      NUMBER   - Id of the batch and party record
200    --   OUT:
201    --     x_to_id               NUMBER   - Id of the record under the new parent
202    --                                      that its merged to
203    --     x_return_status       VARCHAR2 - Return the status of the procedure
204    --
205    --   Version : Current version 1.0
206    --
207    --   End of Comments
208    --
209 PROCEDURE CS_INC_ALL_MERGE_SHIP_SITE_USE(
210     p_entity_name                IN   VARCHAR2,
211     p_from_id                    IN   NUMBER,
212     x_to_id                      OUT  NOCOPY NUMBER,
213     p_from_fk_id                 IN   NUMBER,
214     p_to_fk_id                   IN   NUMBER,
215     p_parent_entity_name         IN   VARCHAR2,
216     p_batch_id                   IN   NUMBER,
217     p_batch_party_id             IN   NUMBER,
218     x_return_status              OUT  NOCOPY VARCHAR2);
219 
220 
221    --   *******************************************************
222    --    Start of Comments
223    --   *******************************************************
224    --   API Name:  CS_INC_ALL_MERGE_SITE_ID
225    --   Purpose :  Performs site_id merge in CS_INCIDENTS_ALL_B
226    --              table.
227    --   Type    :  Private
228    --   Pre-Req :  None.
229    --   Parameters:
230    --   IN - All IN parameters are REQUIRED.
231    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
232    --     p_from_id             NUMBER   - Id of the record that is being merged
233    --     p_from_fk_id          NUMBER   - Id of the Old Parent
234    --     p_to_fk_id            NUMBER   - Id of the New Parent
235    --     p_parent_entity_name  VARCHAR2 - Parent entity name
236    --     p_batch_id            NUMBER   - Id of the Batch
237    --     p_batch_party_id      NUMBER   - Id of the batch and party record
238    --   OUT:
239    --     x_to_id               NUMBER   - Id of the record under the new parent
240    --                                      that its merged to
241    --     x_return_status       VARCHAR2 - Return the status of the procedure
242    --
243    --   Version : Current version 1.0
244    --
245    --   End of Comments
246    --
247 PROCEDURE  CS_INC_ALL_MERGE_SITE_ID(
248     p_entity_name                IN   VARCHAR2,
249     p_from_id                    IN   NUMBER,
250     x_to_id                      OUT  NOCOPY NUMBER,
251     p_from_fk_id                 IN   NUMBER,
252     p_to_fk_id                   IN   NUMBER,
253     p_parent_entity_name         IN   VARCHAR2,
254     p_batch_id                   IN   NUMBER,
255     p_batch_party_id             IN   NUMBER,
256     x_return_status              OUT  NOCOPY VARCHAR2);
257 
258 
259    --   *******************************************************
260    --    Start of Comments
261    --   *******************************************************
262    --   API Name:  CS_INC_ALL_MERGE_CT_SITE_ID
263    --   Purpose :  Performs customer_site_id merge in CS_INCIDENTS_ALL_B
264    --              table.
265    --   Type    :  Private
266    --   Pre-Req :  None.
267    --   Parameters:
268    --   IN - All IN parameters are REQUIRED.
269    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
270    --     p_from_id             NUMBER   - Id of the record that is being merged
271    --     p_from_fk_id          NUMBER   - Id of the Old Parent
272    --     p_to_fk_id            NUMBER   - Id of the New Parent
273    --     p_parent_entity_name  VARCHAR2 - Parent entity name
274    --     p_batch_id            NUMBER   - Id of the Batch
275    --     p_batch_party_id      NUMBER   - Id of the batch and party record
276    --   OUT:
277    --     x_to_id               NUMBER   - Id of the record under the new parent
278    --                                      that its merged to
279    --     x_return_status       VARCHAR2 - Return the status of the procedure
280    --
281    --   Version : Current version 1.0
282    --
283    --   End of Comments
284    --
285 PROCEDURE  CS_INC_ALL_MERGE_CT_SITE_ID(
286     p_entity_name                IN   VARCHAR2,
287     p_from_id                    IN   NUMBER,
288     x_to_id                      OUT  NOCOPY NUMBER,
289     p_from_fk_id                 IN   NUMBER,
290     p_to_fk_id                   IN   NUMBER,
291     p_parent_entity_name         IN   VARCHAR2,
292     p_batch_id                   IN   NUMBER,
293     p_batch_party_id             IN   NUMBER,
294     x_return_status              OUT  NOCOPY VARCHAR2);
295 
296 
297    --   *******************************************************
298    --    Start of Comments
299    --   *******************************************************
300    --   API Name:  CS_INC_ALL_MERGE_INST_SITE_USE
301    --   Purpose :  Merges install_site_use_id in CS_INCIDENTS_ALL_B  table
302    --   Type    :  Private
303    --   Pre-Req :  None.
304    --   Parameters:
305    --   IN - All IN parameters are REQUIRED.
306    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
307    --     p_from_id             NUMBER   - Id of the record that is being merged
308    --     p_from_fk_id          NUMBER   - Id of the Old Parent
309    --     p_to_fk_id            NUMBER   - Id of the New Parent
310    --     p_parent_entity_name  VARCHAR2 - Parent entity name
311    --     p_batch_id            NUMBER   - Id of the Batch
312    --     p_batch_party_id      NUMBER   - Id of the batch and party record
313    --   OUT:
314    --     x_to_id               NUMBER   - Id of the record under the new parent
315    --                                      that its merged to
316    --     x_return_status       VARCHAR2 - Return the status of the procedure
317    --
318    --   Version : Current version 1.0
319    --
320    --   End of Comments
321    --
322 PROCEDURE CS_INC_ALL_MERGE_INST_SITE_USE(
323     p_entity_name                IN   VARCHAR2,
324     p_from_id                    IN   NUMBER,
325     x_to_id                      OUT  NOCOPY NUMBER,
326     p_from_fk_id                 IN   NUMBER,
327     p_to_fk_id                   IN   NUMBER,
328     p_parent_entity_name         IN   VARCHAR2,
329     p_batch_id                   IN   NUMBER,
330     p_batch_party_id             IN   NUMBER,
331     x_return_status              OUT  NOCOPY VARCHAR2);
332 
333 
334    --   *******************************************************
335    --    Start of Comments
336    --   *******************************************************
337    --   API Name:  CS_AUDIT_MERGE_PARTY
338    --   Purpose :  Performs bill_to_contact_id merge in CS_INCIDENT_AUDIT_B table.
339    --   Type    :  Private
340    --   Pre-Req :  None.
341    --   Parameters:
342    --   IN - All IN parameters are REQUIRED.
343    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
344    --     p_from_id             NUMBER   - Id of the record that is being merged
345    --     p_from_fk_id          NUMBER   - Id of the Old Parent
346    --     p_to_fk_id            NUMBER   - Id of the New Parent
347    --     p_parent_entity_name  VARCHAR2 - Parent entity name
348    --     p_batch_id            NUMBER   - Id of the Batch
349    --     p_batch_party_id      NUMBER   - Id of the batch and party record
350    --   OUT:
351    --     x_to_id               NUMBER   - Id of the record under the new parent
352    --                                      that its merged to
353    --     x_return_status       VARCHAR2 - Return the status of the procedure
354    --
355    --   Version : Current version 1.0
356    --
357    --   End of Comments
358    --
359 PROCEDURE CS_AUDIT_MERGE_PARTY(
360     p_entity_name                IN   VARCHAR2,
361     p_from_id                    IN   NUMBER,
362     x_to_id                      OUT  NOCOPY NUMBER,
363     p_from_fk_id                 IN   NUMBER,
364     p_to_fk_id                   IN   NUMBER,
365     p_parent_entity_name         IN   VARCHAR2,
366     p_batch_id                   IN   NUMBER,
367     p_batch_party_id             IN   NUMBER,
368     x_return_status              OUT  NOCOPY VARCHAR2);
369 
370 
371    --   *******************************************************
372    --    Start of Comments
373    --   *******************************************************
374    --   API Name:  CS_AUDIT_MERGE_OLD_BILL_CONT
375    --   Purpose :  Performs old_bill_to_contact_id ids  merge in CS_INCIDENT_AUDIT_B table.
376    --   Type    :  Private
377    --   Pre-Req :  None.
378    --   Parameters:
379    --   IN - All IN parameters are REQUIRED.
380    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
381    --     p_from_id             NUMBER   - Id of the record that is being merged
382    --     p_from_fk_id          NUMBER   - Id of the Old Parent
383    --     p_to_fk_id            NUMBER   - Id of the New Parent
384    --     p_parent_entity_name  VARCHAR2 - Parent entity name
385    --     p_batch_id            NUMBER   - Id of the Batch
389    --                                      that its merged to
386    --     p_batch_party_id      NUMBER   - Id of the batch and party record
387    --   OUT:
388    --     x_to_id               NUMBER   - Id of the record under the new parent
390    --     x_return_status       VARCHAR2 - Return the status of the procedure
391    --
392    --   Version : Current version 1.0
393    --
394    --   End of Comments
395    --
396 PROCEDURE CS_AUDIT_MERGE_OLD_BILL_CONT (
397     p_entity_name                IN   VARCHAR2,
398     p_from_id                    IN   NUMBER,
399     x_to_id                      OUT  NOCOPY NUMBER,
400     p_from_fk_id                 IN   NUMBER,
401     p_to_fk_id                   IN   NUMBER,
402     p_parent_entity_name         IN   VARCHAR2,
403     p_batch_id                   IN   NUMBER,
404     p_batch_party_id             IN   NUMBER,
405     x_return_status              OUT  NOCOPY VARCHAR2);
406 
407 
408    --   *******************************************************
409    --    Start of Comments
410    --   *******************************************************
411    --   API Name:  CS_AUDIT_MERGE_SHIP_TO_CONT
412    --   Purpose :  Performs ship_to_contact_id merge in CS_INCIDENT_AUDIT_B table.
413    --   Type    :  Private
414    --   Pre-Req :  None.
415    --   Parameters:
416    --   IN - All IN parameters are REQUIRED.
417    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
418    --     p_from_id             NUMBER   - Id of the record that is being merged
419    --     p_from_fk_id          NUMBER   - Id of the Old Parent
420    --     p_to_fk_id            NUMBER   - Id of the New Parent
421    --     p_parent_entity_name  VARCHAR2 - Parent entity name
422    --     p_batch_id            NUMBER   - Id of the Batch
423    --     p_batch_party_id      NUMBER   - Id of the batch and party record
424    --   OUT:
425    --     x_to_id               NUMBER   - Id of the record under the new parent
426    --                                      that its merged to
427    --     x_return_status       VARCHAR2 - Return the status of the procedure
428    --
429    --   Version : Current version 1.0
430    --
431    --   End of Comments
432    --
433 PROCEDURE CS_AUDIT_MERGE_SHIP_TO_CONT (
434     p_entity_name                IN   VARCHAR2,
435     p_from_id                    IN   NUMBER,
436     x_to_id                      OUT  NOCOPY NUMBER,
437     p_from_fk_id                 IN   NUMBER,
438     p_to_fk_id                   IN   NUMBER,
439     p_parent_entity_name         IN   VARCHAR2,
440     p_batch_id                   IN   NUMBER,
441     p_batch_party_id             IN   NUMBER,
442     x_return_status              OUT  NOCOPY VARCHAR2);
443 
444 
445    --   *******************************************************
446    --    Start of Comments
447    --   *******************************************************
448    --   API Name:  CS_AUDIT_MERGE_OLD_SHIP_CONT
449    --   Purpose :  Performs old_ship_to_contact_id merge in CS_INCIDENT_AUDIT_B table.
450    --   Type    :  Private
451    --   Pre-Req :  None.
452    --   Parameters:
453    --   IN - All IN parameters are REQUIRED.
454    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
455    --     p_from_id             NUMBER   - Id of the record that is being merged
456    --     p_from_fk_id          NUMBER   - Id of the Old Parent
457    --     p_to_fk_id            NUMBER   - Id of the New Parent
458    --     p_parent_entity_name  VARCHAR2 - Parent entity name
459    --     p_batch_id            NUMBER   - Id of the Batch
460    --     p_batch_party_id      NUMBER   - Id of the batch and party record
461    --   OUT:
462    --     x_to_id               NUMBER   - Id of the record under the new parent
463    --                                      that its merged to
464    --     x_return_status       VARCHAR2 - Return the status of the procedure
465    --
466    --   Version : Current version 1.0
467    --
468    --   End of Comments
469    --
470 PROCEDURE CS_AUDIT_MERGE_OLD_SHIP_CONT(
471     p_entity_name                IN   VARCHAR2,
472     p_from_id                    IN   NUMBER,
473     x_to_id                      OUT  NOCOPY NUMBER,
474     p_from_fk_id                 IN   NUMBER,
475     p_to_fk_id                   IN   NUMBER,
476     p_parent_entity_name         IN   VARCHAR2,
477     p_batch_id                   IN   NUMBER,
478     p_batch_party_id             IN   NUMBER,
479     x_return_status              OUT  NOCOPY VARCHAR2);
480 
481 
482    --   *******************************************************
483    --    Start of Comments
484    --   *******************************************************
485    --   API Name:  CS_AUDIT_MERGE_SITE_ID
486    --   Purpose :  Performs site_id merge in CS_INCIDENT_AUDIT_B table.
487    --   Type    :  Private
488    --   Pre-Req :  None.
489    --   Parameters:
490    --   IN - All IN parameters are REQUIRED.
491    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
492    --     p_from_id             NUMBER   - Id of the record that is being merged
493    --     p_from_fk_id          NUMBER   - Id of the Old Parent
494    --     p_to_fk_id            NUMBER   - Id of the New Parent
498    --   OUT:
495    --     p_parent_entity_name  VARCHAR2 - Parent entity name
496    --     p_batch_id            NUMBER   - Id of the Batch
497    --     p_batch_party_id      NUMBER   - Id of the batch and party record
499    --     x_to_id               NUMBER   - Id of the record under the new parent
500    --                                      that its merged to
501    --     x_return_status       VARCHAR2 - Return the status of the procedure
502    --
503    --   Version : Current version 1.0
504    --
505    --   End of Comments
506    --
507 PROCEDURE CS_AUDIT_MERGE_SITE_ID(
508     p_entity_name                IN   VARCHAR2,
509     p_from_id                    IN   NUMBER,
510     x_to_id                      OUT  NOCOPY NUMBER,
511     p_from_fk_id                 IN   NUMBER,
512     p_to_fk_id                   IN   NUMBER,
513     p_parent_entity_name         IN   VARCHAR2,
514     p_batch_id                   IN   NUMBER,
515     p_batch_party_id             IN   NUMBER,
516     x_return_status              OUT  NOCOPY VARCHAR2);
517 
518 
519    --   *******************************************************
520    --    Start of Comments
521    --   *******************************************************
522    --   API Name:  CS_AUDIT_MERGE_OLD_SITE_ID
523    --   Purpose :  Performs old_site_id merge in CS_INCIDENT_AUDIT_B table.
524    --   Type    :  Private
525    --   Pre-Req :  None.
526    --   Parameters:
527    --   IN - All IN parameters are REQUIRED.
528    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
529    --     p_from_id             NUMBER   - Id of the record that is being merged
530    --     p_from_fk_id          NUMBER   - Id of the Old Parent
531    --     p_to_fk_id            NUMBER   - Id of the New Parent
532    --     p_parent_entity_name  VARCHAR2 - Parent entity name
533    --     p_batch_id            NUMBER   - Id of the Batch
534    --     p_batch_party_id      NUMBER   - Id of the batch and party record
535    --   OUT:
536    --     x_to_id               NUMBER   - Id of the record under the new parent
537    --                                      that its merged to
538    --     x_return_status       VARCHAR2 - Return the status of the procedure
539    --
540    --   Version : Current version 1.0
541    --
542    --   End of Comments
543    --
544 PROCEDURE CS_AUDIT_MERGE_OLD_SITE_ID(
545     p_entity_name                IN   VARCHAR2,
546     p_from_id                    IN   NUMBER,
547     x_to_id                      OUT  NOCOPY NUMBER,
548     p_from_fk_id                 IN   NUMBER,
549     p_to_fk_id                   IN   NUMBER,
550     p_parent_entity_name         IN   VARCHAR2,
551     p_batch_id                   IN   NUMBER,
552     p_batch_party_id             IN   NUMBER,
553     x_return_status              OUT  NOCOPY VARCHAR2);
554 
555 
556    --   *******************************************************
557    --    Start of Comments
558    --   *******************************************************
559    --   API Name:  CS_CONTACTS_MERGE_PARTY
560    --   Purpose :  Performs party id merge in CS_HZ_SR_CONTACT_POINTS table.
561    --   Type    :  Private
562    --   Pre-Req :  None.
563    --   Parameters:
564    --   IN - All IN parameters are REQUIRED.
565    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
566    --     p_from_id             NUMBER   - Id of the record that is being merged
567    --     p_from_fk_id          NUMBER   - Id of the Old Parent
568    --     p_to_fk_id            NUMBER   - Id of the New Parent
569    --     p_parent_entity_name  VARCHAR2 - Parent entity name
570    --     p_batch_id            NUMBER   - Id of the Batch
571    --     p_batch_party_id      NUMBER   - Id of the batch and party record
572    --   OUT:
573    --     x_to_id               NUMBER   - Id of the record under the new parent
574    --                                      that its merged to
575    --     x_return_status       VARCHAR2 - Return the status of the procedure
576    --
577    --   Version : Current version 1.0
578    --
579    --   End of Comments
580    --
581 PROCEDURE CS_CONTACTS_MERGE_PARTY(
582     p_entity_name                IN   VARCHAR2,
583     p_from_id                    IN   NUMBER,
584     x_to_id                      OUT  NOCOPY NUMBER,
585     p_from_fk_id                 IN   NUMBER,
586     p_to_fk_id                   IN   NUMBER,
587     p_parent_entity_name         IN   VARCHAR2,
588     p_batch_id                   IN   NUMBER,
589     p_batch_party_id             IN   NUMBER,
590     x_return_status              OUT  NOCOPY VARCHAR2);
591 
592 
593    --   *******************************************************
594    --    Start of Comments
595    --   *******************************************************
596    --   API Name:  CS_CONTACTS_MERGE_CONT_POINTS
597    --   Purpose :  Performs contact_point id merge in CS_HZ_SR_CONTACT_POINTS table.
598    --   Type    :  Private
599    --   Pre-Req :  None.
600    --   Parameters:
601    --   IN - All IN parameters are REQUIRED.
602    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
603    --     p_from_id             NUMBER   - Id of the record that is being merged
604    --     p_from_fk_id          NUMBER   - Id of the Old Parent
605    --     p_to_fk_id            NUMBER   - Id of the New Parent
606    --     p_parent_entity_name  VARCHAR2 - Parent entity name
607    --     p_batch_id            NUMBER   - Id of the Batch
608    --     p_batch_party_id      NUMBER   - Id of the batch and party record
609    --   OUT:
613    --
610    --     x_to_id               NUMBER   - Id of the record under the new parent
611    --                                      that its merged to
612    --     x_return_status       VARCHAR2 - Return the status of the procedure
614    --   Version : Current version 1.0
615    --
616    --   End of Comments
617    --
618 PROCEDURE CS_CONTACTS_MERGE_CONT_POINTS(
619     p_entity_name                IN   VARCHAR2,
620     p_from_id                    IN   NUMBER,
621     x_to_id                      OUT  NOCOPY NUMBER,
622     p_from_fk_id                 IN   NUMBER,
623     p_to_fk_id                   IN   NUMBER,
624     p_parent_entity_name         IN   VARCHAR2,
625     p_batch_id                   IN   NUMBER,
626     p_batch_party_id             IN   NUMBER,
627     x_return_status              OUT  NOCOPY VARCHAR2);
628 
629    --   *******************************************************
630    --    Start of Comments
631    --   *******************************************************
632    --   API Name:  CS_INC_ALL_MERGE_CONT_POINTS
633    --   Purpose :  Performs customer_phone_id and customer_email_id merge in
634    --              CS_INCIDENTS_ALL_B table.
635    --   Type    :  Private
636    --   Pre-Req :  None.
637    --   Parameters:
638    --   IN - All IN parameters are REQUIRED.
639    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
640    --     p_from_id             NUMBER   - Id of the record that is being merged
641    --     p_from_fk_id          NUMBER   - Id of the Old Parent
642    --     p_to_fk_id            NUMBER   - Id of the New Parent
643    --     p_parent_entity_name  VARCHAR2 - Parent entity name
644    --     p_batch_id            NUMBER   - Id of the Batch
645    --     p_batch_party_id      NUMBER   - Id of the batch and party record
646    --   OUT:
647    --     x_to_id               NUMBER   - Id of the record under the new parent
648    --                                      that its merged to
649    --     x_return_status       VARCHAR2 - Return the status of the procedure
650    --
651    --   Version : Current version 1.0
652    --
653    --   End of Comments
654    --
655 PROCEDURE CS_INC_ALL_MERGE_CONT_POINTS(
656     p_entity_name                IN   VARCHAR2,
657     p_from_id                    IN   NUMBER,
658     x_to_id                      OUT  NOCOPY NUMBER,
659     p_from_fk_id                 IN   NUMBER,
660     p_to_fk_id                   IN   NUMBER,
661     p_parent_entity_name         IN   VARCHAR2,
662     p_batch_id                   IN   NUMBER,
663     p_batch_party_id             IN   NUMBER,
664     x_return_status              OUT  NOCOPY VARCHAR2);
665 
666 
667 END  CS_SR_PARTY_MERGE_PKG;
668