4 /*----------------------------------------------------------------*
1 PACKAGE WMS_CONTAINER_PVT AUTHID CURRENT_USER AS
2 /* $Header: WMSVCNTS.pls 120.8.12020000.2 2013/03/19 13:36:37 ssrikaku ship $ */
3
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
13 -- Issued out of Stores
10 LPN_CONTEXT_WIP CONSTANT NUMBER := 2;
11 -- Resides in Receiving
12 LPN_CONTEXT_RCV CONSTANT NUMBER := 3;
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';
123 p_inventory_item_id IN NUMBER
120 G_NO_CONV_RETURN_ZERO CONSTANT VARCHAR2(30) := 'NO_CONV_RETURN_ZERO';
121
122 FUNCTION Convert_UOM (
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
135 -- This api takes in a LPN record type and translates it's attributes
132 -- FUNCTION To_DeliveryDetailsRecType
133 /*---------------------------------------------------------------------*/
134 -- Purpose
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
229 -- x_msg_count
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;
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
274 -- cost_group_id Container Item Cost Group Id
271 -- revision Container Item Revision
272 -- lot_number Container Item Lot Number
273 -- serial_number Container Item Serial Number
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 ------------------------
322 -- Added for LSP Project, bug 9087971
323 ------------------------
324 /*---------------------------------------------------------------------*/
325 -- Name
326 -- PROCEDURE Auto_Create_LPNs
327 /*---------------------------------------------------------------------*/
328 -- Purpose
329 -- This api is used to mass generate LPN numbers, either individually or in a sequence
330 -- This is overloaded by adding the additional paramater as p_client_code for LSP Project
331 --
332 -- Input Parameters
333 -- p_api_version (required) API version number (current version is 1.0)
334 -- p_init_msg_list (required)
335 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
336 -- if set to FND_API.G_TRUE - initialize error message list
337 -- if set to FND_API.G_FALSE - not initialize error message list
338 -- p_commit (required) whether or not to commit the changes to database
339 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
340 -- p_caller (required) VARCHAR2 Code of calling API/Product/Flow
341 -- p_lpn_attributes Record of atrributes to be added to each LPN created aand inserted into
342 -- WMS_License_Plate_Numbers. LPN record type is a generic LPN record type
343 -- and not all attributes listed are allowed while creating LPNs.
344 -- p_client_code Client Code of the item
345 --
346 -- The Following is list of LPN record type fields that are used:
347 -- lpn_context LPN Context
348 -- organization_id Organization Id
349 -- subinventory Subinventory
350 -- locator_id Locator Id
351 -- inventory_item_id ID of Container Item
352 -- revision Container Item Revision
353 -- lot_number Container Item Lot Number
354 -- serial_number Container Item Serial Number
355 -- cost_group_id Container Item Cost Group Id
356 -- source_type_id Source type ID for the source transaction
357 -- source_header_id Source header ID for the source transaction
358 -- source_name Source name for the source transaction
359 -- source_line_id Source line ID for the source transaction
360 -- source_line_detail_id Source line detail ID for the source transaction
364 -- p_serial_ranges If item is serial controlled, this table can be used to
361 -- source_transaction_id The transaction identifier that created this LPN
362 -- used for LPN historical and auditing purposes
363 --
365 -- determine the serials that should be assigned to the new LPNs
366 -- the quantity of serial numbers given will overide the quantity
367 -- given in the p_quantity parameter. Currently only a single serial
368 -- range is supported.
369 --
370 -- Output Parameters
371 -- x_return_status
372 -- if the Create_LPN API succeeds, the value is fnd_api.g_ret_sts_success;
373 -- if there is an expected error, the value is fnd_api.g_ret_sts_error;
374 -- if there is an unexpected error, the value is fnd_api.g_ret_sts_unexp_error;
375 -- x_msg_count
376 -- if there is one or more errors, the number of error messages in the buffer
377 -- x_msg_data
378 -- if there is one and only one error, the error message
379 -- x_created_lpns
380 -- table of LPN records which have been generated
381 --
382 PROCEDURE Auto_Create_LPNs (
383 p_api_version IN NUMBER
384 , p_init_msg_list IN VARCHAR2
385 , p_commit IN VARCHAR2
386 , x_return_status OUT NOCOPY VARCHAR2
387 , x_msg_count OUT NOCOPY NUMBER
388 , x_msg_data OUT NOCOPY VARCHAR2
389 , p_caller IN VARCHAR2
390 , p_quantity IN NUMBER
391 , p_lpn_prefix IN VARCHAR2
392 , p_lpn_suffix IN VARCHAR2
393 , p_starting_number IN NUMBER
394 , p_total_lpn_length IN NUMBER
395 , p_ucc_128_suffix_flag IN VARCHAR2
399 , p_client_code IN VARCHAR2 -- Adding for LSP, bug 9087971
396 , p_lpn_attributes IN WMS_Data_Type_Definitions_PUB.LPNRecordType
397 , p_serial_ranges IN WMS_Data_Type_Definitions_PUB.SerialRangeTableType
398 , x_created_lpns OUT NOCOPY WMS_Data_Type_Definitions_PUB.LPNTableType
400 );
401
402
403 /*---------------------------------------------------------------------*/
404 -- Name
405 -- PROCEDURE Modify_LPNs
406 /*---------------------------------------------------------------------*/
407 -- Purpose
408 -- This api is used to mass generate LPN numbers, either individually or in a sequence
409 --
410 -- Input Parameters
411 -- p_api_version (required) API version number (current version is 1.0)
412 -- p_init_msg_list (required)
413 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
414 -- if set to FND_API.G_TRUE - initialize error message list
415 -- if set to FND_API.G_FALSE - not initialize error message list
416 -- p_commit (required) whether or not to commit the changes to database
417 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE
418 -- p_caller (required) VARCHAR2 Code of calling API/Product/Flow
419 -- p_lpn_table Table of LPN records to be modified.
420 -- WMS_License_Plate_Numbers. LPN record type is a generic LPN record type
421 -- and not all attributes listed are allowed while creating LPNs.
422 --
423 -- The Following is list of LPN record type fields that are used:
424 -- lpn_id *required* to identify LPN to be updated. Cannot be modified.
425 -- lpn_context LPN Context
426 -- organization_id Organization Id - Required Value
427 -- subinventory Subinventory - Defaults to NULL
428 -- locator_id Locator Id - Defaults to NULL
429 -- inventory_item_id ID of Container Item
430 -- revision Container Item Revision
431 -- lot_number Container Item Lot Number
432 -- serial_number Container Item Serial Number
433 -- cost_group_id Container Item Cost Group Id
434 -- tare_weight_uom_code UOM of container weight
435 -- tare_weight weight of container item
436 -- gross_weight_uom_code UOM of content weight + container weight
437 -- gross_weight weight of contents + container weight
438 -- container_volume_uom UOM of container volume
439 -- container_volume volume of container item
440 -- content_volume_uom_code UOM of content volume
441 -- content_volume volume of LPN's contents
442 -- source_type_id Source type ID for the source transaction
443 -- source_header_id Source header ID for the source transaction
444 -- source_name Source name for the source transaction
445 -- source_line_id Source line ID for the source transaction
449 --
446 -- source_line_detail_id Source line detail ID for the source transaction
447 -- source_transaction_id The transaction identifier that created this LPN
448 -- used for LPN historical and auditing purposes
450 -- Output Parameters
451 -- x_return_status
452 -- if the Create_LPN API succeeds, the value is fnd_api.g_ret_sts_success;
453 -- if there is an expected error, the value is fnd_api.g_ret_sts_error;
454 -- if there is an unexpected error, the value is fnd_api.g_ret_sts_unexp_error;
455 -- x_msg_count
456 -- if there is one or more errors, the number of error messages in the buffer
457 -- x_msg_data
458 -- if there is one and only one error, the error message
459 --
460 PROCEDURE Modify_LPNs (
461 p_api_version IN NUMBER
462 , p_init_msg_list IN VARCHAR2
463 , p_commit IN VARCHAR2
464 , x_return_status OUT NOCOPY VARCHAR2
465 , x_msg_count OUT NOCOPY NUMBER
466 , x_msg_data OUT NOCOPY VARCHAR2
467 , p_caller IN VARCHAR2
468 , p_lpn_table IN WMS_Data_Type_Definitions_PUB.LPNTableType
469 );
470
471 /*---------------------------------------------------------------------*/
472 -- Name
473 -- PROCEDURE Generate_LPN_CP
474 /* --------------------------------------------------------------------*/
475 --
476 -- Purpose
477 -- Generate LPN numbers Concurrent Program.
478 --
479 -- Input Parameters
480 -- p_api_version
481 -- API version number (current version is 1.0)
482 -- p_init_msg_list (optional, default FND_API.G_FALSE)
483 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
484 -- if set to FND_API.G_TRUE
485 -- initialize error message list
486 -- if set to FND_API.G_FALSE - not initialize error
487 -- message list
488 -- p_commit (optional, default FND_API.G_FALSE)
489 -- whether or not to commit the changes to database
490 -- p_organization_id Organization Id - Required Value
491 -- p_container_item_id Container Item Id - Defaults to NULL
492 -- p_revision Revision - Defaults to NULL
493 -- p_lot_number Lot Number - Defaults to NULL
494 -- p_from_serial_number Starting Serial Number - Defaults to NULL
495 -- p_to_serial_number Ending Serial Number - Defaults to NULL
496 -- p_subinventory Subinventory - Defaults to NULL
497 -- p_locator_id Locator Id - Defaults to NULL
498 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
499 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
500 -- p_starting_num Starting Number of an LPN - Defaults to NULL
501 -- p_quantity No of LPNs to be generated - Default Value is 1
502 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
503 -- - Defaults to 1.
504 -- Indicates the source where the LPN is generated
505 -- p_cost_group_id Cost Group Id - Defaults to NULL
506 -- p_source_type_id Source type ID for the source transaction
507 -- p_source_header_id Source header ID for the source transaction
508 -- p_source_name Source name for the source transaction
509 -- p_source_line_id Source line ID for the source transaction
510 -- p_source_line_detail_id Source line detail ID for the source transaction
511 --
512 --
513 -- Output Parameters
514 --
515 -- p_lpn_id_out - Outputs the generated LPN ID
516 -- if only one LPN is requested to be generated
517 -- p_lpn_out - Outputs the generated license plate number
518 -- if only one LPN is requested to be generated
519 -- p_process_id - Process ID to identify the LPN's generated in the
520 -- table WMS_LPN_PROCESS_TEMP
521
525 , p_api_version IN NUMBER
522 PROCEDURE Generate_LPN_CP(
523 errbuf OUT NOCOPY VARCHAR2
524 , retcode OUT NOCOPY NUMBER
526 , p_organization_id IN NUMBER
527 , p_container_item_id IN NUMBER := NULL
528 , p_revision IN VARCHAR2 := NULL
529 , p_lot_number IN VARCHAR2 := NULL
530 , p_from_serial_number IN VARCHAR2 := NULL
531 , p_to_serial_number IN VARCHAR2 := NULL
532 , p_subinventory IN VARCHAR2 := NULL
533 , p_locator_id IN NUMBER := NULL
534 , p_org_parameters IN NUMBER := NULL
535 , p_parm_dummy_1 IN VARCHAR2 := NULL
536 , p_total_length IN NUMBER := NULL
537 , p_lpn_prefix IN VARCHAR2 := NULL
538 , p_starting_num IN NUMBER := NULL
539 , p_ucc_128_suffix_flag IN NUMBER := 2
540 , p_parm_dummy_2 IN VARCHAR2 := NULL
541 , p_lpn_suffix IN VARCHAR2 := NULL
542 , p_quantity IN NUMBER := 1
543 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
544 , p_cost_group_id IN NUMBER := NULL
545 );
546
547
548 ------------------------
549 -- Added for LSP Project, bug 9087971
550 ------------------------
551 /*---------------------------------------------------------------------*/
552 -- Name
553 -- PROCEDURE Generate_LPN_CP
554 /* --------------------------------------------------------------------*/
555 --
556 -- Purpose
557 -- Generate LPN numbers Concurrent Program.
558 -- This is overloaded by adding the additional paramater as p_client_code for LSP Project
559 --
560 -- Input Parameters
561 -- p_api_version
562 -- API version number (current version is 1.0)
563 -- p_init_msg_list (optional, default FND_API.G_FALSE)
564 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
565 -- if set to FND_API.G_TRUE
566 -- initialize error message list
567 -- if set to FND_API.G_FALSE - not initialize error
568 -- message list
569 -- p_commit (optional, default FND_API.G_FALSE)
570 -- whether or not to commit the changes to database
571 -- p_organization_id Organization Id - Required Value
572 -- p_container_item_id Container Item Id - Defaults to NULL
573 -- p_revision Revision - Defaults to NULL
574 -- p_lot_number Lot Number - Defaults to NULL
575 -- p_from_serial_number Starting Serial Number - Defaults to NULL
576 -- p_to_serial_number Ending Serial Number - Defaults to NULL
577 -- p_subinventory Subinventory - Defaults to NULL
578 -- p_locator_id Locator Id - Defaults to NULL
579 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
580 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
581 -- p_starting_num Starting Number of an LPN - Defaults to NULL
582 -- p_quantity No of LPNs to be generated - Default Value is 1
583 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
584 -- - Defaults to 1.
585 -- Indicates the source where the LPN is generated
586 -- p_cost_group_id Cost Group Id - Defaults to NULL
587 -- p_source_type_id Source type ID for the source transaction
588 -- p_source_header_id Source header ID for the source transaction
589 -- p_source_name Source name for the source transaction
590 -- p_source_line_id Source line ID for the source transaction
591 -- p_source_line_detail_id Source line detail ID for the source transaction
592 -- p_client_code Client Code of the item
593 --
594 --
595 -- Output Parameters
596 --
597 -- p_lpn_id_out - Outputs the generated LPN ID
598 -- if only one LPN is requested to be generated
599 -- p_lpn_out - Outputs the generated license plate number
600 -- if only one LPN is requested to be generated
601 -- p_process_id - Process ID to identify the LPN's generated in the
602 -- table WMS_LPN_PROCESS_TEMP
603 PROCEDURE Generate_LPN_CP (
604 errbuf OUT NOCOPY VARCHAR2
605 , retcode OUT NOCOPY NUMBER
606 , p_api_version IN NUMBER
607 , p_organization_id IN NUMBER
608 , p_container_item_id IN NUMBER := NULL
609 , p_revision IN VARCHAR2 := NULL
610 , p_lot_number IN VARCHAR2 := NULL
611 , p_from_serial_number IN VARCHAR2 := NULL
612 , p_to_serial_number IN VARCHAR2 := NULL
613 , p_subinventory IN VARCHAR2 := NULL
614 , p_locator_id IN NUMBER := NULL
615 , p_org_parameters IN NUMBER
616 , p_parm_dummy_1 IN VARCHAR2
617 , p_total_length IN NUMBER
618 , p_lpn_prefix IN VARCHAR2 := NULL
619 , p_starting_num IN NUMBER := NULL
620 , p_ucc_128_suffix_flag IN NUMBER
621 , p_parm_dummy_2 IN VARCHAR2
622 , p_lpn_suffix IN VARCHAR2 := NULL
623 , p_quantity IN NUMBER := 1
624 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
625 , p_cost_group_id IN NUMBER := NULL
626 , p_client_code IN VARCHAR2 -- Adding for LSP, bug 9087971
627 );
628
629
630
631 /*---------------------------------------------------------------------*/
632 -- Name
633 -- PROCEDURE Generate_LPN
634 /* --------------------------------------------------------------------*/
635 --
636 -- Purpose
637 -- Generate LPN numbers, either individually or in a sequence.
638 --
639 -- Input Parameters
640 -- p_api_version
641 -- API version number (current version is 1.0)
642 -- p_init_msg_list (optional, default FND_API.G_FALSE)
643 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
644 -- if set to FND_API.G_TRUE
645 -- initialize error message list
646 -- if set to FND_API.G_FALSE - not initialize error
647 -- message list
648 -- p_commit (optional, default FND_API.G_FALSE)
649 -- whether or not to commit the changes to database
650 -- p_validation_level (optional), determines if full validation or
651 -- no validation will be performed
652 -- defaults to FND_API.G_VALID_LEVEL_FULL
656 -- p_revision Revision - Defaults to NULL
653 -- FND_API.G_VALID_LEVEL_NONE is the other value
654 -- p_organization_id Organization Id - Required Value
655 -- p_container_item_id Container Item Id - Defaults to NULL
657 -- p_lot_number Lot Number - Defaults to NULL
658 -- p_from_serial_number Starting Serial Number - Defaults to NULL
659 -- p_to_serial_number Ending Serial Number - Defaults to NULL
660 -- p_subinventory Subinventory - Defaults to NULL
661 -- p_locator_id Locator Id - Defaults to NULL
662 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
663 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
664 -- p_starting_num Starting Number of an LPN - Defaults to NULL
665 -- p_quantity No of LPNs to be generated - Default Value is 1
666 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
667 -- - Defaults to 5 (Pregenerated).
668 -- Indicates the source where the LPN is generated
669 -- p_cost_group_id Cost Group Id - Defaults to NULL
670 -- p_source_type_id Source type ID for the source transaction
671 -- p_source_header_id Source header ID for the source transaction
672 -- p_source_name Source name for the source transaction
673 -- p_source_line_id Source line ID for the source transaction
674 -- p_source_line_detail_id Source line detail ID for the source transaction
675 --
676 --
677 -- Output Parameters
678 -- x_return_status
679 -- if the Generate_LPN API succeeds, the value is
680 -- fnd_api.g_ret_sts_success;
681 -- if there is an expected error, the value is
682 -- fnd_api.g_ret_sts_error;
683 -- if there is an unexpected error, the value is
684 -- fnd_api.g_ret_sts_unexp_error;
685 -- x_msg_count
686 -- if there is one or more errors, the number of error messages
687 -- in the buffer
688 -- x_msg_data
689 -- if there is one and only one error, the error message
690 -- (See fnd_api package for more details about the above output parameters)
691 --
692 -- p_lpn_id_out - Outputs the generated LPN ID
693 -- if only one LPN is requested to be generated
694 -- p_lpn_out - Outputs the generated license plate number
695 -- if only one LPN is requested to be generated
696 -- p_process_id - Process ID to identify the LPN's generated in the
697 -- table WMS_LPN_PROCESS_TEMP
698
699 PROCEDURE Generate_LPN (
700 p_api_version IN NUMBER
701 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
702 , p_commit IN VARCHAR2 := fnd_api.g_false
703 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
704 , x_return_status OUT NOCOPY VARCHAR2
705 , x_msg_count OUT NOCOPY NUMBER
706 , x_msg_data OUT NOCOPY VARCHAR2
707 , p_organization_id IN NUMBER
708 , p_container_item_id IN NUMBER := NULL
709 , p_revision IN VARCHAR2 := NULL
710 , p_lot_number IN VARCHAR2 := NULL
711 , p_from_serial_number IN VARCHAR2 := NULL
715 , p_lpn_prefix IN VARCHAR2 := NULL
712 , p_to_serial_number IN VARCHAR2 := NULL
713 , p_subinventory IN VARCHAR2 := NULL
714 , p_locator_id IN NUMBER := NULL
716 , p_lpn_suffix IN VARCHAR2 := NULL
717 , p_starting_num IN NUMBER := NULL
718 , p_quantity IN NUMBER := 1
719 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
720 , p_cost_group_id IN NUMBER := NULL
721 , p_source_type_id IN NUMBER := NULL
722 , p_source_header_id IN NUMBER := NULL
723 , p_source_name IN VARCHAR2 := NULL
724 , p_source_line_id IN NUMBER := NULL
725 , p_source_line_detail_id IN NUMBER := NULL
726 , p_lpn_id_out OUT NOCOPY NUMBER
727 , p_lpn_out OUT NOCOPY VARCHAR2
728 , p_process_id OUT NOCOPY NUMBER
729 , p_total_length IN NUMBER := NULL
730 , p_ucc_128_suffix_flag IN NUMBER := 2 -- 1='Y', 2= 'N'
731 );
732
733
734 ------------------------
735 -- Added for LSP Project, bug 9087971
736 ------------------------
737 /*---------------------------------------------------------------------*/
738 -- Name
739 -- PROCEDURE Generate_LPN
740 /* --------------------------------------------------------------------*/
741 --
742 -- Purpose
743 -- Generate LPN numbers, either individually or in a sequence.
744 -- This is overloaded by adding the additional paramater as p_client_code for LSP Project
745 --
746 -- Input Parameters
747 -- p_api_version
748 -- API version number (current version is 1.0)
749 -- p_init_msg_list (optional, default FND_API.G_FALSE)
750 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
751 -- if set to FND_API.G_TRUE
752 -- initialize error message list
753 -- if set to FND_API.G_FALSE - not initialize error
754 -- message list
755 -- p_commit (optional, default FND_API.G_FALSE)
756 -- whether or not to commit the changes to database
757 -- p_validation_level (optional), determines if full validation or
758 -- no validation will be performed
759 -- defaults to FND_API.G_VALID_LEVEL_FULL
760 -- FND_API.G_VALID_LEVEL_NONE is the other value
761 -- p_organization_id Organization Id - Required Value
762 -- p_container_item_id Container Item Id - Defaults to NULL
763 -- p_revision Revision - Defaults to NULL
764 -- p_lot_number Lot Number - Defaults to NULL
765 -- p_from_serial_number Starting Serial Number - Defaults to NULL
766 -- p_to_serial_number Ending Serial Number - Defaults to NULL
767 -- p_subinventory Subinventory - Defaults to NULL
768 -- p_locator_id Locator Id - Defaults to NULL
769 -- p_lpn_prefix Prefix Value of an LPN - Defaults to NULL
770 -- p_lpn_suffix Suffix Value of an LPN - Defaults to NULL
771 -- p_starting_num Starting Number of an LPN - Defaults to NULL
772 -- p_quantity No of LPNs to be generated - Default Value is 1
773 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
774 -- - Defaults to 5 (Pregenerated).
775 -- Indicates the source where the LPN is generated
776 -- p_cost_group_id Cost Group Id - Defaults to NULL
777 -- p_source_type_id Source type ID for the source transaction
781 -- p_source_line_detail_id Source line detail ID for the source transaction
778 -- p_source_header_id Source header ID for the source transaction
779 -- p_source_name Source name for the source transaction
780 -- p_source_line_id Source line ID for the source transaction
782 -- p_client_code Client Code of the item
783 --
784 --
785 -- Output Parameters
786 -- x_return_status
787 -- if the Generate_LPN API succeeds, the value is
788 -- fnd_api.g_ret_sts_success;
789 -- if there is an expected error, the value is
790 -- fnd_api.g_ret_sts_error;
791 -- if there is an unexpected error, the value is
792 -- fnd_api.g_ret_sts_unexp_error;
793 -- x_msg_count
794 -- if there is one or more errors, the number of error messages
795 -- in the buffer
796 -- x_msg_data
797 -- if there is one and only one error, the error message
798 -- (See fnd_api package for more details about the above output parameters)
799 --
800 -- p_lpn_id_out - Outputs the generated LPN ID
801 -- if only one LPN is requested to be generated
802 -- p_lpn_out - Outputs the generated license plate number
803 -- if only one LPN is requested to be generated
804 -- p_process_id - Process ID to identify the LPN's generated in the
805 -- table WMS_LPN_PROCESS_TEMP
806
807 PROCEDURE Generate_LPN (
808 p_api_version IN NUMBER
809 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
810 , p_commit IN VARCHAR2 := fnd_api.g_false
811 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
812 , x_return_status OUT NOCOPY VARCHAR2
813 , x_msg_count OUT NOCOPY NUMBER
814 , x_msg_data OUT NOCOPY VARCHAR2
815 , p_organization_id IN NUMBER
816 , p_container_item_id IN NUMBER := NULL
817 , p_revision IN VARCHAR2 := NULL
818 , p_lot_number IN VARCHAR2 := NULL
819 , p_from_serial_number IN VARCHAR2 := NULL
820 , p_to_serial_number IN VARCHAR2 := NULL
821 , p_subinventory IN VARCHAR2 := NULL
822 , p_locator_id IN NUMBER := NULL
823 , p_lpn_prefix IN VARCHAR2 := NULL
824 , p_lpn_suffix IN VARCHAR2 := NULL
825 , p_starting_num IN NUMBER := NULL
826 , p_quantity IN NUMBER := 1
827 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
828 , p_cost_group_id IN NUMBER := NULL
829 , p_source_type_id IN NUMBER := NULL
830 , p_source_header_id IN NUMBER := NULL
831 , p_source_name IN VARCHAR2 := NULL
832 , p_source_line_id IN NUMBER := NULL
833 , p_source_line_detail_id IN NUMBER := NULL
834 , p_lpn_id_out OUT NOCOPY NUMBER
835 , p_lpn_out OUT NOCOPY VARCHAR2
836 , p_process_id OUT NOCOPY NUMBER
837 , p_total_length IN NUMBER := NULL
838 , p_ucc_128_suffix_flag IN NUMBER := 2
839 , p_client_code IN VARCHAR2 -- Adding for LSP, bug 9087971
840 );
841
842
843
844 /*---------------------------------------------------------------------*/
845 -- Name
846 -- PROCEDURE Associate_LPN
847 /*---------------------------------------------------------------------*/
848 -- Purpose
849 -- Associate an LPN to a specific instance of a container
850 --
851 -- Input Parameters
852 -- p_api_version
853 -- API version number (current version is 1.0)
854 -- p_init_msg_list (optional, default FND_API.G_FALSE)
855 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
856 -- if set to FND_API.G_TRUE
857 -- initialize error message list
858 -- if set to FND_API.G_FALSE - not initialize error
859 -- message list
860 -- p_commit (optional, default FND_API.G_FALSE)
861 -- whether or not to commit the changes to database
862 -- p_validation_level (optional), determines if full validation or
863 -- no validation will be performed
864 -- defaults to FND_API.G_VALID_LEVEL_FULL
865 -- FND_API.G_VALID_LEVEL_NONE is the other value
866 -- p_lpn_id License Plate Number Identifier - Required Value
867 -- p_container_item_id Container Item Id - Required Value
868 -- p_lot_number Lot Number - Defaults to NULL
869 -- p_revision Revision - Defaults to NULL
870 -- p_serial_number Serial Number - Defaults to NULL
871 -- p_organization_id Organization Id - Required Value
872 -- p_subinventory Subinventory - Defaults to NULL
873 -- p_locator_id Locator Id - Defaults to NULL
874 -- p_cost_group_id Cost Group Id - Defaults to NULL
875 -- p_source_type_id Source type ID for the source transaction
876 -- p_source_header_id Source header ID for the source transaction
877 -- p_source_name Source name for the source transaction
878 -- p_source_line_id Source line ID for the source transaction
879 -- p_source_line_detail_id Source line detail ID for the source transaction
880 --
881 --
882 -- Output Parameters
883 -- x_return_status
884 -- if the Associate_LPN API succeeds, the value is
885 -- fnd_api.g_ret_sts_success;
886 -- if there is an expected error, the value is
887 -- fnd_api.g_ret_sts_error;
888 -- if there is an unexpected error, the value is
889 -- fnd_api.g_ret_sts_unexp_error;
890 -- x_msg_count
894 -- if there is one and only one error, the error message
891 -- if there is one or more errors, the number of error messages
892 -- in the buffer
893 -- x_msg_data
895
896 PROCEDURE Associate_LPN(
897 p_api_version IN NUMBER
898 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
899 , p_commit IN VARCHAR2 := fnd_api.g_false
900 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
901 , x_return_status OUT NOCOPY VARCHAR2
902 , x_msg_count OUT NOCOPY NUMBER
903 , x_msg_data OUT NOCOPY VARCHAR2
904 , p_lpn_id IN NUMBER
905 , p_container_item_id IN NUMBER
906 , p_lot_number IN VARCHAR2 := NULL
907 , p_revision IN VARCHAR2 := NULL
908 , p_serial_number IN VARCHAR2 := NULL
909 , p_organization_id IN NUMBER
910 , p_subinventory IN VARCHAR2 := NULL
911 , p_locator_id IN NUMBER := NULL
912 , p_cost_group_id IN NUMBER := NULL
913 , p_source_type_id IN NUMBER := NULL
914 , p_source_header_id IN NUMBER := NULL
915 , p_source_name IN VARCHAR2 := NULL
916 , p_source_line_id IN NUMBER := NULL
917 , p_source_line_detail_id IN NUMBER := NULL
918 );
919
920 /*---------------------------------------------------------------------*/
921 -- Name
922 -- PROCEDURE Create_LPN
923 /*---------------------------------------------------------------------*/
924 -- Purpose
925 -- Associate an LPN to a specific instance of a container in which
926 -- the LPN is already existing. It will create an associated LPN ID
927 -- and store the record in the WMS_LICENSE_PLATE_NUMBERS table
928 --
929 -- Input Parameters
930 -- p_api_version
931 -- API version number (current version is 1.0)
932 -- p_init_msg_list (optional, default FND_API.G_FALSE)
933 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
934 -- if set to FND_API.G_TRUE
935 -- initialize error message list
936 -- if set to FND_API.G_FALSE - not initialize error
937 -- message list
938 -- p_commit (optional, default FND_API.G_FALSE)
939 -- whether or not to commit the changes to database
940 -- p_validation_level (optional), determines if full validation or
941 -- no validation will be performed
942 -- defaults to FND_API.G_VALID_LEVEL_FULL
943 -- FND_API.G_VALID_LEVEL_NONE is the other value
944 -- p_lpn License Plate Number Identifier - Required Value
945 -- p_organization_id Organization Id - Required Value
946 -- p_container_item_id Container Item Id - Defaults to NULL
947 -- p_revision Revision - Defaults to NULL
948 -- p_lot_number Lot Number - Defaults to NULL
949 -- p_serial_number Serial Number - Defaults to NULL
950 -- p_subinventory Subinventory - Defaults to NULL
951 -- p_locator_id Locator Id - Defaults to NULL
952 -- p_source LPN Context. 1. INV, 2. WIP, or 2. REC, etc..
953 -- - Defaults to 5 (Pregenerated).
954 -- p_cost_group_id Cost Group Id - Defaults to NULL
955 -- p_parent_lpn_id Parent LPN Id - Defaults to NULL
956 -- p_source_type_id Source type ID for the source transaction
957 -- p_source_header_id Source header ID for the source transaction
958 -- p_source_name Source name for the source transaction
959 -- p_source_line_id Source line ID for the source transaction
960 -- p_source_line_detail_id Source line detail ID for the source transaction
961 --
962 --
963 -- Output Parameters
964 -- x_return_status
965 -- if the Create_LPN API succeeds, the value is
966 -- fnd_api.g_ret_sts_success;
967 -- if there is an expected error, the value is
968 -- fnd_api.g_ret_sts_error;
969 -- if there is an unexpected error, the value is
970 -- fnd_api.g_ret_sts_unexp_error;
971 -- x_msg_count
972 -- if there is one or more errors, the number of error messages
973 -- in the buffer
974 -- x_msg_data
975 -- if there is one and only one error, the error message
976 -- x_lpn_id The LPN ID for the new LPN record entry
977 --
978
979 PROCEDURE Create_LPN (
980 p_api_version IN NUMBER
981 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
982 , p_commit IN VARCHAR2 := fnd_api.g_false
983 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
984 , x_return_status OUT NOCOPY VARCHAR2
985 , x_msg_count OUT NOCOPY NUMBER
986 , x_msg_data OUT NOCOPY VARCHAR2
987 , p_lpn IN VARCHAR2
988 , p_organization_id IN NUMBER
989 , p_container_item_id IN NUMBER := NULL
990 , p_lot_number IN VARCHAR2 := NULL
991 , p_revision IN VARCHAR2 := NULL
992 , p_serial_number IN VARCHAR2 := NULL
993 , p_subinventory IN VARCHAR2 := NULL
994 , p_locator_id IN NUMBER := NULL
995 , p_source IN NUMBER := LPN_CONTEXT_PREGENERATED
996 , p_cost_group_id IN NUMBER := NULL
997 , p_parent_lpn_id IN NUMBER := NULL
998 , p_source_type_id IN NUMBER := NULL
999 , p_source_header_id IN NUMBER := NULL
1003 , x_lpn_id OUT NOCOPY NUMBER
1000 , p_source_name IN VARCHAR2 := NULL
1001 , p_source_line_id IN NUMBER := NULL
1002 , p_source_line_detail_id IN NUMBER := NULL
1004 );
1005
1006 /*---------------------------------------------------------------------*/
1007 -- Name
1008 -- PROCEDURE Modify_LPN and Modify_LPN_Wrapper
1009 /*---------------------------------------------------------------------*/
1010 -- Purpose
1011 -- Used to update the attributes of a specific container instance (LPN).
1012 -- Modify_LPN_Wrapper just calls Modify_LPN but it doesn't take in a
1013 -- record type as an input. This is used for the java calls to this
1014 -- procedure in the mobile transactions.
1015 -- Fields that can be modified include:
1016 -- * all the gross weight and content volume related fields
1017 -- * status_id, lpn_context, sealed_status
1018 -- * org, sub, and loc information
1019 -- * All of the extra Attribute related columns for future usages
1020 --
1021 -- Input Parameters
1022 -- p_api_version
1023 -- API version number (current version is 1.0)
1024 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1025 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1026 -- if set to FND_API.G_TRUE
1027 -- initialize error message list
1028 -- if set to FND_API.G_FALSE - not initialize error
1029 -- message list
1030 -- p_commit (optional, default FND_API.G_FALSE)
1031 -- whether or not to commit the changes to database
1032 -- p_validation_level (optional), determines if full validation or
1033 -- no validation will be performed
1034 -- defaults to FND_API.G_VALID_LEVEL_FULL
1035 -- FND_API.G_VALID_LEVEL_NONE is the other value
1036 -- p_lpn WMS_LICENSE_PLATE_NUMBERS%ROWTYPE - Required Value
1037 -- Stores the information for the fields of the LPN record that
1038 -- the user desires to modify
1039 -- p_source_type_id Source type ID for the source transaction
1040 -- p_source_header_id Source header ID for the source transaction
1041 -- p_source_name Source name for the source transaction
1042 -- p_source_line_id Source line ID for the source transaction
1043 -- p_source_line_detail_id Source line detail ID for the source transaction
1044 --
1045 --
1046 -- Output Parameters
1047 -- x_return_status
1048 -- if the Modify_LPN API succeeds, the value is
1049 -- fnd_api.g_ret_sts_success;
1050 -- if there is an expected error, the value is
1051 -- fnd_api.g_ret_sts_error;
1052 -- if there is an unexpected error, the value is
1053 -- fnd_api.g_ret_sts_unexp_error;
1054 -- x_msg_count
1055 -- if there is one or more errors, the number of error messages
1056 -- in the buffer
1057 -- x_msg_data
1058 -- if there is one and only one error, the error message
1059
1060 PROCEDURE Modify_LPN (
1061 p_api_version IN NUMBER
1062 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1063 , p_commit IN VARCHAR2 := fnd_api.g_false
1064 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1065 , x_return_status OUT NOCOPY VARCHAR2
1066 , x_msg_count OUT NOCOPY NUMBER
1067 , x_msg_data OUT NOCOPY VARCHAR2
1068 , p_lpn IN WMS_CONTAINER_PUB.LPN
1069 , p_caller IN VARCHAR2 := NULL
1070 );
1071
1072 PROCEDURE Modify_LPN_Wrapper(
1073 p_api_version IN NUMBER
1074 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1075 , p_commit IN VARCHAR2 := fnd_api.g_false
1076 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1077 , x_return_status OUT NOCOPY VARCHAR2
1078 , x_msg_count OUT NOCOPY NUMBER
1079 , x_msg_data OUT NOCOPY VARCHAR2
1080 , p_lpn_id IN NUMBER
1081 , p_license_plate_number IN VARCHAR2 := NULL
1082 , p_inventory_item_id IN NUMBER := NULL
1083 , p_weight_uom_code IN VARCHAR2 := NULL
1084 , p_gross_weight IN NUMBER := NULL
1085 , p_volume_uom_code IN VARCHAR2 := NULL
1086 , p_content_volume IN NUMBER := NULL
1087 , p_status_id IN NUMBER := NULL
1088 , p_lpn_context IN NUMBER := NULL
1089 , p_sealed_status IN NUMBER := NULL
1090 , p_organization_id IN NUMBER := NULL
1091 , p_subinventory IN VARCHAR := NULL
1092 , p_locator_id IN NUMBER := NULL
1093 , p_source_type_id IN NUMBER := NULL
1094 , p_source_header_id IN NUMBER := NULL
1095 , p_source_name IN VARCHAR2 := NULL
1096 , p_source_line_id IN NUMBER := NULL
1097 , p_source_line_detail_id IN NUMBER := NULL
1098 , p_caller IN VARCHAR2 := NULL
1099 );
1100
1101 -- Start of comments
1102 -- API name : PackUnpack_Container
1103 -- Type : Private
1104 -- Function : Allows the caller to pack or unpack contents from a container instance or LPN.
1105 -- This API does not update onhand, so should not be used directly for packing
1106 -- items in inventory. For inventory packs the transaction manager should be used.
1107 -- Pre-reqs : None.
1108 -- Parameters:
1109 -- IN :
1110 -- p_api_version
1111 -- API version number (current version is 1.0)
1115 -- initialize error message list
1112 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1113 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1114 -- if set to FND_API.G_TRUE
1116 -- if set to FND_API.G_FALSE - not initialize error
1117 -- message list
1118 -- p_commit (optional, default FND_API.G_FALSE)
1119 -- whether or not to commit the changes to database
1120 -- p_validation_level (optional), determines if full validation or
1121 -- no validation will be performed
1122 -- defaults to FND_API.G_VALID_LEVEL_FULL
1123 -- FND_API.G_VALID_LEVEL_NONE is the other value
1124 -- p_lpn_id Parent License Plate Number Identifier - Required Value
1125 -- p_content_lpn_id Content LPN ID
1126 -- p_content_item_id Content Item ID - Defaults to NULL
1127 -- p_content_item_desc Content Item Description - Defaults to NULL
1128 -- p_revision Revision - Defaults to NULL
1129 -- p_lot_number Lot Number - Defaults to NULL
1130 -- p_from_serial_number Starting Serial Number - Defaults to NULL
1131 -- p_to_serial_number Ending Serial Number - Defaults to NULL
1132 -- p_quantity Content Quantity - Defaults to NULL
1133 -- This value is not required if you are
1134 -- packing or unpacking an LPN or if you are
1135 -- packing or unpacking serialized items
1136 -- p_uom Content Qty UOM - Defaults to NULL
1137 -- p_organization_id Organization ID - Required Value
1138 -- p_subinventory Subinventory - Defaults to NULL
1139 -- Value is the source subinventory if pack,
1140 -- destination subinventory if unpack operation
1141 -- p_locator_id Locator Id - Defaults to NULL
1142 -- Value is the source locator if pack,
1143 -- destination locator if unpack operation
1144 -- p_enforce_wv_constraints Weight and Volume Enforcement Flag
1145 -- Defaults to 2 (= No), 1 = Yes
1146 -- p_operation Type of opertaion, Pack/Unpack - Required Value
1147 -- 1 = Pack : Add the quantity to the existing amount
1148 -- 2 = Unpack : Subtract quantity from the existing amount
1149 -- 3 = Adjust : Change quantity to the given amount
1150 -- 4 = Unpack All: Unpack all contents and unnest all child lpns
1151 -- p_cost_group_id Cost Group Id - Defaults to NULL
1152 -- p_source_type_id Source type ID for the source transaction
1153 -- p_source_header_id Source header ID for the source transaction
1154 -- p_source_name Source name for the source transaction
1155 -- p_source_line_id Source line ID for the source transaction
1156 -- p_source_line_detail_id Source line detail ID for the source transaction
1157 -- p_unpack_all Parameter signifying if all of the contents
1158 -- in the LPN should be unpacked
1159 -- 1 = Yes, 2 = No Defaults to 2 = No
1160 -- p_auto_unnest_empty_lpns Parameter signifies if lpns that are empty after
1161 -- unpacking should be unnested from it's parent LPN (if any)
1162 -- and made defined but not used.
1163 -- 1 = Yes, 2 = No Defaults to 1 = Yes
1164 -- p_ignore_item_controls Parameter signifies for unpack operations, if this is set to
1165 -- set to 1 (yes), unpacking will allow user to unpack from WLC
1166 -- row with null lots even if a value is passed to p_lot_number
1167 -- similarly, it will igonore errors if a serial within the passed
1168 -- in serial range was not found within the lpn in MSN
1169 -- 1 = Yes, 2 = No Defaults to 2 = No
1170 -- OUT :
1171 -- x_return_status
1172 -- if the PackUnpack_Container API succeeds, the value is
1173 -- fnd_api.g_ret_sts_success;
1174 -- if there is an expected error, the value is
1175 -- fnd_api.g_ret_sts_error;
1176 -- if there is an unexpected error, the value is
1177 -- fnd_api.g_ret_sts_unexp_error;
1178 -- x_msg_count
1179 -- if there is one or more errors, the number of error messages
1180 -- in the buffer
1181 -- x_msg_data
1182 -- if there is one and only one error, the error message
1183 -- Version : 1.0
1184 -- End of comments
1185
1186 PROCEDURE PackUnpack_Container(
1187 p_api_version IN NUMBER
1188 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1189 , p_commit IN VARCHAR2 := fnd_api.g_false
1190 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1191 , x_return_status OUT NOCOPY VARCHAR2
1192 , x_msg_count OUT NOCOPY NUMBER
1193 , x_msg_data OUT NOCOPY VARCHAR2
1194 , p_lpn_id IN NUMBER
1195 , p_content_lpn_id IN NUMBER := NULL
1196 , p_content_item_id IN NUMBER := NULL
1197 , p_content_item_desc IN VARCHAR2 := NULL
1198 , p_revision IN VARCHAR2 := NULL
1199 , p_lot_number IN VARCHAR2 := NULL
1200 , p_from_serial_number IN VARCHAR2 := NULL
1201 , p_to_serial_number IN VARCHAR2 := NULL
1202 , p_quantity IN NUMBER := 1
1203 , p_uom IN VARCHAR2 := NULL
1204 , p_sec_quantity IN NUMBER := NULL -- INVCONV kkillams
1205 , p_sec_uom IN VARCHAR2 := NULL -- INVCONV kkillams
1206 , p_organization_id IN NUMBER
1207 , p_subinventory IN VARCHAR2 := NULL
1208 , p_locator_id IN NUMBER := NULL
1209 , p_enforce_wv_constraints IN NUMBER := 2
1210 , p_operation IN NUMBER
1211 , p_cost_group_id IN NUMBER := NULL
1212 , p_source_type_id IN NUMBER := NULL
1213 , p_source_header_id IN NUMBER := NULL
1214 , p_source_name IN VARCHAR2 := NULL
1215 , p_source_line_id IN NUMBER := NULL
1216 , p_source_line_detail_id IN NUMBER := NULL
1217 , p_unpack_all IN NUMBER := 2
1218 , p_auto_unnest_empty_lpns IN NUMBER := 1
1219 , p_ignore_item_controls IN NUMBER := 2
1220 , p_primary_quantity IN NUMBER := NULL
1221 , p_caller IN VARCHAR2 := NULL
1222 , p_source_transaction_id IN NUMBER := NULL
1223 );
1224
1225 /*---------------------------------------------------------------------*/
1226 -- Name
1227 -- PROCEDURE Validate_Update_Wt_Volume
1228 /*---------------------------------------------------------------------*/
1229 -- Purpose
1230 -- Calculates the gross weight and (occupied) volume of a
1231 -- container, every time content is packed into or unpacked
1232 -- from the container. Also validates that the
1233 -- weight and volume capacity constraints are not
1234 -- violated for a container or any of
1235 -- its parent or nested containers.
1236 --
1237 -- Input Parameters
1238 -- p_api_version
1239 -- API version number (current version is 1.0)
1240 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1241 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1242 -- if set to FND_API.G_TRUE
1243 -- initialize error message list
1244 -- if set to FND_API.G_FALSE - not initialize error
1245 -- message list
1246 -- p_commit (optional, default FND_API.G_FALSE)
1247 -- whether or not to commit the changes to database
1248 -- p_lpn_id License Plate Number Identifier - Required Value
1249 -- p_content_lpn_id Content LPN Id - Defaults to NULL
1250 -- p_content_item_id Content Item Id - Defaults to NULL
1251 -- p_quantity Content Quantity - Defaults to NULL
1252 -- p_uom Content Qty UOM - Defaults to NULL
1253 -- p_organization_id Organization Id - Defaults to NULL
1254 -- p_enforce_wv_constraints Weight and Volume Enforcement Flag - Defaults to 2 (= No)
1255 -- p_operation Type of operation - Required Value
1256 -- - Valid Values are 1. Pack 2.Unpack
1257 -- p_action Action Type - Required Value
1258 -- - Valid Values are
1259 -- 1. Validate, 2. Update, 3. Validate and Update
1260 -- Output Parameters
1261 -- x_return_status
1262 -- if the Validate_Update_Wt_Volume API succeeds, the value is
1263 -- fnd_api.g_ret_sts_success;
1264 -- if there is an expected error, the value is
1265 -- fnd_api.g_ret_sts_error;
1266 -- if there is an unexpected error, the value is
1267 -- fnd_api.g_ret_sts_unexp_error;
1268 -- x_msg_count
1269 -- if there is one or more errors, the number of error messages
1270 -- in the buffer
1271 -- x_msg_data
1275 -- otherwise the operation is invalid and this will have a value of 2.
1272 -- if there is one and only one error, the error message
1273 -- x_valid_operation
1274 -- if the operation to be validated is valid, then this will have a value of 1.
1276 --
1277
1278 PROCEDURE Validate_Update_Wt_Volume(
1279 p_api_version IN NUMBER
1280 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1281 , p_commit IN VARCHAR2 := fnd_api.g_false
1282 , x_return_status OUT NOCOPY VARCHAR2
1283 , x_msg_count OUT NOCOPY NUMBER
1284 , x_msg_data OUT NOCOPY VARCHAR2
1285 , p_lpn_id IN NUMBER
1286 , p_content_lpn_id IN VARCHAR2 := NULL
1287 , p_content_item_id IN NUMBER := NULL
1288 , p_quantity IN NUMBER := NULL
1289 , p_uom IN VARCHAR2 := NULL
1290 , p_organization_id IN NUMBER := NULL
1291 , p_enforce_wv_constraints IN NUMBER := 2
1292 , p_operation IN NUMBER
1293 , p_action IN NUMBER
1294 , x_valid_operation OUT NOCOPY NUMBER
1295 );
1296
1297 /*---------------------------------------------------------------------*/
1298 -- Name
1299 -- PROCEDURE Container_Required_Qty
1300 /*---------------------------------------------------------------------*/
1301 -- Purpose
1302 -- Calculates the quantity of containers required to store
1303 -- (source) the inventory item or container specified.
1304 -- If the destination container given, it will be calculated for
1305 -- the given container item or it will be calculated as per the
1306 -- item/container relationship definitions.
1307 --
1308 -- Input Parameters
1309 -- p_api_version
1310 -- API version number (current version is 1.0)
1311 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1312 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1313 -- if set to FND_API.G_TRUE
1314 -- initialize error message list
1315 -- if set to FND_API.G_FALSE - not initialize error
1316 -- message list
1317 -- p_commit (optional, default FND_API.G_FALSE)
1318 -- whether or not to commit the changes to database
1319 -- p_source_item_id Source Item id (can also be a container Item) - Required Value
1320 -- p_source_qty Source Item Qty - Required Value
1321 -- p_source_qty_uom UOM of Source Item Qty - Required Value
1322 -- p_qty_per_container Qty per each container - Defaults to NULL
1323 -- p_qty_per_container_uom UOM of Qty per each container - Defaults to NULL
1324 -- p_organization_id Organization Id - Defaults to NULL
1325 -- p_dest_cont_item_id Destination container item id - IN OUT parameter
1326 --
1327 --
1328 -- Output Parameters
1329 -- x_return_status
1330 -- if the Container_Required_Qty API succeeds, the value is
1331 -- fnd_api.g_ret_sts_success;
1332 -- if there is an expected error, the value is
1333 -- fnd_api.g_ret_sts_error;
1334 -- if there is an unexpected error, the value is
1335 -- fnd_api.g_ret_sts_unexp_error;
1336 -- x_msg_count
1337 -- if there is one or more errors, the number of error messages
1338 -- in the buffer
1339 -- x_msg_data
1340 -- if there is one and only one error, the error message
1341 -- p_dest_cont_item_id Destination container item id - IN OUT parameter
1342 -- p_qty_required Required Container Quantity
1343
1344 PROCEDURE Container_Required_Qty(
1345 p_api_version IN NUMBER
1346 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1347 , p_commit IN VARCHAR2 := fnd_api.g_false
1348 , x_return_status OUT NOCOPY VARCHAR2
1349 , x_msg_count OUT NOCOPY NUMBER
1350 , x_msg_data OUT NOCOPY VARCHAR2
1351 , p_source_item_id IN NUMBER
1352 , p_source_qty IN NUMBER
1353 , p_source_qty_uom IN VARCHAR2
1354 , p_qty_per_cont IN NUMBER := NULL
1355 , p_qty_per_cont_uom IN VARCHAR2 := NULL
1356 , p_organization_id IN NUMBER
1357 , p_dest_cont_item_id IN OUT NOCOPY NUMBER
1358 , p_qty_required OUT NOCOPY NUMBER
1359 );
1360
1361 /*---------------------------------------------------------------------*/
1362 -- Name
1363 -- PROCEDURE Prepack_LPN_CP
1364 /*---------------------------------------------------------------------*/
1365 -- Purpose
1366 -- Allows the packing of items that are not yet in inventory. LPN's are
1367 -- pre-generated and associated with contents at the release of a WIP job.
1368 -- The LPN's generated will have a state of "Resides in WIP" so that their
1369 -- contents are not included in on hand inventory
1370 --
1371 --
1372 -- Input Parameters
1373 -- p_api_version
1374 -- API version number (current version is 1.0)
1375 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1376 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1377 -- if set to FND_API.G_TRUE
1378 -- initialize error message list
1379 -- if set to FND_API.G_FALSE - do not initialize error
1380 -- message list
1381 -- p_commit (optional, default FND_API.G_FALSE)
1382 -- whether or not to commit the changes to database
1383 -- p_organization_id Organization of the LPN - Required
1384 -- p_subinventory Subinventory - Defaults to NULL
1385 -- p_locator_id Locator Id - Defaults to NULL
1386 -- p_inventory_item_id Inventory ID number - Required
1387 -- p_revision Revision of the inventory item
1388 -- p_lot_number Lot number of the inventory item
1389 -- p_quantity Quantity of item to be prepacked - Required
1390 -- p_uom UOM of the quantity prepacked - Required
1391 -- p_source Source of information (WIP/REC)
1392 -- p_serial_number_from Starting serial number for inventory item
1393 -- p_serial_number_to Ending serial number for inventory item
1394 -- p_container_item_id Inventory item ID for a container item
1395 -- p_cont_revision Revision of the container item
1396 -- p_cont_lot_number Lot Number of the container item
1397 -- p_cont_serial_number_from From serial number of the container item
1398 -- p_cont_serial_number_to To serial number of the container item
1399 -- p_lpn_sealed_flag Flag to tell if LPN should be sealed or not
1400 -- p_print_label Should labels be printed afterwards
1401 -- p_print_content_report Should content reports be generated afterwards
1402 --
1403 --
1404 -- Output Parameters
1405 -- ERRBUF Concurrent program error buffer
1406 -- RETCODE Concurrent program return code
1407 -- x_return_status
1408 -- if the Prepack_LPN API succeeds, the value is
1409 -- fnd_api.g_ret_sts_success;
1410 -- if there is an expected error, the value is
1411 -- fnd_api.g_ret_sts_error;
1412 -- if there is an unexpected error, the value is
1413 -- fnd_api.g_ret_sts_unexp_error;
1414 -- x_msg_count
1415 -- if there is one or more errors, the number of error messages
1416 -- in the buffer
1417 -- x_msg_data
1418 -- if there is one and only one error, the error message
1419 --
1420
1421 PROCEDURE Prepack_LPN_CP(
1422 ERRBUF OUT NOCOPY VARCHAR2
1423 , RETCODE OUT NOCOPY NUMBER
1424 , p_api_version IN NUMBER
1425 , p_organization_id IN NUMBER
1426 , p_subinventory IN VARCHAR2 := NULL
1427 , p_locator_id IN NUMBER := NULL
1428 , p_inventory_item_id IN NUMBER
1429 , p_revision IN VARCHAR2 := NULL
1430 , p_lot_number IN VARCHAR2 := NULL
1431 , p_quantity IN NUMBER
1432 , p_uom IN VARCHAR2
1433 , p_source IN NUMBER
1434 , p_serial_number_from IN VARCHAR2 := NULL
1435 , p_serial_number_to IN VARCHAR2 := NULL
1436 , p_container_item_id IN NUMBER := NULL
1437 , p_cont_revision IN VARCHAR2 := NULL
1438 , p_cont_lot_number IN VARCHAR2 := NULL
1439 , p_cont_serial_number_from IN VARCHAR2 := NULL
1440 , p_cont_serial_number_to IN VARCHAR2 := NULL
1441 , p_lpn_sealed_flag IN NUMBER := NULL
1442 , p_print_label IN NUMBER := NULL
1443 , p_print_content_report IN NUMBER := NULL
1444 , p_packaging_level IN NUMBER := -1
1445 , p_sec_quantity IN NUMBER := NULL --INVCONV kkillams
1446 , p_sec_uom IN VARCHAR2 := NULL --INVCONV kkillams
1447 );
1448
1449 /*---------------------------------------------------------------------*/
1450 -- Name
1451 -- PROCEDURE Prepack_LPN
1452 /*---------------------------------------------------------------------*/
1453 -- Purpose
1454 -- Allows the packing of items that are not yet in inventory. LPN's are
1455 -- pre-generated and associated with contents at the release of a WIP job.
1456 -- The LPN's generated will have a state of "Resides in WIP" so that their
1457 -- contents are not included in on hand inventory
1458 --
1459 --
1460 -- Input Parameters
1461 -- p_api_version
1462 -- API version number (current version is 1.0)
1463 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1464 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1465 -- if set to FND_API.G_TRUE
1469 -- p_commit (optional, default FND_API.G_FALSE)
1466 -- initialize error message list
1467 -- if set to FND_API.G_FALSE - do not initialize error
1468 -- message list
1470 -- whether or not to commit the changes to database
1471 -- p_organization_id Organization of the LPN - Required
1472 -- p_subinventory Subinventory - Defaults to NULL
1473 -- p_locator_id Locator Id - Defaults to NULL
1474 -- p_inventory_item_id Inventory ID number - Required
1475 -- p_revision Revision of the inventory item
1476 -- p_lot_number Lot number of the inventory item
1477 -- p_quantity Quantity of item to be prepacked - Required
1478 -- p_uom UOM of the quantity prepacked - Required
1479 -- p_source Source of information (WIP/REC)
1480 -- p_serial_number_from Starting serial number for inventory item
1481 -- p_serial_number_to Ending serial number for inventory item
1482 -- p_container_item_id Inventory item ID for a container item
1483 -- p_cont_revision Revision of the container item
1484 -- p_cont_lot_number Lot Number of the container item
1485 -- p_cont_serial_number_from From serial number of the container item
1486 -- p_cont_serial_number_to To serial number of the container item
1487 -- p_lpn_sealed_flag Flag to tell if LPN should be sealed or not
1488 -- p_print_label Should labels be printed afterwards
1489 -- p_print_content_report Should content reports be generated afterwards
1490 --
1491 --
1492 -- Output Parameters
1493 -- x_return_status
1494 -- if the Prepack_LPN API succeeds, the value is
1495 -- fnd_api.g_ret_sts_success;
1496 -- if there is an expected error, the value is
1497 -- fnd_api.g_ret_sts_error;
1498 -- if there is an unexpected error, the value is
1499 -- fnd_api.g_ret_sts_unexp_error;
1500 -- x_msg_count
1501 -- if there is one or more errors, the number of error messages
1502 -- in the buffer
1503 -- x_msg_data
1504 -- if there is one and only one error, the error message
1505 --
1506
1507 PROCEDURE Prepack_LPN(
1508 p_api_version IN NUMBER
1509 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1510 , p_commit IN VARCHAR2 := fnd_api.g_false
1511 , x_return_status OUT NOCOPY VARCHAR2
1512 , x_msg_count OUT NOCOPY NUMBER
1513 , x_msg_data OUT NOCOPY VARCHAR2
1514 , p_organization_id IN NUMBER
1515 , p_subinventory IN VARCHAR2 := NULL
1516 , p_locator_id IN NUMBER := NULL
1517 , p_inventory_item_id IN NUMBER
1518 , p_revision IN VARCHAR2 := NULL
1519 , p_lot_number IN VARCHAR2 := NULL
1520 , p_quantity IN NUMBER
1521 , p_uom IN VARCHAR2
1522 , p_source IN NUMBER
1523 , p_serial_number_from IN VARCHAR2 := NULL
1524 , p_serial_number_to IN VARCHAR2 := NULL
1525 , p_container_item_id IN NUMBER := NULL
1526 , p_cont_revision IN VARCHAR2 := NULL
1527 , p_cont_lot_number IN VARCHAR2 := NULL
1528 , p_cont_serial_number_from IN VARCHAR2 := NULL
1529 , p_cont_serial_number_to IN VARCHAR2 := NULL
1530 , p_lpn_sealed_flag IN NUMBER := NULL
1531 , p_print_label IN NUMBER := NULL
1532 , p_print_content_report IN NUMBER := NULL
1533 , p_packaging_level IN NUMBER := -1
1534 , p_sec_quantity IN NUMBER := NULL --INVCONV kkillams
1535 , p_sec_uom IN VARCHAR2 := NULL --INVCONV kkillams
1536 );
1537
1538 -- Start of comments
1539 -- API name : Pack_Prepack_Container
1540 -- Type : Private
1541 -- Function : Allows the caller to define the lot and serials of of the items that were originally
1542 -- prepacked
1543 -- Pre-reqs : None.
1544 -- Parameters:
1545 -- IN :
1546 -- p_api_version
1547 -- API version number (current version is 1.0)
1548 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1549 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1550 -- if set to FND_API.G_TRUE
1551 -- initialize error message list
1552 -- if set to FND_API.G_FALSE - not initialize error
1553 -- message list
1554 -- p_commit (optional, default FND_API.G_FALSE)
1555 -- whether or not to commit the changes to database
1556 -- p_validation_level (optional), determines if full validation or
1557 -- no validation will be performed
1558 -- defaults to FND_API.G_VALID_LEVEL_FULL
1559 -- FND_API.G_VALID_LEVEL_NONE is the other value
1560 -- p_lpn_id Parent License Plate Number Identifier - Required Value
1561 -- p_content_item_id Content Item ID - Defaults to NULL
1562 -- p_revision Revision - Defaults to NULL
1563 -- p_lot_number Lot Number - Defaults to NULL
1564 -- p_from_serial_number Starting Serial Number - Defaults to NULL
1565 -- p_to_serial_number Ending Serial Number - Defaults to NULL
1566 -- p_quantity Content Quantity - Defaults to NULL
1567 -- p_uom Content Qty UOM - Defaults to NULL
1568 -- p_organization_id Organization ID - Required Value
1569 -- p_operation Type of opertaion, Pack/Unpack - Required Value
1570 -- 1 = Pack, 2 = Unpack
1571 -- p_source_type_id Source type ID for the source transaction
1572 -- OUT :
1573 -- x_return_status
1574 -- if the PackUnpack_Container API succeeds, the value is
1575 -- fnd_api.g_ret_sts_success;
1576 -- if there is an expected error, the value is
1577 -- fnd_api.g_ret_sts_error;
1578 -- if there is an unexpected error, the value is
1579 -- fnd_api.g_ret_sts_unexp_error;
1580 -- x_msg_count
1581 -- if there is one or more errors, the number of error messages
1582 -- in the buffer
1583 -- x_msg_data
1584 -- if there is one and only one error, the error message
1585 -- Version : 1.0
1586 -- End of comments
1587
1588 PROCEDURE Pack_Prepack_Container(
1589 p_api_version IN NUMBER
1590 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1591 , p_commit IN VARCHAR2 := fnd_api.g_false
1592 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1593 , x_return_status OUT NOCOPY VARCHAR2
1594 , x_msg_count OUT NOCOPY NUMBER
1595 , x_msg_data OUT NOCOPY VARCHAR2
1596 , p_lpn_id IN NUMBER
1597 , p_content_item_id IN NUMBER := NULL
1598 , p_revision IN VARCHAR2 := NULL
1599 , p_lot_number IN VARCHAR2 := NULL
1600 , p_from_serial_number IN VARCHAR2 := NULL
1601 , p_to_serial_number IN VARCHAR2 := NULL
1602 , p_quantity IN NUMBER := 1
1603 , p_uom IN VARCHAR2 := NULL
1604 , p_organization_id IN NUMBER
1605 , p_operation IN NUMBER
1606 , p_source_type_id IN NUMBER := NULL
1607 );
1608
1609 -- Start of comments
1610 -- API name : Explode_LPN
1611 -- Type : Private
1612 -- Function : API returns a PL/SQL table of a containers contents.
1613 -- User will pass in the LPN of
1614 -- the container to be exploded and the level to explode to.
1615 -- Pre-reqs : None.
1616 -- Parameters:
1617 -- IN :
1618 -- p_api_version
1619 -- API version number (current version is 1.0)
1620 -- p_init_msg_list (optional, default FND_API.G_FALSE)
1621 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
1622 -- if set to FND_API.G_TRUE
1623 -- initialize error message list
1624 -- if set to FND_API.G_FALSE - not initialize error
1625 -- message list
1626 -- p_commit (optional, default FND_API.G_FALSE)
1627 -- whether or not to commit the changes to database
1628 -- p_lpn_id License Plate Number Identifier - Required Value
1629 -- p_explosion_level Explosion Level - Defaults to 0 (Explode to all levels)
1630 --
1631 -- OUT :
1632 -- x_return_status
1633 -- if the Explode_LPN API succeeds, the value is
1634 -- fnd_api.g_ret_sts_success;
1635 -- if there is an expected error, the value is
1636 -- fnd_api.g_ret_sts_error;
1637 -- if there is an unexpected error, the value is
1638 -- fnd_api.g_ret_sts_unexp_error;
1639 -- x_msg_count
1640 -- if there is one or more errors, the number of error messages
1641 -- in the buffer
1642 -- x_msg_data
1643 -- if there is one and only one error, the error message
1644 -- Version : 1.0
1645 -- End of comments
1646
1647 PROCEDURE Explode_LPN (
1648 p_api_version IN NUMBER
1649 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1650 , p_commit IN VARCHAR2 := fnd_api.g_false
1651 , x_return_status OUT NOCOPY VARCHAR2
1652 , x_msg_count OUT NOCOPY NUMBER
1653 , x_msg_data OUT NOCOPY VARCHAR2
1654 , p_lpn_id IN NUMBER
1655 , p_explosion_level IN NUMBER := 0
1656 , x_content_tbl OUT NOCOPY WMS_CONTAINER_PUB.WMS_Container_Tbl_Type
1657 );
1658
1659 /*---------------------------------------------------------------------*/
1660 -- Name
1661 -- FUNCTION Validate_LPN
1662 /*---------------------------------------------------------------------*/
1663 -- Purpose
1664 -- This Function returns a row of WMS_Licese_Plate_Numbers entity
1665 --
1666 -- Input Parameters
1667 -- p_lpn License_Plate_Number entity Row type variable
1668 -- Output Value - 1. Success 0. Failure
1669 -- Version : 1.0
1670 -- End of comments
1671
1672 -- Constant Return Values for Validation APIs
1676 FUNCTION Validate_LPN (
1673 T CONSTANT NUMBER := 1;
1674 F CONSTANT NUMBER := 0;
1675
1677 p_lpn IN OUT NOCOPY WMS_CONTAINER_PUB.LPN
1678 , p_lock IN NUMBER := 2
1679 ) RETURN NUMBER;
1680
1681
1682 -- Constant validation types supported buy Validate_LPN
1683 -- G_RECONFIGURE_LPN will validate the existance of given lpn
1684 -- Validatoin will pass if there are no pending transactions in MMTT
1685 -- or reservations for this lpn or any of it's child LPNs
1686 G_RECONFIGURE_LPN CONSTANT VARCHAR2(30) := 'Reconfigure_LPN';
1687
1688 -- G_NO_ONHAND_EXISTS will validate the existance of contents given lpn
1689 -- Validatoin will pass if there are no onhand quantity in
1690 -- MTL_ONHAND_QUANTITIES_DETIAL or MTL_SERIAL_NUMBERS
1691 -- associated to this lpn
1692 G_NO_ONHAND_EXISTS CONSTANT VARCHAR2(30) := 'No_Onhand_Exists';
1693
1694 -- Start of comments
1695 -- API name: Validate_LPN
1696 -- Type : Private
1697 -- Pre-reqs: None.
1698 -- Function: Returns 1 if the lpn is valid for the given type
1699 -- 0 otherwise
1700 -- Parameters:
1701 -- IN: p_organization_id IN NUMBER Required
1702 -- Item organization id. Part of the unique key
1703 -- that uniquely identifies an item record.
1704 -- p_lpn_id IN NUMBER Required
1705 -- Corresponds to the column lpn_id of the LPN to validate
1706 -- p_validation_type IN VARCHAR2 Required
1707 -- The UOM in which secondary quantity should be calculated from
1708 -- If no UOM is passes, API will use the primary UOM
1709 -- Version : Current version 1.0
1710 -- End of comments
1711
1712 FUNCTION Validate_LPN (
1713 p_organization_id IN NUMBER
1714 , p_lpn_id IN NUMBER
1715 , p_validation_type IN VARCHAR2
1716 ) RETURN NUMBER;
1717
1718 -- Start of comments
1719 -- API name: Merge_Up_LPN
1720 -- Type : Private
1721 -- Pre-reqs: None.
1722 -- Function: Creates and executes transactions in MTL_MATERIAL_TRANSACTIONS_TEMP
1723 -- to consolidate contents of a nested LPN structure into the outermost
1724 -- LPN
1725 -- Example: Before Merge Up
1726 --
1727 -- Item A Qty 3 Item A Qty 2
1728 -- Item B Qty 4 Item C Qty 5
1729 -- -------------- Item C Qty 2 --------------
1730 -- LPN3 Item D Qty 3 LPN2
1731 -- ----------------------------------------------
1732 -- LPN 1
1733 -- After Merge Up
1734 --
1735 -- Item A Qty 5
1736 -- Item B Qty 4
1737 -- Item C Qty 7
1738 -- Item D Qty 3 Empty Empty
1739 -- -------------- -------------- --------------
1740 -- LPN 1 LPN 2 LPN 3
1741 -- Parameters:
1742 -- IN: p_organization_id IN NUMBER Required
1743 -- LPN organization id. Part of the unique key
1744 -- that uniquely identifies an LPN record.
1745 -- p_outermost_lpn_id IN NUMBER Required
1746 -- Corresponds to the column lpn_id of the LPN to validate
1747 -- This LPN must be the outermost LPN, i.e. cannot have any
1748 -- parent LPN (nested)
1749 -- Version : Current version 1.0
1750 -- End of comments
1751
1752 PROCEDURE Merge_Up_LPN (
1753 p_api_version IN NUMBER
1754 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1755 , p_commit IN VARCHAR2 := fnd_api.g_false
1756 , x_return_status OUT NOCOPY VARCHAR2
1757 , x_msg_count OUT NOCOPY NUMBER
1758 , x_msg_data OUT NOCOPY VARCHAR2
1759 , p_organization_id IN NUMBER
1760 , p_outermost_lpn_id IN NUMBER
1761 );
1762
1763 -- Start of comments
1764 -- API name: Break_Down_LPN
1765 -- Type : Private
1766 -- Pre-reqs: None.
1767 -- Function: Creates and executes transactions in MTL_MATERIAL_TRANSACTIONS_TEMP
1768 -- to unnest LPN structure but leaving all contents in their original
1769 -- LPNs
1770 -- Example: Before Break Down
1771 --
1772 -- Item A Qty 3 Item A Qty 2
1773 -- Item B Qty 4 Item C Qty 5
1774 -- -------------- Item C Qty 2 --------------
1775 -- LPN3 Item D Qty 3 LPN2
1776 -- ----------------------------------------------
1777 -- LPN 1
1778 -- After Break Down
1779 --
1780 -- Item C Qty 2 Item A Qty 2 Item A Qty 3
1781 -- Item D Qty 3 Item C Qty 5 Item B Qty 4
1782 -- -------------- -------------- --------------
1783 -- LPN 1 LPN 2 LPN 3
1784 -- Parameters:
1785 -- IN: p_organization_id IN NUMBER Required
1786 -- LPN organization id. Part of the unique key
1787 -- that uniquely identifies an LPN record.
1788 -- p_outermost_lpn_id IN NUMBER Required
1789 -- Corresponds to the column lpn_id of the LPN to validate
1790 -- This LPN must be the outermost LPN, i.e. cannot have any
1791 -- parent LPN (nested)
1792 -- Version : Current version 1.0
1793 -- End of comments
1794
1795 PROCEDURE Break_Down_LPN (
1796 p_api_version IN NUMBER
1797 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1798 , p_commit IN VARCHAR2 := fnd_api.g_false
1799 , x_return_status OUT NOCOPY VARCHAR2
1800 , x_msg_count OUT NOCOPY NUMBER
1801 , x_msg_data OUT NOCOPY VARCHAR2
1802 , p_organization_id IN NUMBER
1803 , p_outermost_lpn_id IN NUMBER
1804 );
1805
1806 -- Start of comments
1807 -- API name: Initialize_LPN
1808 -- Type : Private
1809 -- Pre-reqs: None.
1810 -- Function: Clears LPN of all contents and resets LPN to defined but not used
1811 -- (pregenerated) status, clearing subinventory and location information.
1812 -- If LPN is nested, all nested lpns will also be initialized
1813 -- API will only remove information from
1814 -- Parameters:
1815 -- IN: p_organization_id IN NUMBER Required
1816 -- LPN organization id. Part of the unique key
1817 -- that uniquely identifies an LPN record.
1818 -- p_outermost_lpn_id IN NUMBER Required
1819 -- Corresponds to the column lpn_id of the LPN to Initialize
1820 -- This LPN must be the outermost LPN, i.e. cannot have any
1821 -- parent LPN (nested)
1822 -- Version : Current version 1.0
1823 -- End of comments
1824
1825 PROCEDURE Initialize_LPN (
1826 p_api_version IN NUMBER
1827 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1828 , p_commit IN VARCHAR2 := fnd_api.g_false
1829 , x_return_status OUT NOCOPY VARCHAR2
1830 , x_msg_count OUT NOCOPY NUMBER
1831 , x_msg_data OUT NOCOPY VARCHAR2
1832 , p_organization_id IN NUMBER
1833 , p_outermost_lpn_id IN NUMBER
1834 );
1835
1836 /*---------------------------------------------------------------------*/
1837 -- Name
1838 -- PROCEDURE plan_delivery
1839 /*---------------------------------------------------------------------*/
1840 -- Purpose
1841 -- Informs shipping at the time of a packing operation to inform shipping
1842 -- of the packing event.
1843 --
1844 -- Input Parameters
1845 -- p_lpn_id The LPN which is being split or consolidated.
1846 -- Output Parameters
1847 -- x_return_status
1848 -- if the plan_delivery API succeeds, the value is
1849 -- fnd_api.g_ret_sts_success;
1850 -- if there is an expected error, the value is
1851 -- fnd_api.g_ret_sts_error;
1852 -- if there is an unexpected error, the value is
1853 -- fnd_api.g_ret_sts_unexp_error;
1854 -- x_msg_count
1855 -- if there is one or more errors, the number of error messages
1856 -- in the buffer
1857 -- x_msg_data
1858 -- if there is one and only one error, the error message
1859 --
1860 PROCEDURE plan_delivery(p_lpn_id IN NUMBER,
1861 x_return_status OUT nocopy VARCHAR2,
1862 x_msg_data OUT nocopy VARCHAR2,
1863 x_msg_count OUT nocopy NUMBER);
1864
1865 -------------------------------------------------
1866 -- Added for LSP Project, bug 9087971
1867 -- NAME
1868 -- PROCEDURE get_item_from_lpn
1869 -------------------------------------------------
1870 -- Purpose
1871 -- Following procedure will get the concatenated item segments from the given LPN.
1872 --
1873 -- Input Parameters
1874 -- p_org Organization ID
1875 -- p_lpn_id LPN ID
1876 -- p_lpn_context Context of the LPN
1877 --
1878 -- Output Parameters
1879 -- x_item Item name
1880 PROCEDURE get_item_from_lpn
1881 (
1882 p_org IN NUMBER,
1883 p_lpn_id IN NUMBER,
1884 p_lpn_context IN NUMBER,
1885 x_item OUT NOCOPY VARCHAR2 );
1886
1887 -- 16284527 start
1888 PROCEDURE lock_org_lpn
1889 (
1890 p_lpn_id IN NUMBER,
1891 p_org_id IN NUMBER,
1892 x_err_code OUT NOCOPY NUMBER,
1893 x_err_msg OUT NOCOPY VARCHAR2
1894 );
1895 -- 16284527 end
1896
1897 END WMS_CONTAINER_PVT;
1898