DBA Data[Home] [Help]

PACKAGE: APPS.CSC_PARTY_MERGE_PKG

Source


1 PACKAGE CSC_PARTY_MERGE_PKG AUTHID CURRENT_USER AS
2 /* $Header: cscvmpts.pls 115.2 2002/12/04 16:19:02 bhroy noship $ */
3 -- Start of Comments
4 -- Package name     : CSC_PARTY_MERGE_PKG
5 -- Purpose          : Merges duplicate parties in Customer Care tables. The
6 --                    Customer Care table that need to be considered for
7 --                    Party Merge are:
8 --                    CSC_CUSTOMERS,              CSC_CUSTOMERS_AUDIT_HIST,
9 --                    CSC_CUSTOMIZED_PLANS,       CSC_CUST_PLANS,
10 --                    CSC_CUST_PLANS_AUDIT,       CSC_PROF_BLOCK_RESULTS,
11 --                    CSC_PROF_CHECK_RESULTS.
12 --
13 -- History
14 -- MM-DD-YYYY    NAME          MODIFICATIONS
15 -- 10-10-2000    dejoseph      Created.
16 -- 10-25-2001    dejoseph      Included command for auto db driver.
17 --                             Ref bug # 2076739.
18 --
19 -- End of Comments
20 
21    --   *******************************************************
22    --    Start of Comments
23    --   *******************************************************
24    --   API Name:  csc_customers_merge
25    --   Purpose :  Merges parties in CSC_CUSTOMERS table
26    --   Type    :  Private
27    --   Pre-Req :  None.
28    --   Parameters:
29    --   IN - All IN parameters are REQUIRED.
30    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
31    --     p_from_id             NUMBER   - Id of the record that is being merged
32    --     p_from_fk_id          NUMBER   - Id of the Old Parent
33    --     p_to_fk_id            NUMBER   - Id of the New Parent
34    --     p_parent_entity_name  VARCHAR2 - Parent entity name
35    --     p_batch_id            NUMBER   - Id of the Batch
36    --     p_batch_party_id      NUMBER   - Id of the batch and party record
37    --   OUT NOCOPY:
38    --     x_to_id               NUMBER   - Id of the record under the new parent
39    --                                      that its merged to
40    --     x_return_status       VARCHAR2 - Return the status of the procedure
41    --
42    --   Version : Current version 1.0
43    --
44    --   End of Comments
45    --
46 
47 PROCEDURE CSC_CUSTOMERS_MERGE (
48     p_entity_name                IN   VARCHAR2,
49     p_from_id                    IN   NUMBER,
50     x_to_id                      OUT NOCOPY  NUMBER,
51     p_from_fk_id                 IN   NUMBER,
52     p_to_fk_id                   IN   NUMBER,
53     p_parent_entity_name         IN   VARCHAR2,
54     p_batch_id                   IN   NUMBER,
55     p_batch_party_id             IN   NUMBER,
56     x_return_status              OUT NOCOPY  VARCHAR2);
57 
58    --   *******************************************************
59    --    Start of Comments
60    --   *******************************************************
61    --   API Name:  csc_cust_plans_merge
62    --   Purpose :  Performs party merge in CSC_CUST_PLANS table. For every record
63    --              updated in CSC_CUST_PLANS, insert a row in CSC_CUST_PLANS_AUDIT
64    --              table to record the merge operation
65    --   Type    :  Private
66    --   Pre-Req :  None.
67    --   Parameters:
68    --   IN - All IN parameters are REQUIRED.
69    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
70    --     p_from_id             NUMBER   - Id of the record that is being merged
71    --     p_from_fk_id          NUMBER   - Id of the Old Parent
72    --     p_to_fk_id            NUMBER   - Id of the New Parent
73    --     p_parent_entity_name  VARCHAR2 - Parent entity name
74    --     p_batch_id            NUMBER   - Id of the Batch
75    --     p_batch_party_id      NUMBER   - Id of the batch and party record
76    --   OUT NOCOPY:
77    --     x_to_id               NUMBER   - Id of the record under the new parent
78    --                                      that its merged to
79    --     x_return_status       VARCHAR2 - Return the status of the procedure
80    --
81    --   Version : Current version 1.0
82    --
83    --   End of Comments
84    --
85 PROCEDURE CSC_CUST_PLANS_MERGE (
86     p_entity_name                IN   VARCHAR2,
87     p_from_id                    IN   NUMBER,
88     x_to_id                      OUT NOCOPY  NUMBER,
89     p_from_fk_id                 IN   NUMBER,
90     p_to_fk_id                   IN   NUMBER,
91     p_parent_entity_name         IN   VARCHAR2,
92     p_batch_id                   IN   NUMBER,
93     p_batch_party_id             IN   NUMBER,
94     x_return_status              OUT NOCOPY  VARCHAR2);
95 
96    --   *******************************************************
97    --    Start of Comments
98    --   *******************************************************
99    --   API Name:  csc_customized_plans_merge
100    --   Purpose :  Performs party merge in CSC_CUSTOMIZED_PLANS table. If there are
101    --              duplicate plans existing between the two merging parties, then
102    --              delete the rows of the merge from party in this table.
103    --   Type    :  Private
104    --   Pre-Req :  None.
105    --   Parameters:
106    --   IN - All IN parameters are REQUIRED.
107    --     p_entity_name         VARCHAR2 - Name of the entity that is being merged
108    --     p_from_id             NUMBER   - Id of the record that is being merged
109    --     p_from_fk_id          NUMBER   - Id of the Old Parent
110    --     p_to_fk_id            NUMBER   - Id of the New Parent
111    --     p_parent_entity_name  VARCHAR2 - Parent entity name
112    --     p_batch_id            NUMBER   - Id of the Batch
113    --     p_batch_party_id      NUMBER   - Id of the batch and party record
114    --   OUT NOCOPY:
115    --     x_to_id               NUMBER   - Id of the record under the new parent
116    --                                      that its merged to
117    --     x_return_status       VARCHAR2 - Return the status of the procedure
118    --
119    --   Version : Current version 1.0
120    --
121    --   End of Comments
122    --
123 PROCEDURE CSC_CUSTOMIZED_PLANS_MERGE (
124     p_entity_name                IN   VARCHAR2,
125     p_from_id                    IN   NUMBER,
126     x_to_id                      OUT NOCOPY  NUMBER,
127     p_from_fk_id                 IN   NUMBER,
128     p_to_fk_id                   IN   NUMBER,
129     p_parent_entity_name         IN   VARCHAR2,
130     p_batch_id                   IN   NUMBER,
131     p_batch_party_id             IN   NUMBER,
132     x_return_status              OUT NOCOPY  VARCHAR2);
133 
134 END  CSC_PARTY_MERGE_PKG;