7:
8: -- LOCAL PROCEDURES
9:
10: PROCEDURE derive_io_rcv_line_qty(
11: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
12: n IN OUT NOCOPY BINARY_INTEGER,
13: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
14: );
15:
9:
10: PROCEDURE derive_io_rcv_line_qty(
11: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
12: n IN OUT NOCOPY BINARY_INTEGER,
13: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
14: );
15:
16: PROCEDURE derive_trans_del_line_quantity(
17: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
13: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
14: );
15:
16: PROCEDURE derive_trans_del_line_quantity(
17: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
18: n IN OUT NOCOPY BINARY_INTEGER,
19: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
20: );
21:
15:
16: PROCEDURE derive_trans_del_line_quantity(
17: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
18: n IN OUT NOCOPY BINARY_INTEGER,
19: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
20: );
21:
22: PROCEDURE derive_io_correct_line_qty(
23: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
19: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
20: );
21:
22: PROCEDURE derive_io_correct_line_qty(
23: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
24: n IN OUT NOCOPY BINARY_INTEGER,
25: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
26: );
27:
21:
22: PROCEDURE derive_io_correct_line_qty(
23: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
24: n IN OUT NOCOPY BINARY_INTEGER,
25: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
26: );
27:
28: PROCEDURE derive_io_shipment_info(
29: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
25: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
26: );
27:
28: PROCEDURE derive_io_shipment_info(
29: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
30: n IN OUT NOCOPY BINARY_INTEGER
31: );
32:
33: -- GLOBAL PROCEDURES
32:
33: -- GLOBAL PROCEDURES
34:
35: PROCEDURE derive_internal_order_header(
36: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
37: ) IS
38: BEGIN
39: rcv_roi_header_common.derive_ship_to_org_info(p_header_record);
40: rcv_roi_header_common.derive_from_org_info(p_header_record);
43: -- derive shipment info?
44: END derive_internal_order_header;
45:
46: PROCEDURE default_internal_order_header(
47: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
48: ) IS
49: BEGIN
50: rcv_roi_header_common.default_last_update_info(p_header_record);
51: rcv_roi_header_common.default_creation_info(p_header_record);
74: END IF;
75: END default_internal_order_header;
76:
77: PROCEDURE validate_internal_order_header(
78: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
79: ) IS
80: BEGIN
81: rcv_roi_header_common.validate_trx_type(p_header_record);
82: -- validate_document_type(p_header_record);
97: * default_shipment_info defaults the shipment_header_id if the
98: * shipment_num is given for an inter-org/internal req receipts.
99: */
100: PROCEDURE default_shipment_info(
101: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
102: ) IS
103: x_count NUMBER;
104: BEGIN
105: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
150: p_header_record.error_record.error_message := rcv_error_pkg.get_last_message;
151: END default_shipment_info;
152:
153: PROCEDURE update_header(
154: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
155: ) IS
156: BEGIN
157: UPDATE rcv_shipment_headers
158: SET shipment_header_id = p_header_record.header_record.receipt_header_id,
231: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id;
232: END update_header;
233:
234: PROCEDURE derive_io_receive_line(
235: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
236: n IN OUT NOCOPY BINARY_INTEGER,
237: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
238: x_header_record IN rcv_roi_preprocessor.header_rec_type
239: ) IS
233:
234: PROCEDURE derive_io_receive_line(
235: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
236: n IN OUT NOCOPY BINARY_INTEGER,
237: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
238: x_header_record IN rcv_roi_preprocessor.header_rec_type
239: ) IS
240: BEGIN
241: x_progress := '000';
234: PROCEDURE derive_io_receive_line(
235: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
236: n IN OUT NOCOPY BINARY_INTEGER,
237: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
238: x_header_record IN rcv_roi_preprocessor.header_rec_type
239: ) IS
240: BEGIN
241: x_progress := '000';
242:
303: /* Bug3591830 - END */
304: END derive_io_receive_line;
305:
306: PROCEDURE derive_io_trans_line(
307: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
308: n IN OUT NOCOPY BINARY_INTEGER,
309: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
310: x_header_record IN rcv_roi_preprocessor.header_rec_type
311: ) IS
305:
306: PROCEDURE derive_io_trans_line(
307: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
308: n IN OUT NOCOPY BINARY_INTEGER,
309: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
310: x_header_record IN rcv_roi_preprocessor.header_rec_type
311: ) IS
312: BEGIN
313: IF (g_asn_debug = 'Y') THEN
306: PROCEDURE derive_io_trans_line(
307: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
308: n IN OUT NOCOPY BINARY_INTEGER,
309: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
310: x_header_record IN rcv_roi_preprocessor.header_rec_type
311: ) IS
312: BEGIN
313: IF (g_asn_debug = 'Y') THEN
314: asn_debug.put_line('enter derive_io_trans_line ');
367: );
368: END derive_io_trans_line;
369:
370: PROCEDURE derive_io_correct_line(
371: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
372: n IN OUT NOCOPY BINARY_INTEGER,
373: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
374: x_header_record IN rcv_roi_preprocessor.header_rec_type
375: ) IS
369:
370: PROCEDURE derive_io_correct_line(
371: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
372: n IN OUT NOCOPY BINARY_INTEGER,
373: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
374: x_header_record IN rcv_roi_preprocessor.header_rec_type
375: ) IS
376: BEGIN
377: IF (g_asn_debug = 'Y') THEN
370: PROCEDURE derive_io_correct_line(
371: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
372: n IN OUT NOCOPY BINARY_INTEGER,
373: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
374: x_header_record IN rcv_roi_preprocessor.header_rec_type
375: ) IS
376: BEGIN
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('enter derive_correction_line ');
413: );
414: END derive_io_correct_line;
415:
416: PROCEDURE default_io_receive_line(
417: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
418: n IN BINARY_INTEGER
419: ) IS
420: l_routing_header_id NUMBER;
421: BEGIN
472: x_cascaded_table(n).routing_header_id := l_routing_header_id;
473: END default_io_receive_line;
474:
475: PROCEDURE default_io_trans_line(
476: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
477: n IN BINARY_INTEGER
478: ) IS
479: BEGIN
480: -- logic should match int-org transfer
481: rcv_int_org_transfer.default_int_org_trans_del(x_cascaded_table, n);
482: END default_io_trans_line;
483:
484: PROCEDURE default_io_correct_line(
485: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
486: n IN BINARY_INTEGER
487: ) IS
488: BEGIN
489: -- logic should match int-org transfer
490: rcv_int_org_transfer.default_int_org_cor_line(x_cascaded_table, n);
491: END default_io_correct_line;
492:
493: PROCEDURE validate_io_receive_line(
494: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
495: n IN BINARY_INTEGER,
496: x_header_record IN rcv_roi_preprocessor.header_rec_type
497: ) IS
498: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
492:
493: PROCEDURE validate_io_receive_line(
494: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
495: n IN BINARY_INTEGER,
496: x_header_record IN rcv_roi_preprocessor.header_rec_type
497: ) IS
498: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
499: l_skip_validation NUMBER := 0; --Bug#6375015
500: BEGIN
690: NULL;
691: END validate_io_receive_line;
692:
693: PROCEDURE derive_io_rcv_line_qty(
694: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
695: n IN OUT NOCOPY BINARY_INTEGER,
696: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
697: ) IS
698: /* Bug 3684984.
692:
693: PROCEDURE derive_io_rcv_line_qty(
694: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
695: n IN OUT NOCOPY BINARY_INTEGER,
696: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
697: ) IS
698: /* Bug 3684984.
699: * Added the columns requisition_line_id, employee_id and
700: * po_line_location_id to the cursor. We used to get this before
1553: END IF;
1554: END derive_io_rcv_line_qty;
1555:
1556: PROCEDURE derive_trans_del_line_quantity(
1557: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1558: n IN OUT NOCOPY BINARY_INTEGER,
1559: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
1560: ) IS
1561: BEGIN
1555:
1556: PROCEDURE derive_trans_del_line_quantity(
1557: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1558: n IN OUT NOCOPY BINARY_INTEGER,
1559: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
1560: ) IS
1561: BEGIN
1562: -- logic should match inter-org transfer, so
1563: rcv_int_org_transfer.derive_trans_del_line_quantity(x_cascaded_table,
1566: );
1567: END derive_trans_del_line_quantity;
1568:
1569: PROCEDURE derive_io_correct_line_qty(
1570: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1571: n IN OUT NOCOPY BINARY_INTEGER,
1572: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
1573: ) IS
1574: BEGIN
1568:
1569: PROCEDURE derive_io_correct_line_qty(
1570: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1571: n IN OUT NOCOPY BINARY_INTEGER,
1572: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type
1573: ) IS
1574: BEGIN
1575: -- logic is the same for inter_org xfer, so...
1576: rcv_int_org_transfer.derive_int_org_cor_line_qty(x_cascaded_table,
1579: );
1580: END derive_io_correct_line_qty;
1581:
1582: PROCEDURE derive_io_shipment_info(
1583: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1584: n IN OUT NOCOPY BINARY_INTEGER
1585: ) IS
1586: l_shipment_header_id NUMBER;
1587: l_shipment_line_id NUMBER;
1659: If rcv_shipment_line_id is not known, it will try to get the value based on
1660: rcv_shipment_header_id only if the rsh has got only one rsl.
1661: */
1662: PROCEDURE get_deliver_to_person_from_rsl(
1663: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1664: n IN BINARY_INTEGER
1665: ) IS
1666: l_deliver_to_person_id NUMBER;
1667: l_rsl_count NUMBER;
1733: This function is called from validate_io_rcv_line() and it tries to default
1734: the deliver_to_person_id mentioned in the parent transaction(i.e from rcv_transactions).
1735: */
1736: FUNCTION get_deliver_to_person_from_rt(
1737: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1738: n IN BINARY_INTEGER
1739: ) RETURN NUMBER IS
1740: l_parent_deliver_to_person_id NUMBER := null;
1741: BEGIN
1761: the deliver_to_person_id mentioned in the parent transaction(i.e from rcv_transactions_interface).
1762: */
1763:
1764: FUNCTION get_deliver_to_person_from_rti(
1765: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1766: n IN BINARY_INTEGER
1767: ) RETURN NUMBER IS
1768: l_parent_deliver_to_person_id NUMBER := null;
1769: BEGIN