DBA Data[Home] [Help]

PACKAGE: APPS.WSH_DELIVERY_DETAILS_INV

Source


1 PACKAGE WSH_DELIVERY_DETAILS_INV AUTHID CURRENT_USER as
2 /* $Header: WSHDDICS.pls 120.6 2011/05/24 08:59:11 shtadepa ship $ */
3 
4 /*
5 -----------------------------------------------------------------------------
6   RECORD TYPE  : line_inv_info
7   DESCRIPTION  : This record type stores some of the delivery detail attributes
8 		 pertaining to the inventory controls. Used to pass the info
9 		 on the form to the details required API.
10 ------------------------------------------------------------------------------
11 */
12 
13 
14   TYPE line_inv_info IS RECORD (
15 	delivery_detail_id WSH_DELIVERY_DETAILS.delivery_detail_id%TYPE,
16 	inventory_item_id WSH_DELIVERY_DETAILS.inventory_item_id%TYPE,
17 	shp_qty	WSH_DELIVERY_DETAILS.shipped_quantity%TYPE,
18 	req_qty WSH_DELIVERY_DETAILS.requested_quantity%TYPE,
19 	ser_qty NUMBER,
20 	revision WSH_DELIVERY_DETAILS.revision%TYPE,
21 	subinventory WSH_DELIVERY_DETAILS.subinventory%TYPE,
22 	lot_number WSH_DELIVERY_DETAILS.lot_number%TYPE,
23 	locator_id WSH_DELIVERY_DETAILS.locator_id%TYPE,
24 	locator_control_code NUMBER,
25 	serial_number WSH_DELIVERY_DETAILS.serial_number%TYPE,
26 	serial_number_control_code NUMBER,
27 	transaction_temp_id WSH_DELIVERY_DETAILS.transaction_temp_id%TYPE,
28         organization_id WSH_DELIVERY_DETAILS.organization_id%TYPE,
29         picked_quantity NUMBER,
30         picked_quantity2 NUMBER,
31         requested_quantity_uom WSH_DELIVERY_DETAILS.requested_quantity_uom%TYPE,
32         requested_quantity_uom2 WSH_DELIVERY_DETAILS.requested_quantity_uom2%TYPE,
33         source_line_id NUMBER,
34         source_header_id NUMBER,
35         source_code WSH_DELIVERY_DETAILS.source_code%TYPE,
36         line_direction WSH_DELIVERY_DETAILS.source_code%TYPE);
37 
38 
39   TYPE inv_control_flag_rec IS RECORD (
40 	rev_flag VARCHAR2(3),
41 	lot_flag VARCHAR2(3),
42 	sub_flag VARCHAR2(3),
43 	loc_flag VARCHAR2(3),
44 	ser_flag VARCHAR2(3),
45 	restrict_loc NUMBER,
46 	restrict_sub NUMBER,
47 	location_control_code NUMBER,
48 	serial_code NUMBER ,
49 	reservable_type NUMBER,
50         details_required_flag VARCHAR2(1), -- Bug fix 2850555
51 	invalid_material_status_flag VARCHAR2(1), -- Added for Material Status Control Project
52         transactable_flag VARCHAR2(1) -- Bug 3599363
53         );
54 
55 -- HW OPMCONV - Item attributes
56 TYPE mtl_system_items_rec IS RECORD
57    ( primary_uom_code               mtl_system_items.primary_uom_code%TYPE
58    , secondary_uom_code             mtl_system_items.secondary_uom_code%TYPE
59    , secondary_default_ind          mtl_system_items.secondary_default_ind%TYPE
60    , lot_control_code               mtl_system_items.lot_control_code%TYPE
61    , tracking_quantity_ind          mtl_system_items.tracking_quantity_ind%TYPE
62    , dual_uom_deviation_low         mtl_system_items.dual_uom_deviation_low%TYPE
63    , dual_uom_deviation_high        mtl_system_items.dual_uom_deviation_high%TYPE
64    , enabled_flag                   mtl_system_items.enabled_flag%TYPE
65    , shippable_item_flag            mtl_system_items.shippable_item_flag%TYPE
66    , inventory_item_flag            mtl_system_items.inventory_item_flag%TYPE
67    , lot_divisible_flag             mtl_system_items.lot_divisible_flag%TYPE
68    , lot_status_enabled             mtl_system_items.lot_status_enabled%TYPE
69    --  bug 5264874 Added two new attributes
70    , reservable_type                mtl_system_items.reservable_type%TYPE
71    , mtl_transactions_enabled_flag  mtl_system_items.mtl_transactions_enabled_flag%TYPE
72    , container_item_flag            mtl_system_items.container_item_flag%TYPE);
73 
74 --  bug 5264874
75 TYPE mtl_org_param_rec IS RECORD
76    ( stock_locator_control_code     mtl_parameters.stock_locator_control_code%type
77    , negative_inv_receipt_code      mtl_parameters.negative_inv_receipt_code%type
78    , serial_number_type             mtl_parameters.serial_number_type%type);
79 
80 TYPE mtl_sec_inv_rec IS RECORD
81    ( locator_type                   mtl_secondary_inventories.locator_type%type);
82 
83 --  bug 5264874 end
84 
85 /*
86 -----------------------------------------------------------------------------
87    PROCEDURE  : Fetch_Inv_Controls
88    PARAMETERS : p_delivery_detail_id - delivery detail id.
89 		p_inventory_item_id - inventory_item_id on line for which
90 		inventory controls need to be determined.
91 		p_organization_id - organization_id to which inventory_item
92 		belongs.
93 		p_subinventory - subinventory to which the item belongs
94 		x_inv_controls_rec - output record of
95 		WSH_DELIVERY_DETAILS_INV.inv_control_flag_rec type containing
96 		all inv control flags for the item and organization.
97 		x_return_status - return status of the API.
98   DESCRIPTION : This procedure takes a delivery detail id or alternatively the
99 		inventory item id and organization id and determines whether
100 		the item is under any of the inventory controls. The API
101 		fetches the control codes/flags from mtl_system_items for the
102 		given inventory item and organization and decodes them and
103 		returns a record of inv controls with a 'Y' or a 'N' for each
104 		of the inv controls.
105 
106 ------------------------------------------------------------------------------
107 */
108 
109 
110 PROCEDURE Fetch_Inv_Controls (
111   p_delivery_detail_id IN NUMBER DEFAULT NULL,
112   p_inventory_item_id IN NUMBER,
113   p_organization_id IN NUMBER,
114   p_subinventory IN VARCHAR2,
115   x_inv_controls_rec OUT NOCOPY  WSH_DELIVERY_DETAILS_INV.inv_control_flag_rec,
116   x_return_status OUT NOCOPY  VARCHAR2);
117 
118 
119 /*
120 -----------------------------------------------------------------------------
121    PROCEDURE   : Details_Required
122    PARAMETERS : p_line_inv_rec - WSH_DELIVERY_DETAILS_INV.line_inv_info type
123 		that contains information about all the inventory control
124 		values on the form for the delivery detail id.
125 		p_set_default - boolean variable that indicates whether
126 		to retrieve the default values for controls if the
127 		attributes are missing.
128 		x_line_inv_rec - WSH_DELIVERY_DETAILS_INV.line_inv_info type
129 		containing default values in the case where set_default is TRUE
130   DESCRIPTION : This procedure takes a WSH_DELIVERY_DETAILS_INV.line_inv_info
131 		type with inventory control attributes for the delivery detail
132 		id from the form and determines whether additional inventory
133 		control information needs to be entered or not. If additional
134 		control information is needed then the functions returns a
135 		TRUE or else it is returns FALSE.
136 		Alternatively, if the p_set_default value is set to TRUE, then
137 		it retrieves any default control attributes for the inventory
138 		item on the line and returns the information as x_line_inv_rec
139 
140 ------------------------------------------------------------------------------
141 */
142 
143 
144 PROCEDURE Details_Required (
145   p_line_inv_rec IN WSH_DELIVERY_DETAILS_INV.line_inv_info,
146   p_set_default IN BOOLEAN DEFAULT FALSE,
147   x_line_inv_rec OUT NOCOPY  WSH_DELIVERY_DETAILS_INV.line_inv_info,
148   x_details_required OUT NOCOPY  BOOLEAN,
149   x_return_status OUT NOCOPY  VARCHAR2);
150 
151 
152 /*
153 -----------------------------------------------------------------------------
154   FUNCTION   : Sub_Loc_Ctl
155   PARAMETERS : p_subinventory - subinventory
156 	       p_organization_id - organization_id of line
157   DESCRIPTION : This API takes the subinventory and determines whether the
158 	 	subinventory is under locator control and returns the locator
159 		control code for the subinventory.
160 -----------------------------------------------------------------------------
161 */
162 
163 FUNCTION Sub_Loc_Ctl (
164   p_subinventory IN VARCHAR2,
165   p_organization_id IN NUMBER ) RETURN NUMBER;
166 
167 
168 /*
169 -----------------------------------------------------------------------------
170   FUNCTION   : Get_Org_Loc
171   PARAMETERS : p_organization_id - organization id of line
172   DESCRIPTION : This API takes the organization determines whether the
173 	 	organization is under locator control and returns the locator
174 		control code for the organization.
175 -----------------------------------------------------------------------------
176 */
177 
178 FUNCTION Get_Org_Loc (
179  p_organization_id IN NUMBER) RETURN NUMBER;
180 
181 
182 /*
183 -----------------------------------------------------------------------------
184   PROCEDURE   : Default_Subinventory
185   PARAMETERS  : p_org_id - organization_id
186  	        p_inv_item_id - inventory_item_id on the line
187 	        x_default_sub - default subinventory for the item/org
188 	        x_return_status - return status of the API
189   DESCRIPTION : Get Default Sub for this item/org if it is defined else it
190 		returns null.
191 -----------------------------------------------------------------------------
192 */
193 
194 PROCEDURE Default_Subinventory (
195   p_org_id IN NUMBER,
196   p_inv_item_id IN NUMBER,
197   x_default_sub OUT NOCOPY  VARCHAR2,
198   x_return_status OUT NOCOPY  VARCHAR2);
199 
200 
201 
202 /*
203 -----------------------------------------------------------------------------
204   FUNCTION    : DEFAULT_LOCATOR
205   PARAMETERS  : p_organization_id - input org id
206   		p_inv_item_id - input item_id
207   		p_subinventory - input sub id
208   		p_loc_restricted_flag - Y or N. If Y will ensure location is
209 		in predefined list
210   		x_locator_id -  output default locator id.
211 		x_return_status - return status of API.
212   DESCRIPTION : Retrieves default locator. If none exists then it returns null.
213 -----------------------------------------------------------------------------
214 */
215 
216 
217 FUNCTION DEFAULT_LOCATOR
218 	(p_organization_id IN NUMBER,
219 	 p_inv_item_id IN NUMBER,
220          p_subinventory IN VARCHAR2,
221          p_loc_restricted_flag IN VARCHAR2) RETURN NUMBER;
222 
223 
224 
225 /*
226 -----------------------------------------------------------------------------
227   FUNCTION    : Locator_Ctl_Code
228   PARAMETERS  : p_organization_id - input org id
229 		p_restrict_loc - restrict_locators_code
230   		p_org_loc_code - loc control code for org
231   		p_sub_loc_code - loc control code for sub
232   		p_item_loc_code - loc control code for item
233   DESCRIPTION : Determines the locator control code based on the three loc
234 		control codes and returns the governing loc control code.
235 -----------------------------------------------------------------------------
236 */
237 
238 
239 FUNCTION Locator_Ctl_Code (
240 		p_org_id IN NUMBER,
241 		p_restrict_loc IN NUMBER,
242 		p_org_loc_code  IN NUMBER,
243 		p_sub_loc_code  IN NUMBER,
244 		p_item_loc_code IN NUMBER ) RETURN NUMBER;
245 
246 
247 
248 
249 /*
250 -----------------------------------------------------------------------------
251   PROCEDURE   : Mark_Serial_Number
252   PARAMETERS  : p_delivery_detail_id - delivery detail id or container id
253 		p_serial_number - serial number in case of single quantity
254 		p_transaction_temp_id - transaction temp id for multiple
255 		quantity of serial numbers.
256 	        x_return_status - return status of the API
257   DESCRIPTION : Call Inventory's serial number mark API. Uses the delivery
258 		detail id as the group mark id, temp lot id and temp id to
259 		identify the serial numbers in mtl serial numbers. If the qty
260 		is greater than 1, then it uses the transaction temp id to
261 		fetch all the serial number ranges and then calls the mark API
262 		for each of the ranges.
263 -----------------------------------------------------------------------------
264 */
265 
266 PROCEDURE Mark_Serial_Number (
267   p_delivery_detail_id IN NUMBER,
268   p_serial_number IN VARCHAR2,
269   p_transaction_temp_id IN NUMBER,
270   x_return_status OUT NOCOPY  VARCHAR2);
271 
272 
273 /*
274 -----------------------------------------------------------------------------
275   PROCEDURE   : Unmark_Serial_Number
276   PARAMETERS  : p_delivery_detail_id - delivery detail id or container id
277 		p_serial_number_code - serial number code for the inventory
278 		item on the line.
279 		p_serial_number - serial number in case of single quantity
280 		p_transaction_temp_id - transaction temp id for multiple
281 		quantity of serial numbers.
282 	        x_return_status - return status of the API
283 	        p_inventory_item_id - inventory item
284   DESCRIPTION : Call Inventory's serial number unmark API. Uses the serial
285                 number, inventory_item_id to identify the serial numbers in
286 		mtl serial numbers. If the qty is greater than 1,
287                 then it uses the transaction temp id to
288 		fetch all the serial number ranges and then calls the ummark
289 		API for each of the ranges.
290 -----------------------------------------------------------------------------
291 */
292 
293 PROCEDURE Unmark_Serial_Number (
294   p_delivery_detail_id IN NUMBER,
295   p_serial_number_code IN NUMBER,
296   p_serial_number IN VARCHAR2,
297   p_transaction_temp_id IN NUMBER,
298   x_return_status OUT NOCOPY  VARCHAR2,
299   p_inventory_item_id IN NUMBER DEFAULT NULL);
300 
301 
302 /*
303 -----------------------------------------------------------------------------
304 
305     Procedure	: validate_locator
306     Parameters	: p_locator_id
307                   p_inventory_item
308    		  p_sub
309 		  p_transaction_type_id
310                   p_object_type
311     Description	: This function returns a boolean value to
312                   indicate if the locator is valid in the context of inventory
313                   and subinventory
314 
315 -----------------------------------------------------------------------------
316 */
317 
318 PROCEDURE Validate_Locator(
322   p_subinventory IN VARCHAR2,
319   p_locator_id IN NUMBER,
320   p_inventory_item_id IN NUMBER,
321   p_organization_id IN NUMBER,
323   p_transaction_type_id IN NUMBER DEFAULT NULL,
324   p_object_type IN VARCHAR2 DEFAULT NULL,
325   x_return_status OUT NOCOPY  VARCHAR2,
326   x_result OUT NOCOPY  BOOLEAN
327 ) ;
328 
329 
330 /*
331 -----------------------------------------------------------------------------
332 
333    Procedure	: Validate_Revision
334    Parameters	: p_revision
335                   p_organization_id
336   		  p_inventory_item_id
337                   x_return_status
338    Description	: Validate item in context of organization_id
339   		  Return TRUE if validate item successfully
340   		  FALSE otherwise
341 -----------------------------------------------------------------------------
342 */
343 
344 PROCEDURE Validate_Revision(
345   p_revision IN VARCHAR2,
346   p_organization_id IN NUMBER,
347   p_inventory_item_id IN NUMBER,
348   x_return_status OUT NOCOPY  VARCHAR2,
349   x_result OUT NOCOPY  BOOLEAN) ;
350 
351 
352 /*
353 -----------------------------------------------------------------------------
354 
355    Procedure	: Validate_Subinventory
356    Parameters	: p_subinventory
357                   p_organization_id
358   	  	  p_inventory_item_id
359 		  p_transaction_type_id
360                   p_object_type
361                   x_return_status
362                   p_to_subinventory
363    Description	: Validate item in context of organization_id
364   		  Return TRUE if validate item successfully
365   		  FALSE otherwise
366                   p_to_subinventory is defaulted to NULL, if it is NULL
367                   p_subinventory will be validated as from_subinventory.
368                   Else, p_to_subinventory will be validated as to_subinvnetory.
369 -----------------------------------------------------------------------------
370 */
371 
372 PROCEDURE Validate_Subinventory(
373   p_subinventory IN VARCHAR2,
374   p_organization_id IN NUMBER,
375   p_inventory_item_id IN NUMBER,
376   p_transaction_type_id IN NUMBER DEFAULT NULL,
377   p_object_type IN VARCHAR2 DEFAULT NULL,
378   x_return_status OUT NOCOPY  VARCHAR2,
379   x_result OUT NOCOPY  BOOLEAN,
380   p_to_subinventory IN VARCHAR2 DEFAULT NULL
381 ) ;
382 
383 
384 /*
385 -----------------------------------------------------------------------------
386 
387    Procedure	: Validate_Lot_Number
388    Parameters	: p_lot_number
389                   p_organization_id
390   		  p_inventory_item_id
391                   p_subinventory
392   		  p_revision
393                   p_locator_id
394  	          p_transaction_type_id
395                   p_object_type
396                   x_return_status
397    Description	: Validate item in context of organization_id
398   		  Return TRUE if validate item successfully
399   		  FALSE otherwise
400 -----------------------------------------------------------------------------
401 */
402 
403 
404 PROCEDURE Validate_Lot_Number(
405   p_lot_number IN VARCHAR2,
406   p_organization_id IN NUMBER,
407   p_inventory_item_id IN NUMBER,
408   p_subinventory IN VARCHAR2,
409   p_revision IN VARCHAR2,
410   p_locator_id IN NUMBER,
411   p_transaction_type_id IN NUMBER DEFAULT NULL,
412   p_object_type IN VARCHAR2 DEFAULT NULL,
413   p_lpn_id IN NUMBER DEFAULT NULL,         --bug 12576086
414   x_return_status OUT NOCOPY  VARCHAR2,
415   x_result OUT NOCOPY  BOOLEAN) ;
416 
417 /*
418 -----------------------------------------------------------------------------
419 
420    Procedure	: Validate_Serial
421    Parameters	: p_serial_number
422                   p_lot_number
423                   p_organization_id
424   		  p_inventory_item_id
425                   p_subinventory
426   		  p_revision
427                   p_locator_id
428  	          p_transaction_type_id
429                   p_object_type
430                   x_return_status
431    Description	: Validate item in context of organization_id
432   		  Return TRUE if validate item successfully
433   		  FALSE otherwise
434 -----------------------------------------------------------------------------
435 */
436 PROCEDURE Validate_Serial(
437   p_serial_number IN VARCHAR2,
438   p_lot_number IN VARCHAR2,
439   p_organization_id IN NUMBER,
440   p_inventory_item_id IN NUMBER,
441   p_subinventory IN VARCHAR2,
442   p_revision IN VARCHAR2,
443   p_locator_id IN NUMBER,
444   p_transaction_type_id IN NUMBER DEFAULT NULL,
445   p_object_type IN VARCHAR2 DEFAULT NULL,
446   x_return_status OUT NOCOPY  VARCHAR2,
447   x_result OUT NOCOPY  BOOLEAN) ;
448 
449 
450 
451 /*
452 -----------------------------------------------------------------------------
453   PROCEDURE   : Update_Locator_Subinv
454   PARAMETERS  : p_organization_id - organization id for the delivery detail
455 		p_locator_id - locator id for the delivery detail
456 		-1 if dynamic insert and 1 if pre-defined.
457 		p_subinventory - subinventory for the delivery detail
458 	        x_return_status - return status of the API
459   DESCRIPTION : This procedure takes in the inventory location id (locator id),
460 		subinventory and org for the delivery detail and validates if
461 		the locator id exists for the given organization and location.
462 		If it can find it then it raises a duplicate locator exception,
463 		else it updates the mtl item locations table with the
464 		input subinventory for the given locator id and organization.
465 -----------------------------------------------------------------------------
466 */
467 
468 PROCEDURE Update_Locator_Subinv (
472  x_return_status OUT NOCOPY  VARCHAR2);
469  p_organization_id IN NUMBER,
470  p_locator_id IN NUMBER,
471  p_subinventory IN VARCHAR2,
473 
474 
475 /*
476 -----------------------------------------------------------------------------
477   FUNCTION    : Get_Serial_Qty
478   PARAMETERS  : p_organization_id - organization id of line
479 	        p_delivery_detail_id - delivery detail id for the line
480   DESCRIPTION :	This API takes the organization and delivery detail id for
481 		the line and calculates the serial quantity for the line
482 		based on the transaction temp id/serial number that is
483 		entered for the line. If the item is not under serial control
484 		then it returns a 0. If it is an invalid delivery detail id
485 		then it returns a -99.
486 -----------------------------------------------------------------------------
487 */
488 
489 
490 FUNCTION Get_Serial_Qty (
491  p_organization_id IN NUMBER,
492  p_delivery_detail_id IN NUMBER) RETURN NUMBER;
493 
494 /*FUNCTION get_reservable_flag
495 Checks if the item is reservable*/
496 
497 FUNCTION get_reservable_flag(x_item_id         IN NUMBER,
498                              x_organization_id IN NUMBER,
499                              x_pickable_flag   IN VARCHAR2) RETURN
500 VARCHAR2;
501 
502 /*
503 -----------------------------------------------------------------------------
504   FUNCTION    : Line_Reserved
505   PARAMETERS  : p_detail_id       - delivery_detail_id
506                 p_source_code     - source system code
507                 p_released_status - released status
508                 p_pickable_flag   - pickable flag
509                 p_organization_id - organization id of item
510                 p_inventory_item_id - item id
511                 x_return_status   - success if able to look up reservation status
512                                     error if cannot look up
513   DESCRIPTION :	This API takes the organization and inventory item
514 		and determines whether the lines item is reserved.
515               It returns Y if it is reserved, N otherwise.
516 -----------------------------------------------------------------------------
517 */
518 
519 FUNCTION Line_Reserved(
520              p_detail_id          IN  NUMBER,
521              p_source_code        IN  VARCHAR2,
522              p_released_status    IN  VARCHAR2,
523              p_pickable_flag      IN  VARCHAR2,
524              p_organization_id    IN  NUMBER,
525              p_inventory_item_id  IN  NUMBER,
526              x_return_status      OUT NOCOPY  VARCHAR2) RETURN VARCHAR2 ;
527 
528 PROCEDURE Create_Dynamic_Serial(
529         p_from_number IN VARCHAR2,
530         p_to_number IN VARCHAR2,
531         p_source_line_id IN NUMBER,
532         p_delivery_detail_id IN NUMBER,
533         p_inventory_item_id IN NUMBER,
534         p_organization_id IN NUMBER,
535         p_revision IN VARCHAR2,
536         p_lot_number IN VARCHAR2,
537         p_subinventory IN VARCHAR2,
538         p_locator_id IN NUMBER,
539         x_return_status OUT NOCOPY  VARCHAR2,
540         p_serial_number_type_id in  NUMBER DEFAULT NULL,
541         p_source_document_type_id  in NUMBER DEFAULT NULL);
542 
543 /* I: Harmonization Project: kvenkate */
544 PROCEDURE Validate_Serial_Range(
545   p_from_serial_number IN VARCHAR2,
546   p_to_serial_number   IN VARCHAR2,
547   p_lot_number         IN VARCHAR2,
548   p_organization_id    IN NUMBER,
549   p_inventory_item_id  IN NUMBER,
550   p_subinventory       IN VARCHAR2,
551   p_revision           IN VARCHAR2,
552   p_locator_id         IN NUMBER,
553   p_quantity           IN NUMBER,
554   p_transaction_type_id IN NUMBER DEFAULT NULL,
555   p_object_type         IN VARCHAR2 DEFAULT NULL,
556   x_prefix             OUT NOCOPY VARCHAR2,
557   x_return_status      OUT NOCOPY VARCHAR2,
558   x_result             OUT NOCOPY BOOLEAN) ;
559 
560 /* I: Harmonization Project: kvenkate */
561 PROCEDURE Create_Dynamic_Serial_Range(
562         p_from_number        IN VARCHAR2,
563         p_to_number          IN VARCHAR2,
564         p_source_line_id     IN NUMBER,
565         p_delivery_detail_id IN NUMBER,
566         p_inventory_item_id  IN NUMBER,
567         p_organization_id    IN NUMBER,
568         p_revision           IN VARCHAR2,
569         p_lot_number         IN VARCHAR2,
570         p_subinventory       IN VARCHAR2,
571         p_locator_id         IN NUMBER,
572         p_quantity           IN NUMBER,
573 	x_prefix             OUT NOCOPY VARCHAR2,
574         x_return_status      OUT NOCOPY VARCHAR2);
575 
576 PROCEDURE Check_Default_Catch_Weights(p_line_inv_rec IN WSH_DELIVERY_DETAILS_INV.line_inv_info,
577                                       x_return_status   OUT NOCOPY VARCHAR2);
578 
579 -- HW OPMCONV - New procedure to get item information
580 /*
581 -----------------------------------------------------------------------------
582   PROCEDURE   : Get_item_information
583   PARAMETERS  : p_organization_id       - organization id
584                 p_inventory_item_id     - source system code
585                 x_mtl_system_items_rec  - Record to hold item informatiom
586                 x_return_status   - success if able to look up item information
587                                     error if cannot find item information
588 
589   DESCRIPTION :	This API takes the organization and inventory item
590 		and checks if item information is already cached, if
591 		not, it loads the new item information for a specific
592 		organization
593 -----------------------------------------------------------------------------
594 */
595 PROCEDURE Get_item_information (
596   p_organization_id        IN            NUMBER
597 , p_inventory_item_id      IN            NUMBER
601 
598 , x_mtl_system_items_rec   OUT  NOCOPY   WSH_DELIVERY_DETAILS_INV.mtl_system_items_rec
599 , x_return_status          OUT  NOCOPY VARCHAR2
600 );
602 
603 /*
604 -----------------------------------------------------------------------------
605   PROCEDURE   : Update_Marked_Serial
606   PARAMETERS  : p_from_serial_number - serial number to be marked with new
607                 transaction_temp_id
608                 p_to_serial_number - to serial number
609                 p_inventory_item_id - inventory item
610                 p_organization_id - organization_id
611                 p_transaction_temp_id - newly generated transaction temp id
612                 for serial number
613                 x_return_status - return status of the API
614   DESCRIPTION : Call Inventory's update_marked_serial API which will take
615                 serial number and new transaction_temp_id as input and
616                 mark the serial number with the new transaction_temp_id
617 -----------------------------------------------------------------------------
618 */
619 PROCEDURE Update_Marked_Serial (
620   p_from_serial_number  IN      VARCHAR2,
621   p_to_serial_number    IN      VARCHAR2 DEFAULT NULL,
622   p_inventory_item_id   IN      NUMBER,
623   p_organization_id     IN      NUMBER,
624   p_transaction_temp_id IN      NUMBER,
625   p_delivery_detail_id IN       NUMBER , --RTV changes
626   x_return_status OUT NOCOPY    VARCHAR2);
627 
628 /*
629 -----------------------------------------------------------------------------
630   PROCEDURE   : get_trx_type_id
631   PARAMETERS  : p_source_line_id - Order Line Id
632                 p_source_code - Source Code ('OE','OKE', etc.)
633                 x_transaction_type_id - Transaction type id based on the
634                                         Line id and the Source System
635                 x_return_status - return status of the API
636   DESCRIPTION : Determines the transaction type id based on the Line id and
637                 the Source System
638 -----------------------------------------------------------------------------
639 */
640 
641 PROCEDURE get_trx_type_id(
642   p_source_line_id IN NUMBER,
643   p_source_code IN VARCHAR2,
644   x_transaction_type_id OUT NOCOPY NUMBER,
645   x_return_status OUT NOCOPY VARCHAR2 );
646 
647 END WSH_DELIVERY_DETAILS_INV;