1 PACKAGE inv_serial_number_pub AS
2 /* $Header: INVPSNS.pls 120.0.12010000.1 2008/07/24 01:43:22 appldev ship $ */
3 /*#
4 * The Serial Numbers procedures allow users to create, update and validate serials.
5 * In Addition users can the uniqueness of a serial number,
6 * get difference between two serial numbers, validate and update serial attributes and
7 * create unit (serial) transactions
8 * @rep:scope public
9 * @rep:product INV
10 * @rep:lifecycle active
11 * @rep:displayname Inventory Serial Number
12 * @rep:category BUSINESS_ENTITY INV_SERIAL_NUMBER
13 */
14
15 g_org_id NUMBER;
16 g_transfer_org_id NUMBER;
17 g_firstscan BOOLEAN := TRUE;
18 g_serial_attributes_tbl inv_lot_sel_attr.lot_sel_attributes_tbl_type;
19
20 /*#
21 * Use this procedure to populate Serial Attribute columns
22 * @rep:scope public
23 * @rep:lifecycle active
24 * @rep:displayname Populate Serial Attribute Columns
25 */
26 PROCEDURE populateattributescolumn;
27
28 /*#
29 * Use this procedure to Set the value of g_firstscan variable
30 * @param p_firstscan TRUE or FALSE can be passed as input in this variable to set the value of g_firstscan
31 * @rep:scope public
32 * @rep:lifecycle active
33 * @rep:displayname Set First Scan
34 */
35 PROCEDURE set_firstscan(p_firstscan IN BOOLEAN);
36
37 -- Overloaded Procedure insertSerial for eAM
38 /*#
39 * Use this procedure to validate and insert a given Serial Number.
40 * @param p_api_version API version is passed as input in this variable
41 * @paraminfo {@rep:required}
42 * @param p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to Initialize message list or not
43 * @paraminfo {@rep:required}
44 * @param p_commit fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to commit or not
45 * @paraminfo {@rep:required}
46 * @param p_validation_level Validation level is passed as input in this variable
47 * @paraminfo {@rep:required}
48 * @param p_inventory_item_id Inventory Item id is passed as input in this variable
49 * @paraminfo {@rep:required}
50 * @param p_organization_id Organization id is passed as input in this variable
51 * @paraminfo {@rep:required}
52 * @param p_serial_number Serial Number is passed as input in this variable
53 * @paraminfo {@rep:required}
54 * @param p_current_status Current Status of the Serial Number is passed as input in this variable
55 * @paraminfo {@rep:required}
56 * @param p_group_mark_id Group Mark id is passed as input in this variable
57 * @paraminfo {@rep:required}
58 * @param p_lot_number Lot Number is passed as input in this variable
59 * @paraminfo {@rep:required}
60 * @param p_initialization_date Initialization Date is passed as input in this variable
61 * @param x_return_status Return Status indiacation success or failure.
62 * @paraminfo {@rep:required}
63 * @param x_msg_count message count from the error stack in case of failure
64 * @paraminfo {@rep:required}
65 * @param x_msg_data x_msg_data Return the error message in case of failure
66 * @paraminfo {@rep:required}
67 * @param p_organization_type Organization type is passed as input in this variable
68 * @param p_owning_org_id Owning Organization id is passed as input in this variable
69 * @param p_owning_tp_type Owning Trading partner type is passed as input in this variable
70 * @param p_planning_org_id Planning Organization id is passed as input in this variable
71 * @param p_planning_tp_type Planning Trading partner type is passed as input in this variable
72 * @rep:scope public
73 * @rep:lifecycle active
74 * @rep:displayname Insert Serial Number
75 */
76 PROCEDURE insertserial(
77 p_api_version IN NUMBER
78 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
79 , p_commit IN VARCHAR2 := fnd_api.g_false
80 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
81 , p_inventory_item_id IN NUMBER
82 , p_organization_id IN NUMBER
83 , p_serial_number IN VARCHAR2
84 , p_current_status IN NUMBER
85 , p_group_mark_id IN NUMBER
86 , p_lot_number IN VARCHAR2
87 , p_initialization_date IN DATE DEFAULT SYSDATE
88 , x_return_status OUT NOCOPY VARCHAR2
89 , x_msg_count OUT NOCOPY NUMBER
90 , x_msg_data OUT NOCOPY VARCHAR2
91 , p_organization_type IN NUMBER DEFAULT NULL
92 , p_owning_org_id IN NUMBER DEFAULT NULL
93 , p_owning_tp_type IN NUMBER DEFAULT NULL
94 , p_planning_org_id IN NUMBER DEFAULT NULL
95 , p_planning_tp_type IN NUMBER DEFAULT NULL
96 );
97
98 -- 'Serial Tracking in WIP project. add wip_entity_id, operation_seq_num, intraooperation_step_type
99 -- also as the input parameters.
100 /*#
101 * Use this procedure to validate and insert a given Serial Number.
102 * @param p_api_version API version is passed as input in this variable
103 * @paraminfo {@rep:required}
104 * @param p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to Initialize message list or not
105 * @paraminfo {@rep:required}
106 * @param p_commit fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to commit or not
107 * @paraminfo {@rep:required}
108 * @param p_validation_level Validation level is passed as input in this variable
109 * @paraminfo {@rep:required}
110 * @param p_inventory_item_id Inventory Item id is passed as input in this variable
111 * @paraminfo {@rep:required}
112 * @param p_organization_id Organization id is passed as input in this variable
113 * @paraminfo {@rep:required}
114 * @param p_serial_number Serial Number is passed as input in this variable
115 * @paraminfo {@rep:required}
116 * @param p_initialization_date Initialization Date is passed as input in this variable
117 * @paraminfo {@rep:required}
118 * @param p_completion_date Unit completion date is passed as input in this variable
119 * @paraminfo {@rep:required}
120 * @param p_ship_date Unit Ship Date is passed as input in this variable
121 * @paraminfo {@rep:required}
122 * @param p_revision Inventory Item Revision code is passed as input in this variable
123 * @paraminfo {@rep:required}
124 * @param p_lot_number Lot Number is passed as input in this variable
125 * @paraminfo {@rep:required}
126 * @param p_current_locator_id Current Locator id is passed as input in this variable
127 * @paraminfo {@rep:required}
128 * @param p_subinventory_code Current Subinventry Code is passed as input in this variable
129 * @paraminfo {@rep:required}
130 * @param p_trx_src_id Transaction Source id is passed as input in this variable
131 * @paraminfo {@rep:required}
132 * @param p_unit_vendor_id Unit Supplier Code is passed as input in this variable
133 * @paraminfo {@rep:required}
134 * @param p_vendor_lot_number Supplier Lot Number is passed as input in this variable
135 * @paraminfo {@rep:required}
136 * @param p_vendor_serial_number Supplier Serial Number is passed as input in this variable
137 * @paraminfo {@rep:required}
138 * @param p_receipt_issue_type Transaction Type is passed as input in this variable
139 * @paraminfo {@rep:required}
140 * @param p_txn_src_id Transaction Source id is passed as input in this variable
141 * @paraminfo {@rep:required}
142 * @param p_txn_src_name Transaction source Name is passed as input in this variable
143 * @paraminfo {@rep:required}
144 * @param p_txn_src_type_id Transaction Source type id is passed as input in this variable
145 * @paraminfo {@rep:required}
146 * @param p_transaction_id Transaction id is passed as input in this variable
147 * @paraminfo {@rep:required}
148 * @param p_current_status Current Status of the Serial Number is passed as input in this variable
149 * @paraminfo {@rep:required}
150 * @param p_parent_item_id Component parent part Number is passed as input in this variable
151 * @paraminfo {@rep:required}
152 * @param p_parent_serial_number Component parent Serial Number is passed as input in this variable
153 * @paraminfo {@rep:required}
154 * @param p_cost_group_id Cost Group id is passed as input in this variable
155 * @paraminfo {@rep:required}
156 * @param p_transaction_action_id Transaction action id is passed as input in this variable
157 * @paraminfo {@rep:required}
158 * @param p_transaction_temp_id Transaction Temp id is passed as input in this variable
159 * @paraminfo {@rep:required}
160 * @param p_status_id Status id is passed as input in this variable
161 * @paraminfo {@rep:required}
162 * @param x_object_id Return Object id
163 * @paraminfo {@rep:required}
164 * @param x_return_status Return Status indiacation success or failure.
165 * @paraminfo {@rep:required}
166 * @param x_msg_count message count from the error stack in case of failure
167 * @paraminfo {@rep:required}
168 * @param x_msg_data x_msg_data Return the error message in case of failure
169 * @paraminfo {@rep:required}
170 * @param p_organization_type Organization type is passed as input in this variable
171 * @param p_owning_org_id Owning Organization id is passed as input in this variable
172 * @param p_owning_tp_type Owning Trading partner type is passed as input in this variable
173 * @param p_planning_org_id Planning Organization id is passed as input in this variable
174 * @param p_planning_tp_type Planning Trading partner type is passed as input in this variable
175 * @param p_wip_entity_id Wip entity id is passed as input in this variable
176 * @param p_operation_seq_num Wip operaion Sequence Number is passed as input in this variable
177 * @param p_intraoperation_step_type Code for Interopration step in mfg_lookups is passed as input in this variable
178 * @paraminfo {@rep:required}
179 * @rep:scope public
180 * @rep:lifecycle active
181 * @rep:displayname Insert Serial Number
182 */
183 PROCEDURE insertserial(
184 p_api_version IN NUMBER
185 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
186 , p_commit IN VARCHAR2 := fnd_api.g_false
187 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
188 , p_inventory_item_id IN NUMBER
189 , p_organization_id IN NUMBER
190 , p_serial_number IN VARCHAR2
191 , p_initialization_date IN DATE
192 , p_completion_date IN DATE
193 , p_ship_date IN DATE
194 , p_revision IN VARCHAR2
195 , p_lot_number IN VARCHAR2
196 , p_current_locator_id IN NUMBER
197 , p_subinventory_code IN VARCHAR2
198 , p_trx_src_id IN NUMBER
199 , p_unit_vendor_id IN NUMBER
200 , p_vendor_lot_number IN VARCHAR2
201 , p_vendor_serial_number IN VARCHAR2
202 , p_receipt_issue_type IN NUMBER
203 , p_txn_src_id IN NUMBER
204 , p_txn_src_name IN VARCHAR2
205 , p_txn_src_type_id IN NUMBER
206 , p_transaction_id IN NUMBER
207 , p_current_status IN NUMBER
208 , p_parent_item_id IN NUMBER
209 , p_parent_serial_number IN VARCHAR2
210 , p_cost_group_id IN NUMBER
211 , p_transaction_action_id IN NUMBER
212 , p_transaction_temp_id IN NUMBER
213 , p_status_id IN NUMBER
214 , x_object_id OUT NOCOPY NUMBER
215 , x_return_status OUT NOCOPY VARCHAR2
216 , x_msg_count OUT NOCOPY NUMBER
217 , x_msg_data OUT NOCOPY VARCHAR2
218 , p_organization_type IN NUMBER DEFAULT NULL
219 , p_owning_org_id IN NUMBER DEFAULT NULL
220 , p_owning_tp_type IN NUMBER DEFAULT NULL
221 , p_planning_org_id IN NUMBER DEFAULT NULL
222 , p_planning_tp_type IN NUMBER DEFAULT NULL
223 , p_wip_entity_id IN NUMBER DEFAULT NULL
224 , p_operation_seq_num IN NUMBER DEFAULT NULL
225 , p_intraoperation_step_type IN NUMBER DEFAULT NULL
226 );
227
228 -- This api is the wrapper to insert a range of serial numbers into
229 -- mtl_serial_numbers
230
231 /* FP-J Lot/Serial Support Enhancement
232 * Created a new parameter p_rcv_serial_flag that would be used to identify
233 * that this API is called from receiving UI, which is used to control updates
234 * to MTL_SERIAL_NUMBERS
235 */
236 /*#
237 * Use this procedure to validate and insert a range of Serial Numbers
238 * based on Start Serial Number and End Serial Number.
239 * @param p_api_version API version is passed as input in this variable
240 * @paraminfo {@rep:required}
241 * @param p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to Initialize message list or not
242 * @paraminfo {@rep:required}
243 * @param p_commit fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to commit or not
244 * @paraminfo {@rep:required}
245 * @param p_validation_level Validation level is passed as input in this variable
246 * @paraminfo {@rep:required}
247 * @param p_inventory_item_id Inventory Item id is passed as input in this variable
248 * @paraminfo {@rep:required}
249 * @param p_organization_id Organization id is passed as input in this variable
250 * @paraminfo {@rep:required}
251 * @param p_from_serial_number Start Serial Number is passed as input in this variable
252 * @paraminfo {@rep:required}
253 * @param p_to_serial_number End Serial Number is passed as input in this variable
254 * @paraminfo {@rep:required}
255 * @param p_initialization_date Initialization Date is passed as input in this variable
256 * @paraminfo {@rep:required}
257 * @param p_completion_date Unit completion date is passed as input in this variable
258 * @paraminfo {@rep:required}
259 * @param p_ship_date Unit Ship Date is passed as input in this variable
260 * @paraminfo {@rep:required}
261 * @param p_revision Inventory Item Revision code is passed as input in this variable
262 * @paraminfo {@rep:required}
263 * @param p_lot_number Lot Number is passed as input in this variable
264 * @paraminfo {@rep:required}
265 * @param p_current_locator_id Current Locator id is passed as input in this variable
266 * @paraminfo {@rep:required}
267 * @param p_subinventory_code Current Subinventry Code is passed as input in this variable
268 * @paraminfo {@rep:required}
269 * @param p_trx_src_id Transaction Source id is passed as input in this variable
270 * @paraminfo {@rep:required}
271 * @param p_unit_vendor_id Unit Supplier Code is passed as input in this variable
272 * @paraminfo {@rep:required}
273 * @param p_vendor_lot_number Supplier Lot Number is passed as input in this variable
274 * @paraminfo {@rep:required}
275 * @param p_vendor_serial_number Supplier Serial Number is passed as input in this variable
276 * @paraminfo {@rep:required}
277 * @param p_receipt_issue_type Transaction Type is passed as input in this variable
278 * @paraminfo {@rep:required}
279 * @param p_txn_src_id Transaction Source id is passed as input in this variable
280 * @paraminfo {@rep:required}
281 * @param p_txn_src_name Transaction source Name is passed as input in this variable
282 * @paraminfo {@rep:required}
283 * @param p_txn_src_type_id Transaction Source type id is passed as input in this variable
284 * @paraminfo {@rep:required}
285 * @param p_transaction_id Transaction id is passed as input in this variable
286 * @paraminfo {@rep:required}
287 * @param p_current_status Current Status of the Serial Number is passed as input in this variable
288 * @paraminfo {@rep:required}
289 * @param p_parent_item_id Component parent part Number is passed as input in this variable
290 * @paraminfo {@rep:required}
291 * @param p_parent_serial_number Component parent Serial Number is passed as input in this variable
292 * @paraminfo {@rep:required}
293 * @param p_cost_group_id Cost Group id is passed as input in this variable
294 * @paraminfo {@rep:required}
295 * @param p_transaction_action_id Transaction action id is passed as input in this variable
296 * @paraminfo {@rep:required}
300 * @paraminfo {@rep:required}
297 * @param p_transaction_temp_id Transaction Temp id is passed as input in this variable
298 * @paraminfo {@rep:required}
299 * @param p_status_id Status id is passed as input in this variable
301 * @param p_inspection_status Status after Inspection is passed as input in this variable
302 * @paraminfo {@rep:required}
303 * @param x_object_id Return Object id
304 * @paraminfo {@rep:required}
305 * @param x_return_status Return Status indiacation success or failure.
306 * @paraminfo {@rep:required}
307 * @param x_msg_count message count from the error stack in case of failure
308 * @paraminfo {@rep:required}
309 * @param x_msg_data x_msg_data Return the error message in case of failure
310 * @paraminfo {@rep:required}
311 * @param p_organization_type Organization type is passed as input in this variable
312 * @param p_owning_org_id Owning Organization id is passed as input in this variable
313 * @param p_owning_tp_type Owning Trading partner type is passed as input in this variable
314 * @param p_planning_org_id Planning Organization id is passed as input in this variable
315 * @param p_planning_tp_type Planning Trading partner type is passed as input in this variable
316 * @param p_rcv_serial_flag Flag specicying receiving serial or not is passed as input in this variable
317 * @rep:scope public
318 * @rep:lifecycle active
319 * @rep:displayname Insert Range of Serial Numbers
320 */
321 PROCEDURE insert_range_serial(
322 p_api_version IN NUMBER
323 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
324 , p_commit IN VARCHAR2 := fnd_api.g_false
325 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
326 , p_inventory_item_id IN NUMBER
327 , p_organization_id IN NUMBER
328 , p_from_serial_number IN VARCHAR2
329 , p_to_serial_number IN VARCHAR2
330 , p_initialization_date IN DATE
331 , p_completion_date IN DATE
332 , p_ship_date IN DATE
333 , p_revision IN VARCHAR2
334 , p_lot_number IN VARCHAR2
335 , p_current_locator_id IN NUMBER
336 , p_subinventory_code IN VARCHAR2
337 , p_trx_src_id IN NUMBER
338 , p_unit_vendor_id IN NUMBER
339 , p_vendor_lot_number IN VARCHAR2
340 , p_vendor_serial_number IN VARCHAR2
341 , p_receipt_issue_type IN NUMBER
342 , p_txn_src_id IN NUMBER
343 , p_txn_src_name IN VARCHAR2
344 , p_txn_src_type_id IN NUMBER
345 , p_transaction_id IN NUMBER
346 , p_current_status IN NUMBER
347 , p_parent_item_id IN NUMBER
348 , p_parent_serial_number IN VARCHAR2
349 , p_cost_group_id IN NUMBER
350 , p_transaction_action_id IN NUMBER
351 , p_transaction_temp_id IN NUMBER
352 , p_status_id IN NUMBER
353 , p_inspection_status IN NUMBER
354 , x_object_id OUT NOCOPY NUMBER
355 , x_return_status OUT NOCOPY VARCHAR2
356 , x_msg_count OUT NOCOPY NUMBER
357 , x_msg_data OUT NOCOPY VARCHAR2
358 , p_organization_type IN NUMBER DEFAULT NULL
359 , p_owning_org_id IN NUMBER DEFAULT NULL
360 , p_owning_tp_type IN NUMBER DEFAULT NULL
361 , p_planning_org_id IN NUMBER DEFAULT NULL
362 , p_planning_tp_type IN NUMBER DEFAULT NULL
363 , p_rcv_serial_flag IN VARCHAR2 DEFAULT NULL
364 );
365
366 -- 'Serial Tracking in WIP project. add wip_entity_id, operation_seq_num, intraooperation_step_type, line_mark_id
367 -- also as the input parameters.
368 /*#
369 * Use this procedure to update a given Serial Number
370 * @param p_api_version API version is passed as input in this variable
371 * @paraminfo {@rep:required}
372 * @param p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to Initialize message list or not
373 * @paraminfo {@rep:required}
374 * @param p_commit fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to commit or not
375 * @paraminfo {@rep:required}
376 * @param p_validation_level Validation level is passed as input in this variable
377 * @paraminfo {@rep:required}
378 * @param p_inventory_item_id Inventory Item id is passed as input in this variable
379 * @paraminfo {@rep:required}
380 * @param p_organization_id Organization id is passed as input in this variable
381 * @paraminfo {@rep:required}
382 * @param p_serial_number Serial Number is passed as input in this variable
383 * @paraminfo {@rep:required}
384 * @param p_initialization_date Initialization Date is passed as input in this variable
385 * @paraminfo {@rep:required}
386 * @param p_completion_date Unit completion date is passed as input in this variable
387 * @paraminfo {@rep:required}
388 * @param p_ship_date Unit Ship Date is passed as input in this variable
389 * @paraminfo {@rep:required}
390 * @param p_revision Inventory Item Revision code is passed as input in this variable
391 * @paraminfo {@rep:required}
392 * @param p_lot_number Lot Number is passed as input in this variable
393 * @paraminfo {@rep:required}
397 * @paraminfo {@rep:required}
394 * @param p_current_locator_id Current Locator id is passed as input in this variable
395 * @paraminfo {@rep:required}
396 * @param p_subinventory_code Current Subinventry Code is passed as input in this variable
398 * @param p_trx_src_id Transaction Source id is passed as input in this variable
399 * @paraminfo {@rep:required}
400 * @param p_unit_vendor_id Unit Supplier Code is passed as input in this variable
401 * @paraminfo {@rep:required}
402 * @param p_vendor_lot_number Supplier Lot Number is passed as input in this variable
403 * @paraminfo {@rep:required}
404 * @param p_vendor_serial_number Supplier Serial Number is passed as input in this variable
405 * @paraminfo {@rep:required}
406 * @param p_receipt_issue_type Transaction Type is passed as input in this variable
407 * @paraminfo {@rep:required}
408 * @param p_txn_src_id Transaction Source id is passed as input in this variable
409 * @paraminfo {@rep:required}
410 * @param p_txn_src_name Transaction source Name is passed as input in this variable
411 * @paraminfo {@rep:required}
412 * @param p_txn_src_type_id Transaction Source type id is passed as input in this variable
413 * @paraminfo {@rep:required}
414 * @param p_current_status Current Status of the Serial Number is passed as input in this variable
415 * @paraminfo {@rep:required}
416 * @param p_parent_item_id Component parent part Number is passed as input in this variable
417 * @paraminfo {@rep:required}
418 * @param p_parent_serial_number Component parent Serial Number is passed as input in this variable
419 * @paraminfo {@rep:required}
420 * @param p_serial_temp_id Transaction temp id is passed as input in this variable
421 * @paraminfo {@rep:required}
422 * @param p_last_status Last Status is passed as input in this variable
423 * @paraminfo {@rep:required}
424 * @param p_status_id Status id is passed as input in this variable
425 * @paraminfo {@rep:required}
426 * @param x_object_id Return Object id
427 * @paraminfo {@rep:required}
428 * @param x_return_status Return Status indiacation success or failure.
429 * @paraminfo {@rep:required}
430 * @param x_msg_count message count from the error stack in case of failure
431 * @paraminfo {@rep:required}
432 * @param x_msg_data x_msg_data Return the error message in case of failure
433 * @paraminfo {@rep:required}
434 * @param p_organization_type Organization type is passed as input in this variable
435 * @param p_owning_org_id Owning Organization id is passed as input in this variable
436 * @param p_owning_tp_type Owning Trading partner type is passed as input in this variable
437 * @param p_transaction_action_id Transaction action id is passed as input in this variable
438 * @param p_planning_org_id Planning Organization id is passed as input in this variable
439 * @param p_planning_tp_type Planning Trading partner type is passed as input in this variable
440 * @param p_wip_entity_id Wip entity id is passed as input in this variable
441 * @param p_operation_seq_num Wip operaion Sequence Number is passed as input in this variable
442 * @param p_intraoperation_step_type Code for Interopration step in mfg_lookups is passed as input in this variable
443 * @param p_line_mark_id Line identifier is passed as input in this variable
444 * @rep:scope public
445 * @rep:lifecycle active
446 * @rep:displayname Update Serial Number
447 */
448 PROCEDURE updateserial(
449 p_api_version IN NUMBER
450 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
451 , p_commit IN VARCHAR2 := fnd_api.g_false
452 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
453 , p_inventory_item_id IN NUMBER
454 , p_organization_id IN NUMBER
455 , p_serial_number IN VARCHAR2
456 , p_initialization_date IN DATE
457 , p_completion_date IN DATE
458 , p_ship_date IN DATE
459 , p_revision IN VARCHAR2
460 , p_lot_number IN VARCHAR2
461 , p_current_locator_id IN NUMBER
462 , p_subinventory_code IN VARCHAR2
463 , p_trx_src_id IN NUMBER
464 , p_unit_vendor_id IN NUMBER
465 , p_vendor_lot_number IN VARCHAR2
466 , p_vendor_serial_number IN VARCHAR2
467 , p_receipt_issue_type IN NUMBER
468 , p_txn_src_id IN NUMBER
469 , p_txn_src_name IN VARCHAR2
470 , p_txn_src_type_id IN NUMBER
471 , p_current_status IN NUMBER
472 , p_parent_item_id IN NUMBER
473 , p_parent_serial_number IN VARCHAR2
474 , p_serial_temp_id IN NUMBER
475 , p_last_status IN NUMBER
476 , p_status_id IN NUMBER
477 , x_object_id OUT NOCOPY NUMBER
478 , x_return_status OUT NOCOPY VARCHAR2
479 , x_msg_count OUT NOCOPY NUMBER
480 , x_msg_data OUT NOCOPY VARCHAR2
481 , p_organization_type IN NUMBER DEFAULT NULL
482 , p_owning_org_id IN NUMBER DEFAULT NULL
483 , p_owning_tp_type IN NUMBER DEFAULT NULL
484 , p_planning_org_id IN NUMBER DEFAULT NULL
485 , p_planning_tp_type IN NUMBER DEFAULT NULL
486 , p_transaction_action_id IN NUMBER DEFAULT NULL
487 , p_wip_entity_id IN NUMBER DEFAULT NULL
488 , p_operation_seq_num IN NUMBER DEFAULT NULL
489 , p_intraoperation_step_type IN NUMBER DEFAULT NULL
490 , p_line_mark_id IN NUMBER DEFAULT NULL
491 );
492
493
494 /*#
495 * Use this procedure to create Transactions of serialized units.
496 * @param p_api_version API version is passed as input in this variable
497 * @paraminfo {@rep:required}
498 * @param p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to Initialize message list or not
499 * @paraminfo {@rep:required}
500 * @param p_commit fnd_api.g_false or fnd_api.g_true is passed as input in this variable to determine whether to commit or not
501 * @paraminfo {@rep:required}
502 * @param p_validation_level Validation level is passed as input in this variable
503 * @paraminfo {@rep:required}
504 * @param p_inventory_item_id Inventory Item id is passed as input in this variable
505 * @paraminfo {@rep:required}
506 * @param p_organization_id Organization id is passed as input in this variable
507 * @paraminfo {@rep:required}
508 * @param p_serial_number Serial Number is passed as input in this variable
509 * @paraminfo {@rep:required}
510 * @param p_current_locator_id Current Locator id is passed as input in this variable
511 * @paraminfo {@rep:required}
512 * @param p_subinventory_code Current Subinventry Code is passed as input in this variable
513 * @paraminfo {@rep:required}
514 * @param p_transaction_date Transaction date is passed as input in this variable
515 * @paraminfo {@rep:required}
516 * @param p_txn_src_id Transaction Source id is passed as input in this variable
517 * @paraminfo {@rep:required}
518 * @param p_txn_src_name Transaction source Name is passed as input in this variable
519 * @paraminfo {@rep:required}
520 * @param p_txn_src_type_id Transaction Source type id is passed as input in this variable
521 * @paraminfo {@rep:required}
522 * @param p_transaction_id Transaction id is passed as input in this variable
523 * @paraminfo {@rep:required}
524 * @param p_transaction_action_id Transaction action id is passed as input in this variable
525 * @paraminfo {@rep:required}
526 * @param p_transaction_temp_id Transaction Temp id is passed as input in this variable
527 * @paraminfo {@rep:required}
528 * @param p_receipt_issue_type Transaction Type is passed as input in this variable
529 * @paraminfo {@rep:required}
530 * @param p_customer_id Customer id is passed as input in this variable
531 * @paraminfo {@rep:required}
532 * @param p_ship_id Ship code is passed as input in this variable
533 * @paraminfo {@rep:required}
534 * @param p_status_id Status id is passed as input in this variable
535 * @paraminfo {@rep:required}
536 * @param x_return_status Return Status indiacation success or failure.
537 * @paraminfo {@rep:required}
538 * @param x_msg_count message count from the error stack in case of failure
539 * @paraminfo {@rep:required}
540 * @param x_msg_data x_msg_data Return the error message in case of failure
541 * @paraminfo {@rep:required}
542 * @rep:scope public
543 * @rep:lifecycle active
544 * @rep:displayname Insert Unit Transactions
545 */
546 PROCEDURE insertunittrx(
547 p_api_version IN NUMBER
548 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
549 , p_commit IN VARCHAR2 := fnd_api.g_false
550 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
551 , p_inventory_item_id IN NUMBER
552 , p_organization_id IN NUMBER
553 , p_serial_number IN VARCHAR2
554 , p_current_locator_id IN NUMBER
555 , p_subinventory_code IN VARCHAR2
556 , p_transaction_date IN DATE
557 , p_txn_src_id IN NUMBER
558 , p_txn_src_name IN VARCHAR2
559 , p_txn_src_type_id IN NUMBER
560 , p_transaction_id IN NUMBER
561 , p_transaction_action_id IN NUMBER
562 , p_transaction_temp_id IN NUMBER
563 , p_receipt_issue_type IN NUMBER
564 , p_customer_id IN NUMBER
565 , p_ship_id IN NUMBER
566 , p_status_id IN NUMBER
567 , x_return_status OUT NOCOPY VARCHAR2
568 , x_msg_count OUT NOCOPY NUMBER
569 , x_msg_data OUT NOCOPY VARCHAR2
570 );
571
572 --
573 -- Name: GENERATE_SERIALS (Concurrent Program )
574 --
575 -- Input parameters:
576 -- p_org_id Organization ID
577 -- p_item_id Item ID
578 -- p_qty Count of Serial Numbers
579 -- p_wip_id Wip Entity ID
580 -- p_rev Revision
581 -- p_lot Lot Number
582 --
583 -- Output parameters:
584 -- x_retcode
585 -- x_errbuf
586 --
587 -- Functions: This API generates a batch of Serial Numbers
588 -- in MTL_SERIAL_NUMBERS and sets their status as
592 -- Note: This API works in an autonomous transaction.
589 -- 'DEFINED_BUT_NOT_USED'. Before inserting into the table
590 -- it ensures that there is no clash with existing Serial Numbers
591 -- as per the configured Serial-Number-Uniqueness attribute.
593 -- Note: This API is called by the Serial-Generation concurrent program
594 --
595
596 /*#
597 * Use this procedure to generate a range of Serial Numbers.
598 * All these Serial Numbers will have the status 'DEFINED_BUT_NOT_USED'.
599 * It makes sure that there is no clash with the existing Serial Numbers
600 * according to the Serial-Number-Uniqueness attribute.
601 * It works in an autonomous transaction, and is called by
602 * the Serial-Generation concurrent program.
603 * @param x_retcode Return status indicating success or failure
604 * @paraminfo {@rep:required}
605 * @param x_errbuf Return the error message in case of failure
606 * @paraminfo {@rep:required}
607 * @param p_org_id Organization Id is passed as input in this variable
608 * @paraminfo {@rep:required}
609 * @param p_item_id Inventory Item id passed as input in this variable
610 * @paraminfo {@rep:required}
611 * @param p_qty Quantity passed as input in this variable
612 * @paraminfo {@rep:required}
613 * @param p_serial_code Serial contol code is passed as input in this variable
614 * @paraminfo {@rep:required}
615 * @param p_wip_id Wip entity id is passed as input in this variable
616 * @paraminfo {@rep:required}
617 * @param p_rev Revision is passed as input in this variable
618 * @paraminfo {@rep:required}
619 * @param p_lot Lot Number is passed as input in this variable
620 * @paraminfo {@rep:required}
621 * @param p_group_mark_id Group identifier is passed as input in this variable
622 * @param p_line_mark_id Line identifier is passed as input in this variable
623 * @rep:scope public
624 * @rep:lifecycle active
625 * @rep:displayname Generate Serial Numbers
626 */
627 PROCEDURE generate_serials(
628 x_retcode OUT NOCOPY VARCHAR2
629 , x_errbuf OUT NOCOPY VARCHAR2
630 , p_org_id IN NUMBER
631 , p_item_id IN NUMBER
632 , p_qty IN NUMBER
633 , p_serial_code IN VARCHAR2
634 , p_wip_id IN NUMBER
635 , p_rev IN NUMBER
636 , p_lot IN NUMBER
637 , p_group_mark_id IN NUMBER DEFAULT NULL
638 , p_line_mark_id IN NUMBER DEFAULT NULL
639 );
640
641 --
642 -- Name: GENERATE_SERIALS
643 --
644 -- Input parameters:
645 -- p_org_id Organization ID
646 -- p_item_id Item ID
647 -- p_qty Count of Serial Numbers
648 -- p_wip_id Wip Entity ID
649 -- p_rev Revision
650 -- p_lot Lot Number
651 --
652 -- Output parameters:
653 -- x_start_serial Starting Serial Number
654 -- x_end_serial Ending Serial Number
655 -- x_proc_msg Message from the Process-Manager
656 -- return_status 0 on Success, 1 on Error
657 --
658 -- Functions: This API generates a batch of Serial Numbers
659 -- in MTL_SERIAL_NUMBERS and sets their status as
660 -- 'DEFINED_BUT_NOT_USED'. Before inserting into the table
661 -- it ensures that there is no clash with existing Serial Numbers
662 -- as per the configured Serial-Number-Uniqueness attribute.
663 -- Note: This API works in an autonomous transaction
664 --
665 /*#
666 * Use this function to generate a range of Serial Numbers
667 * @param p_org_id Organization Id is passed as input in this variable
668 * @paraminfo {@rep:required}
669 * @param p_item_id Inventory Item id passed as input in this variable
670 * @paraminfo {@rep:required}
671 * @param p_qty Quantity passed as input in this variable
672 * @paraminfo {@rep:required}
673 * @param p_wip_id Wip entity id is passed as input in this variable
674 * @paraminfo {@rep:required}
675 * @param p_rev Revision is passed as input in this variable
676 * @paraminfo {@rep:required}
677 * @param p_lot Lot Number is passed as input in this variable
678 * @paraminfo {@rep:required}
679 * @param p_group_mark_id Group identifier is passed as input in this variable
680 * @param p_line_mark_id Line identifier is passed as input in this variable
681 * @param x_start_ser Return Start serial
682 * @paraminfo {@rep:required}
683 * @param x_end_ser Return End serial
684 * @paraminfo {@rep:required}
685 * @param x_proc_msg Return Message from the Process-Manager
686 * @paraminfo {@rep:required}
687 * @param p_skip_serial Serial number to be excluded is passed as input in this variable
688 * @paraminfo {@rep:required}
689 * @return status indicating success or failure
690 * @rep:scope public
691 * @rep:lifecycle active
692 * @rep:displayname Generate Serial Numbers
693 */
694 FUNCTION generate_serials(
695 p_org_id IN NUMBER
696 , p_item_id IN NUMBER
697 , p_qty IN NUMBER
698 , p_wip_id IN NUMBER
699 , p_rev IN VARCHAR2
700 , p_lot IN VARCHAR2
701 , p_group_mark_id IN NUMBER DEFAULT NULL
705 , x_proc_msg OUT NOCOPY VARCHAR2
702 , p_line_mark_id IN NUMBER DEFAULT NULL
703 , x_start_ser OUT NOCOPY VARCHAR2
704 , x_end_ser OUT NOCOPY VARCHAR2
706 , p_skip_serial IN NUMBER DEFAULT NULL
707 )
708 RETURN NUMBER;
709
710 --
711 -- Name: IS_SERIAL_UNIQUE
712 --
713 -- Input parameters:
714 -- p_org_id Organization ID
715 -- p_item_id Item ID
716 -- p_serial Serial Number
717 --
718 -- Output parameters:
719 -- x_proc_msg Message from the Process-Manager
720 -- return_status 0 on Success, 1 on Error
721 --
722 -- Functions: This API checks wheather a Serial Number
723 -- can be entered into MTL_SERIAL_NUMBER after considering the
724 -- SERIAL_NUMBER_TYPE of MTL_PARAMETERS. This attribute can
725 -- have the following values :
726 -- 1 - Unique serial numbers within inventory item
727 -- 2 - Unique serial numbers within organization.
728 -- 3 - Unique serial numbers across organizations.
729 --
730 --
731 /*#
732 * Use this function to check whether a Serial number is unique or not
733 * @param p_org_id Organization Id is passed as input in this variable
734 * @paraminfo {@rep:required}
735 * @param p_item_id Inventory Item id passed as input in this variable
736 * @paraminfo {@rep:required}
737 * @param p_serial Serial Number passed as input in this variable
738 * @paraminfo {@rep:required}
739 * @param x_proc_msg Return Message from the Process-Manager
740 * @paraminfo {@rep:required}
741 * @return Status indicating success or failure
742 * @rep:scope public
743 * @rep:lifecycle active
744 * @rep:displayname Is Serial Unique
745 */
746 FUNCTION is_serial_unique(p_org_id IN NUMBER, p_item_id IN NUMBER, p_serial IN VARCHAR2, x_proc_msg OUT NOCOPY VARCHAR2)
747 RETURN NUMBER;
748
749 --
750 -- Name: GET_SERIAL_DIFF
751 --
752 -- Input parameters:
753 -- p_fm_serial 'from' Serial Number
754 -- p_to_serial 'to' Serial Number
755 --
756 -- Output parameters:
757 -- return_status quantity between passed serial numbers
758 --
759 -- Functions: This API returns the numeric difference between the
760 -- fromSerNum and toSerNum by first seperating the numeric part
761 -- from the strings and getting its difference
762 -- * Note: - string-prefix part of both the numbers should match
763 -- * - numeric part lengths should match
764 -- * - difference should be greater than 0
765 --
766 --
767 /*#
768 * Use this function to get the quantity of units between two Serial Numbers.
769 * @param p_fm_serial From Serial Number is passed as input in this variable
770 * @paraminfo {@rep:required}
771 * @param p_to_serial To Serial Number is passed as input in this variable
772 * @paraminfo {@rep:required}
773 * @return The quantity between two Serial Numbers
774 * @rep:scope public
775 * @rep:lifecycle active
776 * @rep:displayname Get Serial Difference
777 */
778 FUNCTION get_serial_diff(p_fm_serial IN VARCHAR2, p_to_serial IN VARCHAR2)
779 RETURN NUMBER;
780
781 --
782 -- Name: VALIDATE_SERIALS
783 --
784 -- Input parameters:
785 -- p_org_id Organization ID
786 -- p_item_id Item ID
787 -- p_wip_id Wip Entity ID
788 -- p_rev Revision
789 -- p_lot Lot Number
790 -- p_locator_id Locator Id
791 -- p_subinventory_code SubInv Code
792 -- p_issue_receipt Issue/Receipt Flag
793 -- IN/OUT parameters:
794 -- p_qty Quantity/Count of Serial Numbers
795 -- x_end_ser End Serial Number
796 -- Output parameters:
797 -- x_proc_msg Error Message
798 --
799 -- Functions: This API Validate a batch of Serial Numbers
800 -- and if the serial number is new then insert the
801 -- serial number in MTL_SERIAL_NUMBERS and sets their status
802 -- appropriate to the transaction. Before inserting into the table
803 -- it ensures that there is no clash with existing Serial Numbers
804 -- as per the configured Serial-Number-Uniqueness attribute.
805 --
806 -- Bug 3194093 added two more parameters to validate_serials()
807 -- p_rcv_validate,p_rcv_shipment_line_id to support serial
808 -- validation for intransit receipt transactions
809 -- applicable for Inter-org,Internal sales order Intransit txns
810 -- Bug 3384652 Changing the param name p_rcv_shipment_line_id to
811 -- p_rcv_source_line_id.And the value passed to this is either
812 -- shipment_line_id or ram_line_id depending on the transaction
813 -- Source type and action. To support serial validation for RMA
814 /*#
815 * Use this function to validate a batch of Serial Numbers
816 * and, if the serial numbers are new, to insert the
817 * serial number in MTL_SERIAL_NUMBERS and to set the status
818 * appropriate to the transaction. Before inserting into the table
819 * it ensures that there is no clash with existing Serial Numbers
820 * according to the configured Serial-Number-Uniqueness attribute.
821 * @param p_org_id Organization Id is passed as input in this variable
822 * @paraminfo {@rep:required}
826 * @paraminfo {@rep:required}
823 * @param p_item_id Inventory Item id passed as input in this variable
824 * @paraminfo {@rep:required}
825 * @param p_qty Quantity passed as input in this variable and Return the valid quantity
827 * @param p_rev Revision is passed as input in this variable
828 * @param p_lot Lot Number is passed as input in this variable
829 * @param p_start_ser Start Serial Number is passed as input in this variable
830 * @paraminfo {@rep:required}
831 * @param p_trx_src_id Transaction Source Type id is passed as input in this variable
832 * @param p_trx_action_id Transaction Action id is passed as input in this variable
833 * @param p_subinventory_code Subinventory code is passed as input in this variable
834 * @param p_locator_id Locator id is passed as input in this variable
835 * @param p_wip_entity_id Wip entity id is passed as input in this variable
836 * @param p_group_mark_id Group identifier is passed as input in this variable
837 * @param p_line_mark_id Line identifier is passed as input in this variable
838 * @param p_issue_receipt Issue or Receipt code is passed as input in this variable
839 * @param x_end_ser End Serial Number is passed as input in this variable and returns the valid End Serial Number
840 * @paraminfo {@rep:required}
841 * @param x_proc_msg Return Message from the Process-Manager
842 * @paraminfo {@rep:required}
843 * @param p_check_for_grp_mark_id The flag that determines whether to check for group mark id is passed as input in this variable
844 * @param p_rcv_validate The flag that determines whether the Serial Number should be validated or not is passed as input in this variable
845 * @param p_rcv_source_line_id Source Line id is passed as input in this variable
846 * @return Return status indicating success or failure
847 * @rep:scope public
848 * @rep:lifecycle active
849 * @rep:displayname Validate Serials
850 */
851 FUNCTION validate_serials(
852 p_org_id IN NUMBER
853 , p_item_id IN NUMBER
854 , p_qty IN OUT NOCOPY NUMBER
855 , p_rev IN VARCHAR2 DEFAULT NULL
856 , p_lot IN VARCHAR2 DEFAULT NULL
857 , p_start_ser IN VARCHAR2
858 , p_trx_src_id IN NUMBER DEFAULT NULL
859 , p_trx_action_id IN NUMBER DEFAULT NULL
860 , p_subinventory_code IN VARCHAR2 DEFAULT NULL
861 , p_locator_id IN NUMBER DEFAULT NULL
862 , p_wip_entity_id IN NUMBER DEFAULT NULL
863 , p_group_mark_id IN NUMBER DEFAULT NULL
864 , p_line_mark_id IN NUMBER DEFAULT NULL
865 , p_issue_receipt IN VARCHAR2 DEFAULT NULL
866 , x_end_ser IN OUT NOCOPY VARCHAR2
867 , x_proc_msg OUT NOCOPY VARCHAR2
868 , p_check_for_grp_mark_id IN VARCHAR2 DEFAULT 'N'
869 , p_rcv_validate IN VARCHAR2 DEFAULT 'N'
870 , p_rcv_source_line_id IN NUMBER DEFAULT -1
871 , p_xfr_org_id IN NUMBER DEFAULT -1 -- Bug#4153297
872 ) --Bug# 2656316
873 RETURN NUMBER;
874
875 /*#
876 * Use this function to get the next Serial Number using the current Serial
877 * Number and Increment Value.
878 * @param p_curr_serial Current Serial number is passed as input in this variable
879 * @param p_inc_value Increment value is passed as input in this variable
880 * @return Returns next Serial Number
881 * @rep:scope public
882 * @rep:lifecycle active
883 * @rep:displayname Increment Serial Number
884 */
885 FUNCTION increment_ser_num(p_curr_serial VARCHAR2, p_inc_value NUMBER)
886 RETURN VARCHAR2;
887
888 --Description
889 --Procedure for validating and updating serial attributes.
890 /*#
891 * Use this procedure to validate and update serial attributes.
892 * @param x_return_status Return status indicating success or failure
893 * @paraminfo {@rep:required}
894 * @param x_msg_count Return message count from the error stack in case of failure
895 * @paraminfo {@rep:required}
896 * @param x_msg_data Return the error message in case of failure
897 * @paraminfo {@rep:required}
898 * @param x_validation_status Return the validation status
899 * @paraminfo {@rep:required}
900 * @param p_serial_number Serial number is passed as input in this variable
901 * @paraminfo {@rep:required}
902 * @param p_organization_id Organization Id is passed as input in this variable
903 * @paraminfo {@rep:required}
904 * @param p_inventory_item_id Inventory Item id passed as input in this variable
905 * @paraminfo {@rep:required}
906 * @param p_serial_att_tbl Serial Attributes table is passed as input in this variable
907 * @paraminfo {@rep:required}
908 * @param p_validate_only TRUE is passed as input in this variable if only validation is required
909 * @rep:scope public
910 * @rep:lifecycle active
911 * @rep:displayname Validate and Update Serial Attributes
912 */
913 PROCEDURE validate_update_serial_att
914 (x_return_status OUT NOCOPY VARCHAR2,
915 x_msg_count OUT NOCOPY NUMBER,
916 x_msg_data OUT NOCOPY VARCHAR2,
917 x_validation_status OUT NOCOPY VARCHAR2,
918 p_serial_number IN VARCHAR2,
919 p_organization_id IN NUMBER,
920 p_inventory_item_id IN NUMBER,
921 p_serial_att_tbl IN
922 inv_lot_sel_attr.lot_sel_attributes_tbl_type,
923 p_validate_only IN BOOLEAN DEFAULT FALSE
924 );
925
926 FUNCTION SNGetMask(P_txn_act_id IN NUMBER,
927 P_txn_src_type_id IN NUMBER,
928 P_serial_control IN NUMBER,
929 x_to_status OUT NOCOPY NUMBER,
930 x_dynamic_ok OUT NOCOPY NUMBER,
931 P_receipt_issue_flag IN VARCHAR2,
932 x_mask OUT NOCOPY VARCHAR2,
933 x_errorcode OUT NOCOPY NUMBER)
934 RETURN BOOLEAN;
935
936 PROCEDURE update_msn
937 (x_return_status OUT NOCOPY VARCHAR2,
938 x_msg_count OUT NOCOPY NUMBER,
939 x_msg_data OUT NOCOPY VARCHAR2,
940 p_trxdate IN DATE,
941 p_transaction_temp_id IN NUMBER,
942 p_rev IN VARCHAR2,
943 p_lotnum IN VARCHAR2,
944 p_orgid IN NUMBER,
945 p_locid IN NUMBER, -- :lii,
946 p_subinv IN VARCHAR2,
947 p_trxsrctypid IN NUMBER,
948 p_trxsrcid IN NUMBER,
949 p_trx_act_id IN NUMBER,
950 p_vendid IN NUMBER, -- :i_vendor_idi,
951 p_venlot IN VARCHAR2,
952 p_receipt_issue_type IN NUMBER,
953 p_trxsname IN VARCHAR2,
954 p_lstupdby IN NUMBER,
955 p_parent_item_id IN NUMBER, -- :parent_item_i,
956 p_parent_ser_num IN VARCHAR2, -- :parent_sn_i,
957 p_ser_ctrl_code IN NUMBER,
958 p_xfr_ser_ctrl_code IN NUMBER,
959 p_trx_qty IN NUMBER,
960 p_invitemid IN NUMBER,
961 p_f_ser_num IN VARCHAR2,
962 p_t_ser_num IN VARCHAR2,
963 x_serial_updated OUT NOCOPY NUMBER
964 );
965
966 FUNCTION getGroupId(
967 p_trx_source_type_id IN number,
968 p_trx_action_id IN number) RETURN NUMBER;
969
970 FUNCTION validate_status(
971 p_trx_src_type_id IN NUMBER,
972 p_trx_action_id IN NUMBER,
973 p_isIssue IN BOOLEAN,
974 p_ser_num_ctrl_code IN NUMBER,
975 p_curr_status IN NUMBER,
976 p_last_trx_src_type_id IN NUMBER,
977 p_xfr_ser_num_ctrl_code IN NUMBER,
978 p_isRestrictRcptSerial IN NUMBER
979 ) return number;
980
981 FUNCTION valsn(
982 p_trx_src_type_id IN NUMBER,
983 p_trx_action_id IN NUMBER,
984 p_revision IN VARCHAR2,
985 p_curr_subinv_code IN VARCHAR2,
986 p_locator_id IN NUMBER,
987 p_item IN NUMBER,
988 p_curr_org_id IN NUMBER,
989 p_lot IN VARCHAR2,
990 p_curr_ser_num IN VARCHAR2,
991 p_ser_num_ctrl_code IN NUMBER,
992 p_xfr_ser_num_ctrl_code IN NUMBER,
993 p_trx_qty IN NUMBER,
994 p_acct_prof_value IN VARCHAR2,
995 p_mask IN VARCHAR2,
996 p_db_current_status IN NUMBER,
997 p_db_current_organization_id IN NUMBER,
998 p_db_revision IN VARCHAR2,
999 p_db_lot_number IN VARCHAR2,
1000 p_db_current_subinventory_code IN VARCHAR2,
1001 p_db_current_locator_id IN NUMBER,
1002 p_db_wip_ent_id_ind IN NUMBER,
1003 p_db_lst_txn_src_type_id IN NUMBER
1004 ) RETURN NUMBER DETERMINISTIC;
1005 --pragma restrict_references(valsn, WNDS, WNPS, RNDS, RNPS);
1006
1007 PROCEDURE insertRangeUnitTrx(
1008 p_api_version IN NUMBER,
1009 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1010 p_commit IN VARCHAR2 := FND_API.G_FALSE,
1011 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1012 p_inventory_item_id IN NUMBER,
1013 p_organization_id IN NUMBER,
1014 p_fm_serial_number IN VARCHAR2,
1015 p_to_serial_number IN VARCHAR2,
1016 p_current_locator_id IN NUMBER,
1017 p_subinventory_code IN VARCHAR2,
1018 p_transaction_date IN DATE,
1019 p_txn_src_id IN NUMBER,
1020 p_txn_src_name IN VARCHAR2,
1021 p_txn_src_type_id IN NUMBER,
1022 p_transaction_id IN NUMBER,
1023 p_transaction_action_id IN NUMBER,
1024 p_transaction_temp_id IN NUMBER,
1025 p_receipt_issue_type IN NUMBER,
1026 p_customer_id IN NUMBER,
1027 p_ship_id IN NUMBER,
1028 p_status_id IN NUMBER,
1029 x_return_status OUT NOCOPY VARCHAR2,
1030 x_msg_count OUT NOCOPY NUMBER,
1031 x_msg_data OUT NOCOPY VARCHAR2);
1032
1033 END inv_serial_number_pub;