1 PACKAGE WSH_OI_VALIDATE AUTHID CURRENT_USER AS
2 /* $Header: WSHSCVLS.pls 115.8 99/07/16 08:21:05 porting ship $ */
3
4 ----------------------------------------------------------------------
5 -- Name : WSH_OI_VALIDATE
6 -- Purpose : Functions/Procedures for performing field Level
7 -- validations, on the four Ship Confirm Open Interface
8 -- tables.
9 -- These are in turn used in the Ship Confirm Open
10 -- Interface PL/SQL Function driver, run_interface
11 -- and can also be re-used by any other API/Form, that
12 -- wants to perform Ship Confirm field level validations.
13 -- History : Sukhbir S. Jolly Created
14 --
15 ----------------------------------------------------------------------
16
17 -- Bug 878148 . Added organization_id as a new parameter
18 PROCEDURE WEIGHT_UOM(x_weight_uom_code IN OUT VARCHAR2 ,
19 x_return_code IN OUT VARCHAR2,
20 x_organization_id IN NUMBER);
21
22 --------------------------------------------------------------------------
23 -- Validate the volume_uom_code, only if it is not null (i.e. specified) in
24 -- the deliveries interface table.
25 --------------------------------------------------------------------------
26
27 -- Bug 878148 . Added organization_id as a new parameter
28 PROCEDURE VOLUME_UOM(x_volume_uom_code IN OUT VARCHAR2 ,
29 x_return_code IN OUT VARCHAR2,
30 x_organization_id IN NUMBER);
31
32 --------------------------------------------------------------------------
33 -- Validate gross weight and net weight in
34 -- the Packed Containers Interface Table.
35 -- If both are not null and not less than 0
36 -- then, gross weight should alway be greater
37 -- than or equal to net weight.
38 --------------------------------------------------------------------------
39 PROCEDURE gross_greater_net(x_gross_weight IN NUMBER,
40 x_net_weight IN NUMBER,
41 x_return_code IN OUT VARCHAR2);
42
43 --------------------------------------------------------------------------
44 -- Validate the picked_by_id/picked_by_name, only if either one or both
45 -- have been specified in the deliveries interface table.
46 --------------------------------------------------------------------------
47
48 PROCEDURE PICKER(x_picked_by_id IN OUT NUMBER ,
49 x_picked_by_name IN VARCHAR2 ,
50 x_return_code IN OUT VARCHAR2);
51
52 --------------------------------------------------------------------------
53 -- Validate the packed_by_id/packed_by_name, only if either one or both
54 -- have been specified in the deliveries interface table.
55 --------------------------------------------------------------------------
56
57 PROCEDURE PACKER(x_packed_by_id IN OUT NUMBER,
58 x_packed_by_name IN VARCHAR2 ,
59 x_return_code IN OUT VARCHAR2);
60
61 --------------------------------------------------------------------------
62 -- Validate the freight_carrier_code, only if it has been specified in the
63 -- deliveries interface table.
64 --------------------------------------------------------------------------
65
66 PROCEDURE FREIGHT_CARRIER(x_organization_id IN NUMBER,
67 x_freight_carrier_code IN VARCHAR2 ,
68 x_return_code IN OUT VARCHAR2);
69
70 --------------------------------------------------------------------------
71 -- Validate the freight_terms_code, only if it has been specified in the
72 -- deliveries interface table.
73 --------------------------------------------------------------------------
74
75 PROCEDURE FREIGHT_TERMS(x_freight_terms_code IN OUT VARCHAR2 ,
76 x_return_code IN OUT VARCHAR2 );
77
78 --------------------------------------------------------------------------
79 -- Validate the fob_code, only if it has been specified in the deliveries
80 -- interface table.
81 --------------------------------------------------------------------------
82
83 PROCEDURE FOB(x_fob_code IN VARCHAR2 ,
84 x_return_code IN OUT VARCHAR2 );
85
86 --------------------------------------------------------------------------
87 -- Validate the report_set_id/report_set, only if either or both have been
88 -- specified in the deliveries interface table.
89 --------------------------------------------------------------------------
90
91 PROCEDURE REPORT_SET(x_report_set_id IN OUT NUMBER ,
92 x_report_set IN VARCHAR2 ,
93 x_return_code IN OUT VARCHAR2 );
94
95 --------------------------------------------------------------------------
96 -- Validate the loading_order_flag/loading_order_desc, only if either or
97 -- both have been specified in the deliveries interface table.
98 -- Examples of
99 --------------------------------------------------------------------------
100
101 PROCEDURE LOADING_ORDER(x_loading_order_flag IN OUT VARCHAR2 ,
102 x_loading_order_desc IN VARCHAR2 ,
103 x_return_code IN OUT VARCHAR2 );
104
105 -----------------------------------------------------------------------
106 -- If we created a new departure then validate if the departure assigned
107 -- to the delivery x_delivery_id and x_departure_id have the same
108 -- freight carrier.
109 -----------------------------------------------------------------------
110
111 PROCEDURE SAME_CARRIER(x_delivery_id IN NUMBER,
112 x_departure_id IN NUMBER,
113 x_return_code IN OUT VARCHAR2 );
114
115 -----------------------------------------------------------------------------
116 -- Validate if there is at least one picking_line_detail_id, in the
117 -- Picking Details Interface table, that does not exist in the table
118 -- so_picking_line_details, for a specific transaction under consideration
119 -----------------------------------------------------------------------------
120
121 PROCEDURE PLD_EXIST_IN_PLDI(x_transaction_id IN NUMBER ,
122 x_return_code IN OUT VARCHAR2);
123
124 -----------------------------------------------------------------------------
125 -- Validate if there is at least one picking_line_detail_id, in the
126 -- Freight Charges Interface table, that does not exist in the table
127 -- so_picking_line_details, for a specific transaction under consideration
128 -----------------------------------------------------------------------------
129
130 PROCEDURE PLD_EXIST_IN_FCI( x_transaction_id IN NUMBER ,
131 x_return_code IN OUT VARCHAR2) ;
132
133 PROCEDURE CONTAINER_WAREHOUSE( x_container_org IN OUT NUMBER ,
134 x_container_org_code IN OUT VARCHAR2 ,
135 x_organization_id IN NUMBER ,
136 x_return_code IN OUT VARCHAR2 ) ;
137
138 ----------------------------------------------------------------------------------
139 -- Validate if at least the container_id or the sequence_number for the container
140 -- has been specified.
141 ----------------------------------------------------------------------------------
142
143 PROCEDURE SEQNUM_CONT_EXIST( x_container_id IN NUMBER ,
144 x_sequence_number IN NUMBER ,
145 x_return_code IN OUT VARCHAR2 );
146
147 ----------------------------------------------------------------------------------
148 -- Validate the container when either the container_id or sequence_number or both
149 -- have been specified. If the container_id is specified, then it takes precedence
150 -- and if not found in WSH_PACKED_CONTAINERS, then it is a validation error. If
151 -- only the sequence_number of the container has been specified, and it does not
152 -- exist in WSH_PACKED_CONTAINERS table, then it means that the user wants to
153 -- create a new container, and is not a validation error.
154 ----------------------------------------------------------------------------------
155
156 PROCEDURE CONTAINER(rec_container_id IN NUMBER,
157 rec_sequence_number IN NUMBER,
158 rec_delivery_id IN NUMBER,
159 x_container_id IN OUT NUMBER,
160 x_return_code IN OUT VARCHAR2);
161
162 ----------------------------------------------------------------------------------
163 -- Validate if the Parent Container already exists in the packed containers table
164 -- Also validate if the Parent Sequence Number and Sequence Number are Equal, if
165 -- they are both specified (i.e. not null)
166 ----------------------------------------------------------------------------------
167
168 PROCEDURE PARENT_SEQ_SELF(x_parent_sequence_number IN NUMBER,
169 x_sequence_number IN NUMBER,
170 x_delivery_id IN NUMBER,
171 x_return_code IN OUT VARCHAR2);
172
173 ----------------------------------------------------------------------------------
174 -- GM EDIFACT (11.5) validate the parent sequence number.
175 ----------------------------------------------------------------------------------
176
177 PROCEDURE Parent_Seq_Concur(x_parent_sequence_number IN NUMBER,
178 p_parent_container_id IN OUT NUMBER,
179 x_container_item_id IN NUMBER,
180 x_delivery_id IN NUMBER,
181 x_delivery_name IN VARCHAR2,
182 x_organization_id IN NUMBER,
183 p_error_code OUT VARCHAR2);
184
185 ----------------------------------------------------------------------------------
186 -- Validate the Parent Container ID. It has to be a valid container_id in
187 -- wsh_packed_containers.
188 ----------------------------------------------------------------------------------
189
190 PROCEDURE PARENT_CONT(x_parent_container_id IN NUMBER,
191 p_parent_sequence_number IN OUT NUMBER,
192 x_container_item_id IN NUMBER,
193 x_organization_id IN NUMBER,
194 p_error_code IN OUT VARCHAR2);
195
196 -------------------------------------------------------------------------------
197 --FUNCTION Container_Inverse_Check
198 -------------------------------------------------------------------------------
199 FUNCTION Container_Inverse_Check(x_parent_container_item_id IN NUMBER,
200 x_container_item_id IN NUMBER,
201 x_organization_id IN NUMBER) RETURN BOOLEAN;
202
203 ----------------------------------------------------------------------------------
204 -- Validate master_serial_number. It must be unique for all master containers.
205 ----------------------------------------------------------------------------------
206
207 PROCEDURE MASTER_SERIAL_NUMBER(x_master_serial_number NUMBER,
208 x_return_code IN OUT VARCHAR2);
209
210 ----------------------------------------------------------------------------------
211 -- Validate master container id.
212 ----------------------------------------------------------------------------------
213
214 PROCEDURE master_container_id(
215 X_parent_container_id IN NUMBER,
216 X_parent_sequence_number IN NUMBER,
217 X_container_id IN NUMBER,
218 X_delivery_id IN NUMBER,
219 X_master_container_id IN OUT NUMBER,
220 X_return_code IN OUT VARCHAR2);
221
222 ----------------------------------------------------------------------------------
223 -- Populate master_container_id in wsh_packed_containers
224 ----------------------------------------------------------------------------------
225
226 PROCEDURE populate_master_cont_id(
227 X_delivery_id IN NUMBER,
228 X_sequence_number IN NUMBER,
229 X_container_id IN NUMBER,
230 X_parent_container_id IN NUMBER,
231 X_parent_sequence_number IN NUMBER,
232 X_master_container_id IN NUMBER,
233 X_return_code IN OUT VARCHAR2);
234
235 ----------------------------------------------------------------------------------
236 -- Populate master_serial_number in wsh_packed_containers
237 ----------------------------------------------------------------------------------
238
239 PROCEDURE populate_master_serial_num(
240 X_delivery_id IN NUMBER,
241 X_sequence_number IN NUMBER,
242 X_container_id IN NUMBER,
243 X_parent_container_id IN NUMBER,
244 X_parent_sequence_number IN NUMBER,
245 X_master_serial_number IN NUMBER,
246 X_return_code IN OUT VARCHAR2);
247
248 ----------------------------------------------------------------------------------
249 -- Populate parent_container_id in wsh_packed_containers
250 ----------------------------------------------------------------------------------
251
252 PROCEDURE populate_parent_cont_id(
253 X_delivery_id IN NUMBER,
254 X_sequence_number IN NUMBER,
255 X_container_id IN NUMBER,
256 X_return_code IN OUT VARCHAR2);
257
258 ----------------------------------------------------------------------------------
259 -- Populate parent_sequence_number in wsh_packed_containers
260 ----------------------------------------------------------------------------------
261
262 PROCEDURE populate_parent_seq_num(
266 X_return_code IN OUT VARCHAR2);
263 X_sequence_number IN NUMBER,
264 X_delivery_id IN NUMBER,
265 X_container_id IN NUMBER,
267
268 ----------------------------------------------------------------------------------
269 -- Update parent_sequence_number in wsh_packed_containers for this container,
270 -- according to the parent_container_id.
271 ----------------------------------------------------------------------------------
272
273 PROCEDURE update_parent_seq_num(
274 X_parent_container_id IN NUMBER,
275 X_parent_sequence_number IN OUT NUMBER,
276 X_delivery_id IN NUMBER,
277 X_container_id IN NUMBER,
278 X_return_code IN OUT VARCHAR2);
279
280 ----------------------------------------------------------------------------------
281 -- Update parent_container_id in wsh_packed_containers for this container,
282 -- according to the parent_sequence_number.
283 ----------------------------------------------------------------------------------
284
285 PROCEDURE update_parent_cont_id(
286 X_parent_sequence_number IN NUMBER,
287 X_parent_contaienr_id IN OUT NUMBER,
288 X_delivery_id IN NUMBER,
289 X_container_id IN NUMBER,
290 X_return_code IN OUT VARCHAR2);
291
292 ----------------------------------------------------------------------------------
293 -- Update master_container_id in wsh_packed_containers for this container,
294 -- according to the parent_container_id or parent_sequence_number.
295 ----------------------------------------------------------------------------------
296
297 PROCEDURE update_master_cont_id(
298 X_parent_sequence_number IN NUMBER,
299 X_parent_container_id IN NUMBER,
300 X_delivery_id IN NUMBER,
301 X_container_id IN NUMBER,
302 X_sequence_number IN NUMBER,
303 X_master_container_id IN OUT NUMBER,
304 X_return_code IN OUT VARCHAR2);
305
306 ----------------------------------------------------------------------------------
307 -- Update master_serial_number in wsh_packed_containers for this container,
308 -- according to the parent_container_id or parent_sequence_number.
309 ----------------------------------------------------------------------------------
310
311 PROCEDURE update_master_serial_num(
312 X_parent_sequence_number IN NUMBER,
313 X_parent_container_id IN NUMBER,
314 X_delivery_id IN NUMBER,
315 X_container_id IN NUMBER,
316 X_master_serial_number IN OUT NUMBER,
317 X_return_code IN OUT VARCHAR2);
318
319
320 ----------------------------------------------------------------------------------
321 -- Validate if the container quantity is negative and not a whole number
322 ----------------------------------------------------------------------------------
323
324 PROCEDURE QTY( x_quantity IN NUMBER ,
325 x_return_code IN OUT VARCHAR2 );
326
327 --------------------------------------------------------------------------------------
328 -- Validate if the delivery under consideration is already AR Interfaced
329 --------------------------------------------------------------------------------------
330
331 PROCEDURE IF_AR_INTFACED(x_delivery_id IN NUMBER ,
332 x_return_code IN OUT VARCHAR2 );
333
334 --------------------------------------------------------------------------------------
335 -- Validate the freight charge type id and desc , if either one or both of them are
336 -- specified
337 --------------------------------------------------------------------------------------
338
339 PROCEDURE FREIGHT_CHARGE_TYPE(x_freight_charge_type_id IN NUMBER,
340 x_freight_charge_type_desc IN VARCHAR2,
341 x_type_id IN OUT NUMBER,
342 x_return_code IN OUT VARCHAR2);
343
344 ----------------------------------------------------------------------------
345 -- Validate the currency code, at least the currency code or name, has to be
346 -- specified
347 ----------------------------------------------------------------------------
348
349 PROCEDURE FRT_CURRENCY_CODE(x_currency_code IN VARCHAR2,
350 x_currency_name IN VARCHAR2,
351 x_amount IN NUMBER,
352 x_valid_cur_code OUT VARCHAR2,
353 x_valid_cur_name OUT VARCHAR2,
354 x_return_code IN OUT VARCHAR2);
355
356 ----------------------------------------------------------------------------
357 -- Validate if the delivery currency and the freight charge currency are the
358 -- same
359 ----------------------------------------------------------------------------
360
361 PROCEDURE DEL_FRT_CURR(x_currency_code IN VARCHAR2,
362 x_del_currency IN VARCHAR2,
363 x_return_code IN OUT VARCHAR2);
364
365
366 ----------------------------------------------------------------------------
367 -- Validate if the currency specified in the deliveries table is the same
368 -- on all the delivery lines associated with it.
369 ----------------------------------------------------------------------------
370
371
372 PROCEDURE SAME_CURRENCY(x_transaction_id IN NUMBER,
373 x_delivery_id IN NUMBER,
374 x_currency_code IN VARCHAR2,
375 x_return_code IN OUT VARCHAR2);
376
377
378 ----------------------------------------------------------------------------
382 PROCEDURE ACTION_CODE( x_action_code IN NUMBER,
379 -- Validate values for Ship Confirm Action Codes , when specified
380 ----------------------------------------------------------------------------
381
383 x_return_code IN OUT VARCHAR2);
384
385 ----------------------------------------------------------------------------------------------
386 -- Validate if the value is negative or zero, the x_entity_code, indicates the entity being considered
387 -- i.e. VOLUME, WEIGHT etc.
388 ----------------------------------------------------------------------------------------------
389
390 PROCEDURE IF_NEGATIVE_ZERO( x_value IN NUMBER,
391 x_entity_code IN VARCHAR2,
392 x_return_code IN OUT VARCHAR2);
393
394 ----------------------------------------------------------------------------------------------
395 -- Validate if the value is negative, the x_entity_code, indicates the entity being considered
396 -- i.e. VOLUME, WEIGHT etc. This value could be zero.
397 ----------------------------------------------------------------------------------------------
398
399 PROCEDURE IF_NEGATIVE( x_value IN NUMBER,
400 x_entity_code IN VARCHAR2,
401 x_return_code IN OUT VARCHAR2);
402
403 ------------------------------------------------------------------------
404 -- Validate customer_id and customer_number, if at least one of them have
405 -- been specified
406 -------------------------------------------------------------------------
407
408 PROCEDURE CUSTOMER( x_customer_id IN OUT NUMBER,
409 x_customer_number IN OUT VARCHAR2,
410 x_return_code IN OUT VARCHAR2);
411
412 --------------------------------------------------------------------------------
413 -- Validate the warehouse, if either the organization_id or organization_code are
414 -- specified
415 --------------------------------------------------------------------------------
416
417 PROCEDURE WAREHOUSE( x_org_id IN OUT NUMBER,
418 x_org_code IN OUT VARCHAR2,
419 x_return_code IN OUT VARCHAR2);
420
421 --------------------------------------------------------------------------------
422 -- Validate for Duplicate AETCs, this is a check specifically for Automotive
423 --------------------------------------------------------------------------------
424
425 PROCEDURE DUPLICATE_AETC( x_aetc IN VARCHAR2,
426 x_delivery_id IN NUMBER,
427 x_return_code IN OUT VARCHAR2);
428
429
430 --------------------------------------------------------------------------------
431 -- Validate Container Inventory Item ID, when Item ID is specified only
432 --------------------------------------------------------------------------------
433
434 PROCEDURE CONTAINER_ITEM( x_organization_id IN NUMBER,
435 x_cont_inventory_item_id IN NUMBER,
436 x_subinv_restricted_flag IN OUT VARCHAR2,
437 x_revision_control_flag IN OUT VARCHAR2,
438 x_lot_control_flag IN OUT VARCHAR2,
439 x_serial_number_control_flag IN OUT VARCHAR2,
440 x_return_code IN OUT VARCHAR2);
441
442 --------------------------------------------------------------------------------
443 -- Validate Subinventory
444 --------------------------------------------------------------------------------
445
446 PROCEDURE SUBINVENTORY (x_warehouse_id IN NUMBER,
447 x_subinventory IN OUT VARCHAR2,
448 x_return_code IN OUT VARCHAR2);
449
450 --------------------------------------------------------------------------------
451 -- Validate For Inequality , when the arguments are numbers
452 --------------------------------------------------------------------------------
453
454 PROCEDURE NOT_EQUAL(value1 IN NUMBER,
455 value2 IN NUMBER,
456 entity_code IN VARCHAR2,
457 x_return_code IN OUT VARCHAR2);
458
459 --------------------------------------------------------------------------------
460 -- Validate For Inequality , when the arguments are numbers
461 --------------------------------------------------------------------------------
462
463 PROCEDURE NOT_EQUAL(value1 IN NUMBER,
464 value2 IN VARCHAR2,
465 entity_code IN VARCHAR2,
466 x_return_code IN OUT VARCHAR2);
467
468 ----------------------------------------------------------------------------------
469 -- Validate Locator
470 ----------------------------------------------------------------------------------
471
472 PROCEDURE LOCATOR( x_locator_id IN NUMBER,
473 x_locator IN VARCHAR2,
474 x_valid_warehouse_id IN NUMBER,
475 x_valid_loc IN OUT NUMBER,
476 x_seg_array IN FND_FLEX_EXT.SegmentArray,
477 x_return_code IN OUT VARCHAR2);
478
479
480 ----------------------------------------------------------------------------------
481 -- Validate Inventory Item ID, if specified
482 ----------------------------------------------------------------------------------
483
484 PROCEDURE INVENTORY_ITEM( x_inventory_item_id IN NUMBER,
485 x_inventory_item IN VARCHAR2,
486 x_organization_id IN NUMBER,
487 x_sopld_item_id IN NUMBER,
491
488 x_valid_item_id IN OUT NUMBER,
489 x_seg_array IN FND_FLEX_EXT.SegmentArray,
490 x_return_code IN OUT VARCHAR2);
492
493 ----------------------------------------------------------------------------------
494 -- Validate Vehicle Item ID, if specified
495 -- It does not validate with the vehicle id existing in wsh_departures.
496 ----------------------------------------------------------------------------------
497
498 PROCEDURE VEHICLE_ITEM( x_vehicle_item_id IN NUMBER,
499 x_vehicle_item IN VARCHAR2,
500 x_organization_id IN NUMBER,
501 x_valid_item_id IN OUT NUMBER,
502 x_seg_array IN FND_FLEX_EXT.SegmentArray,
503 x_return_code IN OUT VARCHAR2);
504
505
506 ------------------------------------------------------------------------------------
507 -- Validate Inventory Item Location , when Item Location ID was specified
508 ------------------------------------------------------------------------------------
509
510 PROCEDURE ITEM_LOCATION( x_organization_id IN NUMBER,
511 x_inventory_location_id IN NUMBER,
512 x_return_code IN OUT VARCHAR2);
513
514 ------------------------------------------------------------------------------------
515 -- Validate if both attributes are NULL , for NUMBER
516 ------------------------------------------------------------------------------------
517
518 PROCEDURE BOTH_ARE_NULL( x_attr1 IN NUMBER,
519 x_attr2 IN NUMBER,
520 x_entity_code IN VARCHAR2,
521 x_return_code IN OUT VARCHAR2);
522
523 ------------------------------------------------------------------------------------
524 -- Validate if both attributes are NULL , for VARCHAR2 and NUMBER attributes
525 ------------------------------------------------------------------------------------
526
527 PROCEDURE BOTH_ARE_NULL( x_attr1 IN NUMBER,
528 x_attr2 IN VARCHAR2,
529 x_entity_code IN VARCHAR2,
530 x_return_code IN OUT VARCHAR2);
531
532 ------------------------------------------------------------------------------------
533 -- Validate that if the serial number is specified in the picking details interface
534 -- table , if the serial number control flag = N
535 ------------------------------------------------------------------------------------
536
537 PROCEDURE SERIAL_NUM_REQD( x_serial_number IN VARCHAR2,
538 x_serial_ctrl_flag IN VARCHAR2,
539 x_return_code IN OUT VARCHAR2);
540
541 ------------------------------------------------------------------------------------
542 -- Validate if serial number qty > 1
543 ------------------------------------------------------------------------------------
544
545 PROCEDURE SERIAL_QTY( x_serial_qty IN NUMBER,
546 x_return_code IN OUT VARCHAR2);
547
548 ------------------------------------------------------------------------------------
549 -- Validate if the Delivery is already Packed and that there are more lines to be
550 -- added to the delivery, for that particular transaction
551 ------------------------------------------------------------------------------------
552
553 PROCEDURE DEL_PACKED( x_delivery_status IN VARCHAR2,
554 x_transaction_id IN NUMBER,
555 x_return_code IN OUT VARCHAR2);
556
557 -----------------------------------------------------------------------------
558 -- Validate if there is at least one picking_line_detail_id, in the
559 -- Freight Charges Interface or Picking Line Details Interface table, that
560 -- does not exist in the table so_picking_line_details, for a specific
561 -- transaction under consideration. This is specifically for the SCOI Form
562 -- or other Form
563 -----------------------------------------------------------------------------
564
565 PROCEDURE PLD_EXIST_FORM( x_picking_line_detail_id IN NUMBER,
566 x_return_code IN OUT VARCHAR2);
567
568
569 PROCEDURE CHECK_PREV_ERR_IN_DELIVERY( x_transaction_id IN NUMBER,
570 x_delivery_id IN NUMBER,
571 x_delivery_name IN VARCHAR2,
572 x_return_code IN OUT VARCHAR2);
573
574 --------------------------------------------------------------------------
575 -- Validate the ship to, when it is specified. This is a common function
576 -- for Ultimate, Intermediate and Pooled Shipto.
577 --------------------------------------------------------------------------
578
579 PROCEDURE SHIPTO( x_shipto IN OUT NUMBER,
580 x_entity_code IN VARCHAR2,
581 x_return_code IN OUT VARCHAR2);
582
583
584
585 --------------------------------------------------------------------------
586 -- Validate reseting variables if org/item have changed
587 --------------------------------------------------------------------------
588
589 PROCEDURE CHANGED_ITEM_ORG(x_warehouse_id IN NUMBER,
590 x_last_warehouse_id IN OUT NUMBER,
591 x_valid_item_id IN OUT NUMBER,
592 x_last_item_id IN OUT NUMBER,
593 x_subinv_restricted_flag IN OUT VARCHAR2,
594 x_revision_control_flag IN OUT VARCHAR2,
595 x_lot_control_flag IN OUT VARCHAR2,
596 x_serial_number_control_flag IN OUT VARCHAR2,
600 -- Validate if a reservation, ensure no interface controls, if input are
597 x_return_code IN OUT VARCHAR2);
598
599 --------------------------------------------------------------------------
601 -- the same if any inventory controls have changed from the reservation
602 -- then raise error
603 --------------------------------------------------------------------------
604
605 PROCEDURE RES_INV_CTRL_CHANGE(x_lot_number IN VARCHAR2,
606 x_sopld_lot_number IN VARCHAR2,
607 x_revision IN VARCHAR2,
608 x_sopld_revision IN VARCHAR2,
609 x_subinventory IN VARCHAR2,
610 x_sopld_subinventory IN VARCHAR2,
611 x_locator_id IN NUMBER,
612 x_sopld_locator_id IN NUMBER,
613 x_return_code IN OUT VARCHAR2);
614
615
616 --------------------------------------------------------------------------
617 -- PLD SUBINVENTORY VALIDATION
618
619 -- Scenario SOPLD Statement
620 -- value value satisfied Action
621 -- --------- ----- ----- --------- ----------------
622 -- 1 sub1 sub1 elsif 1 copies SOPLD value
623 -- 2 sub1 sub2 if - calls validation
624 -- 3 sub1 null if - calls validation
625 -- 4 null null elsif 2 - assigns default
626 -- 5 null sub1 elsif 1 copies SOPLD value
627
628 --------------------------------------------------------------------------
629
630 PROCEDURE PLD_SUBINVENTORY(x_subinventory IN OUT VARCHAR2,
631 x_sopld_subinventory IN OUT VARCHAR2,
632 x_valid_warehouse_id IN OUT NUMBER,
633 x_valid_item_id IN OUT NUMBER,
634 x_subinv_restricted_flag IN OUT VARCHAR2,
635 x_valid_sub IN OUT VARCHAR2,
636 x_default_sub IN OUT VARCHAR2,
637 x_return_code IN OUT VARCHAR2);
638
639 ----------------------------------------------------------------------------------
640 -- PLD LOT NUMBER VALIDATION
641 ----------------------------------------------------------------------------------
642
643 PROCEDURE PLD_LOT_NUMBER(x_lot_number IN OUT VARCHAR2,
644 x_lot_control_flag IN OUT VARCHAR2,
645 x_sopld_lot_number IN OUT VARCHAR2,
646 x_valid_warehouse_id IN OUT NUMBER,
647 x_valid_item_id IN OUT NUMBER ,
648 x_valid_sub IN OUT VARCHAR2,
649 x_valid_lot IN OUT VARCHAR2,
650 x_return_code IN OUT VARCHAR2);
651
652
653 ----------------------------------------------------------------------------------
654 -- PLD REVISION VALIDATION
655 ----------------------------------------------------------------------------------
656
657 PROCEDURE PLD_REVISION(x_revision IN OUT VARCHAR2,
658 x_sopld_revision IN OUT VARCHAR2,
659 x_valid_warehouse_id IN OUT NUMBER,
660 x_valid_item_id IN OUT NUMBER,
661 x_valid_revision IN OUT VARCHAR2,
662 x_revision_control_flag IN OUT VARCHAR2,
663 x_return_code IN OUT VARCHAR2);
664
665
666 ----------------------------------------------------------------------------------
667 -- PLD ITEM LOCATION VALIDATION
668 -- Get location_control flags if item/org/sub have changed VALIDATION
669 ----------------------------------------------------------------------------------
670
671 PROCEDURE PLD_ITEM_LOCATION(x_valid_warehouse_id IN OUT NUMBER,
672 x_last_warehouse_id IN OUT NUMBER,
673 x_valid_item_id IN OUT NUMBER,
674 x_last_item_id IN OUT NUMBER,
675 x_valid_sub IN OUT VARCHAR2,
676 x_last_sub IN OUT VARCHAR2,
677 x_location_control_flag IN OUT VARCHAR2,
678 x_location_restricted_flag IN OUT VARCHAR2,
679 x_valid_loc IN OUT NUMBER,
680 x_return_code IN OUT VARCHAR2);
681
682 ----------------------------------------------------------------------------------
683 -- PLD LOCATOR VALIDATION
684 ----------------------------------------------------------------------------------
685
686 PROCEDURE PLD_LOCATOR(x_locator_id IN OUT NUMBER,
687 x_sopld_locator_id IN OUT NUMBER,
688 x_valid_loc IN OUT NUMBER,
689 x_default_loc IN OUT NUMBER,
690 x_locator_concat_segments IN OUT VARCHAR2,
691 x_location_control_flag IN OUT VARCHAR2,
692 x_valid_warehouse_id IN OUT NUMBER,
693 x_valid_item_id IN OUT NUMBER,
694 x_valid_sub IN OUT VARCHAR2,
695 x_location_restricted_flag IN OUT VARCHAR2,
696 x_valid_flag IN OUT BOOLEAN,
697 seg_array IN FND_FLEX_EXT.SegmentArray,
698 x_return_code IN OUT VARCHAR2);
699
700
701 ----------------------------------------------------------------------------------
702 -- PLD LOCATOR VALIDATION
703 ----------------------------------------------------------------------------------
704
705 PROCEDURE PLD_SERIAL_NUMBER(x_sn IN OUT VARCHAR2,
706 x_serial_number_control_flag IN OUT VARCHAR2,
707 x_shipped_quantity IN OUT NUMBER,
708 x_valid_warehouse_id IN OUT NUMBER,
709 x_valid_item_id IN OUT NUMBER,
710 x_valid_sub IN OUT VARCHAR2,
711 x_valid_revision IN OUT VARCHAR2,
712 x_valid_lot IN OUT VARCHAR2,
713 x_valid_loc IN OUT NUMBER,
714 x_location_restricted_flag IN OUT VARCHAR2,
715 x_location_control_flag IN OUT VARCHAR2,
716 x_row_id IN OUT VARCHAR2,
717 x_picking_line_id IN OUT NUMBER,
721
718 x_picking_line_detail_id IN OUT NUMBER,
719 x_return_code IN OUT VARCHAR2);
720
722 ----------------------------------------------------------------------------------
723 -- PLD LINE ADDITION VALIDATION
724 -- Validate this line can be added to this delivery.
725 ----------------------------------------------------------------------------------
726
727 PROCEDURE PLD_LINE_ADD(x_delivery_id IN NUMBER,
728 x_sopld_delivery_id IN NUMBER,
729 x_del_status IN OUT VARCHAR2,
730 x_result IN OUT BOOLEAN,
731 x_result_num IN OUT NUMBER,
732 x_picking_line_detail_id IN OUT NUMBER,
733 x_token_name IN OUT VARCHAR2,
734 x_return_code IN OUT VARCHAR2);
735
736
737
738
739 PROCEDURE flexfields(id IN NUMBER,
740 valid_id IN OUT NUMBER,
741 item IN VARCHAR2,
742 app_short_name IN VARCHAR2,
743 key_flx_code IN VARCHAR2,
744 struct_number IN NUMBER,
745 org_id IN NUMBER,
746 seg_array IN FND_FLEX_EXT.SegmentArray,
747 val_or_ids IN VARCHAR2,
748 flag IN OUT BOOLEAN,
749 wh_clause IN VARCHAR2 DEFAULT NULL);
750
751
752
753 END WSH_OI_VALIDATE ;