1 PACKAGE WMS_CATCH_WEIGHT_PVT AS
2 /* $Header: WMSVCWTS.pls 120.0.12010000.1 2008/07/28 18:37:47 appldev ship $ */
3
4 -- Constants for MTL_SYSTEM_ITEMS_B.TRACKING_QUANTITY_IND
5 -- Possible values are P/PS (primary/primary and secondary)
6 G_TRACK_PRIMARY CONSTANT VARCHAR(30) := 'P';
7 G_TRACK_PRIMARY_SECONDARY CONSTANT VARCHAR(30) := 'PS';
8
9 -- Constants for MTL_SYSTEM_ITEMS_B.ONT_PRICING_QTY_SOURCE
10 -- Possible values are P/S (primary/secondary)
11 G_PRICE_PRIMARY CONSTANT VARCHAR(30) := 'P';
12 G_PRICE_SECONDARY CONSTANT VARCHAR(30) := 'S';
13
14 -- Constants for MTL_SYSTEM_ITEMS_B.SECONDARY_DEFAULT_IND
15 -- Possible values are F/D/N (Fixed/Default/No default)
16 G_SECONDARY_FIXED CONSTANT VARCHAR(30) := 'F';
17 G_SECONDARY_DEFAULT CONSTANT VARCHAR(30) := 'D';
18 G_SECONDARY_NO_DEFAULT CONSTANT VARCHAR(30) := 'N';
19
20 -- Constants used for return value of Check_Lpn_Secondary_Quantity
21 G_CHECK_SUCCESS CONSTANT NUMBER := 0;
22 G_CHECK_ERROR CONSTANT NUMBER := 1;
23 G_CHECK_WARNING CONSTANT NUMBER := 2;
24
25 TYPE t_genref IS REF CURSOR;
26
27 -- Start of comments
28 -- API name: Get_Catch_Weight_Attributes
29 -- Type : Private
30 -- Pre-reqs: None.
31 -- Function: Returns the column values from MTL_SYSTEM_ITEMS
32 -- concerning catch weights for a given organization
33 -- and inventory_item_id pair
34 -- Parameters:
35 -- IN: p_organization_id IN NUMBER Required
36 -- Item organization id. Part of the unique key
37 -- that uniquely identifies an item record.
38 -- p_inventory_item_id IN NUMBER Required
39 -- Corresponds to the column INVENTORY_ITEM_ID in
40 -- the table MTL_SYSTEM_ITEMS, and identifies the
41 -- record to in which catch weigth attributes should
42 -- be retrieved.
43 -- p_quantity IN NUMBER Optional
44 -- Quantity which secondary quantity should be calculated from
45 -- p_uom_code IN NUMBER Optional
46 -- The UOM in which secondary quantity should be calculated from
47 -- If no UOM is passes, API will use the primary UOM
48 -- OUT: x_tracking_quantity_ind OUT NOCOPY VARCHAR2
49 -- Corresponds to MTL_SYSTEM_ITEMS_B.TRACKING_QUANTITY_IND
50 -- x_ont_pricing_qty_source OUT NOCOPY VARCHAR2
51 -- Corresponds to MTL_SYSTEM_ITEMS_B.ONT_PRICING_QTY_SOURCE
52 -- x_secondary_default_ind OUT NOCOPY VARCHAR2
53 -- Corresponds to MTL_SYSTEM_ITEMS_B.SECONDARY_DEFULAT_IND
54 -- x_secondary_quantity OUT NOCOPY NUMBER
55 -- If item is catch weight enabled and can be defaulted, returns
56 -- the default secondary quantity based on the conversion of p_quantity
57 -- into the secondary uom. Returns null otherwise.
58 -- x_secondary_uom_code OUT NOCOPY VARCHAR2
59 -- Corresponds to MTL_SYSTEM_ITEMS_B.SECONDARY_UOM_CODE
60 -- x_uom_deviation_high OUT NOCOPY NUMBER
61 -- Corresponds to MTL_SYSTEM_ITEMS_B.DUAL_UOM_DEVIATION_HIGH
62 -- x_uom_deviation_low OUT NOCOPY NUMBER
63 -- Corresponds to MTL_SYSTEM_ITEMS_B.DUAL_UOM_DEVIATION_LOW
64 -- Version : Current version 1.0
65 -- End of comments
66
67 PROCEDURE Get_Catch_Weight_Attributes (
68 p_api_version IN NUMBER
69 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
70 , x_return_status OUT NOCOPY VARCHAR2
71 , x_msg_count OUT NOCOPY NUMBER
72 , x_msg_data OUT NOCOPY VARCHAR2
73 , p_organization_id IN NUMBER
74 , p_inventory_item_id IN NUMBER
75 , p_quantity IN NUMBER := NULL
76 , p_uom_code IN VARCHAR2 := NULL
77 , x_tracking_quantity_ind OUT NOCOPY VARCHAR2
78 , x_ont_pricing_qty_source OUT NOCOPY VARCHAR2
79 , x_secondary_default_ind OUT NOCOPY VARCHAR2
80 , x_secondary_quantity OUT NOCOPY NUMBER
81 , x_secondary_uom_code OUT NOCOPY VARCHAR2
82 , x_uom_deviation_high OUT NOCOPY NUMBER
83 , x_uom_deviation_low OUT NOCOPY NUMBER
84 );
85
86
87 -- Start of comments
88 -- API name: Get_Ont_Pricing_Qty_Source
89 -- Type : Private
90 -- Pre-reqs: None.
91 -- Function: Returns the column value of ONT_PRICING_QTY_SOURCE
92 -- from MTL_SYSTEM_ITEMS for a given organization and
93 -- inventory_item_id pair
94 -- Parameters:
95 -- IN: p_organization_id IN NUMBER Required
96 -- Item organization id. Part of the unique key
97 -- that uniquely identifies an item record.
98 -- p_inventory_item_id IN NUMBER Required
99 -- Corresponds to the column INVENTORY_ITEM_ID in
100 -- the table MTL_SYSTEM_ITEMS, and identifies the
101 -- record to in which catch weigth attributes should
102 -- be retrieved.
103 -- OUT: returns the value of MTL_SYSTEM_ITEMS_B.ONT_PRICING_QTY_SOURCE
104 --
105 -- Version : Current version 1.0
106 -- End of comments
107 FUNCTION Get_Ont_Pricing_Qty_Source (
108 p_api_version IN NUMBER
109 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
110 , x_return_status OUT NOCOPY VARCHAR2
111 , x_msg_count OUT NOCOPY NUMBER
112 , x_msg_data OUT NOCOPY VARCHAR2
113 , p_organization_id IN NUMBER
114 , p_inventory_item_id IN NUMBER
115 ) RETURN VARCHAR2;
116
117 -- Start of comments
118 -- API name: Get_Default_Secondary_Quantity
119 -- Type : Private
120 -- Function: For the given item, org, quantity and uom passed by user for it will
121 -- return the ONT_PRICING_QTY_SOURCE and secondary_uom_code, from
122 -- MTL_SYSTEM_ITEMS and calculate the secondary quantity if the item is
123 -- set up to be 'defaultable'.
124 -- Parameters:
125 -- IN: p_organization_id IN NUMBER Required
126 -- Item organization id. Part of the unique key
127 -- that uniquely identifies an item record.
128 -- p_inventory_item_id IN NUMBER Required
129 -- Item ID of item which secondary quantity should be calculated for.
130 -- p_quantity IN NUMBER Required
131 -- Quantity which secondary quantity should be calculated from
132 -- p_uom_code IN NUMBER Optional
133 -- The UOM in which secondary quantity should be calculated from
134 -- If no UOM is passes, API will use the primary UOM
135 -- p_secondary_uom_code IN VARCHAR2 Optional
136 -- value to be used to calcuate default secondary quantity. If left null
137 -- will use secondary_uom_code defined in MTL_SYSTEM_ITEMS.
138 -- p_ont_pricing_qty_source
139 -- value to be used to determine catch weight enabled. If left null will
140 -- use value defined in MTL_SYSTEM_ITEMS.
141 -- p_secondary_default_ind
142 -- value to be used to determine item can default catch weights. If left null
143 -- will use value defined in MTL_SYSTEM_ITEMS.
144 -- IN OUT:
145 -- x_ont_pricing_qty_source
146 -- takes in MTL_SYSTEM_ITEMS_B.ONT_PRICING_QTY_SOURCE if user has it available
147 -- this reduces number of database hits if not availaible API returns table value
148 -- for the given item
149 -- x_secondary_uom_code OUT NOCOPY VARCHAR2
150 -- takes in secondary uom if user has value already available. If not API
151 -- returns the default secondary uom if item is catch weight is enabled
152 -- null otherwise
153 -- OUT:
154 -- x_secondary_quantity OUT NOCOPY NUMBER
155 -- If item is catch weight enabled and can be defaulted, returns
156 -- the default secondary quantity based on the conversion of p_quantity
157 -- into the secondary uom. Returns null otherwise.
158 -- Version : Current version 1.0
159 -- End of comments
160
161 PROCEDURE Get_Default_Secondary_Quantity (
162 p_api_version IN NUMBER
163 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
164 , x_return_status OUT NOCOPY VARCHAR2
165 , x_msg_count OUT NOCOPY NUMBER
166 , x_msg_data OUT NOCOPY VARCHAR2
167 , p_organization_id IN NUMBER
168 , p_inventory_item_id IN NUMBER
169 , p_quantity IN NUMBER
170 , p_uom_code IN VARCHAR2
171 , p_secondary_default_ind IN VARCHAR2 := NULL
172 , x_ont_pricing_qty_source IN OUT NOCOPY VARCHAR2
173 , x_secondary_uom_code IN OUT NOCOPY VARCHAR2
174 , x_secondary_quantity OUT NOCOPY NUMBER
175 );
176
177 -- Start of comments
178 -- API name: Check_Secondary_Qty_Tolerance
179 -- Type : Private
180 -- Function: Based on the source table (MMTT or WDD) the api will retrieve the necessary
181 -- information from the specified record to see if the item is catch weight
182 -- enabled. If so, it will return the ONT_PRICING_QTY_SOURCE and the secondary
183 -- UOM. If the item is also catch weight defaltable it will try to calculate
184 -- the secondary quantity.
185 -- Parameters:
186 -- IN: p_organization_id IN NUMBER Required
187 -- Item organization id.
188 -- p_inventory_item_id IN NUMBER Required
189 -- Item ID of item which the tolerances should be checked.
190 -- p_quantity IN NUMBER Required
191 -- Quantity which secondary quantity should be checked for tolerance against
192 -- p_uom_code IN NUMBER Required
193 -- The UOM in which secondary quantity should be checked for tolerance
194 -- against. If no UOM is passes, API will use the primary UOM
195 -- p_secondary_quantity IN NUMBER Required
196 -- the secondary quantity in secondary uom
197 -- p_secondary_uom_code IN VARCHAR2 Optional
198 -- value to be used to calcuate default secondary quantity. If left null
199 -- will use secondary_uom_code defined in MTL_SYSTEM_ITEMS.
200 -- p_ont_pricing_qty_source
201 -- value to be used to determine catch weight enabled. If left null will
202 -- use the value defined in MTL_SYSTEM_ITEMS.
203 -- p_uom_deviation_high
204 -- value to be used to determine the upper deviation. If left null will
205 -- use value defined in MTL_SYSTEM_ITEMS.
206 -- p_uom_deviation_low
207 -- value to be used to determine the lower deviation. If left null will
208 -- use value defined in MTL_SYSTEM_ITEMS.
209 -- OUT: returns 0 if the secodnary quantity is within tolerance
210 -- 1 if the secodnary quantity is above the upper tolerance
211 -- -1 if the secodnary quantity is beneath the lower tolerance
212 -- Version : Current version 1.0
213 -- End of comments
214
215 FUNCTION Check_Secondary_Qty_Tolerance (
216 p_api_version IN NUMBER
217 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
218 , x_return_status OUT NOCOPY VARCHAR2
219 , x_msg_count OUT NOCOPY NUMBER
220 , x_msg_data OUT NOCOPY VARCHAR2
221 , p_organization_id IN NUMBER
222 , p_inventory_item_id IN NUMBER
223 , p_quantity IN NUMBER
224 , p_uom_code IN VARCHAR2
225 , p_secondary_quantity IN NUMBER
226 , p_secondary_uom_code IN VARCHAR2 := NULL
227 , p_ont_pricing_qty_source IN VARCHAR2 := NULL
228 , p_uom_deviation_high IN NUMBER := NULL
229 , p_uom_deviation_low IN NUMBER := NULL
230 ) RETURN NUMBER;
231
232 -- Start of comments
233 -- API name: Update_Shipping_Secondary_Qty
234 -- Type : Private
235 -- Function: Given a delivery_detail_id for a line from wsh_delivery_details
236 -- API will check tolerances and call a shipping API to update the
237 -- picked_quantity2 and requested_quantity_uom2 fields
238 -- Parameters:
239 -- IN: p_delivery_detail_id IN NUMBER Required
240 -- Delivery detail ID of record from wsh_delivery_details to be updated
241 -- p_secondary_quantity IN NUMBER Required
242 -- value to be used to update picked_quantity2. If left null, API will
243 -- try to default value if item is defaultable. If value is passed as
244 -- FND_API.G_MISS_NUM, API will null the picked_quantity2 and
245 -- requested_quantity_uom2 fields for that particular delivery detail
246 -- p_secondary_uom_code IN VARCHAR2 Optional
247 -- value to be used to update requested_quantity_uom2. If left null will
248 -- use secondary_uom_code defined in MTL_SYSTEM_ITEMS. If defined, will
249 -- be validated against value defined in MTL_SYSTEM_ITEMS and fail if they
250 -- are not the same, since we currently only support one secondary UOM
251 -- Version : Current version 1.0
252 -- End of comments
253
254 PROCEDURE Update_Shipping_Secondary_Qty (
255 p_api_version IN NUMBER
256 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
257 , p_commit IN VARCHAR2 := fnd_api.g_false
258 , x_return_status OUT NOCOPY VARCHAR2
259 , x_msg_count OUT NOCOPY NUMBER
260 , x_msg_data OUT NOCOPY VARCHAR2
261 , p_delivery_detail_id IN NUMBER
262 , p_secondary_quantity IN NUMBER
263 , p_secondary_uom_code IN VARCHAR2 := NULL
264 );
265
266 -- Start of comments
267 -- API name: Update_Parent_Delivery_Sec_Qty
268 -- Type : Private
269 -- Function: Given a delivery_detail_id for a License Plate Number and content item
270 -- information. API will use a shipping API to update the
271 -- picked_quantity2 and requested_quantity_uom2 fields, distributing to
272 -- proportionately over all child WDD lines for that item/rev/lot combination
273 -- Parameters:
274 -- IN: p_organization_id IN NUMBER Required
275 -- Organization id.
276 -- p_parent_del_det_id IN NUMBER Required
277 -- Delivery detail ID of License Plate Number
278 -- p_inventory_item_id IN NUMBER Required
279 -- Item ID of item to be update with secondary quantity and secondary quantity UOM.
280 -- p_revision IN VARCHAR2 Optional
281 -- Revision of item to be update with secondary quantity and secondary quantity UOM.
282 -- required for revision controlled items.
283 -- p_lot_number IN VARCHAR2 Optional
284 -- Lot number of item to be update with secondary quantity and secondary quantity UOM.
285 -- required for lot controlled items.
286 -- p_quantity IN NUMBER Required
287 -- Quantity which secondary quantity will use to determine proportionate distribution
288 -- p_uom_code IN NUMBER Required
289 -- The UOM in which secondary quantity will use to calculate proportionate distribution.
290 -- p_secondary_quantity IN NUMBER
291 -- the secondary quantity in secondary uom
292 -- p_secondary_uom_code IN VARCHAR2 Optional
293 -- value to be used to update requested_quantity_uom2. If left null will
294 -- use secondary_uom_code defined in MTL_SYSTEM_ITEMS. If defined, will
295 -- be validated against value defined in MTL_SYSTEM_ITEMS and fail if they
296 -- are not the same, since we currently only support one secondary UOM
297 -- Version : Current version 1.0
298 -- End of comments
299
300 PROCEDURE Update_Parent_Delivery_Sec_Qty (
301 p_api_version IN NUMBER
302 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
303 , p_commit IN VARCHAR2 := fnd_api.g_false
304 , x_return_status OUT NOCOPY VARCHAR2
305 , x_msg_count OUT NOCOPY NUMBER
306 , x_msg_data OUT NOCOPY VARCHAR2
307 , p_organization_id IN NUMBER
308 , p_parent_del_det_id IN NUMBER
309 , p_inventory_item_id IN NUMBER
310 , p_revision IN VARCHAR2 := NULL
311 , p_lot_number IN VARCHAR2 := NULL
312 , p_quantity IN NUMBER
313 , p_uom_code IN VARCHAR2
314 , p_secondary_quantity IN NUMBER
315 , p_secondary_uom_code IN VARCHAR2
316 );
317
318 -- Start of comments
319 -- API name: Update_LPN_Secondary_Quantity
320 -- Type : Private
321 -- Function: Given a lpn_id for a License Plate Number and content item information, and
325 -- The secondary quantity will be distributed proportionately over all child lines
322 -- table source, API will update the picked_quantity2 and requested_quantity_uom2
323 -- fields if source is 'WDD', or secondary quantity and UOM fields in
324 -- MTL_MATERIAL_TRANSACTIONS_TEMP and MTL_TRANSACTION_LOTS_TEMP if source is 'MMTT'.
326 -- for that item/rev/lot combination
327 -- Parameters:
328 -- IN: p_record_source IN VARCHAR2 Required
329 -- Determines the source table where the record should be updated
330 -- 'MMTT' = MTL_MATERIAL_TRANSACTIONS_TEMP/MTL_TRANSACTION_LOTS_TEMP
331 -- 'WDD' = WSH_DELIVERY_DETAILS
332 -- p_organization_id IN NUMBER Required
333 -- Organization id.
334 -- p_lpn_id IN NUMBER Required
335 -- LPN ID of License Plate Number
336 -- p_inventory_item_id IN NUMBER Required
337 -- Item ID of item to be update with secondary quantity and secondary quantity UOM.
338 -- p_revision IN VARCHAR2 Optional
339 -- Revision of item to be update with secondary quantity and secondary quantity UOM.
340 -- required for revision controlled items.
341 -- p_lot_number IN VARCHAR2 Optional
342 -- Lot number of item to be update with secondary quantity and secondary quantity UOM.
343 -- required for lot controlled items.
344 -- p_quantity IN NUMBER Required
345 -- Quantity which secondary quantity will use to determine proportionate distribution
346 -- p_uom_code IN NUMBER Required
347 -- The UOM in which secondary quantity will use to calculate proportionate distribution.
348 -- p_secondary_quantity IN NUMBER
349 -- the secondary quantity in secondary uom
350 -- p_secondary_uom_code IN VARCHAR2 Optional
351 -- value to be used to update requested_quantity_uom2. If left null will
352 -- use secondary_uom_code defined in MTL_SYSTEM_ITEMS. If defined, will
353 -- be validated against value defined in MTL_SYSTEM_ITEMS and fail if they
354 -- are not the same, since we currently only support one secondary UOM
355 -- Version : Current version 1.0
356 -- End of comments
357
358 PROCEDURE Update_LPN_Secondary_Quantity (
359 p_api_version IN NUMBER
360 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
361 , p_commit IN VARCHAR2 := fnd_api.g_false
362 , x_return_status OUT NOCOPY VARCHAR2
363 , x_msg_count OUT NOCOPY NUMBER
364 , x_msg_data OUT NOCOPY VARCHAR2
365 , p_record_source IN VARCHAR2
366 , p_organization_id IN NUMBER
367 , p_lpn_id IN NUMBER
368 , p_inventory_item_id IN NUMBER
369 , p_revision IN VARCHAR2 := NULL
370 , p_lot_number IN VARCHAR2 := NULL
371 , p_quantity IN NUMBER
372 , p_uom_code IN VARCHAR2
373 , p_secondary_quantity IN NUMBER
374 , p_secondary_uom_code IN VARCHAR2
375 );
376
377
378 -- Start of comments
379 -- API name: Check_LPN_Secondary_Quantity
380 -- Type : Private
381 -- Function: Given a lpn_id for a outermost license plate number and organization ID,
382 -- API will iterate through all it's content items and nested LPNs. Checking
383 -- if the item is catch weight enabled, and if so, check to see if secondary
384 -- quantity and secondary UOM values have been defined for them.
385 -- Parameters:
386 -- IN: p_organization_id IN NUMBER Required
387 -- Organization ID.
388 -- p_outermost_lpn_id IN NUMBER Required
389 -- LPN ID of outermoste license plate number
390 -- OUT: returns:
391 -- 0 (G_CHECK_SUCCESS) if all items in outermost LPN and nested LPNs that are catch
392 -- weight enabled have catch weight values defined.
393 -- 1 (G_CHECK_ERROR) if an item was found in the outermost or nested LPNs that requires
394 -- catch weights but could not be defaulted, either due to setup or invalid uom
395 -- conversion
396 -- 2 (G_CHECK_WARNING) if an item was found in the outermost or nested LPNs that do
397 -- not have catch weight values defined, but can and will be defaulted
398 -- Version : Current version 1.0
399 -- End of comments
400
401 FUNCTION Check_LPN_Secondary_Quantity (
402 p_api_version IN NUMBER
403 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
404 , x_return_status OUT NOCOPY VARCHAR2
405 , x_msg_count OUT NOCOPY NUMBER
406 , x_msg_data OUT NOCOPY VARCHAR2
407 , p_organization_id IN NUMBER
408 , p_outermost_lpn_id IN NUMBER
409 ) RETURN NUMBER;
410
411 -- Start of comments
412 -- API name: GET_OUTER_CATCH_WT_LPN
413 -- Type : Private
414 -- Pre-reqs: None.
415 -- Function: LOV Query, Returns the list of valid Outer LPN
416 -- Parameters:
417 -- IN: p_org_id IN NUMBER Required
418 -- Item organization id. Part of the unique key
419 -- that uniquely identifies an item record.
420 -- p_lpn IN VARCHAR2 Required
421 -- LPN which user might enter.
422 -- p_entry_type IN VARCHAR2 Required
423 -- Could be ALL, NEW, based on the update or New mode user
424 -- selects from the menu
425 -- OUT: x_lpn_lov OUT NOCOPY t_genref
426 -- List of valid outer lpns.
427
428
429 PROCEDURE GET_OUTER_CATCH_WT_LPN
430 (x_lpn_lov OUT NOCOPY t_genref,
434
431 p_org_id IN NUMBER,
432 p_lpn IN VARCHAR2,
433 p_entry_type IN VARCHAR2);
435 -- Start of comments
436 -- API name: GET_INNER_CATCH_WT_LPN
437 -- Type : Private
438 -- Pre-reqs: None.
439 -- Function: LOV Query, Returns the list of valid Inner LPN
440 -- Parameters:
441 -- IN: p_org_id IN NUMBER Required
442 -- Item organization id. Part of the unique key
443 -- that uniquely identifies an item record.
444 -- p_outer_lpn_id IN NUMBER Required
445 -- LPN Id of the outer lpn.
446 -- p_entry_type IN VARCHAR2 Required
447 -- Could be ALL, NEW, based on the update or New mode user
448 -- selects from the menu
449 -- p_lpn_context IN NUMBER
450 -- lpn context of the outer lpn
451 -- p_inner_lpn IN VARCHAR2
452 -- Partial value of inner lpn user might enter
453 -- OUT: x_lpn_lov OUT NOCOPY t_genref
454 -- List of valid inner lpns.
455
456 PROCEDURE GET_INNER_CATCH_WT_LPN
457 (x_lpn_lov OUT NOCOPY t_genref,
458 p_org_id IN NUMBER,
459 p_outer_lpn_id IN NUMBER,
460 p_entry_type IN VARCHAR2,
461 p_lpn_context IN NUMBER,
462 p_inner_lpn IN VARCHAR2);
463
464 -- Start of comments
465 -- API name: GET_CATCH_WT_ITEMS
466 -- Type : Private
467 -- Pre-reqs: None.
468 -- Function: LOV Query, Returns the list of valid Item in the inner LPN
469 -- Parameters:
470 -- IN: p_org_id IN NUMBER Required
471 -- Item organization id. Part of the unique key
472 -- that uniquely identifies an item record.
473 -- p_lpn_id IN NUMBER Required
474 -- LPN Id of the Inner lpn.
475 -- p_entry_type IN VARCHAR2 Required
476 -- Could be ALL, NEW, based on the update or New mode user
477 -- selects from the menu
478 -- p_lpn_context IN NUMBER Required
479 -- lpn context of the outer lpn
480 -- p_concat_item_segment IN VARCHAR2 not Required
481 -- Partial/Full value of the Item
482 -- OUT: x_item_lov OUT NOCOPY t_genref
483 -- List of valid items in inner lpn.
484
485 PROCEDURE GET_CATCH_WT_ITEMS
486 (x_item_lov OUT NOCOPY t_genref,
487 p_org_id IN NUMBER,
488 p_lpn_id IN NUMBER,
489 p_entry_type IN VARCHAR2,
490 p_lpn_context IN NUMBER,
491 p_concat_item_segment IN VARCHAR2);
492
493
494 -- Start of comments
495 -- API name: SHOW_CT_WT_FOR_SPLIT
496 -- Type : Private
497 -- Pre-reqs: None.
498 -- Function: This procedure holds the logic to show the catch weight
499 -- entry fields on the MObile UI or DeskTop form
500 -- If fromLPN has catchweight enabled item and ctwt qty has been
501 -- entered + TOLPN has the same item and ctwt qty is present
502 -- then show the ctwt fields.
503 -- If fromLPN has ctwt item and ctwt qty is 0 + TOLPN has same
504 -- item and ctwt qty = 0
505 -- then show the ctwt fields
506 -- Else dont show the fields
507 -- Parameters:
508 -- IN: p_org_id IN NUMBER Required
509 -- Item organization id. Part of the unique key
510 -- that uniquely identifies an item record.
511 -- p_from_delivery_id IN NUMBER Required
512 -- Delivery Detail Id of the LPN entered by user .
513 -- p_from_item_id IN NUMBER Required
514 -- Item id of the fromlpn item to be split
515 -- p_to_lpn_id IN NUMBER Required
516 -- To lpn id
517 -- OUT: x_show_ct_wt OUT NUMBER
518 -- Valid values are 1 = "YES" OR 0 = "NO"
519
520 PROCEDURE SHOW_CT_WT_FOR_SPLIT (
521 p_org_id IN NUMBER
522 , p_from_lpn_id IN NUMBER
523 , p_from_item_id IN NUMBER
524 , p_from_item_revision IN VARCHAR2
525 , p_from_item_lot_number IN VARCHAR2
526 , p_to_lpn_id IN NUMBER
527 , x_show_ct_wt OUT NOCOPY NUMBER
528 , x_return_status OUT NOCOPY VARCHAR2
529 , x_msg_data OUT NOCOPY VARCHAR2
530 , x_msg_count OUT NOCOPY NUMBER
531
532 );
533
534
535 -- Start of comments
536 -- API name: IS_CT_WT_SPLIT_VALID
537 -- Type : Private
538 -- Pre-reqs: None.
539 -- Function: This function holds the logic to validate the split of ctwt item
540 -- Based on the fm lpn, fm item, item pri qty and item sec qty
541 -- it determines if the left over ct wt is also within tolerances
542 -- Parameters:
543 -- IN: p_org_id IN NUMBER Required
544 -- Item organization id. Part of the unique key
545 -- that uniquely identifies an item record.
546 -- p_from_lpn_id IN NUMBER Required
547 -- lpn id of the from lpn entered by user .
548 -- p_from_item_id IN NUMBER Required
549 -- Item id of the fromlpn item to be split
550 -- p_from_item_revision IN VARCHAR2
551 -- p_from_item_lot_number IN VARCHAR2
552 -- p_from_item_pri_qty IN NUMBER Required
553 -- primary qty that needs to be split
554 -- p_from_item_sec_qty IN NUMBER Required
555 -- sec qty for this item/rev/lot
556 -- OUT: RETURN NUMBER
557 -- Valid values are 1 = "YES" OR 0 = "NO"
558
559 FUNCTION IS_CT_WT_SPLIT_VALID (
560 p_org_id IN NUMBER
561 , p_from_lpn_id IN NUMBER
565 , p_from_item_pri_qty IN NUMBER
562 , p_from_item_id IN NUMBER
563 , p_from_item_revision IN VARCHAR2
564 , p_from_item_lot_number IN VARCHAR2
566 , p_from_item_pri_uom IN VARCHAR2
567 , p_from_item_sec_qty IN NUMBER
568 , x_return_status OUT NOCOPY VARCHAR2
569 , x_msg_data OUT NOCOPY VARCHAR2
570 , x_msg_count OUT NOCOPY NUMBER
571 ) RETURN NUMBER;
572
573
574 -- Start of comments
575 -- API name: VALIDATE_CT_WT_FOR_DELIVERYNUM
576 -- Type : Private
577 -- Pre-reqs: None.
578 -- Function: This procedure holds the logic to validate catch weight
579 -- with in delivery number.
580 -- With the delivery number, find out all lpn (including
581 -- inner lpn's) which has ct wt enabled item and
582 -- ct wt is null. If the item attribute secondary_default_ind
583 -- for that item has
584 -- default set to NO, return error, else try to derive
585 -- sec qty for that item if it is <0 then return error
586 -- else return warning.
590 -- that uniquely identifies an item record.
587 -- Parameters:
588 -- IN: p_org_id IN NUMBER Required
589 -- Item organization id. Part of the unique key
591 -- p_delivery_number IN VARCHAR2 Required
592 -- OUT x_return_status: success, failure
593 -- RETURN 1 --> Error
594 -- 2 --> Warning
595
596 FUNCTION VALIDATE_CT_WT_FOR_DELIVERYNUM (
597 p_api_version IN NUMBER
598 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
599 , x_return_status OUT NOCOPY VARCHAR2
600 , x_msg_count OUT NOCOPY NUMBER
601 , x_msg_data OUT NOCOPY VARCHAR2
602 , p_org_id IN NUMBER
603 , p_delivery_name IN VARCHAR2
604 )RETURN NUMBER;
605
606 END WMS_CATCH_WEIGHT_PVT;