DBA Data[Home] [Help]
Skip to content

PACKAGE: APPS.WMS_PUTAWAY_UTILS

Source


1 PACKAGE WMS_PUTAWAY_UTILS AUTHID CURRENT_USER AS
2 /* $Header: WMSPUTLS.pls 120.5.12020000.3 2013/01/30 07:09:28 azjain ship $*/
3 
4 --WMS_PUTAWAY_UTILS  Package
5 -- File        : WMSPUTLS.pls
6 -- Content     : Contains procedures and fucntions for putaway utilities
7 -- Description : Contains procedures and fucntions for putaway utilities
8 
9    /**
10 
11    **/
12 -- Notes       : This package will contain the wrappers (which will be called from the java files)
13 --               for putaway.
14 --               This will also contain the grouping logic stuff which will populate the global
15 --               temp table WMS_PUTAWAY_GROUP_TASKS_GTEMP
16 -- Modified    : Mon Jul 28 18:08:27 GMT+05:30 2003
17 
18 
19 
20 /**
21   *   This function will return the subinventory_type for the
22   *   subinventory and org combination passed as input. It will
23   *   return the following values
24   *   1  -- Storage Subinventory.
25   *   2  -- Receiving Subinventory.
26   *   -1 -- Error
27 
28   *  @param  p_organization_id   Organization ID
29   *  @param  p_subinventory_code   Subinventory Code
30   *  @ RETURN  number
31 
32 
33 **/
34    FUNCTION get_subinventory_type(
35       p_organization_id IN NUMBER,
36       p_subinventory_code IN VARCHAR2)
37      RETURN NUMBER;
38 
39 
40 
41 
42 /**
43   *   This function will remove all the records in the temporary
44   *   table WMS_PUTAWAY_GROUP_TASKS_TEMP
45   *   The rows that has to be deleted depends on the i/p parameter
46   *   p_del_type
47   *
48   *   p_del_type   Action
49   *   ------------------------------------------------------------
50   *   1        --  Delete tasks belonging to the group which is passed as input.
51   *   2        --  Delete dummy rows whose drop_type is 'ID'
52   *   This Funciton will delete both the group_tasks and all_task
53   *   rows.
54   *   It will return the number of rows deleted
55   *   -1 in case of failure.
56 
57   *  @param  p_group_id   Group ID for which the records has to be deleted
58   *  @ RETURN  NUMBER
59 
60 
61 **/
62     FUNCTION Remove_Tasks_In_Group(
63                  p_del_type  IN NUMBER
64                 ,p_group_id  IN NUMBER := NULL )
65     RETURN NUMBER;
66 
67      PROCEDURE unload_task      --Added new procedure for UNload ER:13797542
68     (
69      x_return_status OUT NOCOPY VARCHAR2
70    , x_message             OUT NOCOPY VARCHAR2
71    , p_lpn_id              IN NUMBER );
72 
73 
74 
75 /**
76   *   This procedure will populate the grouped tasks temporary
77   *   table (WMS_PUTAWAY_GROUP_TASKS_GTEMP with the required data
78   *   and also it will stamp the drop type for the tasks and will
79   *   group them based on various criterias.
80 
81   *  @param  x_return_status  Return status of the procedure - Success, Error, Unexpected Error, Warning etc.,
82   *  @param  x_msg_count      Count of messages in the stack
83   *  @param  x_msg_data       Actual message if the count = 1 else it will be null.
84   *  @param  p_org_id         Organization Id
85   *  @param  p_drop_type      This indicates for which type of drop the temp table should be populated.
86   *                           This can have the values
87   *                              SD - 'System Drop'
88   *                              DA - 'Drop All'
89   *                              ED - 'Existing Putaway Drop'
90   *  @param  p_emp_id         Employee identifier
91   *  @param  p_lpn_id         LPN for which this procedure is called.
92   *  @param  p_item_drop_flag Whether it is called for all item drops or not
93   *  @param  p_lpn_is_loaded  Whether the LPN is already loaded or not.
94 
95 
96 **/
97 
98 /** Bug#6920388
99 This procedure will unpack the inner LPN of a given LPN if the inner LPN
100 has a picking task loaded from it. Thi will be used in manual load and drop.
101 **/
102 
103 PROCEDURE Detach_Loaded_Lpns ( p_lpn_id NUMBER,
104                                 p_org_id NUMBER);
105 
106 
107   PROCEDURE   Create_grouped_tasks(
108     x_return_status   OUT  NOCOPY  VARCHAR2,
109     x_msg_count       OUT  NOCOPY  NUMBER,
110     x_msg_data        OUT  NOCOPY  VARCHAR2,
111     p_org_id          IN           NUMBER,
112     p_drop_type       IN           VARCHAR2,
113     p_emp_id          IN           NUMBER,
114     p_lpn_id          IN           NUMBER     DEFAULT NULL,
115     p_item_drop_flag  IN           VARCHAR2   DEFAULT 'N',
116     p_lpn_is_loaded   IN           VARCHAR2   DEFAULT 'N');
117 
118 
119 /**
120   *   This procedure will explode the LPN passed and will get all the MMTTs
121   *   for its contents  (including childs contents) and will call the ATF API to
122   *   Abort the operation instance.
123   *
124   *   The parameter p_call_type will decide what ATF API to call
125   *   p_call_type   Gloabl Constant      Meaning
126   *   1             G_ATF_ACTIVATE_PLAN  Activate Plan
127   *   2             G_ATF_ABORT_PLAN     Abort Plan
128   *
129   *  @param  p_call_type      Mode for which the procedure is called
130   *  @param  p_org_id         Organization Identifier
131   *  @param  p_lpn_id         LPN identifier
132   *  @param  p_emp_id         Employee identifier
133   *
134   *  @param  x_return_status  Return status of the function - Success, Error, Unexpected Error, Warning etc.,
135   *  @param  x_msg_count      Count of messages in the stack
136   *  @param  x_msg_data       Actual message if the count = 1 else it will be null.
137   *
138 **/
139 
140    -- In case of Manual/User Drop the ATF API's will be still used to create WDTs and WDTH.
141    -- Before that the existing WDTs, Plans etc has to be deleted and hence Abort plan has to be called first.
142    PROCEDURE ATF_For_Manual_Drop(
143               x_return_status  OUT NOCOPY  VARCHAR2
144              ,x_msg_count      OUT NOCOPY  NUMBER
145              ,x_msg_data       OUT NOCOPY  VARCHAR2
146              ,p_call_type      IN          NUMBER
147              ,p_org_id         IN          NUMBER
148              ,p_lpn_id         IN          NUMBER
149              ,p_emp_id         IN          NUMBER
150              );
151 
152 
153 
154 /**
155   *   This Procedure will do the ATF integration for the LOAD operation
156   *   in case of single step drop or load portion of manual drop.
157   *
158   *   This procedure inturn will call Activate_Plan_For_Load to activate
159   *   the plan for load and then will call Complete_Plan_For_Load to complete the LOAD step.
160   *
161   *   This procedure will be called from create_grouped_tasks in case of single step drop
162   *   ie the LPN which has to be dropped is not loaded already.
163   *
164   *  @param   x_return_status   Return status of the function - Success, Error, Unexpected Error, Warning etc.,
165   *  @param   x_msg_count       Count of messages in the stack
166   *  @param   x_msg_data        Actual message if the count = 1 else it will be null.
167   *  @param   p_org_id          Organization Identifier
168   *  @param   p_lpn_id          LPN Identifier
169   *  @param   p_emp_id          Employee Identifier
170   *  @ RETURN  NUMBER
171 
172 
173 **/
174    PROCEDURE Complete_ATF_Load(
178       ,p_org_id        IN           NUMBER
175        x_return_status OUT  NOCOPY  VARCHAR2
176       ,x_msg_count     OUT  NOCOPY  NUMBER
177       ,x_msg_data      OUT  NOCOPY  VARCHAR2
179       ,p_lpn_id        IN           NUMBER
180       ,p_emp_id        IN           NUMBER );
181 
182 
183 
184 
185 /**
186   *   This function will call the ATF API to activate the operation instance for inspect.
187   *   It will call the ATF API  wms_atf_runtime_pub_apis.activate_operation_instance for
188   *   each MMTT. For the Move Order Line passed.
189   *
190   *   ATF will check whether the current step. If it is not inspect, it will inturn call
191   *   the Abort operation instance to abort the current plan in progress. So we need not
192   *   call Abort Explicitly in this case.
193   *
194   *   It returns the number of rows for which the plan is
195   *   activated, will return -1 in case of failure.
196 
197   *  @param  x_return_status  Return status of the function - Success, Error, Unexpected Error, Warning etc.,
198   *  @param  x_msg_count      Count of messages in the stack
199   *  @param  x_msg_data       Actual message if the count = 1 else it will be null.
200   *  @param   p_org_id          Organization Identifier
201   *  @param   p_lpn_id          LPN Identifier
202   *  @param   p_emp_id          Employee Identifier
203   *
204   *  @ RETURN  NUMBER
205 
206 
207 **/
208    FUNCTION Activate_Plan_For_Inspect(
209               x_return_status  OUT NOCOPY  VARCHAR2
210              ,x_msg_count      OUT NOCOPY  NUMBER
211              ,x_msg_data       OUT NOCOPY  VARCHAR2
212              ,p_org_id         IN          NUMBER
213              ,p_mo_line_id     IN           NUMBER )
214      RETURN NUMBER;
215 
216 
217 /**
218   *   This procedure will call the ATF API to cleanup / rollback
219   *   the operation instance for load / drop / single step drop.
220   *
221   *   It will call the ATF APIs for each MMTT in the temp table
222   *   if group_id is not passed else it will call ATF APIs only
223   *   for that group in the temp table.
224   *
225   *   It returns the number of rows for which the plan is
226   *   cleanedup / rolled back, will return -1 in case of failure.
227   *
228   *   The parameter p_call_type will decide what ATF API to call
229   *   p_call_type   Gloabl Constant         Meaning
230   *   ----------------------------------------------------------
231   *   1             G_CT_NORMAL_LOAD        Called from Load scenario (Manual Load)
232   *   2             G_CT_NORMAL_DROP        Called from Drop (LPN already loaded)
233   *   3             G_CT_SINGLE_STEP_DROP   Called from Drop (LPN already loaded)
234   *
235   *   if p_call_type = 3, Rollback_operation_plan will be called
236   *   else  Cleanup_Operation_Instance will be called.
237   *
238   *
239   *  @param  x_return_status   Return status of the function - Success, Error, Unexpected Error,
240   *                            Warning etc.,
241   *  @param  x_msg_count       Count of messages in the stack
242   *  @param  x_msg_data        Actual message if the count = 1 else it will be null.
243   *  @param  p_org_id          Organization Identifier
244   *  @param  p_call_type       Whether cleanup is called for load, drop or single step drop
245   *  @param  p_lpn_id          LPN Identifier
246   *  @param  p_group_id        Group ID for which cleanup has to be called.
247   *                            Can have following values:
248   *                            -1: Called when one of the tasks failed and
249   *                                user decided to quit all tasks
250   *                            -2: Called at the end of all tasks to clean up
251   *                                task split during partial drop
252   *                            NULL: Called in cases of Manual Drop, Inspection,
253   *                                  Manual Load
254   *                            Others: Called when one of the tasks failed and
255   *                                    user wants to cancel just this task
256   *  @ RETURN  NUMBER
257 
258 
259 **/
260    PROCEDURE Cleanup_ATF(
261           x_return_status OUT  NOCOPY  VARCHAR2
262          ,x_msg_count     OUT  NOCOPY  NUMBER
263          ,x_msg_data      OUT  NOCOPY  VARCHAR2
264          ,p_org_id        IN           NUMBER
265          ,p_call_type     IN           NUMBER
266          ,p_lpn_id        IN           NUMBER   DEFAULT NULL
267          ,p_group_id      IN           NUMBER   DEFAULT NULL
268          ,p_parent_lpn_id IN           NUMBER   DEFAULT NULL
269 	 ,p_drop_all      IN           VARCHAR2 --BUG 5075410
270 	 ,p_emp_id        IN           NUMBER); --BUG 5075410
271 
272 
273   /**
274   *  Nested LPN changes, This procedure Loads the given FromLPN into ToLPN
275   *  and calls suggestions_pub
276   *  @param   p_org_id       Current Organization
277   *  @param   p_sub_code     If tosub is receving then call transfer transaction
278                              If to sub is inventory sub then call Pack Unpack API.
279   *  @param   p_from_lpn_id  From LPN id
280   *  @param   p_to_lpn_id    Transfer LPN id
281   *  @param   p_mode
282               1 - Load entire LPN
283               If the parent_lpn for the given from lpn is not null then unpack the lpn from its parent
284               If the to_lpn is not null then pack the lpn into tolpn.
285               2 - Transfer All contents
286               3 - Transfer parial quantity.
287 
288   *  @param   x_ret      returns the following values
289   *           0 - Success
290   *           1 - failure.
291   *  @param   x_return_status
292   *  @param   x_msg_count
293   *  @param   x_context
294   *  @param   p_user_id
295   **/
299   , p_user_id              IN             NUMBER
296   PROCEDURE suggestions_pub_wrapper(
297     p_lpn_id               IN             NUMBER
298   , p_org_id               IN             NUMBER
300   , p_eqp_ins              IN             VARCHAR2
301   , p_status               IN             NUMBER := 3
302   , p_check_for_crossdock  IN             VARCHAR2 := 'Y'
303   , x_number_of_rows       OUT NOCOPY     NUMBER
304   , x_return_status        OUT NOCOPY     VARCHAR2
305   , x_msg_count            OUT NOCOPY     NUMBER
306   , x_msg_data             OUT NOCOPY     VARCHAR2
307   , x_crossdock            OUT NOCOPY     VARCHAR2
308   );
309 
310 
311 
312  /**
313   *   Nested LPN changes
314   *   This procedure loads the given Nested LPN
315   */
316   PROCEDURE load_lpn(
317       p_org_id         IN             NUMBER
318     , p_sub_code       IN             VARCHAR2
319     , p_loc_id         IN             NUMBER
320     , p_from_lpn_id    IN             NUMBER
321     , p_to_lpn_id      IN             NUMBER
322     , p_mode           IN             NUMBER
323     , p_user_id        IN             NUMBER
324     , p_eqp_ins        IN             VARCHAR2
325     , p_project_id     IN             NUMBER DEFAULT NULL
326     , p_task_id        IN             NUMBER DEFAULT NULL
327     , p_check_for_crossdock IN        VARCHAR2
328     , x_return_status  OUT NOCOPY     VARCHAR2
329     , x_msg_count      OUT NOCOPY     NUMBER
330     , x_msg_data       OUT NOCOPY     VARCHAR2
331     , x_crossdock      OUT NOCOPY     VARCHAR2
332     );
333 
334 
335 
336      /**
337    *  Nested LPN changes, This procedure explodes the given LPN
338    *  and for each LPN checks the validity of the given LPN and returns
339    *  @param   p_org_id   Current Organization
340    *  @param   p_lpn_id   From LPN ID
341    *  @param   p_mode
342                Purpose of the parameter - This method can be called
343                from both UI as well as grouping logic. If this method
344                is called from grouping logic, check only for the given LPN
345                and not for the child LPNs.
346                0 - Check for the given LPN iteself and not for the child LPNs
347                1 - Check for the given LPN as well as it child LPNs.
348 
349    *  @param   x_ret      returns the following values
350    *           0 - Success
351    *           1 - Entire LPN needs Inspection.
352    *           2 - Entire LPN is Invalid
353    *           3 - Entire LPN is Invalid and cannot be putawayed.
354    *           4 - Some child LPNs are invalid and cannot be putawayed.
355    *           5 - Some child LPNs need inspection.
356    *  @param   x_loaded_stauts
357    *           0 - not loaded
358    *           1 - loaded
359    *  @param   x_return_status
360    *  @param   x_msg_count
361    *  @param   x_context
362    *  @param   p_user_id
363    **/
364   PROCEDURE check_lpn_validity_wrapper(
365     p_org_id         IN             NUMBER
366   , p_lpn_id         IN             NUMBER
367   , p_user_id        IN             NUMBER
368   , p_mode           IN             NUMBER
369   , x_ret            OUT NOCOPY     NUMBER
370   , x_lpn_context    OUT NOCOPY     NUMBER
371   , x_loaded_status  OUT NOCOPY     VARCHAR2
372   , x_return_status  OUT NOCOPY     VARCHAR2
373   , x_msg_count      OUT NOCOPY     NUMBER
374   , x_msg_data       OUT NOCOPY     VARCHAR2);
375 
376 
377    /** Porcedure ot update Move order line */
378    PROCEDURE update_mo(
379       MoLineId            NUMBER   DEFAULT  -9999,
380       ReferenceId         NUMBER   DEFAULT  -9999,
381       Reference           VARCHAR2 DEFAULT '-9999',
382       Reference_type_code NUMBER   DEFAULT  -9999,
383       lpn_id              NUMBER   DEFAULT  -9999,
384       wms_process_flag    NUMBER   DEFAULT  -9999,
385       inspect_status      NUMBER   DEFAULT  -9999);
386 
387 
388 
389   /**
390   *  This procedures transfer all the contents in from_LPN to into_LPN
391   *  @param   p_org_id       Current Organization
392   *  @param   p_sub_code     Not currently used
393   *  @param   p_loc_id       Not currently used
394   *  @param   p_from_lpn_id  From LPN id
395   *  @param   p_into_lpn_id  Into LPN id to which the contents in From LPN
396   *                          will be transfered
397   *  @param   p_mode
398   *  @param   p_user_id
399   *  @param   p_eqp_ins
400   *  @param   p_project_id
401   *  @param   p_task_id
402   *  @param   x_return_status
403   *  @param   x_msg_count
404   *  @param   x_msg_data
405     **/
406   PROCEDURE transfer_contents
407     (
408      p_org_id           IN             NUMBER    DEFAULT NULL
409      , p_sub_code       IN             VARCHAR2 DEFAULT NULL
410      , p_loc_id         IN             NUMBER   DEFAULT NULL
411      , p_from_lpn_id    IN             NUMBER
412      , p_into_lpn_id    IN             NUMBER
413      , p_operation      IN             VARCHAR2
414      , p_mode           IN             NUMBER
415      , p_user_id        IN             NUMBER
416      , p_eqp_ins        IN             VARCHAR2
417      , p_project_id     IN             NUMBER   DEFAULT NULL
418      , p_task_id        IN             NUMBER   DEFAULT NULL
419      , x_return_status  OUT NOCOPY     VARCHAR2
420      , x_msg_count      OUT NOCOPY     NUMBER
421      , x_msg_data       OUT NOCOPY     VARCHAR2 );
422 
423  /**
424   *   This procedure is a wrapper for the complete_putaway API and will be
425   *   called for a group of tasks. Accepts the current group Id or
426   *   transaction_header_id and the values confirmed by the user on the page
427   *   and processes the eligible tasks
428   *   Processing Logic:
429   *     -> Loop through each task/MMTT row given the group_id/header_id
430   *     -> Consume the task quantity based on the confirmed quantity
431   *     -> Create the lots and serials interface records (receiving LPN)
432   *     -> Create the WLPNI records (receiving LPN) or
433   *        call pack/unpack API to reflect nesting changes
434   *     -> Call the complete_putaway API for the given task
435   *     -> Call the receiving Transaction Manager (receiving LPN)
436   *
437   *  @param  x_return_status            Return Status Indicator
438   *  @param  x_msg_count                Stacked messages counter
439   *  @param  x_msg_data                 Stacked Messages
440   *  @param  p_group_id                 ID of the current group of tasks
441   *  @param  p_txn_header_id            header_id for the current group of tasks
442   *  @param  p_drop_type                Drop Type Identifier.<br>
443   *                                     ID - Item Drop<br>
444   *                                     CD - Consolidated Drop<br>
445   *                                     MD - Manual Drop<br>
446   *                                     UD - User Drop<br>
447   *  @param  p_lpn_mode                 Flag for LPN actions
448   *                                     1 - Transfer Contents<br>
449   *                                     2 - Drop Entire LPN<br>
450   *                                     3 - Item Drop
451   *  @param  p_lpn_id                   LPN being putaway
452   *  @param  p_lpn_context               Context of the LPN being putaway
456   *  @param  p_revision                 Revision confirmed (item drop)
453   *  @param  p_organization_id          Organization ID
454   *  @param  p_user_id                  Logged in Employee ID
455   *  @param  p_item_id                  Item for the current group (item drop)
457   *  @param  p_lot_number               Lot Number confirmed (item drop)
458   *  @param  p_subinventory_code        Drop to Subinventory Code
459   *  @param  p_locator_id               Drop to Locator ID
460   *  @param  p_quantity                 Quantity Confirmed (item drop)
461   *  @param  p_uom_code                 Unit of Measure confirmed (item drop)
462   *  @param  p_entire_lpn               Flag to indicate if entire LPN is putaway
463   *  @param  p_to_lpn_name              License Plate number of the Into LPN
464   *  @param  p_to_lpn_id                LPN Id of the Into LPN
465   *  @param  p_project_id               Project ID
466   *  @param  p_task_id                  Task ID
467   *  @param  p_reference                MOL reference
468   *  @param  p_qty_reason_id            Reason ID for Quantity Discrepancy
469   *  @param  p_loc_reason_id            Reason ID for locator discrepancy
470   *  @param  p_process_serial_flag      Flag set if serials are confirmed in UI
471   *  @param  p_msni_txn_interface_id    Transaction_interface_id of MSNI records
472   *                                     created from the UI
473   *  @param  p_product_transaction_id   Product_transaction_id of MTLI/MSNI
474   *                                     populated if user confirms partial qty
475   **/
476   PROCEDURE Complete_Putaway_Wrapper(
477       x_return_status           OUT  NOCOPY VARCHAR2
478     , x_msg_count               OUT  NOCOPY NUMBER
479     , x_msg_data                OUT  NOCOPY VARCHAR2
480       /* Added for LMS project: Anupam Jain*/
481     , x_lms_operation_plan_id   OUT  NOCOPY NUMBER
482       /* LMS change end*/
483     , p_group_id                IN          NUMBER   DEFAULT NULL
484     , p_txn_header_id           IN          NUMBER   DEFAULT NULL
485     , p_drop_type               IN          VARCHAR2
486     , p_lpn_mode                IN          NUMBER
487     , p_lpn_id                  IN          NUMBER
488     , p_lpn_context             IN          NUMBER
489     , p_organization_id         IN          NUMBER
490     , p_user_id                 IN          NUMBER
491     , p_item_id                 IN          NUMBER   DEFAULT NULL
492     , p_revision                IN          VARCHAR2 DEFAULT NULL
493     , p_lot_number              IN          VARCHAR2 DEFAULT NULL
494     , p_subinventory_code       IN          VARCHAR2
495     , p_locator_id              IN          NUMBER
496     , p_quantity                IN          NUMBER   DEFAULT NULL
497     , p_uom_code                IN          VARCHAR2 DEFAULT NULL
498     , p_entire_lpn              IN          VARCHAR2 DEFAULT 'Y'
499     , p_to_lpn_name             IN          VARCHAR2
500     , p_to_lpn_id               IN          NUMBER
501     , p_project_id              IN          NUMBER   DEFAULT NULL
502     , p_task_id                 IN          NUMBER   DEFAULT NULL
503     , p_reference               IN          VARCHAR2 DEFAULT 'N'
504     , p_qty_reason_id           IN          NUMBER   DEFAULT NULL
505     , p_loc_reason_id           IN          NUMBER   DEFAULT NULL
506     , p_process_serial_flag     IN          VARCHAR2 DEFAULT NULL
507     , p_msni_txn_interface_id   IN          NUMBER   DEFAULT NULL
508     , p_product_transaction_id  IN          NUMBER   DEFAULT NULL
509     , p_secondary_quantity      IN          NUMBER   DEFAULT NULL --OPM Convergence
510     , p_secondary_uom           IN          VARCHAR2 DEFAULT NULL --OPM Convergence
511    , p_lpn_initially_loaded    IN          VARCHAR2 DEFAULT NULL );
512 
513 
514      /**
515    *  This procedure is called from the UI to check the validity of an into LPN
516    *  @param   p_org_id              Current Organization
517    *  @param   p_lpn_id              From LPN ID
518    *  @param   p_project_id          Project ID of from LPN
519    *  @param   p_task_id             Task ID of from LPN
520    *  @param   p_employee_id
521    *  @param   p_into_lpn            The license plate number that is entered in the
522    *                                 intoLPN field
523    *  @param   x_return_status
524    *  @param   x_msg_count
525    *  @param   x_msg_data
526    *  @param   x_validation_passed   'Y' if all passed, 'N' otherwise
527    *  @param   x_new_lpn_created     'Y' if a lpn is created, 'N' otherwise
528      **/
529    PROCEDURE validate_into_lpn
530      (p_organization_id      IN    NUMBER             ,
531       p_lpn_id               IN    NUMBER             ,
532       p_employee_id          IN    NUMBER             ,
533       p_into_lpn             IN    VARCHAR2           ,
534       x_return_status        OUT   NOCOPY VARCHAR2    ,
535       x_msg_count            OUT   NOCOPY NUMBER      ,
536       x_msg_data             OUT   NOCOPY VARCHAR2    ,
537       x_validation_passed    OUT   NOCOPY VARCHAR2    ,
538       x_new_lpn_created      OUT   NOCOPY VARCHAR2    ,
539       p_project_id           IN    NUMBER DEFAULT NULL,
540       p_task_id              IN    NUMBER DEFAULT NULL,
541       p_drop_type            IN    VARCHAR2 DEFAULT NULL,
542       p_sub                  IN    VARCHAR2 DEFAULT NULL,
543       p_loc                  IN    NUMBER DEFAULT NULL,
544       p_crossdock_type       IN    VARCHAR2 DEFAULT NULL,
545       p_consolidation_method_id   IN    NUMBER DEFAULT NULL,
546       p_backorder_delivery_detail_id IN NUMBER DEFAULT NULL,
547       p_suggested_into_lpn_id IN   NUMBER DEFAULT NULL
548       );
549 
550    /**
551    *   This function inserts an RTI record to tells the TM
552    *   to move all the contents of LPN to transfer LPN.
553    *  @param    p_from_org         from organization id
554    *  @param    p_lpn_id           from LPN id
555    *  @param    p_to_org           to organization id
556    *  @param    p_to_sub           to subinventory code
557    *  @param    p_to_loc           to locator id
558    *  @param    p_xfer_lpn_id      to LPN id
559    *  @param    p_first_time       1 if insert_rti is called the first
560    *                               time.  It will generate a new group id, which will be used in
561    *                               all subsequent call to this API.  It
562    *                               will also call init_statup_values the first time
563    *  @param    p_mobile_txn       'Y' if this is being called for a mobile transaction
564    *  @param    p_txn_mode_code    'ONLINE' or 'IMMEDIATE'
565    *  @param    x_return_status
566    *  @param    x_msg_count
567    *  @param    x_msg_data
568    *  @ RETURN  number             Returns the group id under which the RTI
569    *                               is inserted
570    **/
571      FUNCTION insert_rti( p_from_org IN NUMBER
572         ,p_lpn_id IN NUMBER
573         ,p_to_org IN NUMBER
574         ,p_to_sub IN VARCHAR2
575         ,p_to_loc IN NUMBER
576         ,p_xfer_lpn_id IN NUMBER
577         ,p_first_time IN NUMBER
578         ,p_mobile_txn IN VARCHAR2
579         ,p_txn_mode_code IN VARCHAR2
580         ,x_return_status OUT nocopy VARCHAR2
581         ,x_msg_count OUT nocopy NUMBER
582         ,x_msg_data OUT nocopy VARCHAR2 )
583      RETURN NUMBER;
584 
585    PROCEDURE get_crossdock_info
586      (p_lpn_id                 IN NUMBER,
587       p_organization_id        IN NUMBER,
588       x_back_order_delivery_id OUT nocopy NUMBER,
589       x_crossdock_type         OUT nocopy NUMBER,
590       x_wip_supply_type        OUT nocopy NUMBER );
591 
592    PROCEDURE update_loc_suggested_capacity
593      (x_return_status    OUT NOCOPY     VARCHAR2
594       , x_msg_count        OUT NOCOPY     NUMBER
595       , x_msg_data         OUT NOCOPY     VARCHAR2
596       , p_organization_id  IN             NUMBER
597       , p_lpn_id           IN             NUMBER
598       , p_location_id      IN             NUMBER
599       );
600 
601    PROCEDURE validate_material_status
602      (x_passed             OUT nocopy     VARCHAR2
603       , p_organization_id  IN             NUMBER
604       , p_sub              IN             VARCHAR2
605       , p_loc              IN             NUMBER
606       );
607 
608    -- bug 5286880
609    FUNCTION populate_grouping_rows
610      (p_lpn_id            IN NUMBER)
611    RETURN NUMBER;
612 
613    FUNCTION get_grouping_count
614      (p_line_rows         IN WSH_UTIL_CORE.id_tab_type)
615    RETURN NUMBER;
616 
617    FUNCTION get_grouping
618      (p_bo_dd_id          IN NUMBER)
619    RETURN NUMBER;
620    -- bug 5286880
621 
622  --Added following procedure for bug 7143123
623     PROCEDURE Cleanup_LPN_Crossdock_Wrapper(
624       p_org_id         IN             NUMBER
625     , p_lpn_id         IN             NUMBER
626     , x_return_status  OUT NOCOPY     VARCHAR2
627     );
628 
629 END WMS_PUTAWAY_UTILS;
630