1 PACKAGE inv_rcv_std_rcpt_apis AUTHID CURRENT_USER AS
2 /* $Header: INVSTDRS.pls 120.7 2010/12/10 09:14:56 srsomasu ship $*/
3 TYPE rcv_enter_receipts_rec_tp IS RECORD(
4 line_chkbox CHAR(1)
5 , source_type_code VARCHAR2(30)
6 , receipt_source_code VARCHAR2(30)
7 , order_type_code VARCHAR2(30)
8 , order_type VARCHAR2(80)
9 , po_header_id NUMBER
10 , po_number VARCHAR2(30)
11 , po_line_id NUMBER
12 , po_line_number NUMBER
13 , po_line_location_id NUMBER
14 , po_shipment_number NUMBER
15 , po_release_id NUMBER
16 , po_release_number NUMBER
17 , req_header_id NUMBER
18 , req_number VARCHAR2(80)
19 , req_line_id NUMBER
20 , req_line NUMBER
21 , req_distribution_id NUMBER
22 , rcv_shipment_header_id NUMBER
23 , rcv_shipment_number VARCHAR2(30)
24 , rcv_shipment_line_id NUMBER
25 , rcv_line_number NUMBER
26 , from_organization_id NUMBER
27 , to_organization_id NUMBER
28 , vendor_id NUMBER
29 , SOURCE VARCHAR2(255)
30 , vendor_site_id NUMBER
31 , outside_operation_flag VARCHAR2(1)
32 , item_id NUMBER
33 , -- bug 2073164
34 -- Added extra column in the rec structure
35 uom_code VARCHAR2(3)
36 , primary_uom VARCHAR2(25)
37 , primary_uom_class VARCHAR2(10)
38 , item_allowed_units_lookup_code NUMBER
39 , item_locator_control NUMBER
40 , restrict_locators_code VARCHAR2(1)
41 , restrict_subinventories_code VARCHAR2(1)
42 , shelf_life_code NUMBER
43 , shelf_life_days NUMBER
44 , serial_number_control_code NUMBER
45 , lot_control_code NUMBER
46 , item_rev_control_flag_to VARCHAR2(1)
47 , item_rev_control_flag_from VARCHAR2(1)
48 , item_number VARCHAR2(40)
49 , item_revision VARCHAR2(3)
50 , item_description VARCHAR2(240)
51 , item_category_id NUMBER
52 , hazard_class VARCHAR2(40)
53 , un_number VARCHAR2(30)
54 , vendor_item_number VARCHAR2(30)
55 , ship_to_location_id NUMBER
56 , ship_to_location VARCHAR2(60)
57 , packing_slip VARCHAR2(80)
58 , routing_id NUMBER
59 , routing_name VARCHAR2(30)
60 , need_by_date DATE
61 , expected_receipt_date DATE
62 , ordered_qty NUMBER
63 , ordered_uom VARCHAR2(25)
64 , ussgl_transaction_code VARCHAR2(30)
65 , government_context VARCHAR2(30)
66 , inspection_required_flag VARCHAR2(1)
67 , receipt_required_flag VARCHAR2(1)
68 , enforce_ship_to_location_code VARCHAR2(30)
69 , unit_price NUMBER
70 , currency_code VARCHAR2(30)
71 , currency_conversion_type VARCHAR2(30)
72 , currency_conversion_date DATE
73 , currency_conversion_rate NUMBER
74 , note_to_receiver VARCHAR2(480) --Changed the length from 240 to 480 for Bug 10333116
75 , destination_type_code VARCHAR2(30)
76 , deliver_to_person_id NUMBER
77 , deliver_to_location_id NUMBER
78 , destination_subinventory VARCHAR2(10)
79 , attribute_category VARCHAR2(30)
80 , attribute1 VARCHAR2(150)
81 , attribute2 VARCHAR2(150)
82 , attribute3 VARCHAR2(150)
83 , attribute4 VARCHAR2(150)
84 , attribute5 VARCHAR2(150)
85 , attribute6 VARCHAR2(150)
86 , attribute7 VARCHAR2(150)
87 , attribute8 VARCHAR2(150)
88 , attribute9 VARCHAR2(150)
89 , attribute10 VARCHAR2(150)
90 , attribute11 VARCHAR2(150)
91 , attribute12 VARCHAR2(150)
92 , attribute13 VARCHAR2(150)
93 , attribute14 VARCHAR2(150)
94 , attribute15 VARCHAR2(150)
95 , closed_code VARCHAR2(30)
96 , asn_type VARCHAR2(30)
97 , bill_of_lading VARCHAR2(30)
98 , shipped_date DATE
99 , freight_carrier_code VARCHAR2(30)
100 , waybill_airbill_num VARCHAR2(80)
101 , freight_bill_num VARCHAR2(35)
102 , vendor_lot_num VARCHAR2(80)
103 , container_num VARCHAR2(35)
104 , truck_num VARCHAR2(35)
105 , bar_code_label VARCHAR2(35)
106 , rate_type_display VARCHAR2(30)
107 , match_option VARCHAR2(25)
108 , country_of_origin_code VARCHAR2(2)
109 , oe_order_header_id NUMBER
110 , oe_order_num NUMBER
111 , oe_order_line_id NUMBER
112 , oe_order_line_num NUMBER
113 , customer_id NUMBER
114 , customer_site_id NUMBER
115 , customer_item_num VARCHAR2(50)
116 , pll_note_to_receiver VARCHAR2(240)
117 , -- ABOVE FIELDS ARE FROM RCV_ENTER_RECEIPTS_V
118 -- BELOW ARE MAINLY FROM PO_DISTRIBUTIONS
119 po_distribution_id NUMBER
120 , qty_ordered NUMBER
121 , wip_entity_id NUMBER
122 , wip_operation_seq_num NUMBER
123 , wip_resource_seq_num NUMBER
124 , wip_repetitive_schedule_id NUMBER
125 , wip_line_id NUMBER
126 , bom_resource_id NUMBER
127 , destination_type VARCHAR2(80)
128 , LOCATION VARCHAR2(60)
129 , currency_conversion_rate_pod NUMBER
130 , currency_conversion_date_pod DATE
131 , project_id NUMBER
132 , task_id NUMBER
133 -- OPM Convergence ..commented out temporarily
134 , secondary_uom VARCHAR2(25) DEFAULT NULL
135 , secondary_uom_code VARCHAR2(3) DEFAULT NULL
136 , secondary_quantity NUMBER DEFAULT NULL
137 );
138
139 -- this is the record type for RCV_TRANSACTION Block
140 -- which includes DB items from RCV_ENTER_RECEIPTS_V
141 -- and NON-DB items
142 TYPE rcv_transaction_rec_tp IS RECORD(
143 line_chkbox CHAR(1)
144 , source_type_code VARCHAR2(30)
145 , receipt_source_code VARCHAR2(30)
146 , order_type_code VARCHAR2(30)
147 , order_type VARCHAR2(80)
148 , po_header_id NUMBER
149 , po_number VARCHAR2(30)
150 , po_line_id NUMBER
151 , po_line_number NUMBER
152 , po_line_location_id NUMBER
153 , po_shipment_number NUMBER
154 , po_release_id NUMBER
155 , po_release_number NUMBER
156 , req_header_id NUMBER
157 , req_number VARCHAR2(80)
158 , req_line_id NUMBER
159 , req_line NUMBER
160 , req_distribution_id NUMBER
161 , rcv_shipment_header_id NUMBER
162 , rcv_shipment_number VARCHAR2(30)
163 , rcv_shipment_line_id NUMBER
164 , rcv_line_number NUMBER
165 , from_organization_id NUMBER
166 , to_organization_id NUMBER
167 , vendor_id NUMBER
168 , SOURCE VARCHAR2(255)
169 , vendor_site_id NUMBER
170 , outside_operation_flag VARCHAR2(1)
171 , item_id NUMBER
172 -- bug 2073164
173 -- Added extra column in the rec structure
174 ,uom_code VARCHAR2(3)
175 , primary_uom VARCHAR2(25)
176 , primary_uom_class VARCHAR2(10)
177 , item_allowed_units_lookup_code NUMBER
178 , item_locator_control NUMBER
179 , restrict_locators_code VARCHAR2(1)
180 , restrict_subinventories_code VARCHAR2(1)
181 , shelf_life_code NUMBER
182 , shelf_life_days NUMBER
183 , serial_number_control_code NUMBER
184 , lot_control_code NUMBER
185 , item_rev_control_flag_to VARCHAR2(1)
186 , item_rev_control_flag_from VARCHAR2(1)
187 , item_number VARCHAR2(40)
188 , item_revision VARCHAR2(3)
189 , item_description VARCHAR2(240)
190 , item_category_id NUMBER
191 , hazard_class VARCHAR2(40)
192 , un_number VARCHAR2(30)
193 , vendor_item_number VARCHAR2(30)
194 , ship_to_location_id NUMBER
195 , ship_to_location VARCHAR2(60)
196 , packing_slip VARCHAR2(30)
197 , routing_id NUMBER
198 , routing_name VARCHAR2(30)
199 , need_by_date DATE
200 , expected_receipt_date DATE
201 , ordered_qty NUMBER
202 , ordered_uom VARCHAR2(25)
203 , ussgl_transaction_code VARCHAR2(30)
204 , government_context VARCHAR2(30)
205 , inspection_required_flag VARCHAR2(1)
206 , receipt_required_flag VARCHAR2(1)
207 , enforce_ship_to_location_code VARCHAR2(30)
208 , unit_price NUMBER
209 , currency_code VARCHAR2(15)
210 , currency_conversion_type VARCHAR2(30)
211 , currency_conversion_date DATE
212 , currency_conversion_rate NUMBER
213 , note_to_receiver VARCHAR2(480) --Changed the length from 240 to 480 for Bug 10333116
214 , destination_type_code VARCHAR2(30)
215 , deliver_to_person_id NUMBER
216 , deliver_to_location_id NUMBER
217 , destination_subinventory VARCHAR2(10)
218 , attribute_category VARCHAR2(30)
219 , attribute1 VARCHAR2(150)
220 , attribute2 VARCHAR2(150)
221 , attribute3 VARCHAR2(150)
222 , attribute4 VARCHAR2(150)
223 , attribute5 VARCHAR2(150)
224 , attribute6 VARCHAR2(150)
225 , attribute7 VARCHAR2(150)
226 , attribute8 VARCHAR2(150)
227 , attribute9 VARCHAR2(150)
228 , attribute10 VARCHAR2(150)
229 , attribute11 VARCHAR2(150)
230 , attribute12 VARCHAR2(150)
231 , attribute13 VARCHAR2(150)
232 , attribute14 VARCHAR2(150)
233 , attribute15 VARCHAR2(150)
234 , closed_code VARCHAR2(30)
235 , asn_type VARCHAR2(30)
236 , bill_of_lading VARCHAR2(30)
237 , shipped_date DATE
238 , freight_carrier_code VARCHAR2(30)
239 , waybill_airbill_num VARCHAR2(80)
240 , freight_bill_num VARCHAR2(35)
241 -- vendor_lot_num is defined as a non-db item in form
242 -- however seems it is queried from db only and never changed thereafter ?
243 ,vendor_lot_num VARCHAR2(80)
244 , container_num VARCHAR2(35)
245 , truck_num VARCHAR2(35)
246 , bar_code_label VARCHAR2(35)
247 , rate_type_display VARCHAR2(30)
248 , match_option VARCHAR2(25)
249 , country_of_origin_code VARCHAR2(2)
250 , oe_order_header_id NUMBER
251 , oe_order_num NUMBER
252 , oe_order_line_id NUMBER
253 , oe_order_line_num NUMBER
254 , customer_id NUMBER
255 , customer_site_id NUMBER
256 , customer_item_num VARCHAR2(50)
257 -- below are NON-DB Items
258 ,interface_transaction_id NUMBER
259 , primary_quantity NUMBER
260 , transaction_qty NUMBER
261 , transaction_uom VARCHAR2(25)
262 , receipt_exception NUMBER
263 , comments VARCHAR2(240)
264 -- this field is set in receiving form ?
265 ,reason_id NUMBER
266 , substitute_receipt VARCHAR2(30)
267 , original_item_id NUMBER
268 , locator_id NUMBER
269 , subinventory_dsp VARCHAR2(10)
270 , wip_entity_id NUMBER
271 , wip_line_id NUMBER
272 , department_code NUMBER
273 , wip_repetitive_schedule_id NUMBER
274 , wip_operation_seq_num NUMBER
275 , wip_resource_seq_num NUMBER
276 , bom_resource_id NUMBER
277 , destination_type_code_hold VARCHAR2(30)
278 , po_distribution_id NUMBER
279 , lpn_id NUMBER
280 , transfer_lpn_id NUMBER
281 , cost_group_id NUMBER
282 , transfer_cost_group_id NUMBER
283 -- OPM Convergence
287 );
284 , secondary_uom VARCHAR2(25)
285 , secondary_uom_code VARCHAR2(3)
286 , secondary_quantity NUMBER
288
289 TYPE rcpt_lot_qty_rec IS RECORD(
290 lot_number VARCHAR2(80)
291 , txn_quantity NUMBER
292 , sec_txn_quantity NUMBER --OPM Convergence
293 );
294
295 TYPE rcpt_lot_qty_rec_tb_tp IS TABLE OF rcpt_lot_qty_rec
296 INDEX BY BINARY_INTEGER;
297
298 g_rcpt_lot_qty_rec_tb rcpt_lot_qty_rec_tb_tp;
299 g_shipment_header_id NUMBER := NULL;
300 g_header_intf_id NUMBER := NULL;
301 g_rcpt_match_table_gross inv_rcv_common_apis.cascaded_trans_tab_type; -- input for matching algorithm
302 g_receipt_detail_index NUMBER := 1; -- index for the row needs to be detailed for matching
303 g_dummy_lpn_id NUMBER := NULL; -- dummy lpn_id for normal ASN receipt with the same from and to lpn
304 g_po_line_location_id NUMBER := 0; -- global variable for testing only ?
305 g_po_distribution_id NUMBER := 0;
306
307 /*******************************************************
308 * Name: create_std_rcpt_intf_rec
309 *
310 * Description:
311 *
312 * This API is a wrapper to create record in RCV_TRANSACTIONS_INTERFACE for
313 * different receipt transactions.
314 *
315 * This API takes PO_header_id or Shipment_header_id, item_id, received_qty,
316 * received_UOM, received_location as input. It calls the corresponding API
317 * for different txns (PO, Intransit, RMA, ASN, Int-req).
318 *
319 * The underlying APIs will call the matching algorithm API
320 * to detail the receipt to PO_line_locations.
321 * Then it calls insert API, insert_txn_interface, to inserts PO line
322 * location record into RCV_TRANSACTION_INTERFACE
323 *
324 * Flow:
325 *
326 * 1. query po_startup_value and other initial values
327 * 2. query RCV_ENTER_RECEIPTS_V to populate DB items in rcv_transaction block
328 * before calling matching algorithm
329 * 3. call matching algorithm to detail the receipt
330 * 4. call insert API
331 *
332 * Parameters:
333 *
334 * p_move_order_header_id
335 * p_organization_id
336 * p_shipment_header_id
337 * p_req_header_id
338 * p_po_header_id
339 * p_item_id
340 * p_location_id
341 * p_rcv_qty
342 * p_rcv_uom
343 * p_source_type
344 * p_from_lpn_id
345 * p_lpn_id
346 * p_lot_control_code
347 * p_revision
348 *
349 *******************************************************/
350 /* FP-J Lot/Serial Support
351 * Added a new parameter p_original_rti_id to store the product_transaction_id
352 * passed from the UI to split the lots and serials based on RTI quantity
353 */
354 --Bug #4147209 - Added the DFF attribute category and the attributes
355 --as input parameters
356 PROCEDURE create_std_rcpt_intf_rec(
357 p_move_order_header_id IN OUT NOCOPY NUMBER
358 , p_organization_id IN NUMBER
359 , p_po_header_id IN NUMBER
360 , p_po_release_number_id IN NUMBER
361 , p_po_line_id IN NUMBER
362 , p_shipment_header_id IN NUMBER
363 , p_req_header_id IN NUMBER
364 , p_oe_order_header_id IN NUMBER
365 , p_item_id IN NUMBER
366 , p_location_id IN NUMBER
367 , p_rcv_qty IN NUMBER
368 , p_rcv_uom IN VARCHAR2
369 , p_rcv_uom_code IN VARCHAR2
370 , p_source_type IN VARCHAR2
371 , p_from_lpn_id IN NUMBER
372 , p_lpn_id IN NUMBER
373 , p_lot_control_code IN NUMBER
374 , p_revision IN VARCHAR2
375 , p_inspect IN NUMBER
376 , x_status OUT NOCOPY VARCHAR2
377 , x_message OUT NOCOPY VARCHAR2
378 , p_inv_item_id IN NUMBER DEFAULT NULL
379 , p_item_desc IN VARCHAR2 DEFAULT NULL
380 , p_project_id IN NUMBER DEFAULT NULL
381 , p_task_id IN NUMBER DEFAULT NULL
382 , p_country_code IN VARCHAR2 DEFAULT NULL
383 , p_rcv_subinventory_code IN VARCHAR2 DEFAULT NULL --RCVLOCATORSSUPPORT
384 , p_rcv_locator_id IN NUMBER DEFAULT NULL
385 , p_original_rti_id IN NUMBER DEFAULT NULL
386 --OPM convergence
387 , p_secondary_uom IN VARCHAR2 DEFAULT NULL
388 , p_secondary_uom_code IN VARCHAR2 DEFAULT NULL
389 , p_secondary_quantity IN NUMBER DEFAULT NULL
390 , p_attribute_category IN VARCHAR2 DEFAULT NULL
391 , p_attribute1 IN VARCHAR2 DEFAULT NULL
392 , p_attribute2 IN VARCHAR2 DEFAULT NULL
393 , p_attribute3 IN VARCHAR2 DEFAULT NULL
394 , p_attribute4 IN VARCHAR2 DEFAULT NULL
395 , p_attribute5 IN VARCHAR2 DEFAULT NULL
396 , p_attribute6 IN VARCHAR2 DEFAULT NULL
397 , p_attribute7 IN VARCHAR2 DEFAULT NULL
398 , p_attribute8 IN VARCHAR2 DEFAULT NULL
399 , p_attribute9 IN VARCHAR2 DEFAULT NULL
400 , p_attribute10 IN VARCHAR2 DEFAULT NULL
401 , p_attribute11 IN VARCHAR2 DEFAULT NULL
402 , p_attribute12 IN VARCHAR2 DEFAULT NULL
403 , p_attribute13 IN VARCHAR2 DEFAULT NULL
404 , p_attribute14 IN VARCHAR2 DEFAULT NULL
408 FUNCTION insert_txn_interface(
405 , p_attribute15 IN VARCHAR2 DEFAULT NULL
406 );
407
409 p_rcv_transaction_rec IN OUT NOCOPY rcv_transaction_rec_tp
410 , p_rcv_rcpt_rec IN OUT NOCOPY rcv_enter_receipts_rec_tp
411 , p_group_id NUMBER
412 , p_transaction_type VARCHAR2
413 , p_organization_id NUMBER
414 , p_location_id NUMBER
415 , p_source_type VARCHAR2
416 , p_qa_routing_id NUMBER DEFAULT -1
417 , p_project_id NUMBER DEFAULT NULL
418 , p_task_id NUMBER DEFAULT NULL
419 , p_express_transaction VARCHAR2 DEFAULT NULL
420 )
421 RETURN NUMBER;
422
423 /*
424 --rcv_insert_update_header
425 --========================
426 --If passed shipment_header_id is null it calls rcv_insert_header
427 --Else it calls rcv_update_header
428 --
429 --Called from:
430 --RcptInfoPage.java
431 -------------------
432 --For a PO/RMA receipt calls this API to insert a default RSH row which will
433 --generate the g_shipment_header_id if it is null and pass it back to the
434 --UI. This is the only time a RSH row is inserted. Later in processTxn in
435 --the RcptInfoPage.java this API is called again. For intransit receipts the
436 --g_shipment_header_id gets defaulted to the shipment_header_id in
437 --insert_txn_interface procedure else in this method we generate the
438 --g_shipment_header_id to be used later to insert a corresponding RHI.
439 --The java file passes null for shipment_header_id but stores the value
440 --which is again passed later from the listener to update the RSH.
441 --
442 --RcptInfoFListener.java
443 ------------------------
444 --From this API the shipment_header_id should always get passed to this API
445 --and so we should be just updating the RSH created in the pageEntered or
446 --the existing RSH for the non PO/RMA transaction with the values entered on
447 --the infoPage.
448 --
449 --
450 --rcv_insert_header/rcv_insert_header_insterface
451 --==============================================
452 --Call rcv_insert_header_interface if patchset J is installed
453 --rcv_insert_header
454 --If g_shipment_header_id is null then it generates it
455 --Inserts into RSH
456 --Calls rcv_update_rti_from_header
457 --If patchsetJ is installed,
458 --if g_header_interface_id is null then generate it
459 --Insert into RHI
460 --Calls the rcv_update_rti_from_header
461 --else do what it used to do before.
462 --INVSTDRB.pls
463 --------------
464 --rcv_insert_update_header
465 --
466 --
467 --rcv_update_header
468 --=================
469 --Selects the RSH row for the shipment_header_id passed
470 --Updates the various columns passed in the cursor
471 --calls rcv_shipment_headers_pkg.update_row to update the columns
472 --If patchsetJ is installed
473 --select the RHI row for the header_interface_id passed
474 --updates the various columns in RHI.
475 --else do what it used to do before.
476 --INVSTDRB.pls
477 --------------
478 --rcv_insert_update_header
479 --
480 --
481 --rcv_update_rti_from_header
482 --==========================
483 --Querry RTI to get transaction_status_code using g_shipment_header_id on RTI.
484 --update following columns in RTI:
485 --SET shipment_num = p_shipment_num
486 --, freight_carrier_code = p_freight_carrier_code
487 --, bill_of_lading = p_bill_of_lading
488 --, packing_slip = p_packing_slip
489 --, num_of_containers = p_num_of_containers
490 --, waybill_airbill_num = p_waybill_airbill_num
491 --using g_shipment_header_id on RTI
492 --If patchset J is installed
493 --query RTI to get the transaction_status_code using g_header_intf_id on RTI.
494 --Update the above columns in RTI.
495 --
496 --INVSTDRB.pls
497 --------------
498 --rcv_insert_header
499 --rcv_update_header
500 */
501 --Bug #4147209 - Added the DFF attribute category and the attributes
502 --as input parameters
503 PROCEDURE rcv_insert_update_header(
504 p_organization_id IN NUMBER
505 , p_shipment_header_id IN OUT NOCOPY NUMBER
506 , p_source_type IN VARCHAR2
507 , p_receipt_num IN OUT NOCOPY VARCHAR2
508 , p_vendor_id IN NUMBER
509 , p_vendor_site_id IN NUMBER
510 , p_shipment_num IN VARCHAR2
511 , p_ship_to_location_id IN NUMBER
512 , p_bill_of_lading IN VARCHAR2
513 , p_packing_slip IN VARCHAR2
514 , p_shipped_date IN DATE
515 , p_freight_carrier_code IN VARCHAR2
516 , p_expected_receipt_date IN DATE
517 , p_num_of_containers IN NUMBER
518 , p_waybill_airbill_num IN VARCHAR2
519 , p_comments IN VARCHAR2
520 , p_ussgl_transaction_code IN VARCHAR2
521 , p_government_context IN VARCHAR2
522 , p_request_id IN NUMBER
523 , p_program_application_id IN NUMBER
524 , p_program_id IN NUMBER
525 , p_program_update_date IN DATE
526 , p_customer_id IN NUMBER
527 , p_customer_site_id IN NUMBER
528 , x_return_status OUT NOCOPY VARCHAR2
529 , x_msg_count OUT NOCOPY NUMBER
533 , p_attribute2 IN VARCHAR2 DEFAULT NULL
530 , x_msg_data OUT NOCOPY VARCHAR2
531 , p_attribute_category IN VARCHAR2 DEFAULT NULL
532 , p_attribute1 IN VARCHAR2 DEFAULT NULL
534 , p_attribute3 IN VARCHAR2 DEFAULT NULL
535 , p_attribute4 IN VARCHAR2 DEFAULT NULL
536 , p_attribute5 IN VARCHAR2 DEFAULT NULL
537 , p_attribute6 IN VARCHAR2 DEFAULT NULL
538 , p_attribute7 IN VARCHAR2 DEFAULT NULL
539 , p_attribute8 IN VARCHAR2 DEFAULT NULL
540 , p_attribute9 IN VARCHAR2 DEFAULT NULL
541 , p_attribute10 IN VARCHAR2 DEFAULT NULL
542 , p_attribute11 IN VARCHAR2 DEFAULT NULL
543 , p_attribute12 IN VARCHAR2 DEFAULT NULL
544 , p_attribute13 IN VARCHAR2 DEFAULT NULL
545 , p_attribute14 IN VARCHAR2 DEFAULT NULL
546 , p_attribute15 IN VARCHAR2 DEFAULT NULL
547 );
548
549 -- This API was not called from anywhere outside so removing this from
550 -- the spec. Please look at comments for rcv_insert_update_header
551
552
553 -- For LCM Project BUG 7702666
554 PROCEDURE lcm_call_rcv_rtp(
555 p_lcmOrgID IN NUMBER
556 , p_lcmReceiptNum IN VARCHAR2
557 , x_lcmvalid_status OUT NOCOPY VARCHAR2
558 , x_return_status OUT NOCOPY VARCHAR2
559 , x_msg_data OUT NOCOPY VARCHAR2
560 );
561 -- For LCM Project BUG 7702666
562
563 /*
564 PROCEDURE rcv_update_rti_from_header(
565 p_shipment_num VARCHAR
566 , p_freight_carrier_code VARCHAR2
567 , p_bill_of_lading VARCHAR2
568 , p_packing_slip VARCHAR2
569 , p_num_of_containers NUMBER
570 , p_waybill_airbill_num VARCHAR2
571 , x_return_status OUT NOCOPY VARCHAR2
572 , x_msg_count OUT NOCOPY NUMBER
573 , x_msg_data OUT NOCOPY VARCHAR2
574 );
575 */
576
577 PROCEDURE create_move_order(
578 p_move_order_header_id IN OUT NOCOPY NUMBER
579 , p_po_line_location_id IN NUMBER
580 , p_po_distribution_id IN NUMBER
581 , p_shipment_line_id IN NUMBER
582 , p_oe_order_line_id IN NUMBER
583 , p_routing IN VARCHAR2
584 , p_lot_control_code IN NUMBER
585 , p_org_id IN NUMBER
586 , p_item_id IN NUMBER
587 , p_qty IN NUMBER
588 , p_uom_code IN VARCHAR2
589 , p_lpn IN NUMBER
590 , p_project_id IN NUMBER DEFAULT NULL
591 , p_task_id IN NUMBER DEFAULT NULL
592 , p_revision IN VARCHAR2 DEFAULT NULL
593 , p_inspect IN NUMBER
594 , p_txn_source_id IN NUMBER
595 , x_status OUT NOCOPY VARCHAR2
596 , x_message OUT NOCOPY VARCHAR2
597 , p_transfer_org_id IN NUMBER DEFAULT NULL
598 , p_wms_process_flag IN NUMBER DEFAULT NULL
599 , p_lot_number IN VARCHAR2 DEFAULT NULL
600 , p_secondary_quantity IN NUMBER DEFAULT NULL --OPM Convergence
601 , p_secondary_uom IN VARCHAR2 DEFAULT NULL --OPM Convergence
602 , x_line_id OUT NOCOPY NUMBER
603 );
604
605 PROCEDURE create_mo_for_correction(
606 p_move_order_header_id IN OUT NOCOPY NUMBER
607 , p_po_line_location_id IN NUMBER DEFAULT NULL
608 , p_po_distribution_id IN NUMBER DEFAULT NULL
609 , p_shipment_line_id IN NUMBER DEFAULT NULL
610 , p_oe_order_line_id IN NUMBER DEFAULT NULL
611 , p_routing IN NUMBER
612 , p_lot_control_code IN NUMBER
613 , p_org_id IN NUMBER
614 , p_item_id IN NUMBER
615 , p_qty IN NUMBER
616 , p_uom_code IN VARCHAR2
617 , p_lpn IN NUMBER
618 , p_revision IN VARCHAR2 DEFAULT NULL
619 , p_inspect IN NUMBER
620 , p_txn_source_id IN NUMBER
621 , x_status OUT NOCOPY VARCHAR2
622 , x_message OUT NOCOPY VARCHAR2
623 , p_transfer_org_id IN NUMBER DEFAULT NULL
624 , p_wms_process_flag IN NUMBER DEFAULT NULL
625 , p_secondary_qty IN NUMBER DEFAULT NULL --OPM Convergence
626 , p_secondary_uom IN VARCHAR2 DEFAULT NULL --OPM Convergence
627 );
628
629 PROCEDURE packunpack_container(
630 p_api_version IN NUMBER
631 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
632 , p_commit IN VARCHAR2 := fnd_api.g_false
633 , x_return_status OUT NOCOPY VARCHAR2
634 , x_msg_count OUT NOCOPY NUMBER
635 , x_msg_data OUT NOCOPY VARCHAR2
636 , p_from_lpn_id IN NUMBER := NULL
637 , p_lpn_id IN NUMBER
638 , p_content_lpn_id IN NUMBER := NULL
639 , p_content_item_id IN NUMBER := NULL
640 , p_content_item_desc IN VARCHAR2 := NULL
641 , p_revision IN VARCHAR2 := NULL
645 , p_quantity IN NUMBER := NULL
642 , p_lot_number IN VARCHAR2 := NULL
643 , p_from_serial_number IN VARCHAR2 := NULL
644 , p_to_serial_number IN VARCHAR2 := NULL
646 , p_uom IN VARCHAR2 := NULL
647 , p_organization_id IN NUMBER
648 , p_subinventory IN VARCHAR2 := NULL
649 , p_locator_id IN NUMBER := NULL
650 , p_enforce_wv_constraints IN NUMBER := 2
651 , p_operation IN NUMBER
652 , p_cost_group_id IN NUMBER := NULL
653 , p_source_type_id IN NUMBER := NULL
654 , p_source_header_id IN NUMBER := NULL
655 , p_source_name IN VARCHAR2 := NULL
656 , p_source_line_id IN NUMBER := NULL
657 , p_source_line_detail_id IN NUMBER := NULL
658 , p_homogeneous_container IN NUMBER := 2
659 , p_match_locations IN NUMBER := 2
660 , p_match_lpn_context IN NUMBER := 2
661 , p_match_lot IN NUMBER := 2
662 , p_match_cost_groups IN NUMBER := 2
663 , p_match_mtl_status IN NUMBER := 2
664 );
665
666 PROCEDURE detect_asn_discrepancy(
667 p_shipment_header_id NUMBER
668 , p_lpn_id NUMBER
669 , p_po_header_id NUMBER
670 , x_discrepancy_flag OUT NOCOPY NUMBER
671 , x_return_status OUT NOCOPY VARCHAR2
672 , x_msg_count OUT NOCOPY NUMBER
673 , x_msg_data OUT NOCOPY VARCHAR2
674 );
675
676
677 -- Check if there are LPNs on this shipment
678 -- If there's LPN on this shipment, lpn_flag = 1, else lpn_flag = 0
679
680 PROCEDURE check_lpn_on_shipment(
681 p_shipment_number IN VARCHAR2
682 , p_from_organization_id IN NUMBER
683 , p_to_organization_id IN NUMBER
684 , x_lpn_flag OUT NOCOPY NUMBER
685 , x_return_status OUT NOCOPY VARCHAR2
686 , x_msg_count OUT NOCOPY NUMBER
687 , x_msg_data OUT NOCOPY VARCHAR2
688 );
689
690 -- Check if there are LPNs on this ASN
691 -- If there's LPN on this shipment, lpn_flag = 1, else lpn_flag = 0
692
693 PROCEDURE check_lpn_on_asn(
694 p_shipment_header_id IN VARCHAR2
695 , x_lpn_flag OUT NOCOPY NUMBER
696 , x_return_status OUT NOCOPY VARCHAR2
697 , x_msg_count OUT NOCOPY NUMBER
698 , x_msg_data OUT NOCOPY VARCHAR2
699 );
700
701 PROCEDURE check_lpn_on_req(
702 p_req_num IN VARCHAR2
703 , x_lpn_flag OUT NOCOPY NUMBER
704 , x_return_status OUT NOCOPY VARCHAR2
705 , x_msg_count OUT NOCOPY NUMBER
706 , x_msg_data OUT NOCOPY VARCHAR2
707 );
708
709 PROCEDURE update_lpn_org(
710 p_organization_id IN NUMBER
711 , p_lpn_id IN NUMBER
712 , x_return_status OUT NOCOPY VARCHAR2
713 , x_msg_count OUT NOCOPY NUMBER
714 , x_msg_data OUT NOCOPY VARCHAR2
715 );
716
717 PROCEDURE remove_lpn_contents(
718 p_lpn_id IN NUMBER
719 , x_return_status OUT NOCOPY VARCHAR2
720 , x_msg_count OUT NOCOPY NUMBER
721 , x_msg_data OUT NOCOPY VARCHAR2
722 , p_routing_id IN NUMBER DEFAULT NULL
723 );
724
725 PROCEDURE clear_lpn_for_ship(
726 p_organization_id IN NUMBER
727 , p_shipment_header_id IN NUMBER
728 , x_return_status OUT NOCOPY VARCHAR2
729 , x_msg_count OUT NOCOPY NUMBER
730 , x_msg_data OUT NOCOPY VARCHAR2
731 , p_routing_id IN NUMBER DEFAULT NULL
732 );
733
734 PROCEDURE populate_lot_rec(
735 p_lot_number IN VARCHAR2
736 , p_primary_qty IN NUMBER
737 , p_txn_uom_code IN VARCHAR2
738 , p_org_id NUMBER
739 , p_item_id IN NUMBER
740 , p_secondary_quantity IN NUMBER DEFAULT NULL);
741 --Added to fix the Bug #4037082
742 --This procedure will validate the entered lot quantity
743 --against the shipped lot quantity
744 PROCEDURE validate_lot_qty(
745 p_lot_number IN VARCHAR2
746 , p_inventory_item_id IN NUMBER
747 , p_lot_txn_qty IN NUMBER
748 , p_lot_primary_qty IN NUMBER
749 , p_shipment_header_id IN NUMBER
750 , p_rcv_org_id IN NUMBER
751 , x_return_status OUT NOCOPY VARCHAR2
752 );
753
754 --Added to fix the Bug #4086191
755 --overload the procedure created above
756 --with one more parameter, p_product_txn_id
757 PROCEDURE validate_lot_qty(
758 p_lot_number IN VARCHAR2
759 , p_inventory_item_id IN NUMBER
760 , p_lot_txn_qty IN NUMBER
761 , p_lot_primary_qty IN NUMBER
762 , p_shipment_header_id IN NUMBER
763 , p_rcv_org_id IN NUMBER
764 , p_product_txn_id IN NUMBER
765 , x_return_status OUT NOCOPY VARCHAR2
766 );
767
768 /* Bug 6830559: Making the procedure public, as this is now called from
769 * INVRCVVB.pls
770 */
771 PROCEDURE get_project_task(
772 p_po_line_location_id IN NUMBER
773 , p_oe_order_line_id IN NUMBER
774 , x_project_id OUT NOCOPY NUMBER
775 , x_task_id OUT NOCOPY NUMBER
776 );
777
778 --Added to fix the Bug #6908946
779 --overload the procedure created above
780 --with one more parameter, p_from_lpn_id
781 PROCEDURE validate_lot_qty(
782 p_lot_number IN VARCHAR2
783 , p_inventory_item_id IN NUMBER
784 , p_lot_txn_qty IN NUMBER
785 , p_lot_primary_qty IN NUMBER
786 , p_shipment_header_id IN NUMBER
787 , p_rcv_org_id IN NUMBER
788 , p_product_txn_id IN NUMBER
789 , p_from_lpn_id IN NUMBER
790 , x_return_status OUT NOCOPY VARCHAR2
791 );
792
793 END inv_rcv_std_rcpt_apis;