1 PACKAGE WMS_CONTAINER_PVT AS
2 /* $Header: WMSVCNTS.pls 120.7.12010000.1 2008/07/28 18:37:45 appldev ship $ */
3
4 /*----------------------------------------------------------------*
5 * Global constants representing all possible LPN context values
6 *----------------------------------------------------------------*/
7 -- Resides in Inventory
8 LPN_CONTEXT_INV CONSTANT NUMBER := 1;
9 -- Resides in WIP
10 LPN_CONTEXT_WIP CONSTANT NUMBER := 2;
11 -- Resides in Receiving
12 LPN_CONTEXT_RCV CONSTANT NUMBER := 3;
13 -- Issued out of Stores
14 LPN_CONTEXT_STORES CONSTANT NUMBER := 4;
15 -- Pre-generated
16 LPN_CONTEXT_PREGENERATED CONSTANT NUMBER := 5;
17 -- Resides in intransit
18 LPN_CONTEXT_INTRANSIT CONSTANT NUMBER := 6;
19 -- Resides at vendor site
20 LPN_CONTEXT_VENDOR CONSTANT NUMBER := 7;
21 -- Packing context, used as a temporary context value
22 -- when the user wants to reassociate the LPN with a
23 -- different license plate number and/or container item ID
24 LPN_CONTEXT_PACKING CONSTANT NUMBER := 8;
25 -- Loaded for shipment
26 LPN_LOADED_FOR_SHIPMENT CONSTANT NUMBER := 9;
27 -- Prepack of WIP
28 LPN_PREPACK_FOR_WIP CONSTANT NUMBER := 10;
29 -- LPN Picked
30 LPN_CONTEXT_PICKED CONSTANT NUMBER := 11;
31 -- Temporary context for staged (picked) LPNs
32 LPN_LOADED_IN_STAGE CONSTANT NUMBER := 12;
33
34 /*----------------------------------------------------------------*
35 * Data Types used by container pvt apis
36 *----------------------------------------------------------------*/
37 TYPE LPNBulkRecType is RECORD (
38 LPN_ID WMS_Data_Type_Definitions_PUB.NumberTableType
39 , LICENSE_PLATE_NUMBER WMS_Data_Type_Definitions_PUB.Varchar2_30_TableType
40 , PARENT_LPN_ID WMS_Data_Type_Definitions_PUB.NumberTableType
41 , OUTERMOST_LPN_ID WMS_Data_Type_Definitions_PUB.NumberTableType
42 , LPN_CONTEXT WMS_Data_Type_Definitions_PUB.NumberTableType
43
44 , ORGANIZATION_ID WMS_Data_Type_Definitions_PUB.NumberTableType
45 , SUBINVENTORY_CODE WMS_Data_Type_Definitions_PUB.Varchar2_10_TableType
46 , LOCATOR_ID WMS_Data_Type_Definitions_PUB.NumberTableType
47
48 , INVENTORY_ITEM_ID WMS_Data_Type_Definitions_PUB.NumberTableType
49 , REVISION WMS_Data_Type_Definitions_PUB.Varchar2_3_TableType
50 , LOT_NUMBER WMS_Data_Type_Definitions_PUB.Varchar2_30_TableType
51 , SERIAL_NUMBER WMS_Data_Type_Definitions_PUB.Varchar2_30_TableType
52 , COST_GROUP_ID WMS_Data_Type_Definitions_PUB.NumberTableType
53
54 , TARE_WEIGHT_UOM_CODE WMS_Data_Type_Definitions_PUB.Varchar2_3_TableType
55 , TARE_WEIGHT WMS_Data_Type_Definitions_PUB.NumberTableType
56 , GROSS_WEIGHT_UOM_CODE WMS_Data_Type_Definitions_PUB.Varchar2_3_TableType
57 , GROSS_WEIGHT WMS_Data_Type_Definitions_PUB.NumberTableType
58 , CONTAINER_VOLUME_UOM WMS_Data_Type_Definitions_PUB.Varchar2_3_TableType
59 , CONTAINER_VOLUME WMS_Data_Type_Definitions_PUB.NumberTableType
60 , CONTENT_VOLUME_UOM_CODE WMS_Data_Type_Definitions_PUB.Varchar2_3_TableType
61 , CONTENT_VOLUME WMS_Data_Type_Definitions_PUB.NumberTableType
62
63 , SOURCE_TYPE_ID WMS_Data_Type_Definitions_PUB.NumberTableType
64 , SOURCE_HEADER_ID WMS_Data_Type_Definitions_PUB.NumberTableType
65 , SOURCE_LINE_ID WMS_Data_Type_Definitions_PUB.NumberTableType
66 , SOURCE_LINE_DETAIL_ID WMS_Data_Type_Definitions_PUB.NumberTableType
67 , SOURCE_NAME WMS_Data_Type_Definitions_PUB.Varchar2_30_TableType
68 , SOURCE_TRANSACTION_ID WMS_Data_Type_Definitions_PUB.NumberTableType
69 , REFERENCE_ID WMS_Data_Type_Definitions_PUB.NumberTableType
70
71 , ATTRIBUTE_CATEGORY WMS_Data_Type_Definitions_PUB.Varchar2_30_TableType
72 , ATTRIBUTE1 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
73 , ATTRIBUTE2 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
74 , ATTRIBUTE3 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
75 , ATTRIBUTE4 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
76 , ATTRIBUTE5 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
77 , ATTRIBUTE6 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
78 , ATTRIBUTE7 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
79 , ATTRIBUTE8 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
80 , ATTRIBUTE9 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
81 , ATTRIBUTE10 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
82 , ATTRIBUTE11 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
83 , ATTRIBUTE12 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
84 , ATTRIBUTE13 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
85 , ATTRIBUTE14 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
86 , ATTRIBUTE15 WMS_Data_Type_Definitions_PUB.Varchar2_150_TableType
87 );
88
89 /*---------------------------------------------------------------------*/
90 -- Name
91 -- FUNCTION Convert_UOM
92 /*---------------------------------------------------------------------*/
93 -- Purpose
94 -- This api converts a quantity from UOM to another using a caching
95 -- mechanism to store uom conversions. This can be useful if many
96 -- conversions are done on the same item and uom pairs.
97 --
98 -- Cached conversions will be purged when table gets large
99 --
100 -- Not intended for general use
101 --
102 -- Input Parameters
103 -- p_inventory_item_id: Item id for item specific conversions
104 -- p_fm_quantity : Quantity to be converted into to uom
105 -- p_fm_uom :
106 -- p_to_uom :
107 -- p_mode : Used if user wishes a retun value different from the default
108 -- Default (null) - throw and exception with a message when no conversion is found
109 -- NO_CONV_RETURN_NULL - return null when no conversion is found
110 --
111 -- Returns:
112 -- quantity in p_to_uom
113 --
114
115 -- p_mode options
116 -- NO_CONV_RETURN_NULL ruturns null if no conversion can be found
117 -- NO_CONV_RETURN_NULL ruturns zero if no conversion can be found
118
119 G_NO_CONV_RETURN_NULL CONSTANT VARCHAR2(30) := 'NO_CONV_RETURN_NULL';
120 G_NO_CONV_RETURN_ZERO CONSTANT VARCHAR2(30) := 'NO_CONV_RETURN_ZERO';
121
122 FUNCTION Convert_UOM (
123 p_inventory_item_id IN NUMBER
124 , p_fm_quantity IN NUMBER
125 , p_fm_uom IN VARCHAR2
126 , p_to_uom IN VARCHAR2
127 , p_mode IN VARCHAR2 := null
128 ) RETURN NUMBER;
129
130 /*---------------------------------------------------------------------*/
131 -- Name
132 -- FUNCTION To_DeliveryDetailsRecType
133 /*---------------------------------------------------------------------*/
134 -- Purpose
135 -- This api takes in a LPN record type and translates it's attributes
136 -- into a shipping WMS_Data_Type_Definitions_PUB.LPNRecordType type for
137 -- use in their APIs
138 --
139 -- Not intended for general use
140 --
141 -- The API converts the following LPN attrubtues to the shipping rec type:
142 -- *lpn_id
143 -- *license_plate_number
144 -- *inventory_item_id
145 --
146 -- *organization_id
147 -- *subinventory_code
148 -- *locator_id
149 --
150 -- *tare_weight
151 -- *tare_weight_uom_code
152 -- *gross_weight
153 -- *gross_weight_uom_code
154 --
155 -- *container_volume
156 -- *container_volume_uom
157 -- *content_volume
158 -- *content_volume_uom_code
159 --
160 -- Input Parameters
161 -- p_lpn_record LPN rec type with values to be converted to WSH rec type
162 --
163 -- Returns:
164 -- WMS_Data_Type_Definitions_PUB.LPNRecordType with shipping field
165 -- values populated that correspond the above LPN attributes
166 --
167
168 FUNCTION To_DeliveryDetailsRecType (
169 p_lpn_record IN WMS_Data_Type_Definitions_PUB.LPNRecordType
170 )
171 RETURN WSH_Glbl_Var_Strct_GRP.Delivery_Details_Rec_Type;
172
173 /*---------------------------------------------------------------------*/
174 -- Name
175 -- PROCEDURE Create_LPNs
176 /*---------------------------------------------------------------------*/
177 -- Purpose
178 -- This api takes in a brand new container names (License Plate Numbers) and will
179 -- create an entry for it in the WMS_LICENSE_PLATE_NUMBERS table returning to the
180 -- caller a uniquely generated LPN_IDs for each
181 --
182 -- Caller should add each License Plate Number to the p_lpn_table and any attributes
183 -- valid attributes listed below.
184 --
185 -- The table will be returned with the p_lpn_table.lpn_id field populated for each
186 -- License Plate Number created in WMS_LICENSE_PLATE_NUMBERS
187 --
188 -- Input Parameters
189 -- p_api_version (required) API version number (current version is 1.0)
190 -- p_init_msg_list (required)
191 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
192 -- if set to FND_API.G_TRUE - initialize error message list
193 -- if set to FND_API.G_FALSE - not initialize error message list
194 -- p_commit (required) whether or not to commit the changes to database
195 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
196 -- p_caller (required) VARCHAR2 Code of calling API/Product/Flow
197 --
198 -- IN OUT Parameters
199 -- p_lpn_table Table of LPNs to be created The API will create LPN IDs for
200 -- each record in the table and insert them into WMS_License_Plate_Numbers
201 -- LPN record type is a generic LPN record type and not all attributes listed
202 -- are allowed while creating LPNs.
203 --
204 -- The Following is list of LPN record type fields that are used:
205 -- license_plate_number License Plate Number Identifier - Required Value
206 -- lpn_context LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
207 -- - Defaults to 5 (Pregenerated).
208 -- organization_id Organization Id - Required Value
209 -- subinventory Subinventory
210 -- locator_id Locator ID
211 -- inventory_item_id ID of Container Item
212 -- revision Container Item Revision
213 -- lot_number Container Item Lot Number
214 -- serial_number Container Item Serial Number
215 -- cost_group_id Container Item Cost Group Id
216 -- source_type_id Source type ID for the source transaction
217 -- source_header_id Source header ID for the source transaction
218 -- source_name Source name for the source transaction
219 -- source_line_id Source line ID for the source transaction
220 -- source_line_detail_id Source line detail ID for the source transaction
221 -- source_transaction_id The transaction identifier that created this LPN
222 -- used for LPN historical and auditing purposes
223 --
224 -- Output Parameters
225 -- x_return_status
226 -- if the Create_LPN API succeeds, the value is fnd_api.g_ret_sts_success;
227 -- if there is an expected error, the value is fnd_api.g_ret_sts_error;
228 -- if there is an unexpected error, the value is fnd_api.g_ret_sts_unexp_error;
229 -- x_msg_count
230 -- if there is one or more errors, the number of error messages in the buffer
231 -- x_msg_data
232 -- if there is one and only one error, the error message
233 --
234 PROCEDURE Create_LPNs (
235 p_api_version IN NUMBER
236 , p_init_msg_list IN VARCHAR2
237 , p_commit IN VARCHAR2
238 , x_return_status OUT NOCOPY VARCHAR2
239 , x_msg_count OUT NOCOPY NUMBER
240 , x_msg_data OUT NOCOPY VARCHAR2
241 , p_caller IN VARCHAR2
242 , p_lpn_table IN OUT NOCOPY WMS_Data_Type_Definitions_PUB.LPNTableType
243 );
244
245 /*---------------------------------------------------------------------*/
246 -- Name
247 -- PROCEDURE Auto_Create_LPNs
248 /*---------------------------------------------------------------------*/
249 -- Purpose
250 -- This api is used to mass generate LPN numbers, either individually or in a sequence
251 --
252 -- Input Parameters
253 -- p_api_version (required) API version number (current version is 1.0)
254 -- p_init_msg_list (required)
255 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
256 -- if set to FND_API.G_TRUE - initialize error message list
257 -- if set to FND_API.G_FALSE - not initialize error message list
258 -- p_commit (required) whether or not to commit the changes to database
259 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
260 -- p_caller (required) VARCHAR2 Code of calling API/Product/Flow
261 -- p_lpn_attributes Record of atrributes to be added to each LPN created aand inserted into
262 -- WMS_License_Plate_Numbers. LPN record type is a generic LPN record type
263 -- and not all attributes listed are allowed while creating LPNs.
264 --
265 -- The Following is list of LPN record type fields that are used:
266 -- lpn_context LPN Context
267 -- organization_id Organization Id
268 -- subinventory Subinventory
269 -- locator_id Locator Id
270 -- inventory_item_id ID of Container Item
271 -- revision Container Item Revision
272 -- lot_number Container Item Lot Number
273 -- serial_number Container Item Serial Number
274 -- cost_group_id Container Item Cost Group Id
275 -- source_type_id Source type ID for the source transaction
276 -- source_header_id Source header ID for the source transaction
277 -- source_name Source name for the source transaction
278 -- source_line_id Source line ID for the source transaction
279 -- source_line_detail_id Source line detail ID for the source transaction
280 -- source_transaction_id The transaction identifier that created this LPN
281 -- used for LPN historical and auditing purposes
282 --
283 -- p_serial_ranges If item is serial controlled, this table can be used to
284 -- determine the serials that should be assigned to the new LPNs
285 -- the quantity of serial numbers given will overide the quantity
286 -- given in the p_quantity parameter. Currently only a single serial
287 -- range is supported.
288 --
289 -- Output Parameters
290 -- x_return_status
291 -- if the Create_LPN API succeeds, the value is fnd_api.g_ret_sts_success;
292 -- if there is an expected error, the value is fnd_api.g_ret_sts_error;
293 -- if there is an unexpected error, the value is fnd_api.g_ret_sts_unexp_error;
294 -- x_msg_count
295 -- if there is one or more errors, the number of error messages in the buffer
296 -- x_msg_data
297 -- if there is one and only one error, the error message
298 -- x_created_lpns
299 -- table of LPN records which have been generated
300 --
301 PROCEDURE Auto_Create_LPNs (
302 p_api_version IN NUMBER
303 , p_init_msg_list IN VARCHAR2
304 , p_commit IN VARCHAR2
305 , x_return_status OUT NOCOPY VARCHAR2
306 , x_msg_count OUT NOCOPY NUMBER
307 , x_msg_data OUT NOCOPY VARCHAR2
308 , p_caller IN VARCHAR2
309 , p_quantity IN NUMBER
310 , p_lpn_prefix IN VARCHAR2
311 , p_lpn_suffix IN VARCHAR2
312 , p_starting_number IN NUMBER
313 , p_total_lpn_length IN NUMBER
314 , p_ucc_128_suffix_flag IN VARCHAR2
315 , p_lpn_attributes IN WMS_Data_Type_Definitions_PUB.LPNRecordType
316 , p_serial_ranges IN WMS_Data_Type_Definitions_PUB.SerialRangeTableType
317 , x_created_lpns OUT NOCOPY WMS_Data_Type_Definitions_PUB.LPNTableType
318 );
319
320 /*---------------------------------------------------------------------*/
321 -- Name
322 -- PROCEDURE Modify_LPNs
323 /*---------------------------------------------------------------------*/
324 -- Purpose
325 -- This api is used to mass generate LPN numbers, either individually or in a sequence
326 --
327 -- Input Parameters
328 -- p_api_version (required) API version number (current version is 1.0)
329 -- p_init_msg_list (required)
330 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
331 -- if set to FND_API.G_TRUE - initialize error message list
332 -- if set to FND_API.G_FALSE - not initialize error message list
333 -- p_commit (required) whether or not to commit the changes to database
334 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
335 -- p_caller (required) VARCHAR2 Code of calling API/Product/Flow
336 -- p_lpn_table Table of LPN records to be modified.
337 -- WMS_License_Plate_Numbers. LPN record type is a generic LPN record type
338 -- and not all attributes listed are allowed while creating LPNs.
339 --
340 -- The Following is list of LPN record type fields that are used:
341 -- lpn_id *required* to identify LPN to be updated. Cannot be modified.
342 -- lpn_context LPN Context
343 -- organization_id Organization Id - Required Value
344 -- subinventory Subinventory - Defaults to NULL
345 -- locator_id Locator Id - Defaults to NULL
346 -- inventory_item_id ID of Container Item
347 -- revision Container Item Revision
348 -- lot_number Container Item Lot Number
349 -- serial_number Container Item Serial Number
350 -- cost_group_id Container Item Cost Group Id
351 -- tare_weight_uom_code UOM of container weight
352 -- tare_weight weight of container item
353 -- gross_weight_uom_code UOM of content weight + container weight
354 -- gross_weight weight of contents + container weight
355 -- container_volume_uom UOM of container volume
356 -- container_volume volume of container item
357 -- content_volume_uom_code UOM of content volume
358 -- content_volume volume of LPN's contents
359 -- source_type_id Source type ID for the source transaction
360 -- source_header_id Source header ID for the source transaction
361 -- source_name Source name for the source transaction
362 -- source_line_id Source line ID for the source transaction
363 -- source_line_detail_id Source line detail ID for the source transaction
364 -- source_transaction_id The transaction identifier that created this LPN
365 -- used for LPN historical and auditing purposes
366 --
367 -- Output Parameters
368 -- x_return_status
369 -- if the Create_LPN API succeeds, the value is fnd_api.g_ret_sts_success;
370 -- if there is an expected error, the value is fnd_api.g_ret_sts_error;
371 -- if there is an unexpected error, the value is fnd_api.g_ret_sts_unexp_error;
372 -- x_msg_count
373 -- if there is one or more errors, the number of error messages in the buffer
374 -- x_msg_data
375 -- if there is one and only one error, the error message
376 --
377 PROCEDURE Modify_LPNs (
378 p_api_version IN NUMBER
379 , p_init_msg_list IN VARCHAR2
380 , p_commit IN VARCHAR2
381 , x_return_status OUT NOCOPY VARCHAR2
382 , x_msg_count OUT NOCOPY NUMBER
383 , x_msg_data OUT NOCOPY VARCHAR2
384 , p_caller IN VARCHAR2
385 , p_lpn_table IN WMS_Data_Type_Definitions_PUB.LPNTableType
386 );
387
388 /*---------------------------------------------------------------------*/
389 -- Name
390 -- PROCEDURE Generate_LPN_CP
391 /* --------------------------------------------------------------------*/
392 --
393 -- Purpose
394 -- Generate LPN numbers Concurrent Program.
395 --
396 -- Input Parameters
397 -- p_api_version
398 -- API version number (current version is 1.0)
399 -- p_init_msg_list (optional, default FND_API.G_FALSE)
400 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
401 -- if set to FND_API.G_TRUE
402 -- initialize error message list
403 -- if set to FND_API.G_FALSE - not initialize error
404 -- message list
405 -- p_commit (optional, default FND_API.G_FALSE)
406 -- whether or not to commit the changes to database
407 -- p_organization_id Organization Id - Required Value
408 -- p_container_item_id Container Item Id - Defaults to NULL
409 -- p_revision Revision - Defaults to NULL
410 -- p_lot_number Lot Number - Defaults to NULL
411 -- p_from_serial_number Starting Serial Number - Defaults to NULL
412 -- p_to_serial_number Ending Serial Number - Defaults to NULL
413 -- p_subinventory Subinventory - Defaults to NULL
414 -- p_locator_id Locator Id - Defaults to NULL
415 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
416 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
417 -- p_starting_num Starting Number of an LPN - Defaults to NULL
418 -- p_quantity No of LPNs to be generated - Default Value is 1
419 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
420 -- - Defaults to 1.
421 -- Indicates the source where the LPN is generated
422 -- p_cost_group_id Cost Group Id - Defaults to NULL
423 -- p_source_type_id Source type ID for the source transaction
424 -- p_source_header_id Source header ID for the source transaction
425 -- p_source_name Source name for the source transaction
426 -- p_source_line_id Source line ID for the source transaction
427 -- p_source_line_detail_id Source line detail ID for the source transaction
428 --
429 --
430 -- Output Parameters
431 --
432 -- p_lpn_id_out - Outputs the generated LPN ID
433 -- if only one LPN is requested to be generated
434 -- p_lpn_out - Outputs the generated license plate number
435 -- if only one LPN is requested to be generated
436 -- p_process_id - Process ID to identify the LPN's generated in the
437 -- table WMS_LPN_PROCESS_TEMP
438
439 PROCEDURE Generate_LPN_CP(
440 errbuf OUT NOCOPY VARCHAR2
441 , retcode OUT NOCOPY NUMBER
442 , p_api_version IN NUMBER
443 , p_organization_id IN NUMBER
444 , p_container_item_id IN NUMBER := NULL
445 , p_revision IN VARCHAR2 := NULL
446 , p_lot_number IN VARCHAR2 := NULL
447 , p_from_serial_number IN VARCHAR2 := NULL
448 , p_to_serial_number IN VARCHAR2 := NULL
449 , p_subinventory IN VARCHAR2 := NULL
450 , p_locator_id IN NUMBER := NULL
451 , p_org_parameters IN NUMBER := NULL
452 , p_parm_dummy_1 IN VARCHAR2 := NULL
453 , p_total_length IN NUMBER := NULL
454 , p_lpn_prefix IN VARCHAR2 := NULL
455 , p_starting_num IN NUMBER := NULL
456 , p_ucc_128_suffix_flag IN NUMBER := 2
457 , p_parm_dummy_2 IN VARCHAR2 := NULL
458 , p_lpn_suffix IN VARCHAR2 := NULL
459 , p_quantity IN NUMBER := 1
460 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
461 , p_cost_group_id IN NUMBER := NULL
462 );
463
464 /*---------------------------------------------------------------------*/
465 -- Name
466 -- PROCEDURE Generate_LPN
467 /* --------------------------------------------------------------------*/
468 --
469 -- Purpose
470 -- Generate LPN numbers, either individually or in a sequence.
471 --
472 -- Input Parameters
473 -- p_api_version
474 -- API version number (current version is 1.0)
475 -- p_init_msg_list (optional, default FND_API.G_FALSE)
476 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
477 -- if set to FND_API.G_TRUE
478 -- initialize error message list
479 -- if set to FND_API.G_FALSE - not initialize error
480 -- message list
481 -- p_commit (optional, default FND_API.G_FALSE)
482 -- whether or not to commit the changes to database
483 -- p_validation_level (optional), determines if full validation or
484 -- no validation will be performed
485 -- defaults to FND_API.G_VALID_LEVEL_FULL
486 -- FND_API.G_VALID_LEVEL_NONE is the other value
487 -- p_organization_id Organization Id - Required Value
488 -- p_container_item_id Container Item Id - Defaults to NULL
489 -- p_revision Revision - Defaults to NULL
490 -- p_lot_number Lot Number - Defaults to NULL
491 -- p_from_serial_number Starting Serial Number - Defaults to NULL
492 -- p_to_serial_number Ending Serial Number - Defaults to NULL
493 -- p_subinventory Subinventory - Defaults to NULL
494 -- p_locator_id Locator Id - Defaults to NULL
495 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
496 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
497 -- p_starting_num Starting Number of an LPN - Defaults to NULL
498 -- p_quantity No of LPNs to be generated - Default Value is 1
499 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
500 -- - Defaults to 5 (Pregenerated).
501 -- Indicates the source where the LPN is generated
502 -- p_cost_group_id Cost Group Id - Defaults to NULL
503 -- p_source_type_id Source type ID for the source transaction
504 -- p_source_header_id Source header ID for the source transaction
505 -- p_source_name Source name for the source transaction
506 -- p_source_line_id Source line ID for the source transaction
507 -- p_source_line_detail_id Source line detail ID for the source transaction
508 --
509 --
510 -- Output Parameters
511 -- x_return_status
512 -- if the Generate_LPN API succeeds, the value is
513 -- fnd_api.g_ret_sts_success;
514 -- if there is an expected error, the value is
515 -- fnd_api.g_ret_sts_error;
516 -- if there is an unexpected error, the value is
517 -- fnd_api.g_ret_sts_unexp_error;
518 -- x_msg_count
519 -- if there is one or more errors, the number of error messages
520 -- in the buffer
521 -- x_msg_data
522 -- if there is one and only one error, the error message
523 -- (See fnd_api package for more details about the above output parameters)
524 --
525 -- p_lpn_id_out - Outputs the generated LPN ID
526 -- if only one LPN is requested to be generated
527 -- p_lpn_out - Outputs the generated license plate number
528 -- if only one LPN is requested to be generated
529 -- p_process_id - Process ID to identify the LPN's generated in the
530 -- table WMS_LPN_PROCESS_TEMP
531
532 PROCEDURE Generate_LPN (
533 p_api_version IN NUMBER
534 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
535 , p_commit IN VARCHAR2 := fnd_api.g_false
536 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
537 , x_return_status OUT NOCOPY VARCHAR2
538 , x_msg_count OUT NOCOPY NUMBER
539 , x_msg_data OUT NOCOPY VARCHAR2
540 , p_organization_id IN NUMBER
541 , p_container_item_id IN NUMBER := NULL
542 , p_revision IN VARCHAR2 := NULL
543 , p_lot_number IN VARCHAR2 := NULL
544 , p_from_serial_number IN VARCHAR2 := NULL
545 , p_to_serial_number IN VARCHAR2 := NULL
546 , p_subinventory IN VARCHAR2 := NULL
547 , p_locator_id IN NUMBER := NULL
548 , p_lpn_prefix IN VARCHAR2 := NULL
549 , p_lpn_suffix IN VARCHAR2 := NULL
550 , p_starting_num IN NUMBER := NULL
551 , p_quantity IN NUMBER := 1
552 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
553 , p_cost_group_id IN NUMBER := NULL
554 , p_source_type_id IN NUMBER := NULL
555 , p_source_header_id IN NUMBER := NULL
556 , p_source_name IN VARCHAR2 := NULL
557 , p_source_line_id IN NUMBER := NULL
558 , p_source_line_detail_id IN NUMBER := NULL
559 , p_lpn_id_out OUT NOCOPY NUMBER
560 , p_lpn_out OUT NOCOPY VARCHAR2
561 , p_process_id OUT NOCOPY NUMBER
562 , p_total_length IN NUMBER := NULL
563 , p_ucc_128_suffix_flag IN NUMBER := 2 -- 1='Y', 2= 'N'
564 );
565
566 /*---------------------------------------------------------------------*/
567 -- Name
568 -- PROCEDURE Associate_LPN
569 /*---------------------------------------------------------------------*/
570 -- Purpose
571 -- Associate an LPN to a specific instance of a container
572 --
573 -- Input Parameters
574 -- p_api_version
575 -- API version number (current version is 1.0)
576 -- p_init_msg_list (optional, default FND_API.G_FALSE)
577 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
578 -- if set to FND_API.G_TRUE
579 -- initialize error message list
580 -- if set to FND_API.G_FALSE - not initialize error
581 -- message list
582 -- p_commit (optional, default FND_API.G_FALSE)
583 -- whether or not to commit the changes to database
584 -- p_validation_level (optional), determines if full validation or
585 -- no validation will be performed
586 -- defaults to FND_API.G_VALID_LEVEL_FULL
587 -- FND_API.G_VALID_LEVEL_NONE is the other value
588 -- p_lpn_id License Plate Number Identifier - Required Value
589 -- p_container_item_id Container Item Id - Required Value
590 -- p_lot_number Lot Number - Defaults to NULL
591 -- p_revision Revision - Defaults to NULL
592 -- p_serial_number Serial Number - Defaults to NULL
593 -- p_organization_id Organization Id - Required Value
594 -- p_subinventory Subinventory - Defaults to NULL
595 -- p_locator_id Locator Id - Defaults to NULL
596 -- p_cost_group_id Cost Group Id - Defaults to NULL
597 -- p_source_type_id Source type ID for the source transaction
598 -- p_source_header_id Source header ID for the source transaction
599 -- p_source_name Source name for the source transaction
600 -- p_source_line_id Source line ID for the source transaction
601 -- p_source_line_detail_id Source line detail ID for the source transaction
602 --
603 --
604 -- Output Parameters
605 -- x_return_status
606 -- if the Associate_LPN API succeeds, the value is
607 -- fnd_api.g_ret_sts_success;
608 -- if there is an expected error, the value is
609 -- fnd_api.g_ret_sts_error;
610 -- if there is an unexpected error, the value is
611 -- fnd_api.g_ret_sts_unexp_error;
612 -- x_msg_count
613 -- if there is one or more errors, the number of error messages
614 -- in the buffer
615 -- x_msg_data
616 -- if there is one and only one error, the error message
617
618 PROCEDURE Associate_LPN(
619 p_api_version IN NUMBER
620 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
621 , p_commit IN VARCHAR2 := fnd_api.g_false
622 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
623 , x_return_status OUT NOCOPY VARCHAR2
624 , x_msg_count OUT NOCOPY NUMBER
625 , x_msg_data OUT NOCOPY VARCHAR2
626 , p_lpn_id IN NUMBER
627 , p_container_item_id IN NUMBER
628 , p_lot_number IN VARCHAR2 := NULL
629 , p_revision IN VARCHAR2 := NULL
630 , p_serial_number IN VARCHAR2 := NULL
631 , p_organization_id IN NUMBER
632 , p_subinventory IN VARCHAR2 := NULL
633 , p_locator_id IN NUMBER := NULL
634 , p_cost_group_id IN NUMBER := NULL
635 , p_source_type_id IN NUMBER := NULL
636 , p_source_header_id IN NUMBER := NULL
637 , p_source_name IN VARCHAR2 := NULL
638 , p_source_line_id IN NUMBER := NULL
639 , p_source_line_detail_id IN NUMBER := NULL
640 );
641
642 /*---------------------------------------------------------------------*/
643 -- Name
644 -- PROCEDURE Create_LPN
645 /*---------------------------------------------------------------------*/
646 -- Purpose
647 -- Associate an LPN to a specific instance of a container in which
648 -- the LPN is already existing. It will create an associated LPN ID
649 -- and store the record in the WMS_LICENSE_PLATE_NUMBERS table
650 --
651 -- Input Parameters
652 -- p_api_version
653 -- API version number (current version is 1.0)
654 -- p_init_msg_list (optional, default FND_API.G_FALSE)
655 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
656 -- if set to FND_API.G_TRUE
657 -- initialize error message list
658 -- if set to FND_API.G_FALSE - not initialize error
659 -- message list
660 -- p_commit (optional, default FND_API.G_FALSE)
661 -- whether or not to commit the changes to database
662 -- p_validation_level (optional), determines if full validation or
663 -- no validation will be performed
664 -- defaults to FND_API.G_VALID_LEVEL_FULL
665 -- FND_API.G_VALID_LEVEL_NONE is the other value
666 -- p_lpn License Plate Number Identifier - Required Value
667 -- p_organization_id Organization Id - Required Value
668 -- p_container_item_id Container Item Id - Defaults to NULL
669 -- p_revision Revision - Defaults to NULL
670 -- p_lot_number Lot Number - Defaults to NULL
671 -- p_serial_number Serial Number - Defaults to NULL
672 -- p_subinventory Subinventory - Defaults to NULL
673 -- p_locator_id Locator Id - Defaults to NULL
674 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
675 -- - Defaults to 5 (Pregenerated).
676 -- p_cost_group_id Cost Group Id - Defaults to NULL
677 -- p_parent_lpn_id Parent LPN Id - Defaults to NULL
678 -- p_source_type_id Source type ID for the source transaction
679 -- p_source_header_id Source header ID for the source transaction
680 -- p_source_name Source name for the source transaction
681 -- p_source_line_id Source line ID for the source transaction
682 -- p_source_line_detail_id Source line detail ID for the source transaction
683 --
684 --
685 -- Output Parameters
686 -- x_return_status
687 -- if the Create_LPN API succeeds, the value is
688 -- fnd_api.g_ret_sts_success;
689 -- if there is an expected error, the value is
690 -- fnd_api.g_ret_sts_error;
691 -- if there is an unexpected error, the value is
692 -- fnd_api.g_ret_sts_unexp_error;
693 -- x_msg_count
694 -- if there is one or more errors, the number of error messages
695 -- in the buffer
696 -- x_msg_data
697 -- if there is one and only one error, the error message
698 -- x_lpn_id The LPN ID for the new LPN record entry
699 --
700
701 PROCEDURE Create_LPN (
702 p_api_version IN NUMBER
703 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
704 , p_commit IN VARCHAR2 := fnd_api.g_false
705 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
706 , x_return_status OUT NOCOPY VARCHAR2
707 , x_msg_count OUT NOCOPY NUMBER
708 , x_msg_data OUT NOCOPY VARCHAR2
709 , p_lpn IN VARCHAR2
710 , p_organization_id IN NUMBER
711 , p_container_item_id IN NUMBER := NULL
712 , p_lot_number IN VARCHAR2 := NULL
713 , p_revision IN VARCHAR2 := NULL
714 , p_serial_number IN VARCHAR2 := NULL
715 , p_subinventory IN VARCHAR2 := NULL
716 , p_locator_id IN NUMBER := NULL
717 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
718 , p_cost_group_id IN NUMBER := NULL
719 , p_parent_lpn_id IN NUMBER := NULL
720 , p_source_type_id IN NUMBER := NULL
721 , p_source_header_id IN NUMBER := NULL
722 , p_source_name IN VARCHAR2 := NULL
723 , p_source_line_id IN NUMBER := NULL
724 , p_source_line_detail_id IN NUMBER := NULL
725 , x_lpn_id OUT NOCOPY NUMBER
726 );
727
728 /*---------------------------------------------------------------------*/
729 -- Name
730 -- PROCEDURE Modify_LPN and Modify_LPN_Wrapper
731 /*---------------------------------------------------------------------*/
732 -- Purpose
733 -- Used to update the attributes of a specific container instance (LPN).
734 -- Modify_LPN_Wrapper just calls Modify_LPN but it doesn't take in a
735 -- record type as an input. This is used for the java calls to this
736 -- procedure in the mobile transactions.
737 -- Fields that can be modified include:
738 -- * all the gross weight and content volume related fields
739 -- * status_id, lpn_context, sealed_status
740 -- * org, sub, and loc information
741 -- * All of the extra Attribute related columns for future usages
742 --
743 -- Input Parameters
744 -- p_api_version
745 -- API version number (current version is 1.0)
746 -- p_init_msg_list (optional, default FND_API.G_FALSE)
747 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
748 -- if set to FND_API.G_TRUE
749 -- initialize error message list
750 -- if set to FND_API.G_FALSE - not initialize error
751 -- message list
752 -- p_commit (optional, default FND_API.G_FALSE)
753 -- whether or not to commit the changes to database
754 -- p_validation_level (optional), determines if full validation or
755 -- no validation will be performed
756 -- defaults to FND_API.G_VALID_LEVEL_FULL
757 -- FND_API.G_VALID_LEVEL_NONE is the other value
758 -- p_lpn WMS_LICENSE_PLATE_NUMBERS%ROWTYPE - Required Value
759 -- Stores the information for the fields of the LPN record that
760 -- the user desires to modify
761 -- p_source_type_id Source type ID for the source transaction
762 -- p_source_header_id Source header ID for the source transaction
763 -- p_source_name Source name for the source transaction
764 -- p_source_line_id Source line ID for the source transaction
765 -- p_source_line_detail_id Source line detail ID for the source transaction
766 --
767 --
768 -- Output Parameters
769 -- x_return_status
770 -- if the Modify_LPN API succeeds, the value is
771 -- fnd_api.g_ret_sts_success;
772 -- if there is an expected error, the value is
773 -- fnd_api.g_ret_sts_error;
774 -- if there is an unexpected error, the value is
775 -- fnd_api.g_ret_sts_unexp_error;
776 -- x_msg_count
777 -- if there is one or more errors, the number of error messages
778 -- in the buffer
779 -- x_msg_data
780 -- if there is one and only one error, the error message
781
782 PROCEDURE Modify_LPN (
783 p_api_version IN NUMBER
784 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
785 , p_commit IN VARCHAR2 := fnd_api.g_false
786 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
787 , x_return_status OUT NOCOPY VARCHAR2
788 , x_msg_count OUT NOCOPY NUMBER
789 , x_msg_data OUT NOCOPY VARCHAR2
790 , p_lpn IN WMS_CONTAINER_PUB.LPN
791 , p_caller IN VARCHAR2 := NULL
792 );
793
794 PROCEDURE Modify_LPN_Wrapper(
795 p_api_version IN NUMBER
796 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
797 , p_commit IN VARCHAR2 := fnd_api.g_false
798 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
799 , x_return_status OUT NOCOPY VARCHAR2
800 , x_msg_count OUT NOCOPY NUMBER
801 , x_msg_data OUT NOCOPY VARCHAR2
802 , p_lpn_id IN NUMBER
803 , p_license_plate_number IN VARCHAR2 := NULL
804 , p_inventory_item_id IN NUMBER := NULL
805 , p_weight_uom_code IN VARCHAR2 := NULL
806 , p_gross_weight IN NUMBER := NULL
807 , p_volume_uom_code IN VARCHAR2 := NULL
808 , p_content_volume IN NUMBER := NULL
809 , p_status_id IN NUMBER := NULL
810 , p_lpn_context IN NUMBER := NULL
811 , p_sealed_status IN NUMBER := NULL
812 , p_organization_id IN NUMBER := NULL
813 , p_subinventory IN VARCHAR := NULL
814 , p_locator_id IN NUMBER := NULL
815 , p_source_type_id IN NUMBER := NULL
816 , p_source_header_id IN NUMBER := NULL
817 , p_source_name IN VARCHAR2 := NULL
818 , p_source_line_id IN NUMBER := NULL
819 , p_source_line_detail_id IN NUMBER := NULL
820 , p_caller IN VARCHAR2 := NULL
821 );
822
823 -- Start of comments
824 -- API name : PackUnpack_Container
825 -- Type : Private
826 -- Function : Allows the caller to pack or unpack contents from a container instance or LPN.
827 -- This API does not update onhand, so should not be used directly for packing
828 -- items in inventory. For inventory packs the transaction manager should be used.
829 -- Pre-reqs : None.
830 -- Parameters:
831 -- IN :
832 -- p_api_version
833 -- API version number (current version is 1.0)
834 -- p_init_msg_list (optional, default FND_API.G_FALSE)
835 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
836 -- if set to FND_API.G_TRUE
837 -- initialize error message list
838 -- if set to FND_API.G_FALSE - not initialize error
839 -- message list
840 -- p_commit (optional, default FND_API.G_FALSE)
841 -- whether or not to commit the changes to database
842 -- p_validation_level (optional), determines if full validation or
843 -- no validation will be performed
844 -- defaults to FND_API.G_VALID_LEVEL_FULL
845 -- FND_API.G_VALID_LEVEL_NONE is the other value
846 -- p_lpn_id Parent License Plate Number Identifier - Required Value
847 -- p_content_lpn_id Content LPN ID
848 -- p_content_item_id Content Item ID - Defaults to NULL
849 -- p_content_item_desc Content Item Description - Defaults to NULL
850 -- p_revision Revision - Defaults to NULL
851 -- p_lot_number Lot Number - Defaults to NULL
852 -- p_from_serial_number Starting Serial Number - Defaults to NULL
853 -- p_to_serial_number Ending Serial Number - Defaults to NULL
854 -- p_quantity Content Quantity - Defaults to NULL
855 -- This value is not required if you are
856 -- packing or unpacking an LPN or if you are
857 -- packing or unpacking serialized items
858 -- p_uom Content Qty UOM - Defaults to NULL
859 -- p_organization_id Organization ID - Required Value
860 -- p_subinventory Subinventory - Defaults to NULL
861 -- Value is the source subinventory if pack,
862 -- destination subinventory if unpack operation
863 -- p_locator_id Locator Id - Defaults to NULL
864 -- Value is the source locator if pack,
865 -- destination locator if unpack operation
866 -- p_enforce_wv_constraints Weight and Volume Enforcement Flag
867 -- Defaults to 2 (= No), 1 = Yes
868 -- p_operation Type of opertaion, Pack/Unpack - Required Value
869 -- 1 = Pack : Add the quantity to the existing amount
870 -- 2 = Unpack : Subtract quantity from the existing amount
871 -- 3 = Adjust : Change quantity to the given amount
872 -- 4 = Unpack All: Unpack all contents and unnest all child lpns
873 -- p_cost_group_id Cost Group Id - Defaults to NULL
874 -- p_source_type_id Source type ID for the source transaction
875 -- p_source_header_id Source header ID for the source transaction
876 -- p_source_name Source name for the source transaction
877 -- p_source_line_id Source line ID for the source transaction
878 -- p_source_line_detail_id Source line detail ID for the source transaction
879 -- p_unpack_all Parameter signifying if all of the contents
880 -- in the LPN should be unpacked
881 -- 1 = Yes, 2 = No Defaults to 2 = No
882 -- p_auto_unnest_empty_lpns Parameter signifies if lpns that are empty after
883 -- unpacking should be unnested from it's parent LPN (if any)
884 -- and made defined but not used.
885 -- 1 = Yes, 2 = No Defaults to 1 = Yes
886 -- p_ignore_item_controls Parameter signifies for unpack operations, if this is set to
887 -- set to 1 (yes), unpacking will allow user to unpack from WLC
888 -- row with null lots even if a value is passed to p_lot_number
889 -- similarly, it will igonore errors if a serial within the passed
890 -- in serial range was not found within the lpn in MSN
891 -- 1 = Yes, 2 = No Defaults to 2 = No
892 -- OUT :
893 -- x_return_status
894 -- if the PackUnpack_Container API succeeds, the value is
895 -- fnd_api.g_ret_sts_success;
896 -- if there is an expected error, the value is
897 -- fnd_api.g_ret_sts_error;
898 -- if there is an unexpected error, the value is
899 -- fnd_api.g_ret_sts_unexp_error;
900 -- x_msg_count
901 -- if there is one or more errors, the number of error messages
902 -- in the buffer
903 -- x_msg_data
904 -- if there is one and only one error, the error message
905 -- Version : 1.0
906 -- End of comments
907
908 PROCEDURE PackUnpack_Container(
909 p_api_version IN NUMBER
910 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
911 , p_commit IN VARCHAR2 := fnd_api.g_false
912 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
913 , x_return_status OUT NOCOPY VARCHAR2
914 , x_msg_count OUT NOCOPY NUMBER
915 , x_msg_data OUT NOCOPY VARCHAR2
916 , p_lpn_id IN NUMBER
917 , p_content_lpn_id IN NUMBER := NULL
918 , p_content_item_id IN NUMBER := NULL
919 , p_content_item_desc IN VARCHAR2 := NULL
920 , p_revision IN VARCHAR2 := NULL
921 , p_lot_number IN VARCHAR2 := NULL
922 , p_from_serial_number IN VARCHAR2 := NULL
923 , p_to_serial_number IN VARCHAR2 := NULL
924 , p_quantity IN NUMBER := 1
925 , p_uom IN VARCHAR2 := NULL
926 , p_sec_quantity IN NUMBER := NULL -- INVCONV kkillams
927 , p_sec_uom IN VARCHAR2 := NULL -- INVCONV kkillams
928 , p_organization_id IN NUMBER
929 , p_subinventory IN VARCHAR2 := NULL
930 , p_locator_id IN NUMBER := NULL
931 , p_enforce_wv_constraints IN NUMBER := 2
932 , p_operation IN NUMBER
933 , p_cost_group_id IN NUMBER := NULL
934 , p_source_type_id IN NUMBER := NULL
935 , p_source_header_id IN NUMBER := NULL
936 , p_source_name IN VARCHAR2 := NULL
937 , p_source_line_id IN NUMBER := NULL
938 , p_source_line_detail_id IN NUMBER := NULL
939 , p_unpack_all IN NUMBER := 2
940 , p_auto_unnest_empty_lpns IN NUMBER := 1
941 , p_ignore_item_controls IN NUMBER := 2
942 , p_primary_quantity IN NUMBER := NULL
943 , p_caller IN VARCHAR2 := NULL
944 , p_source_transaction_id IN NUMBER := NULL
945 );
946
947 /*---------------------------------------------------------------------*/
948 -- Name
949 -- PROCEDURE Validate_Update_Wt_Volume
950 /*---------------------------------------------------------------------*/
951 -- Purpose
952 -- Calculates the gross weight and (occupied) volume of a
953 -- container, every time content is packed into or unpacked
954 -- from the container. Also validates that the
955 -- weight and volume capacity constraints are not
956 -- violated for a container or any of
957 -- its parent or nested containers.
958 --
959 -- Input Parameters
960 -- p_api_version
961 -- API version number (current version is 1.0)
962 -- p_init_msg_list (optional, default FND_API.G_FALSE)
963 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
964 -- if set to FND_API.G_TRUE
965 -- initialize error message list
966 -- if set to FND_API.G_FALSE - not initialize error
967 -- message list
968 -- p_commit (optional, default FND_API.G_FALSE)
969 -- whether or not to commit the changes to database
970 -- p_lpn_id License Plate Number Identifier - Required Value
971 -- p_content_lpn_id Content LPN Id - Defaults to NULL
972 -- p_content_item_id Content Item Id - Defaults to NULL
973 -- p_quantity Content Quantity - Defaults to NULL
974 -- p_uom Content Qty UOM - Defaults to NULL
975 -- p_organization_id Organization Id - Defaults to NULL
976 -- p_enforce_wv_constraints Weight and Volume Enforcement Flag - Defaults to 2 (= No)
977 -- p_operation Type of operation - Required Value
978 -- - Valid Values are 1. Pack 2.Unpack
979 -- p_action Action Type - Required Value
980 -- - Valid Values are
981 -- 1. Validate, 2. Update, 3. Validate and Update
982 -- Output Parameters
983 -- x_return_status
984 -- if the Validate_Update_Wt_Volume API succeeds, the value is
985 -- fnd_api.g_ret_sts_success;
986 -- if there is an expected error, the value is
987 -- fnd_api.g_ret_sts_error;
988 -- if there is an unexpected error, the value is
989 -- fnd_api.g_ret_sts_unexp_error;
990 -- x_msg_count
991 -- if there is one or more errors, the number of error messages
992 -- in the buffer
993 -- x_msg_data
994 -- if there is one and only one error, the error message
995 -- x_valid_operation
996 -- if the operation to be validated is valid, then this will have a value of 1.
997 -- otherwise the operation is invalid and this will have a value of 2.
998 --
999
1000 PROCEDURE Validate_Update_Wt_Volume(
1001 p_api_version IN NUMBER
1002 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1003 , p_commit IN VARCHAR2 := fnd_api.g_false
1004 , x_return_status OUT NOCOPY VARCHAR2
1005 , x_msg_count OUT NOCOPY NUMBER
1006 , x_msg_data OUT NOCOPY VARCHAR2
1007 , p_lpn_id IN NUMBER
1008 , p_content_lpn_id IN VARCHAR2 := NULL
1009 , p_content_item_id IN NUMBER := NULL
1010 , p_quantity IN NUMBER := NULL
1011 , p_uom IN VARCHAR2 := NULL
1012 , p_organization_id IN NUMBER := NULL
1013 , p_enforce_wv_constraints IN NUMBER := 2
1014 , p_operation IN NUMBER
1015 , p_action IN NUMBER
1016 , x_valid_operation OUT NOCOPY NUMBER
1017 );
1018
1019 /*---------------------------------------------------------------------*/
1020 -- Name
1021 -- PROCEDURE Container_Required_Qty
1022 /*---------------------------------------------------------------------*/
1023 -- Purpose
1024 -- Calculates the quantity of containers required to store
1025 -- (source) the inventory item or container specified.
1026 -- If the destination container given, it will be calculated for
1027 -- the given container item or it will be calculated as per the
1028 -- item/container relationship definitions.
1029 --
1030 -- Input Parameters
1031 -- p_api_version
1032 -- API version number (current version is 1.0)
1033 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1034 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1035 -- if set to FND_API.G_TRUE
1036 -- initialize error message list
1037 -- if set to FND_API.G_FALSE - not initialize error
1038 -- message list
1039 -- p_commit (optional, default FND_API.G_FALSE)
1040 -- whether or not to commit the changes to database
1041 -- p_source_item_id Source Item id (can also be a container Item) - Required Value
1042 -- p_source_qty Source Item Qty - Required Value
1043 -- p_source_qty_uom UOM of Source Item Qty - Required Value
1044 -- p_qty_per_container Qty per each container - Defaults to NULL
1045 -- p_qty_per_container_uom UOM of Qty per each container - Defaults to NULL
1046 -- p_organization_id Organization Id - Defaults to NULL
1047 -- p_dest_cont_item_id Destination container item id - IN OUT parameter
1048 --
1049 --
1050 -- Output Parameters
1051 -- x_return_status
1052 -- if the Container_Required_Qty API succeeds, the value is
1053 -- fnd_api.g_ret_sts_success;
1054 -- if there is an expected error, the value is
1055 -- fnd_api.g_ret_sts_error;
1056 -- if there is an unexpected error, the value is
1057 -- fnd_api.g_ret_sts_unexp_error;
1058 -- x_msg_count
1059 -- if there is one or more errors, the number of error messages
1060 -- in the buffer
1061 -- x_msg_data
1062 -- if there is one and only one error, the error message
1063 -- p_dest_cont_item_id Destination container item id - IN OUT parameter
1064 -- p_qty_required Required Container Quantity
1065
1066 PROCEDURE Container_Required_Qty(
1067 p_api_version IN NUMBER
1068 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1069 , p_commit IN VARCHAR2 := fnd_api.g_false
1070 , x_return_status OUT NOCOPY VARCHAR2
1071 , x_msg_count OUT NOCOPY NUMBER
1072 , x_msg_data OUT NOCOPY VARCHAR2
1073 , p_source_item_id IN NUMBER
1074 , p_source_qty IN NUMBER
1075 , p_source_qty_uom IN VARCHAR2
1076 , p_qty_per_cont IN NUMBER := NULL
1077 , p_qty_per_cont_uom IN VARCHAR2 := NULL
1078 , p_organization_id IN NUMBER
1079 , p_dest_cont_item_id IN OUT NOCOPY NUMBER
1080 , p_qty_required OUT NOCOPY NUMBER
1081 );
1082
1083 /*---------------------------------------------------------------------*/
1084 -- Name
1085 -- PROCEDURE Prepack_LPN_CP
1086 /*---------------------------------------------------------------------*/
1087 -- Purpose
1088 -- Allows the packing of items that are not yet in inventory. LPN's are
1089 -- pre-generated and associated with contents at the release of a WIP job.
1090 -- The LPN's generated will have a state of "Resides in WIP" so that their
1091 -- contents are not included in on hand inventory
1092 --
1093 --
1094 -- Input Parameters
1095 -- p_api_version
1096 -- API version number (current version is 1.0)
1097 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1098 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1099 -- if set to FND_API.G_TRUE
1100 -- initialize error message list
1101 -- if set to FND_API.G_FALSE - do not initialize error
1102 -- message list
1103 -- p_commit (optional, default FND_API.G_FALSE)
1104 -- whether or not to commit the changes to database
1105 -- p_organization_id Organization of the LPN - Required
1106 -- p_subinventory Subinventory - Defaults to NULL
1107 -- p_locator_id Locator Id - Defaults to NULL
1108 -- p_inventory_item_id Inventory ID number - Required
1109 -- p_revision Revision of the inventory item
1110 -- p_lot_number Lot number of the inventory item
1111 -- p_quantity Quantity of item to be prepacked - Required
1112 -- p_uom UOM of the quantity prepacked - Required
1113 -- p_source Source of information (WIP/REC)
1114 -- p_serial_number_from Starting serial number for inventory item
1115 -- p_serial_number_to Ending serial number for inventory item
1116 -- p_container_item_id Inventory item ID for a container item
1117 -- p_cont_revision Revision of the container item
1118 -- p_cont_lot_number Lot Number of the container item
1119 -- p_cont_serial_number_from From serial number of the container item
1120 -- p_cont_serial_number_to To serial number of the container item
1121 -- p_lpn_sealed_flag Flag to tell if LPN should be sealed or not
1122 -- p_print_label Should labels be printed afterwards
1123 -- p_print_content_report Should content reports be generated afterwards
1124 --
1125 --
1126 -- Output Parameters
1127 -- ERRBUF Concurrent program error buffer
1128 -- RETCODE Concurrent program return code
1129 -- x_return_status
1130 -- if the Prepack_LPN API succeeds, the value is
1131 -- fnd_api.g_ret_sts_success;
1132 -- if there is an expected error, the value is
1133 -- fnd_api.g_ret_sts_error;
1134 -- if there is an unexpected error, the value is
1135 -- fnd_api.g_ret_sts_unexp_error;
1136 -- x_msg_count
1137 -- if there is one or more errors, the number of error messages
1138 -- in the buffer
1139 -- x_msg_data
1140 -- if there is one and only one error, the error message
1141 --
1142
1143 PROCEDURE Prepack_LPN_CP(
1144 ERRBUF OUT NOCOPY VARCHAR2
1145 , RETCODE OUT NOCOPY NUMBER
1146 , p_api_version IN NUMBER
1147 , p_organization_id IN NUMBER
1148 , p_subinventory IN VARCHAR2 := NULL
1149 , p_locator_id IN NUMBER := NULL
1150 , p_inventory_item_id IN NUMBER
1151 , p_revision IN VARCHAR2 := NULL
1152 , p_lot_number IN VARCHAR2 := NULL
1153 , p_quantity IN NUMBER
1154 , p_uom IN VARCHAR2
1155 , p_source IN NUMBER
1156 , p_serial_number_from IN VARCHAR2 := NULL
1157 , p_serial_number_to IN VARCHAR2 := NULL
1158 , p_container_item_id IN NUMBER := NULL
1159 , p_cont_revision IN VARCHAR2 := NULL
1160 , p_cont_lot_number IN VARCHAR2 := NULL
1161 , p_cont_serial_number_from IN VARCHAR2 := NULL
1162 , p_cont_serial_number_to IN VARCHAR2 := NULL
1163 , p_lpn_sealed_flag IN NUMBER := NULL
1164 , p_print_label IN NUMBER := NULL
1165 , p_print_content_report IN NUMBER := NULL
1166 , p_packaging_level IN NUMBER := -1
1167 , p_sec_quantity IN NUMBER := NULL --INVCONV kkillams
1168 , p_sec_uom IN VARCHAR2 := NULL --INVCONV kkillams
1169 );
1170
1171 /*---------------------------------------------------------------------*/
1172 -- Name
1173 -- PROCEDURE Prepack_LPN
1174 /*---------------------------------------------------------------------*/
1175 -- Purpose
1176 -- Allows the packing of items that are not yet in inventory. LPN's are
1177 -- pre-generated and associated with contents at the release of a WIP job.
1178 -- The LPN's generated will have a state of "Resides in WIP" so that their
1179 -- contents are not included in on hand inventory
1180 --
1181 --
1182 -- Input Parameters
1183 -- p_api_version
1184 -- API version number (current version is 1.0)
1185 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1186 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1187 -- if set to FND_API.G_TRUE
1188 -- initialize error message list
1189 -- if set to FND_API.G_FALSE - do not initialize error
1190 -- message list
1191 -- p_commit (optional, default FND_API.G_FALSE)
1192 -- whether or not to commit the changes to database
1193 -- p_organization_id Organization of the LPN - Required
1194 -- p_subinventory Subinventory - Defaults to NULL
1195 -- p_locator_id Locator Id - Defaults to NULL
1196 -- p_inventory_item_id Inventory ID number - Required
1197 -- p_revision Revision of the inventory item
1198 -- p_lot_number Lot number of the inventory item
1199 -- p_quantity Quantity of item to be prepacked - Required
1200 -- p_uom UOM of the quantity prepacked - Required
1201 -- p_source Source of information (WIP/REC)
1202 -- p_serial_number_from Starting serial number for inventory item
1203 -- p_serial_number_to Ending serial number for inventory item
1204 -- p_container_item_id Inventory item ID for a container item
1205 -- p_cont_revision Revision of the container item
1206 -- p_cont_lot_number Lot Number of the container item
1207 -- p_cont_serial_number_from From serial number of the container item
1208 -- p_cont_serial_number_to To serial number of the container item
1209 -- p_lpn_sealed_flag Flag to tell if LPN should be sealed or not
1210 -- p_print_label Should labels be printed afterwards
1211 -- p_print_content_report Should content reports be generated afterwards
1212 --
1213 --
1214 -- Output Parameters
1215 -- x_return_status
1216 -- if the Prepack_LPN API succeeds, the value is
1217 -- fnd_api.g_ret_sts_success;
1218 -- if there is an expected error, the value is
1219 -- fnd_api.g_ret_sts_error;
1220 -- if there is an unexpected error, the value is
1221 -- fnd_api.g_ret_sts_unexp_error;
1222 -- x_msg_count
1223 -- if there is one or more errors, the number of error messages
1224 -- in the buffer
1225 -- x_msg_data
1226 -- if there is one and only one error, the error message
1227 --
1228
1229 PROCEDURE Prepack_LPN(
1230 p_api_version IN NUMBER
1231 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1232 , p_commit IN VARCHAR2 := fnd_api.g_false
1233 , x_return_status OUT NOCOPY VARCHAR2
1234 , x_msg_count OUT NOCOPY NUMBER
1235 , x_msg_data OUT NOCOPY VARCHAR2
1236 , p_organization_id IN NUMBER
1237 , p_subinventory IN VARCHAR2 := NULL
1238 , p_locator_id IN NUMBER := NULL
1239 , p_inventory_item_id IN NUMBER
1240 , p_revision IN VARCHAR2 := NULL
1241 , p_lot_number IN VARCHAR2 := NULL
1242 , p_quantity IN NUMBER
1243 , p_uom IN VARCHAR2
1244 , p_source IN NUMBER
1245 , p_serial_number_from IN VARCHAR2 := NULL
1246 , p_serial_number_to IN VARCHAR2 := NULL
1247 , p_container_item_id IN NUMBER := NULL
1248 , p_cont_revision IN VARCHAR2 := NULL
1249 , p_cont_lot_number IN VARCHAR2 := NULL
1250 , p_cont_serial_number_from IN VARCHAR2 := NULL
1251 , p_cont_serial_number_to IN VARCHAR2 := NULL
1252 , p_lpn_sealed_flag IN NUMBER := NULL
1253 , p_print_label IN NUMBER := NULL
1254 , p_print_content_report IN NUMBER := NULL
1255 , p_packaging_level IN NUMBER := -1
1256 , p_sec_quantity IN NUMBER := NULL --INVCONV kkillams
1257 , p_sec_uom IN VARCHAR2 := NULL --INVCONV kkillams
1258 );
1259
1260 -- Start of comments
1261 -- API name : Pack_Prepack_Container
1262 -- Type : Private
1263 -- Function : Allows the caller to define the lot and serials of of the items that were originally
1264 -- prepacked
1265 -- Pre-reqs : None.
1266 -- Parameters:
1267 -- IN :
1268 -- p_api_version
1269 -- API version number (current version is 1.0)
1270 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1271 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1272 -- if set to FND_API.G_TRUE
1273 -- initialize error message list
1274 -- if set to FND_API.G_FALSE - not initialize error
1275 -- message list
1276 -- p_commit (optional, default FND_API.G_FALSE)
1277 -- whether or not to commit the changes to database
1278 -- p_validation_level (optional), determines if full validation or
1279 -- no validation will be performed
1280 -- defaults to FND_API.G_VALID_LEVEL_FULL
1281 -- FND_API.G_VALID_LEVEL_NONE is the other value
1282 -- p_lpn_id Parent License Plate Number Identifier - Required Value
1283 -- p_content_item_id Content Item ID - Defaults to NULL
1284 -- p_revision Revision - Defaults to NULL
1285 -- p_lot_number Lot Number - Defaults to NULL
1286 -- p_from_serial_number Starting Serial Number - Defaults to NULL
1287 -- p_to_serial_number Ending Serial Number - Defaults to NULL
1288 -- p_quantity Content Quantity - Defaults to NULL
1289 -- p_uom Content Qty UOM - Defaults to NULL
1290 -- p_organization_id Organization ID - Required Value
1291 -- p_operation Type of opertaion, Pack/Unpack - Required Value
1292 -- 1 = Pack, 2 = Unpack
1293 -- p_source_type_id Source type ID for the source transaction
1294 -- OUT :
1295 -- x_return_status
1296 -- if the PackUnpack_Container API succeeds, the value is
1297 -- fnd_api.g_ret_sts_success;
1298 -- if there is an expected error, the value is
1299 -- fnd_api.g_ret_sts_error;
1300 -- if there is an unexpected error, the value is
1301 -- fnd_api.g_ret_sts_unexp_error;
1302 -- x_msg_count
1303 -- if there is one or more errors, the number of error messages
1304 -- in the buffer
1305 -- x_msg_data
1306 -- if there is one and only one error, the error message
1307 -- Version : 1.0
1308 -- End of comments
1309
1310 PROCEDURE Pack_Prepack_Container(
1311 p_api_version IN NUMBER
1312 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1313 , p_commit IN VARCHAR2 := fnd_api.g_false
1314 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1315 , x_return_status OUT NOCOPY VARCHAR2
1316 , x_msg_count OUT NOCOPY NUMBER
1317 , x_msg_data OUT NOCOPY VARCHAR2
1318 , p_lpn_id IN NUMBER
1319 , p_content_item_id IN NUMBER := NULL
1320 , p_revision IN VARCHAR2 := NULL
1321 , p_lot_number IN VARCHAR2 := NULL
1322 , p_from_serial_number IN VARCHAR2 := NULL
1323 , p_to_serial_number IN VARCHAR2 := NULL
1324 , p_quantity IN NUMBER := 1
1325 , p_uom IN VARCHAR2 := NULL
1326 , p_organization_id IN NUMBER
1327 , p_operation IN NUMBER
1328 , p_source_type_id IN NUMBER := NULL
1329 );
1330
1331 -- Start of comments
1332 -- API name : Explode_LPN
1333 -- Type : Private
1334 -- Function : API returns a PL/SQL table of a containers contents.
1335 -- User will pass in the LPN of
1336 -- the container to be exploded and the level to explode to.
1337 -- Pre-reqs : None.
1338 -- Parameters:
1339 -- IN :
1340 -- p_api_version
1341 -- API version number (current version is 1.0)
1342 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1343 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1344 -- if set to FND_API.G_TRUE
1345 -- initialize error message list
1346 -- if set to FND_API.G_FALSE - not initialize error
1347 -- message list
1348 -- p_commit (optional, default FND_API.G_FALSE)
1349 -- whether or not to commit the changes to database
1350 -- p_lpn_id License Plate Number Identifier - Required Value
1351 -- p_explosion_level Explosion Level - Defaults to 0 (Explode to all levels)
1352 --
1353 -- OUT :
1354 -- x_return_status
1355 -- if the Explode_LPN API succeeds, the value is
1356 -- fnd_api.g_ret_sts_success;
1357 -- if there is an expected error, the value is
1358 -- fnd_api.g_ret_sts_error;
1359 -- if there is an unexpected error, the value is
1360 -- fnd_api.g_ret_sts_unexp_error;
1361 -- x_msg_count
1362 -- if there is one or more errors, the number of error messages
1363 -- in the buffer
1364 -- x_msg_data
1365 -- if there is one and only one error, the error message
1366 -- Version : 1.0
1367 -- End of comments
1368
1369 PROCEDURE Explode_LPN (
1370 p_api_version IN NUMBER
1371 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1372 , p_commit IN VARCHAR2 := fnd_api.g_false
1373 , x_return_status OUT NOCOPY VARCHAR2
1374 , x_msg_count OUT NOCOPY NUMBER
1375 , x_msg_data OUT NOCOPY VARCHAR2
1376 , p_lpn_id IN NUMBER
1377 , p_explosion_level IN NUMBER := 0
1378 , x_content_tbl OUT NOCOPY WMS_CONTAINER_PUB.WMS_Container_Tbl_Type
1379 );
1380
1381 /*---------------------------------------------------------------------*/
1382 -- Name
1383 -- FUNCTION Validate_LPN
1384 /*---------------------------------------------------------------------*/
1385 -- Purpose
1386 -- This Function returns a row of WMS_Licese_Plate_Numbers entity
1387 --
1388 -- Input Parameters
1389 -- p_lpn License_Plate_Number entity Row type variable
1390 -- Output Value - 1. Success 0. Failure
1391 -- Version : 1.0
1392 -- End of comments
1393
1394 -- Constant Return Values for Validation APIs
1395 T CONSTANT NUMBER := 1;
1396 F CONSTANT NUMBER := 0;
1397
1398 FUNCTION Validate_LPN (
1399 p_lpn IN OUT NOCOPY WMS_CONTAINER_PUB.LPN
1400 , p_lock IN NUMBER := 2
1401 ) RETURN NUMBER;
1402
1403
1404 -- Constant validation types supported buy Validate_LPN
1405 -- G_RECONFIGURE_LPN will validate the existance of given lpn
1406 -- Validatoin will pass if there are no pending transactions in MMTT
1407 -- or reservations for this lpn or any of it's child LPNs
1408 G_RECONFIGURE_LPN CONSTANT VARCHAR2(30) := 'Reconfigure_LPN';
1409
1410 -- G_NO_ONHAND_EXISTS will validate the existance of contents given lpn
1411 -- Validatoin will pass if there are no onhand quantity in
1412 -- MTL_ONHAND_QUANTITIES_DETIAL or MTL_SERIAL_NUMBERS
1413 -- associated to this lpn
1414 G_NO_ONHAND_EXISTS CONSTANT VARCHAR2(30) := 'No_Onhand_Exists';
1415
1416 -- Start of comments
1417 -- API name: Validate_LPN
1418 -- Type : Private
1419 -- Pre-reqs: None.
1420 -- Function: Returns 1 if the lpn is valid for the given type
1421 -- 0 otherwise
1422 -- Parameters:
1423 -- IN: p_organization_id IN NUMBER Required
1424 -- Item organization id. Part of the unique key
1425 -- that uniquely identifies an item record.
1426 -- p_lpn_id IN NUMBER Required
1427 -- Corresponds to the column lpn_id of the LPN to validate
1428 -- p_validation_type IN VARCHAR2 Required
1429 -- The UOM in which secondary quantity should be calculated from
1430 -- If no UOM is passes, API will use the primary UOM
1431 -- Version : Current version 1.0
1432 -- End of comments
1433
1434 FUNCTION Validate_LPN (
1435 p_organization_id IN NUMBER
1436 , p_lpn_id IN NUMBER
1437 , p_validation_type IN VARCHAR2
1438 ) RETURN NUMBER;
1439
1440 -- Start of comments
1441 -- API name: Merge_Up_LPN
1442 -- Type : Private
1443 -- Pre-reqs: None.
1444 -- Function: Creates and executes transactions in MTL_MATERIAL_TRANSACTIONS_TEMP
1445 -- to consolidate contents of a nested LPN structure into the outermost
1446 -- LPN
1447 -- Example: Before Merge Up
1448 --
1449 -- Item A Qty 3 Item A Qty 2
1450 -- Item B Qty 4 Item C Qty 5
1451 -- -------------- Item C Qty 2 --------------
1452 -- LPN3 Item D Qty 3 LPN2
1453 -- ----------------------------------------------
1454 -- LPN 1
1455 -- After Merge Up
1456 --
1457 -- Item A Qty 5
1458 -- Item B Qty 4
1459 -- Item C Qty 7
1460 -- Item D Qty 3 Empty Empty
1461 -- -------------- -------------- --------------
1462 -- LPN 1 LPN 2 LPN 3
1463 -- Parameters:
1464 -- IN: p_organization_id IN NUMBER Required
1465 -- LPN organization id. Part of the unique key
1466 -- that uniquely identifies an LPN record.
1467 -- p_outermost_lpn_id IN NUMBER Required
1468 -- Corresponds to the column lpn_id of the LPN to validate
1469 -- This LPN must be the outermost LPN, i.e. cannot have any
1470 -- parent LPN (nested)
1471 -- Version : Current version 1.0
1472 -- End of comments
1473
1474 PROCEDURE Merge_Up_LPN (
1475 p_api_version IN NUMBER
1476 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1477 , p_commit IN VARCHAR2 := fnd_api.g_false
1478 , x_return_status OUT NOCOPY VARCHAR2
1479 , x_msg_count OUT NOCOPY NUMBER
1480 , x_msg_data OUT NOCOPY VARCHAR2
1481 , p_organization_id IN NUMBER
1482 , p_outermost_lpn_id IN NUMBER
1483 );
1484
1485 -- Start of comments
1486 -- API name: Break_Down_LPN
1487 -- Type : Private
1488 -- Pre-reqs: None.
1489 -- Function: Creates and executes transactions in MTL_MATERIAL_TRANSACTIONS_TEMP
1490 -- to unnest LPN structure but leaving all contents in their original
1491 -- LPNs
1492 -- Example: Before Break Down
1493 --
1494 -- Item A Qty 3 Item A Qty 2
1495 -- Item B Qty 4 Item C Qty 5
1496 -- -------------- Item C Qty 2 --------------
1497 -- LPN3 Item D Qty 3 LPN2
1498 -- ----------------------------------------------
1499 -- LPN 1
1500 -- After Break Down
1501 --
1502 -- Item C Qty 2 Item A Qty 2 Item A Qty 3
1503 -- Item D Qty 3 Item C Qty 5 Item B Qty 4
1504 -- -------------- -------------- --------------
1505 -- LPN 1 LPN 2 LPN 3
1506 -- Parameters:
1507 -- IN: p_organization_id IN NUMBER Required
1508 -- LPN organization id. Part of the unique key
1509 -- that uniquely identifies an LPN record.
1510 -- p_outermost_lpn_id IN NUMBER Required
1511 -- Corresponds to the column lpn_id of the LPN to validate
1512 -- This LPN must be the outermost LPN, i.e. cannot have any
1513 -- parent LPN (nested)
1514 -- Version : Current version 1.0
1515 -- End of comments
1516
1517 PROCEDURE Break_Down_LPN (
1518 p_api_version IN NUMBER
1519 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1520 , p_commit IN VARCHAR2 := fnd_api.g_false
1521 , x_return_status OUT NOCOPY VARCHAR2
1522 , x_msg_count OUT NOCOPY NUMBER
1523 , x_msg_data OUT NOCOPY VARCHAR2
1524 , p_organization_id IN NUMBER
1525 , p_outermost_lpn_id IN NUMBER
1526 );
1527
1528 -- Start of comments
1529 -- API name: Initialize_LPN
1530 -- Type : Private
1531 -- Pre-reqs: None.
1532 -- Function: Clears LPN of all contents and resets LPN to defined but not used
1533 -- (pregenerated) status, clearing subinventory and location information.
1534 -- If LPN is nested, all nested lpns will also be initialized
1535 -- API will only remove information from
1536 -- Parameters:
1537 -- IN: p_organization_id IN NUMBER Required
1538 -- LPN organization id. Part of the unique key
1539 -- that uniquely identifies an LPN record.
1540 -- p_outermost_lpn_id IN NUMBER Required
1541 -- Corresponds to the column lpn_id of the LPN to Initialize
1542 -- This LPN must be the outermost LPN, i.e. cannot have any
1543 -- parent LPN (nested)
1544 -- Version : Current version 1.0
1545 -- End of comments
1546
1547 PROCEDURE Initialize_LPN (
1548 p_api_version IN NUMBER
1549 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1550 , p_commit IN VARCHAR2 := fnd_api.g_false
1551 , x_return_status OUT NOCOPY VARCHAR2
1552 , x_msg_count OUT NOCOPY NUMBER
1553 , x_msg_data OUT NOCOPY VARCHAR2
1554 , p_organization_id IN NUMBER
1555 , p_outermost_lpn_id IN NUMBER
1556 );
1557
1558 /*---------------------------------------------------------------------*/
1559 -- Name
1560 -- PROCEDURE plan_delivery
1561 /*---------------------------------------------------------------------*/
1562 -- Purpose
1563 -- Informs shipping at the time of a packing operation to inform shipping
1564 -- of the packing event.
1565 --
1566 -- Input Parameters
1567 -- p_lpn_id The LPN which is being split or consolidated.
1568 -- Output Parameters
1569 -- x_return_status
1570 -- if the plan_delivery API succeeds, the value is
1571 -- fnd_api.g_ret_sts_success;
1572 -- if there is an expected error, the value is
1573 -- fnd_api.g_ret_sts_error;
1574 -- if there is an unexpected error, the value is
1575 -- fnd_api.g_ret_sts_unexp_error;
1576 -- x_msg_count
1577 -- if there is one or more errors, the number of error messages
1578 -- in the buffer
1579 -- x_msg_data
1580 -- if there is one and only one error, the error message
1581 --
1582 PROCEDURE plan_delivery(p_lpn_id IN NUMBER,
1583 x_return_status OUT nocopy VARCHAR2,
1584 x_msg_data OUT nocopy VARCHAR2,
1585 x_msg_count OUT nocopy NUMBER);
1586
1587 END WMS_CONTAINER_PVT;