DBA Data[Home] [Help]

PACKAGE: APPS.WSH_PARTY_MERGE

Source


1 PACKAGE WSH_PARTY_MERGE as
2 /* $Header: WSHPAMRS.pls 120.3 2006/03/30 17:23:39 rlanka noship $ */
3 
4 G_PACKAGE_NAME CONSTANT VARCHAR2(50) := 'WSH_PARTY_MERGE';
5 
6  --========================================================================
7   -- PROCEDURE :merge_carriers
8   -- PARAMETERS:
9   --		p_entity_name			Name of Entity Being Merged
10   --		p_from_id				Primary Key Id of the entity that is being merged
11   --		p_to_id				The record under the 'To Parent' that is being merged
12   --		p_from_fk_id			Foreign Key id of the Old Parent Record
13  --		p_to_fk_id			Foreign  Key id of the New Parent Record
14  --		p_parent_entity_name	Name of Parent Entity
15  --		p_batch_id			Id of the Batch
16  --		p_batch_party_id		Id uniquely identifies the batch and party record that is being merged
17  --		x_return_status			 Returns the staus of call
18  --
19  -- COMMENT   : Carriers cannot be merged.
20  --========================================================================
21 PROCEDURE merge_carriers(
22 p_entity_name         IN             VARCHAR2,
23 p_from_id             IN             NUMBER,
24 p_to_id               IN  OUT NOCOPY NUMBER,
25 p_from_fk_id          IN             NUMBER,
26 p_to_fk_id            IN             NUMBER,
27 p_parent_entity_name  IN             VARCHAR2,
28 p_batch_id            IN             NUMBER,
29 p_batch_party_id      IN             NUMBER,
30 x_return_status       IN  OUT NOCOPY VARCHAR2);
31 
32  --========================================================================
33   -- PROCEDURE :merge_carrier_sites
34   -- PARAMETERS:
35   --		p_entity_name			Name of Entity Being Merged
36   --		p_from_id				Primary Key Id of the entity that is being merged
37   --		p_to_id				The record under the 'To Parent' that is being merged
38   --		p_from_fk_id			Foreign Key id of the Old Parent Record
39  --		p_to_fk_id			Foreign  Key id of the New Parent Record
40  --		p_parent_entity_name	Name of Parent Entity
41  --		p_batch_id			Id of the Batch
42  --		p_batch_party_id		Id uniquely identifies the batch and party record that is being merged
43  --		x_return_status			 Returns the staus of call
44  --
45  -- COMMENT   : Carriers Sites cannot be merged.
46  --========================================================================
47 
48 PROCEDURE merge_carrier_sites(
49 p_entity_name         IN             VARCHAR2,
50 p_from_id             IN             NUMBER,
51 p_to_id               IN  OUT NOCOPY NUMBER,
52 p_from_fk_id          IN             NUMBER,
53 p_to_fk_id            IN             NUMBER,
54 p_parent_entity_name IN             VARCHAR2,
55 p_batch_id                IN             NUMBER,
56 p_batch_party_id	IN             NUMBER,
57 x_return_status		IN  OUT NOCOPY VARCHAR2);
58 
59  --========================================================================
60   -- PROCEDURE :merge_party_locations
61   -- PARAMETERS:
62   --		p_entity_name			Name of Entity Being Merged
63   --		p_from_id				Primary Key Id of the entity that is being merged
64   --		p_to_id				The record under the 'To Parent' that is being merged
65   --		p_from_fk_id			Foreign Key id of the Old Parent Record
66  --		p_to_fk_id			Foreign  Key id of the New Parent Record
67  --		p_parent_entity_name	Name of Parent Entity
68  --		p_batch_id			Id of the Batch
69  --		p_batch_party_id		Id uniquely identifies the batch and party record that is being merged
70  --		x_return_status			 Returns the staus of call
71  --
72  -- COMMENT :  To merge locations for parties.-Parent Entity is HZ_PARTIES.
73  --			   Owner Type can be either Supplier or Customer, Carriers cannot be merged
74  --			   Updates OWNER_PARTY_ID and OWNER_TYPE in WSH_LOCATION_OWNERS
75  --========================================================================
76 
77 PROCEDURE  merge_party_locations(
78 p_entity_name		IN             VARCHAR2,
79 p_from_id			IN             NUMBER,
80 p_to_id			IN  OUT NOCOPY NUMBER,
81 p_from_fk_id		IN             NUMBER,
82 p_to_fk_id		IN             NUMBER,
83 p_parent_entity_name	IN             VARCHAR2,
84 p_batch_id              IN             NUMBER,
85 p_batch_party_id	IN             NUMBER,
86 x_return_status		IN  OUT NOCOPY VARCHAR2);
87 
88  --========================================================================
89   -- PROCEDURE :	Merge_supplier_sf_sites
90   -- PARAMETERS:
91   --		p_entity_name              Name of registered table/entity
92   --		p_from_id                      Value of PK of the record being merged
93   --		x_to_id                          Value of the PK of the record to which this record is mapped
94   --		p_from_fk_id                  Value of the from ID (e.g. Party, Party Site, etc.) when merge is executed
95  --		p_to_fk_id                     Value of the to ID (e.g. Party, Party Site, etc.) when merge is executed
96  --		p_parent_entity_name  Name of parent HZ table (e.g. HZ_PARTIES, HZ_PARTY_SITES)
97  --		p_batch_id                    ID of the batch
98  --		p_batch_party_id          ID of the batch and Party record
99  --		x_return_status             Return status
100  --
101  -- COMMENT :
102  --========================================================================
103 Procedure Merge_supplier_sf_sites (
104 	p_entity_name          IN           VARCHAR2,
105 	p_from_id                  IN           NUMBER,
106 	x_to_id                      OUT   NOCOPY  NUMBER,
107 	p_from_fk_id             IN           NUMBER,
108 	p_to_fk_id                 IN           NUMBER,
109 	p_parent_entity_name IN        VARCHAR2,
110 	p_batch_id                IN           NUMBER,
111 	p_batch_party_id      IN           NUMBER,
112 	x_return_status       OUT    NOCOPY  VARCHAR2  );
113 
114 
115 
116 --========================================================================
117 -- PROCEDURE : Update_Entities_During_merge
118 --
119 -- PARAMETERS:
120 --
121 --     p_to_id                     Merge To Vendor ID
122 --     p_from_id                   Merge From Vendor ID
123 --     p_from_party_id             Merge From Party ID
124 --     p_to_party_id               Merge To Party ID
125 --     p_to_site_id                Merge To Site ID
126 --     p_from_site_id              Merge From Site ID
127 --     p_site_merge                Indicates whether this is a site merge
128 --     p_from_supplier_name        Merge From Supplier Name
129 --     x_return_status             Return status
130 --
131 --
132 -- COMMENT : This procedure is used to merge vendor level calendar assignments
133 --           during Party Merge and Vendor Merge.
134 --
135 --==========================================================================
136 
137 PROCEDURE Update_Entities_during_Merge
138        (
139          p_to_id         IN NUMBER,
140          p_from_id       IN NUMBER,
141          p_from_party_id IN NUMBER,
142          p_to_party_id   IN NUMBER,
143          p_to_site_id    IN NUMBER,
144          p_from_site_id  IN NUMBER,
145          p_site_merge    IN BOOLEAN,
146          p_from_supplier_name IN VARCHAR2,
147          x_return_status OUT NOCOPY VARCHAR2
148        );
149 
150 
151 
152 -- ============================================================================
153 --
154 -- R12 FP Bug 5075838
155 --
156 -- PROCEDURE  :    MERGE_LOCATION
157 -- PARAMETERS :
158 --   p_entity_name         Name of Entity Being Merged
159 --   p_from_id             Primary Key Id of the entity that is being merged
160 --   p_to_id               The record under the 'To Parent' that is being
161 --                         merged
162 --   p_from_fk_id          Foreign Key id of the Old Parent Record
163 --   p_to_fk_id            Foreign  Key id of the New Parent Record
164 --   p_parent_entity_name  Name of Parent Entity
165 --   p_batch_id            Id of the Batch
166 --   p_batch_party_id      Id uniquely identifies the batch and party record
167 --                         that is being merged
168 --   x_return_status       Returns the status of call
169 --
170 -- COMMENT :
171 --   To update locations in Wsh_Delivery_Details, Wsh_New_Deliveries,
172 --   Wsh_Trip_Stops tables for Unshipped delivery lines during party
173 --   merge. Also updates Wsh_Picking_Rules tables during party merge.
174 -- ============================================================================
175 PROCEDURE merge_location(
176 p_entity_name         IN             VARCHAR2,
177 p_from_id             IN             NUMBER,
178 p_to_id               IN  OUT NOCOPY NUMBER,
179 p_from_fk_id          IN             NUMBER,
180 p_to_fk_id            IN             NUMBER,
181 p_parent_entity_name  IN             VARCHAR2,
182 p_batch_id            IN             NUMBER,
183 p_batch_party_id      IN             NUMBER,
184 x_return_status       IN  OUT NOCOPY VARCHAR2);
185 
186 
187 END WSH_PARTY_MERGE;