4 --
1 PACKAGE WSH_PICKING_BATCHES_GRP AUTHID CURRENT_USER AS
2 /* $Header: WSHPRGPS.pls 120.3 2010/05/14 09:51:06 sunilku ship $ */
3 --
5 --===================
6 -- PUBLIC VARS
7 --===================
8 --
9 TYPE Batch_Info_rec IS Record (
10 Row_id VARCHAR2(18),
11 Batch_Id wsh_picking_batches.Batch_Id%TYPE,
12 Creation_Date DATE,
13 Created_By wsh_picking_batches.Created_By%TYPE,
14 Last_Update_Date DATE,
15 Last_Updated_By wsh_picking_batches.Last_Updated_By%TYPE,
16 Last_Update_Login wsh_picking_batches.Last_Update_Login%TYPE,
17 Name wsh_picking_batches.Name%TYPE,
18 Backorders_Only_Flag wsh_picking_batches.Backorders_Only_Flag%TYPE,
19 Document_Set_Id wsh_picking_batches.Document_Set_Id%TYPE,
20 Existing_Rsvs_Only_Flag wsh_picking_batches.Existing_Rsvs_Only_Flag%TYPE,
21 Shipment_Priority_Code wsh_picking_batches.Shipment_Priority_Code%TYPE,
22 Ship_Method_Code wsh_picking_batches.Ship_Method_Code%TYPE,
23 Customer_Id wsh_picking_batches.Customer_Id%TYPE,
24 Order_Header_Id wsh_picking_batches.Order_Header_Id%TYPE,
25 Ship_Set_id wsh_picking_batches.Ship_Set_number%TYPE,
26 Inventory_Item_Id wsh_picking_batches.Inventory_Item_Id%TYPE,
27 Order_Type_Id wsh_picking_batches.Order_Type_Id%TYPE,
28 From_Requested_Date DATE,
29 To_Requested_Date DATE,
30 From_Scheduled_Ship_Date DATE,
31 To_Scheduled_Ship_Date DATE,
32 Ship_To_Location_Id wsh_picking_batches.Ship_To_Location_Id%TYPE,
33 Ship_From_Location_Id wsh_picking_batches.Ship_From_Location_Id%TYPE,
34 Trip_Id wsh_picking_batches.Trip_Id%TYPE,
35 Delivery_Id wsh_picking_batches.Delivery_Id%TYPE,
36 Include_Planned_Lines wsh_picking_batches.Include_Planned_Lines%TYPE,
37 Pick_Grouping_Rule_Id wsh_picking_batches.Pick_Grouping_Rule_Id%TYPE,
38 Pick_Sequence_Rule_Id wsh_picking_batches.Pick_Sequence_Rule_Id%TYPE,
39 Autocreate_Delivery_Flag wsh_picking_batches.Autocreate_Delivery_Flag%TYPE,
40 Attribute_Category wsh_picking_batches.Attribute_Category%TYPE,
41 Attribute1 wsh_picking_batches.Attribute1%TYPE,
42 Attribute2 wsh_picking_batches.Attribute2%TYPE,
43 Attribute3 wsh_picking_batches.Attribute3%TYPE,
44 Attribute4 wsh_picking_batches.Attribute4%TYPE,
45 Attribute5 wsh_picking_batches.Attribute5%TYPE,
46 Attribute6 wsh_picking_batches.Attribute6%TYPE,
47 Attribute7 wsh_picking_batches.Attribute7%TYPE,
48 Attribute8 wsh_picking_batches.Attribute8%TYPE,
49 Attribute9 wsh_picking_batches.Attribute9%TYPE,
50 Attribute10 wsh_picking_batches.Attribute10%TYPE,
51 Attribute11 wsh_picking_batches.Attribute11%TYPE,
52 Attribute12 wsh_picking_batches.Attribute12%TYPE,
53 Attribute13 wsh_picking_batches.Attribute13%TYPE,
54 Attribute14 wsh_picking_batches.Attribute14%TYPE,
55 Attribute15 wsh_picking_batches.Attribute15%TYPE,
56 Autodetail_Pr_Flag wsh_picking_batches.Autodetail_Pr_Flag%TYPE,
57 -- Bug#: 3266659 - Removing carrier params
58 -- Carrier_Id wsh_picking_batches.Carrier_Id%TYPE,
59 Trip_Stop_Id wsh_picking_batches.Trip_Stop_Id%TYPE,
60 Default_Stage_Subinventory wsh_picking_batches.Default_Stage_Subinventory%TYPE,
61 Default_Stage_Locator_Id wsh_picking_batches.Default_Stage_Locator_Id%TYPE,
62 Pick_From_Subinventory wsh_picking_batches.Pick_From_Subinventory%TYPE,
63 Pick_From_locator_Id wsh_picking_batches.Pick_From_locator_Id%TYPE,
64 Auto_Pick_Confirm_Flag wsh_picking_batches.Auto_Pick_Confirm_Flag%TYPE,
65 Delivery_Detail_Id wsh_picking_batches.Delivery_Detail_Id%TYPE,
66 Project_Id wsh_picking_batches.Project_Id%TYPE,
67 Task_Id wsh_picking_batches.Task_Id%TYPE,
68 Organization_Id wsh_picking_batches.Organization_Id%TYPE,
69 Ship_Confirm_Rule_Id wsh_picking_batches.Ship_Confirm_Rule_Id%TYPE,
70 Autopack_Flag wsh_picking_batches.Autopack_Flag%TYPE,
71 Autopack_Level wsh_picking_batches.Autopack_Level%TYPE,
72 Task_Planning_Flag wsh_picking_batches.Task_Planning_Flag%TYPE,
76 category_id wsh_picking_batches.category_id%TYPE,
73 -- Bug#: 3266659 - Removing carrier params
74 -- Non_Picking_Flag wsh_picking_batches.Non_Picking_Flag%TYPE,
75 category_set_id wsh_picking_batches.category_set_id%TYPE,
77 ship_set_smc_flag wsh_picking_batches.ship_set_smc_flag%TYPE,
78 -- Bug#: 3266659 - Adding the columns like zone, region, delivery criteria, release
79 -- subinventory and append flag
80 region_ID wsh_picking_batches.region_id%TYPE,
81 zone_ID wsh_picking_batches.zone_id%TYPE,
82 ac_Delivery_Criteria wsh_picking_batches.ac_delivery_criteria%TYPE,
83 rel_subinventory wsh_picking_batches.rel_subinventory%TYPE,
84 append_flag wsh_picking_batches.append_flag%TYPE,
85 task_priority wsh_picking_batches.task_priority%TYPE,
86 actual_departure_date WSH_PICKING_BATCHES.ACTUAL_DEPARTURE_DATE%TYPE,
87 allocation_method WSH_PICKING_BATCHES.ALLOCATION_METHOD%TYPE, --anxsharm, X-dock
88 crossdock_criteria_id WSH_PICKING_BATCHES.CROSSDOCK_CRITERIA_ID%TYPE, -- anxsharm, X-dock
89 dynamic_replenishment_flag WSH_PICKING_BATCHES.dynamic_replenishment_flag%TYPE, ----bug# 6689448 (replenishment project)
90 client_id WSH_PICKING_BATCHES.client_id%TYPE -- LSP PROJECT
91 );
92 --
93 --
94 --===================
95 -- PROCEDURES
96 --===================
97 --
98 --======================================================================================================
99 -- Start of comments
100 --
101 -- API Name : Create_Batch
102 -- Type : Group
103 -- Pre-reqs : None.
104 -- Function : This API is called from WSH_PICKING_BATCHES_PUB
105 -- to validate all the parameters and create the Picking Batch
106 --
107 -- PARAMETERS : p_api_version_number known api versionerror buffer
108 -- p_init_msg_list FND_API.G_TRUE to reset list
109 -- x_return_status return status
110 -- x_msg_count number of messages in the list
111 -- x_msg_data text of messages
112 -- p_commit FND_API.G_TRUE to perform a commit
113 -- p_rule_id Picking Rule Id used for defaulting purpose
114 -- p_rule_name Picking Rule name used for defaulting purpose, Ignore it when p_rule_id
115 -- contains value
116 -- p_batch_rec Contains the all the parameters for the batch
117 -- p_batch_prefix Batch prefix to be prefixed to the batch name
118 -- x_batch_id Out parameter contains the batch id created
119 -- VERSION : current version 1.0
120 -- initial version 1.0
121 --======================================================================================================
122
123
124 PROCEDURE Create_Batch(
125 p_api_version_number IN NUMBER,
126 p_init_msg_list IN VARCHAR2 DEFAULT NULL,
127 p_commit IN VARCHAR2 DEFAULT NULL,
128 x_return_status OUT NOCOPY VARCHAR2,
129 x_msg_count OUT NOCOPY NUMBER,
130 x_msg_data OUT NOCOPY VARCHAR2,
131 p_rule_id IN NUMBER DEFAULT NULL,
132 p_rule_name IN VARCHAR2 DEFAULT NULL,
133 p_batch_rec IN WSH_PICKING_BATCHES_PUB.Batch_Info_Rec,
134 p_batch_prefix IN VARCHAR2 DEFAULT NULL,
135 x_batch_id OUT NOCOPY NUMBER
136 );
137
138 --
139 --======================================================================================================
140 -- Start of comments
141 --
142 -- API Name : Release_Batch
143 -- Type : Group
144 -- Pre-reqs : None.
145 -- Function : The procedure takes in a Batch_id/ Batch_name and depending on the p_release_mode
146 -- value it process the batch. p_log_level value should be greator than 0 when
147 -- customer want to get the pick release log fine incace of concurrent pick release
148 -- release.
149 -- It will do some basic validations on the the input parameters
150 -- like log_level shoud be positive , and on the not null values of p_batch_rec.
151 --
152 -- PARAMETERS : p_api_version_number known api version number
153 -- p_init_msg_list FND_API.G_TRUE to reset list
154 -- p_commit FND_API.G_TRUE to perform a commit
155 -- x_return_status return status
156 -- x_msg_count number of messages in the list
157 -- x_msg_data text of messages
158 -- p_batch_id Picking Batch Id which is used to get Batch
159 -- information from the wsh_picking_batches table.
160 -- p_batch_name Picking Batch Name which is used to get Batch
161 -- information from the wsh_picking_batches table.
162 -- p_log_level Controlls the log message generated by cuncurrent
163 -- pick release process.
164 -- p_release_mode Used to do ONLINE or CONCURRENT pick release,
165 -- Default is "CONCURREN"
166 -- p_num_workers Number of Workers for Parallel Pick Release
170 -- x_request_id Out parameter contains request id for concurrent pick release request
167 -- Default is 1.
168 -- For Online Mode it is always 1
169 -- For Concurrent Mode the value is determined by profile
171 -- Submitted
172 -- VERSION : current version 1.0
173 -- initial version 1.0
174 -- End of comments
175 --======================================================================================================
176
177
178 PROCEDURE Release_Batch (
179 -- Standard parameters
180 p_api_version_number IN NUMBER,
181 p_init_msg_list IN VARCHAR2 DEFAULT NULL,
182 p_commit IN VARCHAR2 DEFAULT NULL,
183 x_return_status OUT NOCOPY VARCHAR2,
184 x_msg_count OUT NOCOPY NUMBER,
185 x_msg_data OUT NOCOPY VARCHAR2,
186 -- program specific paramters.
187 p_batch_id IN NUMBER DEFAULT NULL,
188 p_batch_name IN VARCHAR2 DEFAULT NULL,
189 p_log_level IN NUMBER DEFAULT NULL,
190 p_release_mode IN VARCHAR2 DEFAULT 'CONCURRENT',
191 -- p_num_workers IN NUMBER DEFAULT 1, -- bug 7505524
192 x_request_id OUT NOCOPY NUMBER
193 );
194 -- Bug 7505524 : Added a new api release_wms_wave
195 --============================================================================================
196 -- Start of comments
197 --
198 -- API Name : release_wms_wave
199 -- Type : Group
200 -- Pre-reqs : None.
201 -- Function : The procedure takes in a pick wave header id, pick release batch information and
202 -- pick release mode. It creates new picking batch with the information provided in picking batch
203 -- record. It creates the picking batch with delivery_detail_id of picking batch value as -1 so
204 -- that while pick releasing it considers all delivery detail lines with the batch id stamped.
205 -- Updates new batch id value on all delivery detail lines which are eligible for pick release
206 -- and associated to the pick wave header id passed. Pick releases the batch created in the
207 -- pick release mode(ONLINE/CONCURRENT) passed via p_release_mode.
208 -- Sends the batch id and concurrent request number of pick release request to the caller.
209 --
210 -- PARAMETERS : p_batch_rec Contains the all the parameters for the batch
211 -- p_release_mode Used to do ONLINE or CONCURRENT pick release,
212 -- Default is "CONCURREN"
213 -- p_pick_wave_header_id pick wave header id value.
214 -- x_return_status return status
215 -- x_msg_count number of messages in the list
216 -- x_msg_data text of messages
220
217 -- x_batch_id Out parameter contains the batch id created
218 -- x_request_id Out parameter contains the request Id for the pick release
219 -- concurrent request submitted
221 -- End of comments
222 --============================================================================================
223 PROCEDURE release_wms_wave (
224 p_batch_rec IN WSH_PICKING_BATCHES_PUB.Batch_Info_Rec,
225 p_release_mode IN VARCHAR2 DEFAULT 'CONCURRENT',
226 p_pick_wave_header_id IN NUMBER,
227 x_batch_id OUT NOCOPY NUMBER,
228 x_request_id OUT NOCOPY NUMBER,
229 x_return_status OUT NOCOPY VARCHAR2,
230 x_msg_count OUT NOCOPY NUMBER,
231 x_msg_data OUT NOCOPY VARCHAR2
232 );
233
234
235 END WSH_PICKING_BATCHES_GRP;