1 PACKAGE WSH_UTIL_VALIDATE AUTHID CURRENT_USER as
2 /* $Header: WSHUTVLS.pls 120.2.12010000.4 2010/04/22 12:13:59 selsubra ship $ */
3
4
5
6
7 TYPE cont_def_info_rec_type IS RECORD(
8 master_container_item_id NUMBER,
9 detail_container_item_id NUMBER,
10 key NUMBER
11 );
12 TYPE ignore_plan_rec_type IS RECORD(
13 organization_id NUMBER,
14 carrier_id NUMBER,
15 ship_method_code VARCHAR2(30),
16 ignore_for_planning VARCHAR2(1)
17 );
18
19 TYPE cont_def_info_tab_type is table of cont_def_info_rec_type
20 INDEX BY BINARY_INTEGER;
21
22 TYPE ignore_plan_tab_type is table of ignore_plan_rec_type
23 INDEX BY BINARY_INTEGER;
24
25
26 TYPE item_info_rec_type IS RECORD(
27 organization_id NUMBER,
28 inventory_item_id NUMBER,
29 primary_uom_code VARCHAR2(3),
30 description VARCHAR2(240),
31 hazard_class_id NUMBER,
32 weight_uom_code VARCHAR2(3),
33 unit_weight NUMBER,
34 volume_uom_code VARCHAR2(3),
35 unit_volume NUMBER
36
37 );
38 TYPE item_info_tab_type IS TABLE OF item_info_rec_type
39 INDEX BY BINARY_INTEGER;
40
41 --bms
42 C_HASH_BASE CONSTANT NUMBER := 1;
43 C_HASH_SIZE CONSTANT NUMBER := 33554432 ; --power(2, 25)
44 C_IDX_LIMT NUMBER := 2147483648;
45
46 --===================
47 -- PROCEDURES
48 --===================
49 --========================================================================
50 -- PROCEDURE : Validate_Org
51 --
52 -- COMMENT : Validates Organization_id and Organization_code against view
53 -- org_organization_definitions. If both values are
54 -- specified then only Org_Id is used
55 --========================================================================
56
57 PROCEDURE Validate_Org
58 (p_org_id IN OUT NOCOPY NUMBER,
59 p_org_code IN VARCHAR2,
60 x_return_status OUT NOCOPY VARCHAR2);
61
62 --========================================================================
63 -- PROCEDURE : Validate_Location
64 --
65 -- COMMENT : Validates Location_id and Location_code against view
66 -- hr_locations. If both values are specified then only
67 -- Location_id is used
68 --
69 -- HISTORY : Bug# 1924574 changes for hr_locations (8/15/01), Defaulting
70 -- p_location_code to NULL
71 --========================================================================
72
73 PROCEDURE Validate_Location
74 (p_location_id IN OUT NOCOPY NUMBER,
75 p_location_code IN VARCHAR2 DEFAULT NULL,
76 x_return_status OUT NOCOPY VARCHAR2,
77 p_isWshLocation IN BOOLEAN DEFAULT FALSE,
78 p_caller IN VARCHAR2 DEFAULT NULL);
79
80 --========================================================================
81 -- PROCEDURE : Validate_Lookup
82 --
83 -- COMMENT : Validates Lookup_code and Meaning against view fnd_lookups.
84 -- If both values are specified then only Lookup_code is used
85 --========================================================================
86
87 PROCEDURE Validate_Lookup
88 (p_lookup_type IN VARCHAR2,
89 p_lookup_code IN OUT NOCOPY VARCHAR2,
90 p_meaning IN VARCHAR2,
91 x_return_status OUT NOCOPY VARCHAR2);
92
93 --========================================================================
94 -- PROCEDURE : Validate_Customer
95 --
96 -- COMMENT : Validates Customer_id/Customer_number against
97 -- hz_cust_accounts. If both values are specified then only
98 -- Customer_Id is used
99 --========================================================================
100
101 PROCEDURE Validate_Customer
102 (p_customer_id IN OUT NOCOPY NUMBER,
103 p_customer_number IN VARCHAR2,
104 x_return_status OUT NOCOPY VARCHAR2);
105
106 --========================================================================
107 --========================================================================
108 -- PROCEDURE : Validate_Contact
109 --
110 -- COMMENT : Validates Contact_id against view
111 -- hz_cust_accounts. If both values are specified then only
112 -- Customer_Id is used
113 --========================================================================
114
115 PROCEDURE Validate_Contact
116 (p_contact_id IN OUT NOCOPY NUMBER,
117 x_return_status OUT NOCOPY VARCHAR2);
118
119 --========================================================================
120 -- PROCEDURE : Validate_Quantity
121 -- PROCEDURE : Validate_Quantity
122 --
123 -- COMMENT : Validates if quantity is non-negative and an integer.
124 --========================================================================
125
126 PROCEDURE Validate_Quantity
127 (p_quantity IN NUMBER ,
128 x_return_status OUT NOCOPY VARCHAR2 );
129
130 --========================================================================
131 -- PROCEDURE : Validate_Negative
132 --
133 -- COMMENT : Validates if value is non-negative
134 --========================================================================
135 /*
136 PROCEDURE Validate_Negative
137 (p_value IN NUMBER,
138 x_return_status OUT NOCOPY VARCHAR2);
139 */
140
141
142 --procedure added for Bug # 3266333
143 --========================================================================
144 -- PROCEDURE : Validate_Negative
145 --
146 -- COMMENT : Validates if value is non-negative and shows a message
147 -- along with the attribute/field name which has a negative value.
148 --========================================================================
149
150 PROCEDURE Validate_Negative
151 (p_value IN NUMBER,
152 p_field_name IN VARCHAR2 DEFAULT NULL,
153 x_return_status OUT NOCOPY VARCHAR2);
154
155
156
157 --========================================================================
158 -- PROCEDURE : Validate_Currency
159 --
160 -- COMMENT : Validates Currency_code and Currency_Name against
161 -- table fnd_currencies_vl. If both values are specified then
162 -- only Currency_code is used. p_amount if specified is
163 -- checked for correct precision
164 -- If p_otm_enabled is 'Y', rounds p_amount using FND precision
165 -- for the input currency
166 --========================================================================
167
168 PROCEDURE Validate_Currency
169 (p_currency_code IN OUT NOCOPY VARCHAR2,
170 p_currency_name IN VARCHAR2,
171 p_amount IN NUMBER,
172 p_otm_enabled IN VARCHAR2 DEFAULT NULL, -- OTM R12
173 x_return_status OUT NOCOPY VARCHAR2,
174 x_adjusted_amount OUT NOCOPY NUMBER); -- OTM R12
175
176 --========================================================================
177 -- PROCEDURE : Validate_Uom
178 --
179 -- COMMENT : Validates UOM_Code and UOM Description against table
180 -- mtl_units_of_measure. If both values are specified then
181 -- only UOM_Code is used. Type and Organization are required
182 -- p_type = 'WEIGHT', 'VOLUME'
183 --========================================================================
184
185 PROCEDURE Validate_Uom
186 (p_type IN VARCHAR2,
187 p_organization_id IN NUMBER,
188 p_uom_code IN OUT NOCOPY VARCHAR2,
189 p_uom_desc IN VARCHAR2,
190 x_return_status OUT NOCOPY VARCHAR2);
191
192 --========================================================================
193 -- PROCEDURE : Validate_User
194 --
195 -- COMMENT : Validates User_id and User_name against table fnd_user
196 -- If both values are specified then only User_id is used
197 --========================================================================
198
199 PROCEDURE Validate_User
200 (p_user_id IN OUT NOCOPY NUMBER,
201 p_user_name IN VARCHAR2,
202 x_return_status OUT NOCOPY VARCHAR2);
203
204 --========================================================================
205 -- PROCEDURE : Validate_Ship_Method
206 --
207 -- COMMENT : Validates Ship_Method_Code/Name against view fnd_lookup_values_vl.
208 -- If both are specified then only Ship_Method_Code is used.
209 --========================================================================
210
211 PROCEDURE Validate_Ship_Method
212 (p_ship_method_code IN OUT NOCOPY VARCHAR2,
213 p_ship_method_name IN OUT NOCOPY VARCHAR2,
214 x_return_status OUT NOCOPY VARCHAR2);
215
216 --========================================================================
217 -- PROCEDURE : Validate_Freight_Terms
218 --
219 -- COMMENT : Validates Freight_Terms_Code by calling the
220 -- Validate_Lookup_Code procedure.
221 --========================================================================
222
223 PROCEDURE Validate_Freight_Terms
224 (p_freight_terms_code IN OUT NOCOPY VARCHAR2 ,
225 p_freight_terms_name IN VARCHAR2,
226 x_return_status OUT NOCOPY VARCHAR2 );
227
228 --========================================================================
229 -- PROCEDURE : Validate_FOB
230 --
231 -- COMMENT : Validates FOB_Code by calling Validate_Lookup_Code
232 --========================================================================
233
234 PROCEDURE Validate_FOB
235 (p_fob_code IN OUT NOCOPY VARCHAR2 ,
236 p_fob_name IN VARCHAR2 ,
237 x_return_status OUT NOCOPY VARCHAR2 );
238
239 --========================================================================
240 -- PROCEDURE : Validate_Flexfields
241 --
242 -- COMMENT : Validates Flexfield id and concatenated segments
243 -- Logic used :
244 -- if id is not null
245 -- validate id
246 -- else
247 -- if id is null
248 -- begin
249 -- get delimeter
250 -- concatenate segments
251 -- validate concatenated segments
252 -- exception
253 -- handle exception
254 -- end
255 -- if item is not null
256 -- validate item
257 -- end if;
258 -- end if;
259 -- end if;
260 --========================================================================
261
262 PROCEDURE Validate_Flexfields(
263 p_id IN OUT NOCOPY NUMBER,
264 p_concat_segs IN VARCHAR2,
265 p_app_short_name IN VARCHAR2,
266 p_key_flx_code IN VARCHAR2,
267 p_struct_number IN NUMBER,
268 p_org_id IN NUMBER,
269 p_seg_array IN FND_FLEX_EXT.SegmentArray,
270 p_val_or_ids IN VARCHAR2,
271 p_wh_clause IN VARCHAR2 DEFAULT NULL,
272 x_flag OUT NOCOPY BOOLEAN);
273
274 --========================================================================
275 -- PROCEDURE : Validate_Item
276 --
277 -- COMMENT : Validates Inventory_Item_id/Concatenated name/Segment array
278 -- using FND APIs. Item id takes precedence over the other validations.
279 --========================================================================
280
281 PROCEDURE Validate_Item(
282 p_inventory_item_id IN OUT NOCOPY NUMBER,
283 p_inventory_item IN VARCHAR2,
284 p_organization_id IN NUMBER,
285 p_seg_array IN FND_FLEX_EXT.SegmentArray,
286 x_return_status OUT NOCOPY VARCHAR2,
287 p_item_type IN VARCHAR2 DEFAULT 'STD_ITEM');
288
289 -- LINE SPECIFIC VALIDATIONS BELOW --
290
291 --========================================================================
292 -- PROCEDURE : Validate_Boolean
293 --
297 p_flag IN VARCHAR2,
294 -- COMMENT : Validates data type of boolean
295 --========================================================================
296 PROCEDURE Validate_Boolean(
298 x_return_status OUT NOCOPY VARCHAR2
299 );
300
301 --========================================================================
302 -- PROCEDURE : Validate_Released_Status
303 --
304 -- COMMENT : Validates released_status
305 --========================================================================
306 PROCEDURE Validate_Released_Status(
307 p_released_status IN VARCHAR2,
308 x_return_status OUT NOCOPY VARCHAR2
309 );
310
311 -- CONTAINER SPECIFIC VALIDATIONS BELOW --
312
313 -- DELIVERY SPECIFIC VALIDATIONS BELOW --
314
315 --========================================================================
316 -- PROCEDURE : Validate_Delivery_Name
317 --
318 -- COMMENT : Validates Delivery_id/Delivery_Name against table
319 -- wsh_new_deliveries. If both values are specified then only
320 -- delivery_id is used
321 --========================================================================
322
323 PROCEDURE Validate_Delivery_Name
324 (p_delivery_id IN OUT NOCOPY NUMBER ,
325 p_delivery_name IN VARCHAR2 ,
326 x_return_status OUT NOCOPY VARCHAR2 );
327
328 --========================================================================
329 -- PROCEDURE : Validate_Report_Set
330 --
331 -- COMMENT : Validates Report_set_id/Report_set name against table
332 -- wsh_report_sets. If both values are specified then only
333 -- report_set_id is used
334 --========================================================================
335
336 PROCEDURE Validate_Report_Set
337 (p_report_set_id IN OUT NOCOPY NUMBER ,
338 p_report_set_name IN VARCHAR2 ,
339 x_return_status OUT NOCOPY VARCHAR2 );
340
341 --========================================================================
342 -- PROCEDURE : Validate_Loading_Order
343 --
344 -- COMMENT : Validates Loading_Order_Flag/Loading_order_desc by
345 -- calling Validate_lookup_code. If both values are
346 -- specified then only Loading_order_desc is used
347 --========================================================================
348
349 PROCEDURE Validate_Loading_Order
350 (p_loading_order_flag IN OUT NOCOPY VARCHAR2 ,
351 p_loading_order_desc IN VARCHAR2 ,
352 x_return_status OUT NOCOPY VARCHAR2 );
353
354 -- STOP SPECIFIC VALIDATIONS BELOW --
355
356 --========================================================================
357 -- PROCEDURE : Validate_Stop_Name
358 --
359 -- COMMENT : Validates Stop_id OR
360 -- Trip_id+Stop_Location_id+Planned_Departure_date against table
361 -- wsh_trips. If both validations are possible then only
362 -- stop_id is validated
363 --========================================================================
364
365 PROCEDURE Validate_Stop_Name
366 (p_stop_id IN OUT NOCOPY NUMBER ,
367 p_trip_id IN NUMBER ,
368 p_stop_location_id IN NUMBER ,
369 p_planned_dep_date IN DATE,
370 x_return_status OUT NOCOPY VARCHAR2 );
371
372 -- TRIP SPECIFIC VALIDATIONS BELOW --
373
374 --========================================================================
375 -- PROCEDURE : Validate_Trip_Name
376 --
377 -- COMMENT : Validates Trip_id/Trip_Name against table
378 -- wsh_trips. If both values are specified then only
379 -- trip_id is used
380 --========================================================================
381
382 PROCEDURE Validate_Trip_Name
383 (p_trip_id IN OUT NOCOPY NUMBER ,
384 p_trip_name IN VARCHAR2 ,
385 x_return_status OUT NOCOPY VARCHAR2 );
386
387 --========================================================================
388 -- PROCEDURE : Validate_Trip_MultiStops
389 -- 4106444 -skattama
390 -- COMMENT : Validates for Trip_id if mode is other then
391 -- 'TRUCK', the number of stops should not be more
392 -- than 2.
393 --========================================================================
394
395 PROCEDURE Validate_Trip_MultiStops
396 (p_trip_id IN NUMBER ,
397 p_mode_of_transport IN VARCHAR2 ,
398 x_return_status OUT NOCOPY VARCHAR2 );
399
400 --========================================================================
401 -- PROCEDURE : Validate_Order_uom
402 --
403 -- COMMENT : Validates ordered quantity uom view mtl_item_uoms_view.
404 -- Based on inventory_item_id and organization_id
405 --========================================================================
406 PROCEDURE Validate_Order_uom(
407 p_organization_id IN NUMBER,
408 p_inventory_item_id IN NUMBER,
409 p_unit_of_measure IN VARCHAR2,
410 x_uom_code IN OUT NOCOPY VARCHAR2,
411 x_return_status OUT NOCOPY VARCHAR2);
412
413 --========================================================================
414 -- FUNCTION : Check_Wms_Org
415 --
416 -- COMMENT : Check if the Organization is WMS enabled.
417 -- If Yes, Return 'Y'. Otherwise 'N'
418 --========================================================================
419
420 FUNCTION Check_Wms_Org
421 (p_organization_id IN NUMBER) RETURN VARCHAR2 ;
422
423 --Harmonizing Project I --heali
424 PROCEDURE validate_from_to_dates (
425 p_from_date IN DATE,
426 p_to_date IN DATE,
427 x_return_status OUT NOCOPY VARCHAR2);
428
429 PROCEDURE Validate_Trip_status (
433 --Harmonizing Project I --heali
430 p_trip_id IN NUMBER,
431 p_action IN VARCHAR2,
432 x_return_status OUT NOCOPY VARCHAR2);
434
435 -- I Harmonization: rvishnuv *******
436
437 --========================================================================
438 -- PROCEDURE : Validate_Carrier
439 --
440 -- COMMENT : Check if the Carrier is a valid carrier or not.
441 --========================================================================
442 PROCEDURE Validate_Carrier(
443 p_carrier_name IN VARCHAR2,
444 x_carrier_id IN OUT NOCOPY NUMBER,
445 x_return_status OUT NOCOPY VARCHAR2);
446
447 --========================================================================
448 -- PROCEDURE : Validate_Freight_Carrier
449 --
450 -- COMMENT : This API checks if the inputs ship method, carrier, and service level
451 -- are valid values.
452 -- Also if ship method is a valid input, then, based on the organization,
453 -- it derives the carrier, service level and mode of transport.
454 -- Also, if the ship method is null and if all the remaining three
455 -- components are defined, then based on the organization, it derives
456 -- the ship method.
457 --
458 -- p_entity_type can have values of 'TRIP' or 'DLVY'.
459 -- p_entity_id should contain either trip_id or delivery_id
460 -- depending on the p_entity_type.
461 --========================================================================
462 PROCEDURE Validate_Freight_Carrier(
463 p_ship_method_name IN OUT NOCOPY VARCHAR2,
464 x_ship_method_code IN OUT NOCOPY VARCHAR2,
465 p_carrier_name IN VARCHAR2,
466 x_carrier_id IN OUT NOCOPY NUMBER,
467 x_service_level IN OUT NOCOPY VARCHAR2,
468 x_mode_of_transport IN OUT NOCOPY VARCHAR2,
469 p_entity_type IN VARCHAR2,
470 p_entity_id IN NUMBER,
471 p_organization_id IN NUMBER DEFAULT NULL,
472 x_return_status OUT NOCOPY VARCHAR2,
473 p_caller IN VARCHAR2 DEFAULT 'WSH_PUB');
474 -- I Harmonization: rvishnuv *******
475
476 -- ---------------------------------------------------------------------
477 -- Procedure: Find_Item_Type
478 --
479 -- Parameters:
480 --
481 -- Description: This procedure gives the item type (either container_item or vehicle_item) for the given
482 -- inventory item id and organization id.
483 -- Created: Harmonization Project. Patchset I. kvenkate
484 -- -----------------------------------------------------------------------
485 PROCEDURE Find_Item_Type(
486 p_inventory_item_id IN NUMBER,
487 p_organization_id IN NUMBER,
488 x_item_type OUT NOCOPY VARCHAR2,
489 x_return_status OUT NOCOPY VARCHAR2);
490 -- I Harmonization: kvenkate ***
491
492 FUNCTION Get_Org_Type (
493 p_organization_id IN NUMBER,
494 p_event_key IN VARCHAR2 DEFAULT NULL,
495 p_delivery_id IN NUMBER DEFAULT NULL,
496 p_delivery_detail_id IN NUMBER DEFAULT NULL,
497 p_msg_display IN VARCHAR2 DEFAULT 'Y',
498 x_return_status OUT NOCOPY VARCHAR2
499 ) RETURN VARCHAR2;
500
501
502
503 --========================================================================
504 -- PROCEDURE : get_item_info
505 --
506 -- PARAMETERS: p_organization_id Item's Organization Id
507 -- p_inventory_item_id Inventory Item Id
508 -- x_Item_info_rec stores the item information
509 -- x_return_status return status
510 -- COMMENT : This API manages a cache, which contains item information
511 -- The information on the cached is retrieved based on the
512 -- organization id and inventory id. If this information does not
513 -- exist in the cache, it will be queried and added to it.
514 -- If there is a collision in the cache, then the new information
515 -- will be retrieved and will replace the old ones
516 --========================================================================
517
518 PROCEDURE get_item_info (
519 p_organization_id IN NUMBER,
520 p_inventory_item_id IN NUMBER,
521 x_Item_info_rec OUT NOCOPY
522 item_info_rec_type,
523 x_return_status OUT NOCOPY VARCHAR2);
524
525
526 --========================================================================
527 -- PROCEDURE : Default_container
528 --
529 -- PARAMETERS: p_item_id Item's Organization Id
530 -- x_master_container_item_id default value for master container
531 -- x_detail_container_item_id default value for detail container
532 -- x_return_status return status
533 -- COMMENT : This API calculates the default value for the fields
534 -- detail_container_item_id and master_container_item_id. It then
535 -- caches these values for future calls.
536 --========================================================================
537
538 PROCEDURE Default_container (
539 p_item_id IN NUMBER,
540 x_master_container_item_id OUT NOCOPY NUMBER,
541 x_detail_container_item_id OUT NOCOPY NUMBER,
542 x_return_status OUT NOCOPY VARCHAR2);
543
544 --========================================================================
548 -- p_carrier_id
545 -- PROCEDURE : Calc_ignore_for_planning
546 --
547 -- PARAMETERS: p_organization_id
549 -- p_ship_method_code
550 -- p_tp_installed
551 -- x_return_status return status
552 -- p_otm_installed optional parameter to pass shipping
553 -- parameter OTM_INSTALLED
554 -- p_client_id clientId value. Consider OTM enabled value on Client.
555 --
556 -- COMMENT : This procedure calulates the value for the field
557 -- ignore_for_planning_flag
558 --========================================================================
559
560 PROCEDURE Calc_ignore_for_planning(
561 p_organization_id IN NUMBER,
562 p_carrier_id IN NUMBER,
563 p_ship_method_code IN VARCHAR2,
564 p_tp_installed IN VARCHAR2,
565 p_caller IN VARCHAR2,
566 x_ignore_for_planning OUT NOCOPY VARCHAR2,
567 x_return_status OUT NOCOPY VARCHAR2,
568 p_otm_installed IN VARCHAR2 DEFAULT NULL, --OTM R12 Org-Specific
569 p_client_id IN NUMBER DEFAULT NULL); -- LSP PROJECT
570
571 --=============================================================================
572 -- API name : validate_fob
573 -- Type : Private.
574 -- Function :
575 -- Pre-reqs : None.
576 -- Parameters :
577 -- IN : p_fob NUMBER
578 -- OUT : x_return_status VARCHAR2
579 --==============================================================================
580 PROCEDURE validate_fob(
581 p_fob IN VARCHAR2,
582 x_return_status OUT NOCOPY VARCHAR2);
583
584 --=============================================================================
585 -- API name : validate_freight_terms
586 -- Type : Private.
587 -- Function :
588 -- Pre-reqs : None.
589 -- Parameters :
590 -- IN : p_freight_terms_code NUMBER
591 -- OUT : x_return_status VARCHAR2
592 --=============================================================================
593 PROCEDURE validate_freight_terms(
594 p_freight_terms_code IN VARCHAR2,
595 x_return_status OUT NOCOPY VARCHAR2);
596
597
598 PROCEDURE validate_supplier_location
599 (
600 p_vendor_id IN NUMBER,
601 p_party_id IN NUMBER,
602 p_location_id IN NUMBER,
603 x_return_status OUT NOCOPY VARCHAR2
604 ) ;
605
606 --============================================================================
607 -- START Bug # 3266659: PICK RELEASE BATCH PUBLIC API
608 --=============================================================================
609
610
611 --========================================================================
612 -- PROCEDURE : Validate_Pick_Group_Rule_Name
613 --
614 -- COMMENT : Validates Pick_Grouping_Rule_Id/Pick_Grouping_Rule_Name against table
615 -- wsh_pick_grouping_rules. If both values are specified then only
616 -- Pick_Grouping_Rule_Id is used
617 --========================================================================
618
619 PROCEDURE Validate_Pick_Group_Rule_Name
620 (p_pick_grouping_rule_id IN OUT NOCOPY NUMBER,
621 p_pick_grouping_rule_name IN VARCHAR2,
622 x_return_status OUT NOCOPY VARCHAR2);
623
624
625
626 --========================================================================
627 -- PROCEDURE : Validate_Pick_Seq_Rule_Name
628 --
629 -- COMMENT : Validates Pick_Sequence_Rule_Id/Pick_Sequence_Rule_Name against table
630 -- wsh_pick_sequence_rules. If both values are specified then only
631 -- Pick_Sequence_Rule_Id is used
632 --========================================================================
633
634 PROCEDURE Validate_Pick_Seq_Rule_Name
635 (p_Pick_Sequence_Rule_Id IN OUT NOCOPY NUMBER,
636 p_Pick_Sequence_Rule_Name IN VARCHAR2,
637 x_return_status OUT NOCOPY VARCHAR2 );
638
639
640 --========================================================================
641 -- PROCEDURE : Validate_Ship_Con_Rule_Name
642 --
643 -- COMMENT : Validates Ship_Confirm_Rule_Id/Ship_Confirm_Rule_Name against table
644 -- wsh_ship_confirm_rules. If both values are specified then only
645 -- Ship_Confirm_Rule_Id is used
646 --========================================================================
647
648 PROCEDURE Validate_Ship_Con_Rule_Name
649 (p_ship_confirm_rule_id IN OUT NOCOPY NUMBER ,
650 p_ship_confirm_rule_name IN VARCHAR2,
651 x_return_status OUT NOCOPY VARCHAR2 );
652
653
654 --========================================================================
655 -- PROCEDURE : Validate_Picking_Batch_Name
656 --
657 -- COMMENT : Validates picking_Batch_Id/Picking_Batch_Name against table
658 -- wsh_picking_Batches. If both values are specified then only
659 -- picking_Batch_Id is used
660 --========================================================================
661
662 PROCEDURE Validate_Picking_Batch_Name
663 (p_picking_Batch_id IN OUT NOCOPY NUMBER ,
664 p_picking_Batch_name IN VARCHAR2 ,
665 x_return_status OUT NOCOPY VARCHAR2 );
666
670 --========================================================================
667 -- END Bug #3266659
668
669 -- Bug#3880569: Adding a new procedure Validate_Active_SM
671 -- PROCEDURE : Validate_Active_SM
672 --
673 -- COMMENT : Validates Active Ship_Method_Code/Name against wsh_carrier_services.
674 -- If both values are specified then only Ship_Method_Code is used
675 --========================================================================
676
677 PROCEDURE Validate_Active_SM
678 (p_ship_method_code IN OUT NOCOPY VARCHAR2,
679 p_ship_method_name IN OUT NOCOPY VARCHAR2,
680 x_return_status OUT NOCOPY VARCHAR2);
681
682
683
684 /*======================================================================
685 PROCEDURE : ValidateActualDepartureDate
686
687 COMMENT : This is just a wrapper around the function
688 WSH_UITL_CORE.ValidateActualDepartureDate
689
690 This procedure calls a similar function in WSH_UTIL_CORE
691 and logs an error message if the actual departure date is
692 not valid.
693
694 HISTORY : rlanka 03/08/2005 Created
695 =======================================================================*/
696 PROCEDURE ValidateActualDepartureDate
697 (p_ship_confirm_rule_id IN NUMBER,
698 p_actual_departure_date IN DATE,
699 x_return_status OUT NOCOPY VARCHAR2);
700
701 -- Standalone Project - Start
702 --
703 --=============================================================================
704 -- PUBLIC PROCEDURE :
705 -- Validate_SR_Organization
706 --
707 -- PARAMETERS:
708 -- p_organization_id => Organization Id
709 -- x_return_status => Return Status of API (Either S,E,U)
710 --
711 -- COMMENT:
712 -- API to validate whether Organization is WMS enabled and NOT Process
713 -- manufacturing enabled.
714 -- HISTORY :
715 -- ueshanka 19/Nov/2008 Created
716 --=============================================================================
717 --
718 PROCEDURE Validate_SR_Organization(
719 p_organization_id IN NUMBER,
720 x_return_status OUT NOCOPY VARCHAR2);
721 --
722 --=============================================================================
723 -- PUBLIC PROCEDURE :
724 -- Validate_Locator_Code
725 --
726 -- PARAMETERS:
727 -- p_locator_code => Locator Code
728 -- p_organization_id => Organization Id
729 -- x_locator_id => Locator Id
730 -- x_return_status => Return Status of API (Either S,E,U)
731 --
732 -- COMMENT:
733 -- API to derive Locator Id based on Locator Code and Organization passed
734 -- HISTORY :
735 -- ueshanka 19/Nov/2008 Created
736 --=============================================================================
737 --
738 PROCEDURE Validate_Locator_Code(
739 p_locator_code IN VARCHAR2,
740 p_organization_id IN NUMBER,
741 x_locator_id OUT NOCOPY NUMBER,
742 x_return_status OUT NOCOPY VARCHAR2);
743 --
744 --=============================================================================
745 -- PUBLIC PROCEDURE :
746 -- Validate_Item
747 --
748 -- PARAMETERS:
749 -- p_item_number => Inventory Item Name
750 -- p_organization_id => Organization Id
751 -- x_inventory_item_id => Inventory Item Id
752 -- x_return_status => Return Status of API (Either S,E,U)
753 --
754 -- COMMENT:
755 -- API to derive Inventory Item Id based on Item Number and Organization
756 -- passed
757 -- HISTORY :
758 -- ueshanka 19/Nov/2008 Created
759 --=============================================================================
760 --
761 PROCEDURE Validate_Item(
762 p_item_number IN VARCHAR2,
763 p_organization_id IN NUMBER,
764 x_inventory_item_id OUT NOCOPY NUMBER,
765 x_return_status OUT NOCOPY VARCHAR2);
766 --
767 --=============================================================================
768 -- PUBLIC PROCEDURE :
769 -- Validate_Customer_Item
770 --
771 -- PARAMETERS:
772 -- p_item_number => Inventory Item Name
773 -- p_customer_id => SoldTo Customer Id
774 -- p_address_id => ShipTo Customer Address Id
775 -- x_customer_item_id => Customer Item Id
776 -- x_return_status => Return Status of API (Either S,E,U)
777 --
778 -- COMMENT:
779 -- API to derive Customer Item Id based on Item Number, Customer Id and
780 -- Customer Address Id passed.
781 -- HISTORY :
782 -- ueshanka 19/Nov/2008 Created
783 --=============================================================================
784 --
785 PROCEDURE Validate_Customer_Item(
786 p_item_number IN VARCHAR2,
787 p_customer_id IN NUMBER,
788 p_address_id IN VARCHAR2,
789 x_customer_item_id OUT NOCOPY NUMBER,
790 x_return_status OUT NOCOPY VARCHAR2);
791 --
792 --=============================================================================
793 -- PUBLIC PROCEDURE :
794 -- Validate_Ship_Method
795 --
796 -- PARAMETERS:
797 -- p_organization_id => Organization Id
798 -- p_carrier_code => Carrier Code
799 -- p_service_level => Service Level
800 -- p_mode_of_transport => Mode of Transport
801 -- x_ship_method_code => Ship Method Code
802 -- x_return_status => Return Status of API (Either S,E,U)
803 --
804 -- COMMENT:
805 -- API to derive Ship Method Code based on Carrier, Service Level, Mode
806 -- of Transport and Organization passed.
810 --
807 -- HISTORY :
808 -- ueshanka 19/Nov/2008 Created
809 --=============================================================================
811 PROCEDURE Validate_Ship_Method(
812 p_organization_id IN NUMBER,
813 p_carrier_code IN VARCHAR2,
814 p_service_level IN VARCHAR2,
815 p_mode_of_transport IN VARCHAR2,
816 x_ship_method_code OUT NOCOPY VARCHAR2,
817 x_return_status OUT NOCOPY VARCHAR2);
818
819 -- Standalone Project - End
820 --
821
822 --========================================================================
823 -- PROCEDURE : Validate_Freight_Code Private
824 --
825 -- PARAMETERS: p_freight_code Freight Code
826 -- x_carrier_id In / Out Carrier id
827 -- x_return_status return status
828 --
829 -- VERSION : current version 1.0
830 -- initial version 1.0
831 -- COMMENT : This procedure is used to validate carrier_id and freight_code
832 --========================================================================
833 PROCEDURE Validate_Freight_Code(
834 p_freight_code IN VARCHAR2,
835 x_carrier_id IN OUT NOCOPY NUMBER,
836 x_return_status OUT NOCOPY VARCHAR2);
837
838 END WSH_UTIL_VALIDATE;