1 PACKAGE wms_rule_pvt AS
2 /* $Header: WMSVPPRS.pls 120.2.12010000.2 2008/09/03 23:49:15 dramamoo ship $ */
3 --
4 -- File : WMSVPPRS.pls
5 -- Content : WMS_Rule_PVT package specification
6 -- Description : WMS rule private API's
7 -- Notes :
8 -- Modified : 02/08/99 mzeckzer created
9 -- Modified : 10/02/02 htnguyen modified
10 --
11 -- API name : Apply
12 -- Type : Private
13 -- Function : Applies a wms rule to the given transaction
14 -- or reservation input parameters and creates recommendations
15 -- Pre-reqs : Record in WMS_STRATEGY_MAT_TXN_TMP_V uniquely
16 -- identified by parameters p_transaction_temp_id and
17 -- p_type_code ( base table for the view is
18 -- MTL_MATERIAL_TRANSACTIONS_TEMP );
19 -- At least one transaction detail record in
20 -- WMS_TRX_DETAILS_TMP_V identified by line type code = 1
21 -- and parameters p_transaction_temp_id and p_type_code
22 -- ( base tables are MTL_MATERIAL_TRANSACTIONS_TEMP and
23 -- WMS_TRANSACTIONS_TEMP, respectively );
24 -- Rule record has to exist in WMS_RULES_B uniquely
25 -- identified by parameter p_rule_id;
26 -- If picking, quantity tree has to exist, created through
27 -- INV_Quantity_Tree_PVT.Create_Tree and uniquely identified
28 -- by parameter p_tree_id
29 -- Parameters :
30 -- p_api_version Standard Input Parameter
31 -- p_init_msg_list Standard Input Parameter
32 -- p_commit Standard Input Parameter
33 -- p_validation_level Standard Input Parameter
34 -- p_rule_id Identifier of the rule to apply
35 -- p_type_code Type code of the rule
36 -- p_partial_success_allowed_flag
37 -- 'Y' or 'N'
38 -- p_transaction_temp_id Identifier for the record in view
39 -- wms_strategy_mat_txn_tmp_v that represents
40 -- the request for detailing
41 -- p_organization_id Organization identifier
42 -- p_inventory_item_id Inventory item identifier
43 -- p_transaction_uom Transaction UOM code
44 -- p_primary_uom Primary UOM code
45 -- p_tree_id Identifier for the quantity tree
46 --
47 -- Output Parameters
48 -- x_return_status Standard Output Parameter
49 -- x_msg_count Standard Output Parameter
50 -- x_msg_data Standard Output Parameter
51 -- x_finished whether the rule has found enough quantity to
52 -- find a location that completely satisfy
53 -- the requested quantity (value is 'Y' or 'N')
54 --
55 -- Version
56 -- Currently version is 1.0
57 --
58 -- Notes : Calls API's of WMS_Common_PVT and INV_Quantity_Tree_PVT
59 -- This API must be called internally by
60 -- WMS_Strategy_PVT.Apply only !
61 --
62
63 --
64 -- Added by htnguyen for Agilent Performance / invalid package issues
65 -- which was causing mobile pages to throw "fatal database error"
66 -- wheneve any rule is modified, if it is in use.
67
68 -- Creating ref cursor to call picking rules
69
70 TYPE t_pick_rec IS RECORD (
71 revision WMS_TRANSACTIONS_TEMP.REVISION%TYPE,
72 lot_number WMS_TRANSACTIONS_TEMP.LOT_NUMBER%TYPE,
73 lot_expiration_date WMS_TRANSACTIONS_TEMP.LOT_EXPIRATION_DATE%TYPE,
74 subinventory_code WMS_TRANSACTIONS_TEMP.FROM_SUBINVENTORY_CODE%TYPE,
75 locator_id WMS_TRANSACTIONS_TEMP.FROM_LOCATOR_ID%TYPE,
76 cost_group_id WMS_TRANSACTIONS_TEMP.FROM_COST_GROUP_ID%TYPE,
77 uom_code VARCHAR2(3),
78 lpn_id WMS_TRANSACTIONS_TEMP.LPN_ID%TYPE,
79 serial_number VARCHAR2(30),
80 quantity WMS_TRANSACTIONS_TEMP.PRIMARY_QUANTITY%TYPE,
81 secondary_quantity WMS_TRANSACTIONS_TEMP.SECONDARY_QUANTITY%TYPE,
82 grade_code VARCHAR2(150),
83 consist_string VARCHAR2(1000),
84 order_by_string VARCHAR2(1000)
85 );
86
87 v_pick_rec t_pick_rec;
88 TYPE Cv_pick_type IS REF CURSOR return v_pick_rec%type;
89
90
91 --- end of ref picking cursor ---
92
93 TYPE t_put_rec IS RECORD (
94 subinventory_code WMS_TRANSACTIONS_TEMP.FROM_SUBINVENTORY_CODE%TYPE,
95 locator_id WMS_TRANSACTIONS_TEMP.FROM_LOCATOR_ID%TYPE,
96 project_id MTL_ITEM_LOCATIONS.PROJECT_ID%TYPE,
97 task_id MTL_ITEM_LOCATIONS.TASK_ID%TYPE
98 );
99
100 v_put_rec t_put_rec;
101 TYPE Cv_put_type IS REF CURSOR return v_put_rec%type;
102
103
104 ----
105
106 TYPE Cv_type IS REF CURSOR;
107
108 -- Global variable to hold counter values for each rule type which would be used to buffer the counter
109 -- for a given session
110
111 g_rule_list_pick_ctr NUMBER;
112 g_rule_list_put_ctr NUMBER;
113 g_rule_list_op_ctr NUMBER;
114 g_rule_list_task_ctr NUMBER;
115 g_rule_list_label_ctr NUMBER;
116
117 ---------------
118 g_serial_objects_used NUMBER ;
119 --[ added as a part of lot indiv support ]
120 g_max_tolerance NUMBER;
121 g_min_tolerance NUMBER;
122 g_min_qty_to_allocate NUMBER;
123 g_over_allocation VARCHAR2(1);
124
125 PROCEDURE apply
126 (p_api_version IN NUMBER ,
127 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
128 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
129 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
130 x_return_status OUT NOCOPY VARCHAR2 ,
131 x_msg_count OUT NOCOPY NUMBER ,
132 x_msg_data OUT NOCOPY VARCHAR2 ,
133 p_rule_id IN NUMBER DEFAULT NULL ,
134 p_type_code IN NUMBER DEFAULT NULL ,
135 p_partial_success_allowed_flag IN VARCHAR2 DEFAULT NULL,
136 p_transaction_temp_id IN NUMBER DEFAULT NULL ,
137 p_organization_id IN NUMBER DEFAULT NULL ,
138 p_inventory_item_id IN NUMBER DEFAULT NULL ,
139 p_transaction_uom IN VARCHAR2 DEFAULT NULL,
140 p_primary_uom IN VARCHAR2 DEFAULT NULL,
141 p_secondary_uom IN VARCHAR2 DEFAULT NULL, -- new
142 p_grade_code IN VARCHAR2 DEFAULT NULL, -- new
143 p_transaction_type_id IN NUMBER DEFAULT NULL ,
144 p_tree_id IN NUMBER DEFAULT NULL ,
145 x_finished OUT NOCOPY VARCHAR2 ,
146 p_detail_serial IN BOOLEAN DEFAULT FALSE ,
147 p_from_serial IN VARCHAR2 DEFAULT NULL ,
148 p_to_serial IN VARCHAR2 DEFAULT NULL ,
149 p_detail_any_serial IN NUMBER DEFAULT NULL,
150 p_unit_volume IN NUMBER DEFAULT NULL,
151 p_volume_uom_code IN VARCHAR2 DEFAULT NULL,
152 p_unit_weight IN NUMBER DEFAULT NULL,
153 p_weight_uom_code IN VARCHAR2 DEFAULT NULL,
154 p_base_uom_code IN VARCHAR2 DEFAULT NULL,
155 p_lpn_id IN NUMBER DEFAULT NULL,
156 p_unit_number IN VARCHAR2 DEFAULT NULL,
157 p_simulation_mode IN NUMBER DEFAULT -1,
158 p_project_id IN NUMBER DEFAULT NULL,
159 p_task_id IN NUMBER DEFAULT NULL
160 );
161
162
163 --Added for bug3237702
164 -- API name : ApplyDefLoc
165 -- Type : Private
166 -- Function : Verifies a Putaway location with the given transaction
167 -- input parameters and creates recommendations
168 -- This API does not utlize the rules and should only be
169 -- called when the Inventory Locator is specified on
170 -- the input transaction and there is no requirement
171 -- to check capacity.
172 -- Pre-reqs :
173 --
174 -- Parameters :
175 -- p_api_version Standard Input Parameter
176 -- p_init_msg_list Standard Input Parameter
177 -- p_commit Standard Input Parameter
178 -- p_validation_level Standard Input Parameter
179 -- p_transaction_temp_id Identifier for the record in view
180 -- wms_strategy_mat_txn_tmp_v that represents
181 -- the request for detailing
182 -- p_organization_id Organization identifier
183 -- p_inventory_item_id Inventory item identifier
184 -- p_transaction_uom Transaction UOM code
185 -- p_primary_uom Primary UOM code
186 -- p_project_id Project associated with transaction
187 -- p_task_id Task associated with transaction
188 --
189 -- Output Parameters
190 -- x_return_status Standard Output Parameter
191 -- x_msg_count Standard Output Parameter
192 -- x_msg_data Standard Output Parameter
193 -- x_finished whether the rule has found enough quantity to
194 -- find a location that completely satisfy
195 -- the requested quantity (value is 'Y' or 'N')
196 --
197 -- Version
198 -- Currently version is 1.0
199 --
200 -- Notes : Calls API's of WMS_Common_PVT
201 -- This API must be called internally by
202 -- WMS_Engine_PVT.Create_Suggestions only !
203 --APPLYDEFLOC
204
205 PROCEDURE applydefloc(
206 p_api_version IN NUMBER ,
207 p_init_msg_list IN VARCHAR2 ,
208 p_commit IN VARCHAR2 ,
209 p_validation_level IN NUMBER ,
210 x_return_status OUT NOCOPY VARCHAR2 ,
211 x_msg_count OUT NOCOPY NUMBER ,
212 x_msg_data OUT NOCOPY VARCHAR2 ,
213 p_transaction_temp_id IN NUMBER ,
214 p_organization_id IN NUMBER ,
215 p_inventory_item_id IN NUMBER ,
216 p_subinventory_code IN VARCHAR2 ,
217 p_locator_id IN NUMBER ,
218 p_transaction_uom IN VARCHAR2 ,
219 p_primary_uom IN VARCHAR2 ,
220 p_transaction_type_id IN NUMBER ,
221 x_finished OUT NOCOPY VARCHAR2 ,
222 p_lpn_id IN NUMBER ,
223 p_simulation_mode IN NUMBER ,
224 p_project_id IN NUMBER ,
225 p_task_id IN NUMBER
226 );
227 --bug3237702 ends
228 --
229 --
230 -- API name : CheckSyntax
231 -- Type : Private
232 -- Function : Checks a wms rule for syntax errors
233 -- ( called by 'WMS Rules' definition form
234 -- during enabling functionality )
235 -- Pre-reqs : one record in WMS_RULES_B uniquely identified by parameter
236 -- p_rule_id
237 -- Input Parameters :
238 -- p_api_version Standard Input Parameter
239 -- p_init_msg_list Standard Input Parameter
240 -- p_validation_level Standard Input Parameter
241 -- p_rule_id Identifier of the rule to check
242 --
243 -- Output Parameters :
244 -- x_return_status Standard Output Parameter
245 -- x_msg_count Standard Output Parameter
246 -- x_msg_data Standard Output Parameter
247 --
248 -- Version :
249 -- Current version 1.0
250 --
251 -- Notes : calls API's of WMS_RE_Common_PVT
252 --
253 PROCEDURE CheckSyntax
254 (p_api_version IN NUMBER ,
255 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
256 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
257 x_return_status OUT NOCOPY VARCHAR2 ,
258 x_msg_count OUT NOCOPY NUMBER ,
259 x_msg_data OUT NOCOPY VARCHAR2 ,
260 p_rule_id IN NUMBER DEFAULT NULL
261 );
262 --
263 TYPE rule_rec IS RECORD
264 (rule_id wms_rules_vl.rule_id%TYPE DEFAULT NULL ,
265 organization_id wms_rules_vl.organization_id%TYPE DEFAULT NULL ,
266 type_code wms_rules_vl.type_code%TYPE DEFAULT NULL ,
267 name wms_rules_vl.name%TYPE DEFAULT NULL ,
268 description wms_rules_vl.description%TYPE DEFAULT NULL ,
269 qty_function_parameter_id
270 wms_rules_vl.qty_function_parameter_id%TYPE DEFAULT NULL,
271 enabled_flag wms_rules_vl.enabled_flag%TYPE DEFAULT NULL ,
272 user_defined_flag
273 wms_rules_vl.user_defined_flag%TYPE DEFAULT NULL ,
274 attribute_category
275 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
276 attribute1 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
277 attribute2 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
278 attribute3 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
279 attribute4 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
280 attribute5 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
281 attribute6 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
282 attribute7 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
283 attribute8 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
284 attribute9 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
285 attribute10 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
286 attribute11 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
287 attribute12 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
288 attribute13 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
289 attribute14 wms_rules_vl.attribute_category%TYPE DEFAULT NULL,
290 attribute15 wms_rules_vl.attribute_category%TYPE DEFAULT NULL
291 );
292 --
293 -- API name : Find_Rule
294 -- Type : Private
295 -- Function : find a rule by id
296 -- Input Parameters :
297 -- p_api_version Standard Input Parameter
298 -- p_init_msg_list Standard Input Parameter
299 -- p_rule_id Identifier of the rule
300 --
301 -- Output Parameters:
302 -- x_return_status Standard Output Parameter
303 -- x_msg_count Standard Output Parameter
304 -- x_msg_data Standard Output Parameter
305 -- x_found true if found ; else false
306 -- x_rule_rec info of the rule if found
307
308 -- Version :
309 -- Current version 1.0
310 --
311 -- Notes : calls API's of WMS_RE_Common_PVT
312 --
313 PROCEDURE find_rule
314 ( p_api_version IN NUMBER
315 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
316 ,x_return_status OUT NOCOPY VARCHAR2
317 ,x_msg_count OUT NOCOPY NUMBER
318 ,x_msg_data OUT NOCOPY VARCHAR2
319 ,p_rule_id IN NUMBER
320 ,x_found OUT NOCOPY BOOLEAN
321 ,x_rule_rec OUT NOCOPY rule_rec
322 );
323
324 PROCEDURE GetPackageName
325 (p_rule_id IN NUMBER,
326 x_package_name OUT NOCOPY VARCHAR2
327 );
328
329 -- ### Added by Johnson Abraham.
330 -- ### Until patchset 'I', this used to be a private API.
331 -- ### Added signature to the Spec to make it a Public API since it is
332 -- ### also called from the wms_rule_pvt_ext_psetj(WMSOPPAB.pls) in patchset
333 -- ### 'J'.
334 Procedure execute_op_rule(
335 p_rule_id in number
336 , p_task_id in number
337 , x_return_status out NOCOPY number
338 );
339
340
341 PROCEDURE GenerateRulePackage
342 (p_api_version IN NUMBER ,
343 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
344 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
345 x_return_status OUT NOCOPY VARCHAR2 ,
346 x_msg_count OUT NOCOPY NUMBER ,
350
347 x_msg_data OUT NOCOPY VARCHAR2 ,
348 p_rule_id IN NUMBER DEFAULT NULL
349 );
351 --
352 -- API name : AssignTTs
353 -- Type : Private
354 -- Function : Assign task type to records in MMTT
355 -- Input Parameters :
356 --
357 -- Output Parameters:
358 -- Version :
359 -- Current version 1.0
360 --
361 -- Notes : calls AssignTT(p_task_id NUMBER)
362 -- for a given MO header
363 --
364
365 PROCEDURE assignTTs
366 (p_api_version IN NUMBER ,
367 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
368 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
369 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
370 x_return_status OUT NOCOPY VARCHAR2,
371 x_msg_count OUT NOCOPY NUMBER ,
372 x_msg_data OUT NOCOPY VARCHAR2 ,
373 p_move_order_header_id IN NUMBER);
374
375
376 --
377 -- API name : AssignTT
378 -- Type : Private
379 -- Function : Assign task type to a specific record in MMTT
380 -- Input Parameters :
381 -- p_task_id NUMBER
382 --
383 -- Output Parameters:
384 -- Version :
385 -- Current version 1.0
386 --
387 -- Notes :
388 --
389
390 PROCEDURE AssignTT(
391 p_api_version IN NUMBER ,
392 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
393 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
394 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
395 x_return_status OUT NOCOPY VARCHAR2,
396 x_msg_count OUT NOCOPY NUMBER ,
397 x_msg_data OUT NOCOPY VARCHAR2 ,
398 p_task_id IN NUMBER DEFAULT NULL );
399
400
401
402 --
403 -- API name : CalcRuleWeight
404 -- Type : Private
405 -- Function : Calculate initial rule weight based on number of distinct restriction
406 -- parameters. This is currently the requirement for task type assignment
407 --
408 -- Input Parameters :
409 -- p_task_id NUMBER
410 --
411 -- Output Parameters:
412 -- Version :
413 -- Current version 1.0
414 --
415 -- Notes :
416 --
417
418 PROCEDURE CalcRuleWeight (p_rule_id NUMBER);
419
420 --Name: GetConversionRate
421 --Function: Returns conversion rate between uom and base uom for
422 -- given inventory_item_id, or returns default conversion rate
423 -- for given UOM.
424 --
425
426 FUNCTION GetConversionRate (p_uom_code VARCHAR2,
427 p_organization_id NUMBER,
428 p_inventory_item_id NUMBER DEFAULT 0)
429 RETURN NUMBER;
430
431
432 --===========================================================================================
433 --
434 -- API name : ApplyLabel
435 -- Type : Private
436 -- Function : Retrieve Label based on Label request
437 -- Input Parameters :
438 -- p_label_request_id NUMBER
439 -- p_document_id NUMBER
440 --
441 -- Output Parameters: x_label_format_id
442 -- Version :
443 -- Current version 1.0
444 --
445 -- Notes :
446 --
447 -- This procedure retrieves a specific label for a label request in
448 -- wms_label_requests.
449 -- This procedure calls the rule package created for Label rules to check
450 -- which label rule actually matches the label request in question.
451 --===========================================================================================
452
453
454 PROCEDURE ApplyLabel(
455 p_api_version IN NUMBER,
456 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
457 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
458 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
459 p_label_request_id IN NUMBER,
460 x_return_status OUT NOCOPY VARCHAR2,
461 x_msg_count OUT NOCOPY NUMBER,
462 x_msg_data OUT NOCOPY VARCHAR2,
463 x_label_format_id OUT NOCOPY NUMBER,
464 x_label_format_name OUT NOCOPY VARCHAR2);
465
466
467
468 /********************************************************************
469 * THis api does the mapping between move order type and WMS system task type
470 * Input : p_move_order_type NUMBER
471 * Out : x_wms_sys_task_type NUMBER
472 *****************************************************************/
473
474
475 PROCEDURE get_WMS_sys_task_type
476 (p_move_order_type IN NUMBER,
477 p_transaction_Action_id IN NUMBER DEFAULT NULL,
478 p_transaction_source_type_id IN NUMBER DEFAULT NULL,
479 x_wms_sys_task_type OUT NOCOPY NUMBER);
480
481
482 --compile_all_rule_packages
483 --Concurrent program for compiling all rules
484 PROCEDURE compile_all_rule_packages
485 ( ERRBUF OUT NOCOPY VARCHAR2
486 , RETCODE OUT NOCOPY NUMBER);
490 (p_simulation_mode IN NUMBER)
487
488
489 FUNCTION IsRuleDebugOn
491 RETURN BOOLEAN;
492
493 --
494 -- Name : Rollback_Capacity_Update
495 -- Function : Used in Apply for Put Away rules.
496 -- In Apply, the update_loc_suggested_capacity procedure gets
497 -- called to update the capacity for a locator. This
498 -- procedure is an autonomous transaction, so it issues
499 -- a commit. If some sort of error occurs in Apply, we need to
500 -- undo those changes. We call revert_loc_suggested_capacity
501 -- to decrement the suggested capacity field. The procedure
502 -- is also a autonomous transaction. This procedure is
503 -- also called from WMS_ENGINE_PVT.
504 -- Pre-reqs : cursor has to be parsed and executed already.
505 -- Notes : private procedure for internal use only
506 --
507 PROCEDURE rollback_capacity_update (
508 x_return_status OUT NOCOPY VARCHAR2
509 ,x_msg_count OUT NOCOPY NUMBER
510 ,x_msg_data OUT NOCOPY VARCHAR2
511 ,p_organization_id IN NUMBER
512 ,p_inventory_item_id IN NUMBER);
513
514 --
515 -- API name : Assign_operation_plans
516 -- Type : Private
517 -- Function : Assign operation_plans to records in MMTT
518 -- Input Parameters :
519 --
520 -- Output Parameters:
521 -- Version :
522 -- Current version 1.0
523 --
524 -- Notes : calls AssignTT(p_task_id NUMBER)
525 -- for a given MO header
526 --
527
528 PROCEDURE assign_operation_plans
529 (p_api_version IN NUMBER ,
530 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
531 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
532 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
533 x_return_status OUT NOCOPY VARCHAR2,
534 x_msg_count OUT NOCOPY NUMBER ,
535 x_msg_data OUT NOCOPY VARCHAR2 ,
536 p_move_order_header_id IN NUMBER);
537
538
539 --
540 -- API name : Assign_operation_plan
541 -- Type : Private
542 -- Function : Assign operation_plan to a specific record in MMTT
543 -- Input Parameters :
544 -- p_task_id NUMBER
545 --
546 -- Output Parameters:
547 -- Version :
548 -- Current version 1.0
549 --
550 -- Notes :
551 --
552
553 PROCEDURE Assign_operation_plan(
554 p_api_version IN NUMBER ,
555 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
556 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
557 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
558 x_return_status OUT NOCOPY VARCHAR2,
559 x_msg_count OUT NOCOPY NUMBER ,
560 x_msg_data OUT NOCOPY VARCHAR2 ,
561 p_task_id IN NUMBER);
562
563
564 --
565 --
566
567 -- J Project
568 -- API name : QuickPick
569 -- Type : Private
570 -- Function : Validates Quantity on Hand and Material Status for the picking Locations
571 -- Called for Inventory Moves.
572 -- Pre-reqs : None
573 --
574 -- Input Parameters :
575 -- p_api_version Standard Input Parameter
576 -- p_init_msg_list Standard Input Parameter
577 -- p_validation_level Standard Input Parameter
578 -- p_rule_id Identifier of the rule to check
579 --
580 -- Output Parameters :
581 -- x_return_status Standard Output Parameter
582 -- x_msg_count Standard Output Parameter
583 -- x_msg_data Standard Output Parameter
584 --
585 -- Version :
586 -- Current version 1.0
587 --
588 -- Notes : calls APPLY() API's of WMS_STRATEGY_PVT
589
590 PROCEDURE QuickPick
591 (p_api_version IN NUMBER ,
592 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false ,
593 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false ,
594 p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full ,
595 x_return_status OUT NOCOPY VARCHAR2 ,
596 x_msg_count OUT NOCOPY NUMBER ,
597 x_msg_data OUT NOCOPY VARCHAR2 ,
598 p_type_code IN NUMBER DEFAULT NULL ,
599 p_transaction_temp_id IN NUMBER DEFAULT NULL ,
600 p_organization_id IN NUMBER DEFAULT NULL ,
601 p_inventory_item_id IN NUMBER DEFAULT NULL ,
602 p_transaction_uom IN VARCHAR2 DEFAULT NULL,
603 p_primary_uom IN VARCHAR2 DEFAULT NULL,
604 p_secondary_uom IN VARCHAR2 DEFAULT NULL, -- new
605 p_grade_code IN VARCHAR2 DEFAULT NULL, -- new
606 p_transaction_type_id IN NUMBER DEFAULT NULL ,
607 p_tree_id IN NUMBER DEFAULT NULL ,
608 x_finished OUT NOCOPY VARCHAR2 ,
612 p_detail_any_serial IN NUMBER DEFAULT NULL,
609 p_detail_serial IN BOOLEAN DEFAULT FALSE ,
610 p_from_serial IN VARCHAR2 DEFAULT NULL ,
611 p_to_serial IN VARCHAR2 DEFAULT NULL ,
613 p_unit_volume IN NUMBER DEFAULT NULL,
614 p_volume_uom_code IN VARCHAR2 DEFAULT NULL,
615 p_unit_weight IN NUMBER DEFAULT NULL,
616 p_weight_uom_code IN VARCHAR2 DEFAULT NULL,
617 p_base_uom_code IN VARCHAR2 DEFAULT NULL,
618 p_lpn_id IN NUMBER DEFAULT NULL,
619 p_unit_number IN VARCHAR2 DEFAULT NULL,
620 p_simulation_mode IN NUMBER DEFAULT -1,
621 p_project_id IN NUMBER DEFAULT NULL,
622 p_task_id IN NUMBER DEFAULT NULL
623 );
624
625 PROCEDURE get_available_inventory(
626 p_api_version IN NUMBER
627 , p_init_msg_list IN VARCHAR2
628 , p_commit IN VARCHAR2
629 , p_validation_level IN NUMBER
630 , x_return_status OUT NOCOPY VARCHAR2
631 , x_msg_count OUT NOCOPY NUMBER
632 , x_msg_data OUT NOCOPY VARCHAR2
633 , p_rule_id IN NUMBER
634 , p_type_code IN NUMBER
635 , p_partial_success_allowed_flag IN VARCHAR2
636 , p_transaction_temp_id IN NUMBER
637 , p_organization_id IN NUMBER
638 , p_inventory_item_id IN NUMBER
639 , p_transaction_uom IN VARCHAR2
640 , p_primary_uom IN VARCHAR2
641 , p_transaction_type_id IN NUMBER
642 , p_tree_id IN NUMBER
643 , x_finished OUT NOCOPY VARCHAR2
644 , p_detail_serial IN BOOLEAN
645 , p_from_serial IN VARCHAR2
646 , p_to_serial IN VARCHAR2
647 , p_detail_any_serial IN NUMBER
648 , p_unit_volume IN NUMBER
649 , p_volume_uom_code IN VARCHAR2
650 , p_unit_weight IN NUMBER
651 , p_weight_uom_code IN VARCHAR2
652 , p_base_uom_code IN VARCHAR2
653 , p_lpn_id IN NUMBER
654 , p_unit_number IN VARCHAR2
655 , p_simulation_mode IN NUMBER
656 , p_project_id IN NUMBER
657 , p_task_id IN NUMBER
658 );
659
660
661
662 END wms_rule_pvt;