1 PACKAGE wms_task_dispatch_engine AS
2 /* $Header: WMSTDENS.pls 120.0.12010000.1 2008/07/28 18:37:10 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 -- CP Enhancements
107 -- Overridden this procedure to support cluster picking
108 PROCEDURE dispatch_task
109 (p_api_version IN NUMBER,
110 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
111 p_commit IN VARCHAR2 := FND_API.G_FALSE,
112 p_sign_on_emp_id IN NUMBER,
113 p_sign_on_org_id IN NUMBER,
114 p_sign_on_zone IN VARCHAR2 := NULL,
115 p_sign_on_equipment_id IN NUMBER := NULL, -- specific equip id, NULL or -999. -999 stands for none
116 p_sign_on_equipment_srl IN VARCHAR2 := NULL, -- same as above
117 p_task_type IN VARCHAR2, -- 'PICKING' or 'ALL' to determine the API is called for dispatching picking tasks or displaying all tasks
118 p_task_filter IN VARCHAR2 := null,
119 p_cartonization_id IN NUMBER := NULL,
120 x_task_cur OUT NOCOPY task_rec_cur_tp,
121 x_return_status OUT NOCOPY VARCHAR2,
122 x_msg_count OUT NOCOPY NUMBER,
123 x_msg_data OUT NOCOPY VARCHAR2,
124 p_max_clusters IN NUMBER := 0,
125 x_deliveries_list OUT nocopy VARCHAR2,
126 x_cartons_list OUT nocopy VARCHAR2);
127
128
129 PROCEDURE split_task
130 (p_api_version NUMBER,
131 p_task_id NUMBER,
132 p_commit VARCHAR2 := fnd_api.g_false,
133 x_return_status OUT NOCOPY VARCHAR2,
134 x_msg_count OUT NOCOPY NUMBER,
135 x_msg_data OUT NOCOPY VARCHAR2);
136
137
138
139 PROCEDURE split_tasks
140 (p_api_version NUMBER,
141 p_move_order_header_id NUMBER,
142 p_commit VARCHAR2 := fnd_api.g_false,
143 x_return_status OUT NOCOPY VARCHAR2,
144 x_msg_count OUT NOCOPY NUMBER,
145 x_msg_data OUT NOCOPY VARCHAR2);
146
147
148
149 PROCEDURE consolidate_bulk_tasks
150 (p_api_version IN NUMBER,
151 p_commit IN VARCHAR2 := fnd_api.g_false,
152 x_return_status OUT NOCOPY VARCHAR2,
153 x_msg_count OUT NOCOPY NUMBER,
154 x_msg_data OUT NOCOPY VARCHAR2,
155 p_move_order_header_id IN NUMBER);
156
157 /* -------------------------------------------------------
158 The following two APIs are defined for patchset J bulk picking
159 enhancement
160
161 is_serial_allocated is to check if the serial numbers is allocated
162 or not.
163
164 consolidate_bulk_tasks_for_so is to implement the new logic for
165 bulk picking, works for sales order only for patchset J
166 */
167
168 PROCEDURE consolidate_bulk_tasks_for_so
169 (p_api_version IN NUMBER,
170 p_commit IN VARCHAR2 := fnd_api.g_false,
171 x_return_status OUT NOCOPY VARCHAR2,
172 x_msg_count OUT NOCOPY NUMBER,
173 x_msg_data OUT NOCOPY VARCHAR2,
174 p_move_order_header_id IN NUMBER);
175
176 /* end of patchset J bulk picking */
177
178 FUNCTION is_equipment_cap_exceeded
179 (p_standard_operation_id IN NUMBER,
180 p_item_id IN NUMBER,
181 p_organization_id IN NUMBER,
182 p_txn_qty IN NUMBER,
183 p_txn_uom_code IN VARCHAR2)
184 RETURN VARCHAR2;
185
186 /*******************************************
187 * API to insert a record into mmtt
188 * Created by cjandhya originally
189 ********************************************/
190
191 PROCEDURE insert_mmtt
192 (l_mmtt_rec mtl_material_transactions_temp%ROWTYPE);
193
194
195 /*******************************************
196 * API to insert a record into wms_cartonization_temp
197 * Created by cjandhya originally
198 ********************************************/
199
200
201 PROCEDURE insert_wct
202 (l_wct_rec wms_cartonization_temp%ROWTYPE);
203
204 END wms_task_dispatch_engine;
205