DBA Data[Home] [Help]

PACKAGE: APPS.WSH_DELIVERY_DETAILS_INV

Source


1 PACKAGE WSH_DELIVERY_DETAILS_INV as
2 /* $Header: WSHDDICS.pls 120.4 2008/01/14 14:49:13 skanduku 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(
319   p_locator_id IN NUMBER,
320   p_inventory_item_id IN NUMBER,
321   p_organization_id IN NUMBER,
322   p_subinventory IN VARCHAR2,
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,
380   p_to_subinventory IN VARCHAR2 DEFAULT NULL
377   p_object_type IN VARCHAR2 DEFAULT NULL,
378   x_return_status OUT NOCOPY  VARCHAR2,
379   x_result OUT NOCOPY  BOOLEAN,
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   x_return_status OUT NOCOPY  VARCHAR2,
414   x_result OUT NOCOPY  BOOLEAN) ;
415 
416 /*
417 -----------------------------------------------------------------------------
418 
419    Procedure	: Validate_Serial
420    Parameters	: p_serial_number
421                   p_lot_number
422                   p_organization_id
423   		  p_inventory_item_id
424                   p_subinventory
425   		  p_revision
426                   p_locator_id
427  	          p_transaction_type_id
428                   p_object_type
429                   x_return_status
430    Description	: Validate item in context of organization_id
431   		  Return TRUE if validate item successfully
432   		  FALSE otherwise
433 -----------------------------------------------------------------------------
434 */
435 PROCEDURE Validate_Serial(
436   p_serial_number IN VARCHAR2,
437   p_lot_number IN VARCHAR2,
438   p_organization_id IN NUMBER,
439   p_inventory_item_id IN NUMBER,
440   p_subinventory IN VARCHAR2,
441   p_revision IN VARCHAR2,
442   p_locator_id IN NUMBER,
443   p_transaction_type_id IN NUMBER DEFAULT NULL,
444   p_object_type IN VARCHAR2 DEFAULT NULL,
445   x_return_status OUT NOCOPY  VARCHAR2,
446   x_result OUT NOCOPY  BOOLEAN) ;
447 
448 
449 
450 /*
451 -----------------------------------------------------------------------------
452   PROCEDURE   : Update_Locator_Subinv
453   PARAMETERS  : p_organization_id - organization id for the delivery detail
454 		p_locator_id - locator id for the delivery detail
455 		-1 if dynamic insert and 1 if pre-defined.
456 		p_subinventory - subinventory for the delivery detail
457 	        x_return_status - return status of the API
458   DESCRIPTION : This procedure takes in the inventory location id (locator id),
459 		subinventory and org for the delivery detail and validates if
460 		the locator id exists for the given organization and location.
461 		If it can find it then it raises a duplicate locator exception,
462 		else it updates the mtl item locations table with the
463 		input subinventory for the given locator id and organization.
464 -----------------------------------------------------------------------------
465 */
466 
467 PROCEDURE Update_Locator_Subinv (
468  p_organization_id IN NUMBER,
469  p_locator_id IN NUMBER,
470  p_subinventory IN VARCHAR2,
471  x_return_status OUT NOCOPY  VARCHAR2);
472 
473 
474 /*
475 -----------------------------------------------------------------------------
476   FUNCTION    : Get_Serial_Qty
477   PARAMETERS  : p_organization_id - organization id of line
478 	        p_delivery_detail_id - delivery detail id for the line
479   DESCRIPTION :	This API takes the organization and delivery detail id for
480 		the line and calculates the serial quantity for the line
481 		based on the transaction temp id/serial number that is
482 		entered for the line. If the item is not under serial control
483 		then it returns a 0. If it is an invalid delivery detail id
484 		then it returns a -99.
485 -----------------------------------------------------------------------------
486 */
487 
488 
489 FUNCTION Get_Serial_Qty (
490  p_organization_id IN NUMBER,
491  p_delivery_detail_id IN NUMBER) RETURN NUMBER;
492 
493 /*FUNCTION get_reservable_flag
494 Checks if the item is reservable*/
495 
496 FUNCTION get_reservable_flag(x_item_id         IN NUMBER,
497                              x_organization_id IN NUMBER,
498                              x_pickable_flag   IN VARCHAR2) RETURN
499 VARCHAR2;
500 
501 /*
502 -----------------------------------------------------------------------------
503   FUNCTION    : Line_Reserved
504   PARAMETERS  : p_detail_id       - delivery_detail_id
505                 p_source_code     - source system code
506                 p_released_status - released status
507                 p_pickable_flag   - pickable flag
508                 p_organization_id - organization id of item
509                 p_inventory_item_id - item id
510                 x_return_status   - success if able to look up reservation status
511                                     error if cannot look up
512   DESCRIPTION :	This API takes the organization and inventory item
513 		and determines whether the lines item is reserved.
514               It returns Y if it is reserved, N otherwise.
515 -----------------------------------------------------------------------------
516 */
517 
518 FUNCTION Line_Reserved(
519              p_detail_id          IN  NUMBER,
520              p_source_code        IN  VARCHAR2,
521              p_released_status    IN  VARCHAR2,
522              p_pickable_flag      IN  VARCHAR2,
523              p_organization_id    IN  NUMBER,
524              p_inventory_item_id  IN  NUMBER,
525              x_return_status      OUT NOCOPY  VARCHAR2) RETURN VARCHAR2 ;
526 
527 PROCEDURE Create_Dynamic_Serial(
528         p_from_number IN VARCHAR2,
529         p_to_number IN VARCHAR2,
530         p_source_line_id IN NUMBER,
531         p_delivery_detail_id IN NUMBER,
532         p_inventory_item_id IN NUMBER,
533         p_organization_id IN NUMBER,
534         p_revision IN VARCHAR2,
535         p_lot_number IN VARCHAR2,
536         p_subinventory IN VARCHAR2,
537         p_locator_id IN NUMBER,
538         x_return_status OUT NOCOPY  VARCHAR2,
539         p_serial_number_type_id in  NUMBER DEFAULT NULL,
540         p_source_document_type_id  in NUMBER DEFAULT NULL);
541 
542 /* I: Harmonization Project: kvenkate */
543 PROCEDURE Validate_Serial_Range(
544   p_from_serial_number IN VARCHAR2,
545   p_to_serial_number   IN VARCHAR2,
546   p_lot_number         IN VARCHAR2,
547   p_organization_id    IN NUMBER,
548   p_inventory_item_id  IN NUMBER,
549   p_subinventory       IN VARCHAR2,
550   p_revision           IN VARCHAR2,
551   p_locator_id         IN NUMBER,
552   p_quantity           IN NUMBER,
553   p_transaction_type_id IN NUMBER DEFAULT NULL,
554   p_object_type         IN VARCHAR2 DEFAULT NULL,
555   x_prefix             OUT NOCOPY VARCHAR2,
556   x_return_status      OUT NOCOPY VARCHAR2,
557   x_result             OUT NOCOPY BOOLEAN) ;
558 
559 /* I: Harmonization Project: kvenkate */
560 PROCEDURE Create_Dynamic_Serial_Range(
561         p_from_number        IN VARCHAR2,
562         p_to_number          IN VARCHAR2,
563         p_source_line_id     IN NUMBER,
564         p_delivery_detail_id IN NUMBER,
565         p_inventory_item_id  IN NUMBER,
566         p_organization_id    IN NUMBER,
567         p_revision           IN VARCHAR2,
568         p_lot_number         IN VARCHAR2,
569         p_subinventory       IN VARCHAR2,
570         p_locator_id         IN NUMBER,
571         p_quantity           IN NUMBER,
572 	x_prefix             OUT NOCOPY VARCHAR2,
573         x_return_status      OUT NOCOPY VARCHAR2);
574 
575 PROCEDURE Check_Default_Catch_Weights(p_line_inv_rec IN WSH_DELIVERY_DETAILS_INV.line_inv_info,
576                                       x_return_status   OUT NOCOPY VARCHAR2);
577 
578 -- HW OPMCONV - New procedure to get item information
579 /*
580 -----------------------------------------------------------------------------
581   PROCEDURE   : Get_item_information
582   PARAMETERS  : p_organization_id       - organization id
583                 p_inventory_item_id     - source system code
584                 x_mtl_system_items_rec  - Record to hold item informatiom
585                 x_return_status   - success if able to look up item information
586                                     error if cannot find item information
587 
588   DESCRIPTION :	This API takes the organization and inventory item
589 		and checks if item information is already cached, if
590 		not, it loads the new item information for a specific
591 		organization
592 -----------------------------------------------------------------------------
593 */
594 PROCEDURE Get_item_information (
595   p_organization_id        IN            NUMBER
596 , p_inventory_item_id      IN            NUMBER
597 , x_mtl_system_items_rec   OUT  NOCOPY   WSH_DELIVERY_DETAILS_INV.mtl_system_items_rec
598 , x_return_status          OUT  NOCOPY VARCHAR2
599 );
600 
601 
602 /*
603 -----------------------------------------------------------------------------
604   PROCEDURE   : Update_Marked_Serial
605   PARAMETERS  : p_from_serial_number - serial number to be marked with new
606                 transaction_temp_id
607                 p_to_serial_number - to serial number
608                 p_inventory_item_id - inventory item
609                 p_organization_id - organization_id
610                 p_transaction_temp_id - newly generated transaction temp id
611                 for serial number
612                 x_return_status - return status of the API
613   DESCRIPTION : Call Inventory's update_marked_serial API which will take
614                 serial number and new transaction_temp_id as input and
615                 mark the serial number with the new transaction_temp_id
616 -----------------------------------------------------------------------------
617 */
618 PROCEDURE Update_Marked_Serial (
619   p_from_serial_number  IN      VARCHAR2,
620   p_to_serial_number    IN      VARCHAR2 DEFAULT NULL,
621   p_inventory_item_id   IN      NUMBER,
622   p_organization_id     IN      NUMBER,
623   p_transaction_temp_id IN      NUMBER,
624   x_return_status OUT NOCOPY    VARCHAR2);
625 
626 /*
627 -----------------------------------------------------------------------------
628   PROCEDURE   : get_trx_type_id
629   PARAMETERS  : p_source_line_id - Order Line Id
630                 p_source_code - Source Code ('OE','OKE', etc.)
634   DESCRIPTION : Determines the transaction type id based on the Line id and
631                 x_transaction_type_id - Transaction type id based on the
632                                         Line id and the Source System
633                 x_return_status - return status of the API
635                 the Source System
636 -----------------------------------------------------------------------------
637 */
638 
639 PROCEDURE get_trx_type_id(
640   p_source_line_id IN NUMBER,
641   p_source_code IN VARCHAR2,
642   x_transaction_type_id OUT NOCOPY NUMBER,
643   x_return_status OUT NOCOPY VARCHAR2 );
644 
645 END WSH_DELIVERY_DETAILS_INV;