1 PACKAGE INV_Pick_Release_PUB AS
2 /* $Header: INVPPICS.pls 120.5 2008/01/11 02:02:05 satkumar ship $ */
3
4 -------------------------------------------------------------------------------
5 -- Data Types
6 -------------------------------------------------------------------------------
7 --
8 -- The Release Status table will notify the caller as to which Move Order Lines were
9 -- successfully detailed, which ones were only partially detailed, and which ones
10 -- failed to be processed at all.
11 --
12 -- A table of this type will be returned by the Pick Release API to specify the
13 -- status of the records it attempts to release.
14 --
15 -- The records of this table (of type INV_RELEASE_STATUS_REC_TYPE) will consist of
16 -- the following fields:
17 -- mo_line_id => The Move Order Line ID that this status is for.
18 -- return_status => The standard return status for an API. The return_status
19 -- can also be 'P', which designates that the move order line was only
20 -- partially detailed (but otherwise successful).
21
22 TYPE INV_Release_Status_Rec_Type IS RECORD
23 (
24 mo_line_id NUMBER,
25 detail_rec_count NUMBER,
26 return_status VARCHAR2(1)
27 );
28
29
30 TYPE INV_Release_Status_Tbl_Type IS TABLE OF INV_Release_Status_Rec_Type
31 INDEX BY BINARY_INTEGER;
32
33
34 -------------------------------------------------------------------------------
35 -- Procedures and Functions
36 -------------------------------------------------------------------------------
37 PROCEDURE test_sort(p_trolin_tbl IN OUT NOCOPY INV_Move_Order_Pub.Trolin_Tbl_Type);
38
39 --
40 -- Name
41 -- PROCEDURE Pick_Release
42 --
43 -- Purpose
44 -- Pick releases the move order lines passed in.
45 --
46 -- Input Parameters
47 -- p_api_version_number
48 -- API version number (current version is 1.0)
49 -- p_init_msg_list (optional, default FND_API.G_FALSE)
50 -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
51 -- if set to FND_API.G_TRUE
52 -- initialize error message list
53 -- if set to FND_API.G_FALSE - not initialize error
54 -- message list
55 -- p_commit (optional, default FND_API.G_FALSE)
56 -- whether or not to commit the changes to database
57 --
58 -- p_mo_line_tbl
59 -- Table of Move Order Line records to pick release
60 -- p_auto_pick_confirm (optional, default 2)
61 -- Overrides org-level parameter for whether to automatically call
62 -- pick confirm after release
63 -- Valid values: 1 (yes) or 2 (no)
64 -- p_grouping_rule_id
65 -- Overrides org-level and Move Order header-level grouping rule for
66 -- generating pick slip numbers
67 -- p_allow_partial_pick
68 -- TRUE if the pick release process should continue after a line fails to
69 -- be detailed completely. FALSE if the process should stop and roll
70 -- back all changes if a line cannot be fully detailed.
71 -- NOTE: Printing pick slips as the lines are detailed is only supported if
72 -- this parameter is TRUE, since a commit must be done before printing.
73 --
74 -- Output Parameters
75 -- x_return_status
76 -- if the pick release process succeeds, the value is
77 -- fnd_api.g_ret_sts_success;
78 -- if there is an expected error, the value is
79 -- fnd_api.g_ret_sts_error;
80 -- if there is an unexpected error, the value is
81 -- fnd_api.g_ret_sts_unexp_error;
82 -- x_msg_count
83 -- if there is one or more errors, the number of error messages
84 -- in the buffer
85 -- x_msg_data
86 -- if there is one and only one error, the error message
87 -- (See fnd_api package for more details about the above output parameters)
88 -- x_pick_release_status
89 -- This output parameter is a table of records (of type
90 -- INV_Release_Status_Tbl_Type) which specifies the pick release status
91 -- for each move order line that is passed in.
92 --
93 PROCEDURE Pick_Release
94 (
95 p_api_version IN NUMBER
96 ,p_init_msg_list IN VARCHAR2 := NULL
97 ,p_commit IN VARCHAR2 := NULL
98 ,x_return_status OUT NOCOPY VARCHAR2
99 ,x_msg_count OUT NOCOPY NUMBER
100 ,x_msg_data OUT NOCOPY VARCHAR2
101 ,p_mo_line_tbl IN INV_Move_Order_PUB.TROLIN_TBL_TYPE
102 ,p_auto_pick_confirm IN NUMBER := NULL
103 ,p_grouping_rule_id IN NUMBER := NULL
104 ,p_allow_partial_pick IN VARCHAR2 DEFAULT fnd_api.g_true
105 ,x_pick_release_status OUT NOCOPY INV_Release_Status_Tbl_Type
106 ,p_plan_tasks IN BOOLEAN := FALSE
107 ,p_skip_cartonization IN BOOLEAN := FALSE
108 ,p_mo_transact_date IN DATE := fnd_api.g_miss_date
109 );
110
111
112 -- Changes for R12 Planned Crossdocking project.
113 -- Added the following three IN OUT parameters similar to the Crossdock Pegging API,
114 -- WMS_XDock_Pegging_Pub.Planned_Cross_Dock. These parameters are needed in case allocation
115 -- mode uses crossdocking (either Prioritize Inventory or Prioritize Crossdock). The parameters
116 -- are also used to keep data in sync with shipping's code in the WSH_PICK_LIST package. This API
117 -- will be overloaded so any caller to Pick_Release with the old signature does not error out.
118 --
119 -- IN OUT parameters:
120 -- p_wsh_release_table Table of valid demand lines to pick release against.
121 -- Assume that all WDD records are for the same org, p_organization_id.
122 -- API will only process WDD lines with released_status of
123 -- 'R' (Ready to Release) or 'B' (Backordered).
124 -- Shipping should pass in WSH_PR_CRITERIA.release_table in the
125 -- WSH_PICK_LIST.Release_Batch API when pick release is run.
126 -- p_trolin_delivery_ids Table of delivery IDs for transactable demand lines.
127 -- Crossdocked lines needs to keep this table updated so crossdocked
128 -- or split WDD lines can be picked up to autocreate/merge deliveries.
129 -- Shipping should pass in local variable 'l_trolin_delivery_ids' from
130 -- the Release_Batch API. This table has a one to one relationship
131 -- with p_del_detail_id and stores the delivery_id for the corresponding
132 -- delivery_detail_id in p_del_detail_id.
133 -- p_del_detail_id Table of delivery detail IDs for transactable demand lines.
134 -- Crossdocked lines needs to keep this table updated so crossdocked
135 -- or split WDD lines can be picked up to autocreate/merge deliveries.
136 -- Shipping should pass in local variable 'l_del_detail_id' from
137 -- the Release_Batch API. This table has a one to one relationship
138 -- with p_trolin_delivery_ids and stores a list of delivery_detail_id
139 -- values for all of the transactable WDD lines in p_wsh_release_table.
140 PROCEDURE Pick_Release
141 (
142 p_api_version IN NUMBER
143 ,p_init_msg_list IN VARCHAR2 := NULL
144 ,p_commit IN VARCHAR2 := NULL
145 ,x_return_status OUT NOCOPY VARCHAR2
146 ,x_msg_count OUT NOCOPY NUMBER
147 ,x_msg_data OUT NOCOPY VARCHAR2
148 ,p_mo_line_tbl IN INV_Move_Order_PUB.TROLIN_TBL_TYPE
149 ,p_auto_pick_confirm IN NUMBER := NULL
150 ,p_grouping_rule_id IN NUMBER := NULL
151 ,p_allow_partial_pick IN VARCHAR2 DEFAULT fnd_api.g_true
152 ,x_pick_release_status OUT NOCOPY INV_Release_Status_Tbl_Type
153 ,p_plan_tasks IN BOOLEAN := FALSE
154 ,p_skip_cartonization IN BOOLEAN := FALSE
155 ,p_wsh_release_table IN OUT NOCOPY WSH_PR_CRITERIA.relRecTabTyp
156 ,p_trolin_delivery_ids IN OUT NOCOPY WSH_UTIL_CORE.Id_Tab_Type
157 ,p_del_detail_id IN OUT NOCOPY WSH_PICK_LIST.DelDetTabTyp
158 ,p_mo_transact_date IN DATE := NULL
159 ,p_dynamic_replenishment IN VARCHAR2 DEFAULT NULL
160 );
161
162
163 --
164 -- Name
165 -- PROCEDURE Reserve_Unconfirmed_Quantity
166 --
167 -- Purpose
168 -- Transfers a reservation on material which is missing or damaged to an
169 -- appropriate demand source.
170 --
171 -- Input Parameters
172 -- p_missing_quantity
173 -- The quantity to be transferred to a Cycle Count reservation, in the primary
174 -- UOM for the item.
175 -- p_organization_id
176 -- The organization in which the reservation(s) should be created
177 -- p_reservation_id
178 -- The reservation to transfer quantity from (not required if demand source
179 -- parameters are given).
180 -- p_demand_source_type_id
181 -- The demand source type ID for the reservation to be transferred
182 -- p_demand_source_header_id
183 -- The demand source header ID for the reservation to be transferred
184 -- p_demand_source_line_id
185 -- The demand source line ID for the reservation to be transferred
186 -- p_inventory_item_id
187 -- The item which is missing or damaged.
188 -- p_subinventory_code
189 -- The subinventory in which the material is missing or damaged.
190 -- p_locator_id
191 -- The locator in which the material is missing or damaged.
192 -- p_revision
193 -- The revision of the item which is missing or damaged.
194 -- p_lot_number
195 -- The lot number of the item which is missing or damaged.
196 --
197 -- Output Parameters
198 -- x_return_status
199 -- if the pick release process succeeds, the value is
200 -- fnd_api.g_ret_sts_success;
201 -- if there is an expected error, the value is
202 -- fnd_api.g_ret_sts_error;
203 -- if there is an unexpected error, the value is
204 -- fnd_api.g_ret_sts_unexp_error;
205 -- x_msg_count
206 -- if there is one or more errors, the number of error messages
207 -- in the buffer
208 -- x_msg_data
209 -- if there is one and only one error, the error message
210 -- (See fnd_api package for more details about the above output parameters)
211 --
212 -- HW INVCONV added p_missing_quantity2
213 PROCEDURE Reserve_Unconfirmed_Quantity
214 (
215 p_api_version IN NUMBER
216 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
217 ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
218 ,x_return_status OUT NOCOPY VARCHAR2
219 ,x_msg_count OUT NOCOPY NUMBER
220 ,x_msg_data OUT NOCOPY VARCHAR2
221 ,p_missing_quantity IN NUMBER
222 ,p_missing_quantity2 IN NUMBER DEFAULT fnd_api.g_miss_num
223 ,p_reservation_id IN NUMBER DEFAULT fnd_api.g_miss_num
224 ,p_demand_source_header_id IN NUMBER DEFAULT fnd_api.g_miss_num
225 ,p_demand_source_line_id IN NUMBER DEFAULT fnd_api.g_miss_num
226 ,p_organization_id IN NUMBER DEFAULT fnd_api.g_miss_num
227 ,p_inventory_item_id IN NUMBER DEFAULT fnd_api.g_miss_num
228 ,p_subinventory_code IN VARCHAR2 DEFAULT fnd_api.g_miss_char
229 ,p_locator_id IN NUMBER DEFAULT fnd_api.g_miss_num
230 ,p_revision IN VARCHAR2 DEFAULT fnd_api.g_miss_char
231 ,p_lot_number IN VARCHAR2 DEFAULT fnd_api.g_miss_char
232 );
233
234 PROCEDURE assign_pick_slip_number(
235 x_return_status OUT NOCOPY VARCHAR2,
236 x_msg_count OUT NOCOPY NUMBER,
237 x_msg_data OUT NOCOPY VARCHAR2,
238 p_move_order_header_id IN NUMBER DEFAULT 0,
239 p_ps_mode IN VARCHAR2,
240 p_grouping_rule_id IN NUMBER,
241 p_allow_partial_pick IN VARCHAR2);
242
243
244 PROCEDURE call_cartonization (
245 p_api_version IN NUMBER
246 ,p_init_msg_list IN VARCHAR2 := NULL
247 ,p_commit IN VARCHAR2 := NULL
248 ,p_validation_level IN NUMBER
249 ,x_return_status OUT NOCOPY VARCHAR2
250 ,x_msg_count OUT NOCOPY NUMBER
251 ,x_msg_data OUT NOCOPY VARCHAR2
252 ,p_out_bound IN VARCHAR2
253 ,p_org_id IN NUMBER
254 ,p_move_order_header_id IN NUMBER
255 ,p_grouping_rule_id IN NUMBER := NULL
256 ,p_allow_partial_pick IN VARCHAR2 DEFAULT fnd_api.g_true
257 );
258
259
260 END INV_Pick_Release_PUB;