DBA Data[Home] [Help]

PACKAGE: APPS.WMS_TASK_DISPATCH_ENGINE

Source


1 PACKAGE wms_task_dispatch_engine AUTHID CURRENT_USER AS
2 /* $Header: WMSTDENS.pls 120.2.12020000.1 2012/06/26 08:52:15 appldev ship $*/
3 
4 --
5 -- File        : WMSTDENS.pls
6 -- Content     : WMS_task_schedule package specification
7 -- Description : WMS task dispatching API for mobile application
8 -- Notes       :
9 -- Modified    : 05/01/2000 lezhang created
10 --               09/06/2000 add task split, consolidation apis
11 
12 
13 -- API name    : dispatch_task
14 -- Type        : Private
15 -- Function    : Return a group of tasks that a sign-on employee is eligible
16 --               to perform
17 --               Or return a group of picking tasks with the same picking
18 --               methodology and pick slip number. This group of tasks includes
19 --               the most optimal task based on priority, locator picking
20 --               sequence, coordinates approximation, etc.
21 --               or reservation input parameters and creates recommendations
22 -- Pre-reqs    : 1. For each record in MTL_MATERIAL_TRANSACTIONS_TEMP, user
23 --               defined task type (standard_operation_id column ) has been
24 --               assigned,
25 --               2. System task type (wms_task_type column) has been assigned
26 --               3. Pick methdology code (pick_rule_id column) and pick slip
27 --               number (pick_slip_number column) has been assigned
28 --
29 -- Parameters  :
30 --   p_api_version          Standard Input Parameter
31 --   p_init_msg_list        Standard Input Parameter
32 --   p_commit               Standard Input Parameter
33 --   p_validation_level     Standard Input Parameter
34 --   p_sign_on_emp_id       NUMBER, sign on emplployee ID, mandatory
35 --   p_sign_on_org_id       NUMBER, org ID, mandatory
36 --   p_sign_on_zone         VARCHAR2, sign on sub ID, optional
37 --   p_sign_on_equipment_id NUMBER, sign on equipment item ID, optional,
38 --                          can be a specific number, NULL or -999,
39 --                          -999 means none
40 --   p_sign_on_equipment_srl   VARCHAR2, sign on equipment serial num, optional
41 --                          can be a specific serial number, NULL or '@@@',
42 --                          '@@@' means none
43 --   p_task_type            VARCHAR2, system task type this API will return,
44 --                          can be 'PICKING' or 'ALL'
45 --
46 --
47 -- Output Parameters
48 --   x_return_status        Standard Output Parameter
49 --   x_msg_count            Standard Output Parameter
50 --   x_msg_data             Standard Output Parameter
51 --   x_task_cur             Reference Cursor to deliver the queried tasks
52 --                          It includes following fields:
53 --                          mmtt.transaction_temp_id    NUMBER
54 --                          mmtt.subinventory_code      VARCHAR2
55 --                          mmtt.locator_id             NUMBER
56 --                          mmtt.revision               VARCHAR2
57 --                          mmtt.transaction_uom        VARCHAR2
58 --                          mmtt.transaction_quantity   NUMBER
59 --                          mmtt.lot_number             NUMBER
60 --
61 --
62 -- Version
63 --   Currently version is 1.0
64 --
65 
66 
67 
68 TYPE task_rec_cur_tp IS REF CURSOR;
69 
70 -- APL procedure
71 PROCEDURE dispatch_task
72   (p_api_version        IN  NUMBER,
73    p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE,
74    p_commit             IN  VARCHAR2 := FND_API.G_FALSE,
75    p_sign_on_emp_id     IN NUMBER,
76    p_sign_on_org_id     IN NUMBER,
77    p_sign_on_zone       IN VARCHAR2 := NULL,
78    p_sign_on_equipment_id     IN NUMBER := NULL,  -- specific equip id, NULL or -999. -999 stands for none
79    p_sign_on_equipment_srl    IN VARCHAR2 := NULL,  -- same as above
80    p_task_filter              IN            VARCHAR2,
81    p_task_method              IN            VARCHAR2,
82    x_grouping_document_type   IN OUT nocopy VARCHAR2,
83    x_grouping_document_number IN OUT nocopy NUMBER,
84    x_grouping_source_type_id  IN OUT nocopy NUMBER,
85    x_task_cur           OUT NOCOPY task_rec_cur_tp,
86    x_return_status      OUT NOCOPY VARCHAR2,
87    x_msg_count          OUT NOCOPY NUMBER,
88    x_msg_data           OUT NOCOPY VARCHAR2);
89 
90 PROCEDURE dispatch_task
91   (p_api_version        IN  NUMBER,
92    p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE,
93    p_commit             IN  VARCHAR2 := FND_API.G_FALSE,
94    p_sign_on_emp_id     IN NUMBER,
95    p_sign_on_org_id     IN NUMBER,
96    p_sign_on_zone       IN VARCHAR2 := NULL,
97    p_sign_on_equipment_id     IN NUMBER := NULL,  -- specific equip id, NULL or -999. -999 stands for none
98    p_sign_on_equipment_srl    IN VARCHAR2 := NULL,  -- same as above
99    p_task_type          IN VARCHAR2,  -- 'PICKING' or 'ALL' to determine the API is called for dispatching picking tasks or displaying all tasks
100    p_cartonization_id   IN NUMBER := NULL,
101    x_task_cur           OUT NOCOPY task_rec_cur_tp,
102    x_return_status      OUT NOCOPY VARCHAR2,
103    x_msg_count          OUT NOCOPY NUMBER,
104    x_msg_data           OUT NOCOPY VARCHAR2);
105 
106 -- high volume project
107   Procedure Duplicate_lot_serial_in_parent(
108                   p_parent_transaction_temp_id     NUMBER
109                   , x_return_status        OUT NOCOPY    VARCHAR2
110                   , x_msg_count            OUT NOCOPY    NUMBER
111                   , x_msg_data             OUT NOCOPY    VARCHAR2);
112 
113 
114 -- CP Enhancements
115  -- Overridden this procedure to support cluster picking
116 PROCEDURE dispatch_task
117   (p_api_version        IN  NUMBER,
118    p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE,
119    p_commit             IN  VARCHAR2 := FND_API.G_FALSE,
120    p_sign_on_emp_id     IN NUMBER,
121    p_sign_on_org_id     IN NUMBER,
122    p_sign_on_zone       IN VARCHAR2 := NULL,
123    p_sign_on_equipment_id     IN NUMBER := NULL,  -- specific equip id, NULL or -999. -999 stands for none
124    p_sign_on_equipment_srl    IN VARCHAR2 := NULL,  -- same as above
125    p_task_type          IN VARCHAR2,  -- 'PICKING' or 'ALL' to determine the API is called for dispatching picking tasks or displaying all tasks
126    p_task_filter        IN  VARCHAR2 := null,
127    p_cartonization_id   IN NUMBER := NULL,
128    x_task_cur           OUT NOCOPY task_rec_cur_tp,
129    x_return_status      OUT NOCOPY VARCHAR2,
130    x_msg_count          OUT NOCOPY NUMBER,
131    x_msg_data           OUT NOCOPY VARCHAR2,
132    p_max_clusters       IN    NUMBER := 0,
133    x_deliveries_list    OUT   nocopy VARCHAR2,
134    x_cartons_list       OUT   nocopy VARCHAR2);
135 
136 
137 PROCEDURE split_task
138   (p_api_version NUMBER,
139    p_task_id NUMBER,
140    p_commit VARCHAR2 := fnd_api.g_false,
141    x_return_status OUT NOCOPY VARCHAR2,
142    x_msg_count OUT NOCOPY NUMBER,
143    x_msg_data  OUT NOCOPY VARCHAR2);
144 
145 
146 
147 PROCEDURE split_tasks
148   (p_api_version NUMBER,
149    p_move_order_header_id NUMBER,
150    p_commit VARCHAR2 := fnd_api.g_false,
151    x_return_status OUT NOCOPY VARCHAR2,
152    x_msg_count OUT NOCOPY NUMBER,
153    x_msg_data  OUT NOCOPY VARCHAR2);
154 
155 
156 
157 PROCEDURE consolidate_bulk_tasks
158   (p_api_version            IN NUMBER,
159    p_commit                 IN VARCHAR2 := fnd_api.g_false,
160    x_return_status          OUT NOCOPY VARCHAR2,
161    x_msg_count              OUT NOCOPY NUMBER,
162    x_msg_data               OUT NOCOPY VARCHAR2,
163    p_move_order_header_id   IN NUMBER);
164 
165 /* -------------------------------------------------------
166    The following two APIs are defined for patchset J bulk picking
167    enhancement
168 
169    is_serial_allocated is to check if the serial numbers is allocated
170    or not.
171 
172     consolidate_bulk_tasks_for_so is to implement the new logic for
173     bulk picking, works for sales order only for patchset J
174 */
175 
176 PROCEDURE consolidate_bulk_tasks_for_so
177   (p_api_version            IN NUMBER,
178    p_commit                 IN VARCHAR2 := fnd_api.g_false,
179    x_return_status          OUT NOCOPY VARCHAR2,
180    x_msg_count              OUT NOCOPY NUMBER,
181    x_msg_data               OUT NOCOPY VARCHAR2,
182    p_move_order_header_id   IN NUMBER);
183 
184 /* end of patchset J bulk picking */
185 
186 FUNCTION is_equipment_cap_exceeded
187   (p_standard_operation_id   IN NUMBER,
188    p_item_id IN NUMBER,
189    p_organization_id IN NUMBER,
190    p_txn_qty  IN NUMBER,
191    p_txn_uom_code IN VARCHAR2)
192   RETURN VARCHAR2;
193 
194 /*******************************************
195 * API to insert a record into mmtt
196 * Created by cjandhya originally
197 ********************************************/
198 
199 PROCEDURE insert_mmtt
200   (l_mmtt_rec mtl_material_transactions_temp%ROWTYPE);
201 
202 
203 /*******************************************
204 * API to insert a record into wms_cartonization_temp
205 * Created by cjandhya originally
206 ********************************************/
207 
208 
209 PROCEDURE insert_wct
210   (l_wct_rec wms_cartonization_temp%ROWTYPE);
211 
212   PROCEDURE insert_mtlt   --Bug 9265033 added procedure
213   (p_transaction_temp_id            IN NUMBER,
214    x_return_status          OUT NOCOPY VARCHAR2,
215    x_msg_count              OUT NOCOPY NUMBER,
216    x_msg_data               OUT NOCOPY VARCHAR2);
217 
218 
219 END wms_task_dispatch_engine;
220