DBA Data[Home] [Help]

PACKAGE: APPS.AHL_MM_RESERVATIONS_PVT

Source


1 PACKAGE AHL_MM_RESERVATIONS_PVT AUTHID CURRENT_USER AS
2 /* $Header: AHLVMMRS.pls 120.0.12020000.2 2012/12/14 09:28:48 shnatu noship $ */
3 
4 -------------------------------------
5 -- Common Package CONSTANTS --
6 -------------------------------------
7 G_PKG_NAME     CONSTANT     VARCHAR2(30)     := 'AHL_MM_RESERVATIONS_PVT';
8 
9 
10 -- TYPES are inv_reservation_global.serial_number_rec_type , INVRSVGS.pls
11 TYPE serial_number_rec_type IS RECORD
12   (
13    inventory_item_id NUMBER,
14    serial_number VARCHAR2(30)
15    );
16 
17 TYPE serial_number_tbl_type IS TABLE OF serial_number_rec_type  INDEX BY BINARY_INTEGER;
18 
19 -- TYPES are inv_reservation_global.mtl_reservation_rec_type , INVRSVGS.pls
20 TYPE mtl_reservation_rec_type is RECORD
21   (
22       reservation_id                 NUMBER        := fnd_api.g_miss_num
23     , requirement_date               DATE          := fnd_api.g_miss_date
24     , organization_id                NUMBER        := fnd_api.g_miss_num
25     , inventory_item_id              NUMBER        := fnd_api.g_miss_num
26     , demand_source_type_id          NUMBER        := fnd_api.g_miss_num
27     , demand_source_name             VARCHAR2(30)  := fnd_api.g_miss_char
28     , demand_source_header_id        NUMBER        := fnd_api.g_miss_num
29     , demand_source_line_id          NUMBER        := fnd_api.g_miss_num
30     , demand_source_delivery         NUMBER        := fnd_api.g_miss_num
31     , primary_uom_code               VARCHAR2(3)   := fnd_api.g_miss_char
32     , primary_uom_id                 NUMBER        := fnd_api.g_miss_num
33     , secondary_uom_code             VARCHAR2(3)   := fnd_api.g_miss_char
34     , secondary_uom_id               NUMBER        := fnd_api.g_miss_num
35     , reservation_uom_code           VARCHAR2(3)   := fnd_api.g_miss_char
36     , reservation_uom_id             NUMBER        := fnd_api.g_miss_num
37     , reservation_quantity           NUMBER        := fnd_api.g_miss_num
38     , primary_reservation_quantity   NUMBER        := fnd_api.g_miss_num
39     , secondary_reservation_quantity NUMBER        := fnd_api.g_miss_num
40     , detailed_quantity              NUMBER        := fnd_api.g_miss_num
41     , secondary_detailed_quantity    NUMBER        := fnd_api.g_miss_num
42     , autodetail_group_id            NUMBER        := fnd_api.g_miss_num
43     , external_source_code           VARCHAR2(30)  := fnd_api.g_miss_char
44     , external_source_line_id        NUMBER        := fnd_api.g_miss_num
45     , supply_source_type_id          NUMBER        := fnd_api.g_miss_num
46     , supply_source_header_id        NUMBER        := fnd_api.g_miss_num
47     , supply_source_line_id          NUMBER        := fnd_api.g_miss_num
48     , supply_source_name             VARCHAR2(30)  := fnd_api.g_miss_char
49     , supply_source_line_detail      NUMBER        := fnd_api.g_miss_num
50     , revision                       VARCHAR2(3)   := fnd_api.g_miss_char
51     , subinventory_code              VARCHAR2(10)  := fnd_api.g_miss_char
52     , subinventory_id                NUMBER        := fnd_api.g_miss_num
53     , locator_id                     NUMBER        := fnd_api.g_miss_num
54     , lot_number                     VARCHAR2(80)  := fnd_api.g_miss_char
55     , lot_number_id                  NUMBER        := fnd_api.g_miss_num
56     , pick_slip_number               NUMBER        := fnd_api.g_miss_num
57     , lpn_id                         NUMBER        := fnd_api.g_miss_num
58     , attribute_category             VARCHAR2(30)  := fnd_api.g_miss_char
59     , attribute1                     VARCHAR2(150) := fnd_api.g_miss_char
60     , attribute2                     VARCHAR2(150) := fnd_api.g_miss_char
61     , attribute3                     VARCHAR2(150) := fnd_api.g_miss_char
62     , attribute4                     VARCHAR2(150) := fnd_api.g_miss_char
63     , attribute5                     VARCHAR2(150) := fnd_api.g_miss_char
64     , attribute6                     VARCHAR2(150) := fnd_api.g_miss_char
65     , attribute7                     VARCHAR2(150) := fnd_api.g_miss_char
66     , attribute8                     VARCHAR2(150) := fnd_api.g_miss_char
67     , attribute9                     VARCHAR2(150) := fnd_api.g_miss_char
68     , attribute10                    VARCHAR2(150) := fnd_api.g_miss_char
69     , attribute11                    VARCHAR2(150) := fnd_api.g_miss_char
70     , attribute12                    VARCHAR2(150) := fnd_api.g_miss_char
71     , attribute13                    VARCHAR2(150) := fnd_api.g_miss_char
72     , attribute14                    VARCHAR2(150) := fnd_api.g_miss_char
73     , attribute15                    VARCHAR2(150) := fnd_api.g_miss_char
74     , ship_ready_flag                NUMBER        := fnd_api.g_miss_num
75     , staged_flag                    VARCHAR2(1)   := fnd_api.g_miss_char
76     , crossdock_flag                 VARCHAR2(1)   := fnd_api.g_miss_char
77     , crossdock_criteria_id          NUMBER        := fnd_api.g_miss_num
78     , demand_source_line_detail      NUMBER        := fnd_api.g_miss_num
79     , serial_reservation_quantity    NUMBER        := fnd_api.g_miss_num
80     , supply_receipt_date            DATE          := fnd_api.g_miss_date
81     , demand_ship_date               DATE          := fnd_api.g_miss_date
82     , project_id                     NUMBER        := fnd_api.g_miss_num
83     , task_id                        NUMBER        := fnd_api.g_miss_num
84     , orig_supply_source_type_id     NUMBER        := fnd_api.g_miss_num
85     , orig_supply_source_header_id   NUMBER        := fnd_api.g_miss_num
86     , orig_supply_source_line_id     NUMBER        := fnd_api.g_miss_num
87     , orig_supply_source_line_detail NUMBER        := fnd_api.g_miss_num
88     , orig_demand_source_type_id     NUMBER        := fnd_api.g_miss_num
89     , orig_demand_source_header_id   NUMBER        := fnd_api.g_miss_num
90     , orig_demand_source_line_id     NUMBER        := fnd_api.g_miss_num
91     , orig_demand_source_line_detail NUMBER        := fnd_api.g_miss_num
92     , serial_number                  VARCHAR2(30)  := fnd_api.g_miss_char
93   );
94 
95 TYPE number_table_type  IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
96 TYPE varchar_table_type  IS TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER;
97 
98 ---------------------------------------------------------------------------------------------------------
99 -- Declare Procedures --
100 ---------------------------------------------------------------------------------------------------------
101 -- Start of Comments --
102 --  Procedure name            : CREATE_RESERVATION
103 --  Type                    : Private
104 --  Function                : Reserves the serial numbers in the p_serial_number_tbl
105 --  Pre-reqs                :
106 --  Standard IN  Parameters :
107 --      p_api_version        IN            NUMBER            Required
108 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
109 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
110 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
111 --        p_module_type        IN            VARCHAR2        Default NULL
112 --  Standard OUT Parameters :
113 --      x_return_status        OUT            VARCHAR2        Required
114 --      x_msg_count            OUT            NUMBER            Required
115 --      x_msg_data            OUT            VARCHAR2        Required
116 --
117 --      inv_reservation_pub.create_reservation is called.
118 --
119 --  CREATE_RESERVATION Parameters:
120 --        p_rsv_rec                : The reservation record that needs to be created.
121 --                                   Following parametes MUST be populated by the Caller before calling create_reservation API :-
122 --                                   p_rsv_rec.demand_source_line_detail    := scheduled_material_id;
123 --                                   Other demand details will be populated from scheduled_material_id reference.
124 --                                   Assumption : Demand is always against a workorder requirement. i.e  <p_rsv_rec.demand_source_type_id := inv_reservation_global.g_source_type_wip>
125 --                                   p_rsv_rec.supply_source_type_id        := inv_reservation_global.g_source_type_inv/g_source_type_wip/g_source_type_internal_ord;
126 --                                   p_rsv_rec.supply_source_header_id      := null/<supply wip entity id>/<internal_order_id>/<internal_req_id>
127 --                                   p_rsv_rec.supply_source_line_id        := null/<supply workorder id>/null;
128 --                                   p_rsv_rec.supply_source_line_detail    := null/<supply schedule_material_id>
129 --                                   p_rsv_rec.primary_reservation_quantity := <quantity to be reserved>
130 --                                   p_rsv_rec.subinventory_code := l_sub_inv_code;
131 --                                   p_rsv_rec.locator_id := l_locator_id;
132 --                                   p_rsv_rec.lot_number := l_lot_number;
133 --                                   p_rsv_rec.revision := l_revision;
134 --      p_serial_number_tbl     : Table containing serial numbers of item to be reserved.Inventory_item_id will be fetched from scheduled_material_id.
135 --                                These serials should not be reserved against any other demand.
136 --                                All the serials should have the same sub inv, locator, lot and revision.
137 --                                In case when Inventory is the supply, serilas should be present in RESERVABLE Subinventory.
138 --        x_to_reservation_id     : The id of the new reservation created.
139 --  End of Comments.
140 ---------------------------------------------------------------------------------------------------------
141 PROCEDURE CREATE_RESERVATION(
142     p_api_version             IN                    NUMBER      := 1.0,
143     p_init_msg_list           IN                    VARCHAR2    := FND_API.G_FALSE,
144     p_commit                  IN                    VARCHAR2    := FND_API.G_FALSE,
145     p_validation_level        IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
146     p_module_type             IN                    VARCHAR2,
147     x_return_status           OUT         NOCOPY    VARCHAR2,
148     x_msg_count               OUT         NOCOPY    NUMBER,
149     x_msg_data                OUT         NOCOPY    VARCHAR2,
150     p_rsv_rec                 IN                    mtl_reservation_rec_type,
151     p_serial_number_tbl       IN                    serial_number_tbl_type,
152     x_reservation_id          OUT         NOCOPY    NUMBER);
153 
154 
155 ---------------------------------------------------------------------------------------------------------
156 -- Declare Procedures --
157 ---------------------------------------------------------------------------------------------------------
158 -- Start of Comments --
159 --  Procedure name            : UPDATE_RESERVATION
160 --  Type                    : Private
161 --  Function                : Updates reservation attributes for the reservation : p_reservation_id
162 --  Pre-reqs                :
163 --  Standard IN  Parameters :
164 --      p_api_version        IN            NUMBER            Required
165 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
166 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
167 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
168 --        p_module_type        IN            VARCHAR2        Default NULL
169 --  Standard OUT Parameters :
170 --      x_return_status        OUT            VARCHAR2        Required
171 --      x_msg_count            OUT            NUMBER            Required
172 --      x_msg_data            OUT            VARCHAR2        Required
173 --
174 --
175 --  UPDATE_RESERVATION Parameters:
176 --            p_reservation_id        : The Reservation id from MTL_RESERVATIONS
177 --            p_rsv_rec                : Only the new attributes for the above reservation needs to be assigned, rest all g_miss_XXX by default.
178 --          p_serial_number_tbl     : New serials to be reserved against same reservation.
179 --                                    These serials should not be reserved against any other demand.
180 --                                    In case when Inventory is the supply,these serials should be present in the same RESERVABLE Subinventory/Locator/Lot/Revision.
181 --  End of Comments.
182 ---------------------------------------------------------------------------------------------------------
183 PROCEDURE UPDATE_RESERVATION(
184     p_api_version             IN                     NUMBER      := 1.0,
185     p_init_msg_list           IN                     VARCHAR2    := FND_API.G_FALSE,
186     p_commit                  IN                     VARCHAR2    := FND_API.G_TRUE,
187     p_validation_level        IN                     NUMBER      := FND_API.G_VALID_LEVEL_FULL,
188     p_module_type             IN                     VARCHAR2,
189     x_return_status           OUT         NOCOPY     VARCHAR2,
190     x_msg_count               OUT         NOCOPY     NUMBER,
191     x_msg_data                OUT         NOCOPY     VARCHAR2,
192     p_reservation_id          IN                     NUMBER  ,
193     p_rsv_rec                 IN                     mtl_reservation_rec_type,
194     p_serial_number_tbl       IN                     serial_number_tbl_type);
195 
196 
197 ---------------------------------------------------------------------------------------------------------
198 -- Declare Procedures --
199 ---------------------------------------------------------------------------------------------------------
200 -- Start of Comments --
201 --  Procedure name            : DELETE_RESERVATION
202 --  Type                    : Private
203 --  Function                : API to delete the reservation made for a requirement asainst p_reservation_id
204 --  Pre-reqs                :
205 --  Standard IN  Parameters :
206 --      p_api_version        IN            NUMBER            Required
207 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
208 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
209 --      p_validation_level    IN            NUMBER          Default FND_API.G_VALID_LEVEL_FULL
210 --        p_module_type        IN            VARCHAR2        Default NULL
211 --  Standard OUT Parameters :
212 --      x_return_status        OUT            VARCHAR2        Required
213 --      x_msg_count            OUT            NUMBER            Required
214 --      x_msg_data            OUT            VARCHAR2        Required
215 --
216 --  inv_reservation_pub.delete_reservation is called which takes dummy serial numbers.
217 --
218 --  DELETE_RESERVATION Parameters:
219 --            p_reservation_id        : The Reservation id from MTL_RESERVATIONS
220 --  End of Comments.
221 ---------------------------------------------------------------------------------------------------------
222 PROCEDURE DELETE_RESERVATION(
223     p_api_version             IN                    NUMBER      := 1.0,
224     p_init_msg_list           IN                    VARCHAR2    := FND_API.G_FALSE,
225     p_commit                  IN                    VARCHAR2    := FND_API.G_FALSE,
226     p_validation_level        IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
227     p_module_type             IN                    VARCHAR2,
228     x_return_status           OUT         NOCOPY    VARCHAR2,
229     x_msg_count               OUT         NOCOPY    NUMBER,
233 
230     x_msg_data                OUT         NOCOPY    VARCHAR2,
231     p_reservation_id          IN                    NUMBER );
232 
234 ---------------------------------------------------------------------------------------------------------
235 -- Declare Procedures --
236 ---------------------------------------------------------------------------------------------------------
237 -- Start of Comments --
238 --  Procedure name            : RELIEVE_RESERVATION
239 --  Type                    : Private
240 --  Function                : API to delete a particular serial number from the reservation.
241 --  Pre-reqs                :
242 --  Standard IN  Parameters :
243 --      p_api_version        IN            NUMBER            Required
244 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
245 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
246 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
247 --        p_module_type        IN            VARCHAR2        Default NULL
248 --  Standard OUT Parameters :
249 --      x_return_status        OUT            VARCHAR2        Required
250 --      x_msg_count            OUT            NUMBER            Required
251 --      x_msg_data            OUT            VARCHAR2        Required
252 --
253 --      inv_reservation_pub.relieve_reservation is called.
254 --
255 --  RELIEVE_RESERVATION Parameters:
256 --            p_reservation_id        : The Reservation id from MTL_RESERVATIONS
257 --          p_serial_number_tbl     : Table containing serial number that needs to be relieved.
258 --  End of Comments.
259 ---------------------------------------------------------------------------------------------------------
260 PROCEDURE RELIEVE_RESERVATION(
261     p_api_version             IN                    NUMBER      := 1.0,
262     p_init_msg_list           IN                    VARCHAR2    := FND_API.G_FALSE,
263     p_commit                  IN                    VARCHAR2    := FND_API.G_FALSE,
264     p_validation_level        IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
265     p_module_type             IN                    VARCHAR2,
266     x_return_status           OUT         NOCOPY    VARCHAR2,
267     x_msg_count               OUT         NOCOPY    NUMBER,
268     x_msg_data                OUT         NOCOPY    VARCHAR2,
269     p_reservation_id          IN                    NUMBER  ,
270     p_serial_number_tbl       IN                    serial_number_tbl_type);
271 
272 ---------------------------------------------------------------------------------------------------------
273 -- Declare Procedures --
274 ---------------------------------------------------------------------------------------------------------
275 -- Start of Comments --
276 --  Procedure name            : TRANSFER_RESERVATION
277 --  Type                    : Private
278 --  Function                : API to transfer the reservation made for a particular requirement to another requirement
279 --                            Used only when supply source type value changes (eg. IR to INV or INV to WO kind).
280 --  Pre-reqs                :
281 --  Standard IN  Parameters :
282 --      p_api_version        IN            NUMBER            Required
283 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
284 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
285 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
286 --        p_module_type        IN            VARCHAR2        Default NULL
287 --  Standard OUT Parameters :
288 --      x_return_status        OUT            VARCHAR2        Required
289 --      x_msg_count            OUT            NUMBER               Required
290 --      x_msg_data            OUT            VARCHAR2        Required
291 --
292 --      inv_reservation_pub.transfer_reservation is called.
293 --
294 --  TRANSFER_RESERVATION Parameters:
295 --            p_from_reservation_id    : The id of the reservations that needs to be deleted.
296 --            p_to_rsv_rec             : IF reservation_id is provided, this record will be updated.
297 --                                   p_to_rsv_rec.reservation_id
298 --                                   p_to_rsv_rec.primary_reservation_quantity := <quantity to be TRANSFERRED>
299 --                                   ELSE
300 --                                   The reservation record that needs to be created.
301 --                                   Following parametes MUST be populated by the Caller before calling create_reservation API :-
302 --                                   p_to_rsv_rec.demand_source_line_detail    := scheduled_material_id;
303 --                                   p_to_rsv_rec.primary_reservation_quantity := <quantity to be transfered>
304 --                                   p_to_rsv_rec.supply_source_type_id        := inv_reservation_global.g_source_type_inv/g_source_type_wip/g_source_type_internal_ord;
305 --                                   p_to_rsv_rec.supply_source_header_id      := <supply wip entity id>/<internal_order_id>/<internal_req_id>
306 --                                   p_to_rsv_rec.supply_source_line_id        := <supply workorder id>
307 --                                   p_to_rsv_rec.supply_source_line_detail    := <supply schedule_material_id>
308 --                                   p_to_rsv_rec.primary_reservation_quantity := <quantity to be TRANSFERRED>
309 --                                   p_to_rsv_rec.subinventory_code := l_sub_inv_code;
310 --                                   p_to_rsv_rec.locator_id := l_locator_id;
311 --                                   p_to_rsv_rec.lot_number := l_lot_number;
312 --                                   p_to_rsv_rec.revision := l_revision;
313 --                                   Demand details will be populated from scheduled_material_id reference.
314 --          p_serial_number_tbl     : Table containing serial numbers of item to be transferred from p_from_reservation_id.Inventory_item_id will be fetched from scheduled_material_id.
318 PROCEDURE TRANSFER_RESERVATION(
315 --            x_to_reservation_id      : The id of the new reservation, if created.Else this value is null and the same p_from_reservation_id is updated.
316 --  End of Comments.
317 ---------------------------------------------------------------------------------------------------------
319     p_api_version              IN                    NUMBER      := 1.0,
320     p_init_msg_list            IN                    VARCHAR2    := FND_API.G_FALSE,
321     p_commit                   IN                    VARCHAR2    := FND_API.G_FALSE,
322     p_validation_level         IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
323     p_module_type              IN                    VARCHAR2,
324     x_return_status            OUT         NOCOPY    VARCHAR2,
325     x_msg_count                OUT         NOCOPY    NUMBER,
326     x_msg_data                 OUT         NOCOPY    VARCHAR2,
327     p_from_reservation_id      IN                    NUMBER,
328     p_to_rsv_rec               IN                    mtl_reservation_rec_type,
329     p_serial_number_tbl        IN                    serial_number_tbl_type,
330     x_to_reservation_id        OUT         NOCOPY    NUMBER);
331 
332 
333 ---------------------------------------------------------------------------------------------------------
334 -- Declare Procedures --
335 ---------------------------------------------------------------------------------------------------------
336 -- Start of Comments --
337 --  Procedure name            : PROCESS_RESERVATION
338 --  Type                    : Private
339 --  Function                : API to create/update/transfer the reservation for a particular requirement and serials combination.
340 --  Pre-reqs                :
341 --  Standard IN  Parameters :
342 --      p_api_version        IN            NUMBER            Required
343 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
344 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
345 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
346 --        p_module_type        IN            VARCHAR2        Default NULL
347 --  Standard OUT Parameters :
348 --      x_return_status        OUT        VARCHAR2            Required
349 --      x_msg_count            OUT        NUMBER                Required
350 --      x_msg_data            OUT        VARCHAR2            Required
351 --
352 --
353 --  PROCESS_RESERVATION Parameters:
354 --        p_rsv_rec                : The reservation record that needs to be created or updated.
355 --                                   Following parametes must be populated by the Caller before calling PROCESS_RESERVATION API :-
356 --                                   p_rsv_rec.demand_source_line_detail    := scheduled_material_id;
357 --                                   Other demand details will be populated from scheduled_material_id reference.
358 --                                   Assumption : Demand is always against a workorder requirement. i.e  <p_rsv_rec.demand_source_type_id := inv_reservation_global.g_source_type_wip>
359 --                                   p_rsv_rec.supply_source_type_id        := inv_reservation_global.g_source_type_inv/g_source_type_wip/g_source_type_internal_ord;
360 --                                   p_rsv_rec.supply_source_header_id      := null/<supply wip entity id>/<internal_order_id>/<internal_req_id>
361 --                                   p_rsv_rec.supply_source_line_id        := null/<supply workorder id>/null;
362 --                                   p_rsv_rec.supply_source_line_detail    := null/<supply schedule_material_id>
363 --                                   p_rsv_rec.primary_reservation_quantity := <quantity to be reserved>
364 --      p_serial_number_tbl     : Table containing serial numbers of item to be reserved.Inventory_item_id will be fetched from scheduled_material_id.
365 --                                This table is considered only when supply is from inventory.
366 --                                In case when Inventory is the supply, serilas should be present in RESERVABLE Subinventory.
367 --        x_to_reservation_id_tbl : The id(s) of the reservations, if created.
368 --  End of Comments.
369 ---------------------------------------------------------------------------------------------------------
370 PROCEDURE PROCESS_RESERVATION(
371     p_api_version             IN                    NUMBER      := 1.0,
372     p_init_msg_list           IN                    VARCHAR2    := FND_API.G_FALSE,
373     p_commit                  IN                    VARCHAR2    := FND_API.G_FALSE,
374     p_validation_level        IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
375     p_module_type             IN                    VARCHAR2,
376     x_return_status           OUT         NOCOPY    VARCHAR2,
377     x_msg_count               OUT         NOCOPY    NUMBER,
378     x_msg_data                OUT         NOCOPY    VARCHAR2,
379     p_rsv_rec                 IN                    mtl_reservation_rec_type,
380     p_serial_number_tbl       IN                    serial_number_tbl_type,
381     x_reservation_id_tbl      OUT         NOCOPY    number_table_type);
382 
383 
384 ---------------------------------------------------------------------------------------------------------
385 -- Declare Procedures --
386 ---------------------------------------------------------------------------------------------------------
387 -- Start of Comments --
388 --  Procedure name            : CANCEL_RESERVATION
389 --  Type                    : Private
390 --  Function                : API to relieve given serial numbers from their respective reservation.
391 --  Pre-reqs                :
392 --  Standard IN  Parameters :
393 --      p_api_version        IN            NUMBER            Required
394 --      p_init_msg_list        IN            VARCHAR2        Default FND_API.G_FALSE
395 --      p_commit            IN            VARCHAR2         Default FND_API.G_FALSE
396 --      p_validation_level    IN            NUMBER           Default FND_API.G_VALID_LEVEL_FULL
397 --        p_module_type        IN            VARCHAR2        Default NULL
398 --  Standard OUT Parameters :
399 --      x_return_status        OUT        VARCHAR2            Required
400 --      x_msg_count            OUT        NUMBER                Required
401 --      x_msg_data            OUT        VARCHAR2            Required
402 --
403 --
404 --  CANCEL_RESERVATION Parameters:
405 --      p_serial_number_tbl     : Table containing serial numbers of item to be relieve.
406 --      p_reservation_id_tbl    : Table containing corresponding Reservation_Ids.
407 --      NOTE:
408 --      p_serial_number_tbl(i).serial_number MUST belong to reservation_id populated in p_reservation_id_tbl(i)
409 --      If entire reservation needs to be deleted, leave corresponding p_serial_number_tbl(i) as NULL.
410 --      reservation_id is being asked, as same serial number may exist across orginazations.
411 --  End of Comments.
412 ---------------------------------------------------------------------------------------------------------
413 PROCEDURE CANCEL_RESERVATION(
414     p_api_version             IN                    NUMBER      := 1.0,
415     p_init_msg_list           IN                    VARCHAR2    := FND_API.G_FALSE,
416     p_commit                  IN                    VARCHAR2    := FND_API.G_FALSE,
417     p_validation_level        IN                    NUMBER      := FND_API.G_VALID_LEVEL_FULL,
418     p_module_type             IN                    VARCHAR2,
419     x_return_status           OUT         NOCOPY    VARCHAR2,
420     x_msg_count               OUT         NOCOPY    NUMBER,
421     x_msg_data                OUT         NOCOPY    VARCHAR2,
422     p_serial_number_tbl       IN                    serial_number_tbl_type,
423     p_reservation_id_tbl      IN                    number_table_type);
424 
425 
426 END AHL_MM_RESERVATIONS_PVT;