[Home] [Help]
1770: ** holds that information and is being used here
1771: */
1772: IF ( NVL(x_header_record.header_record.asn_type, 'STD') = 'STD'
1773: AND x_cascaded_table(n).transaction_type = 'RECEIVE'
1774: AND (rcv_roi_header.g_txn_against_asn = 'Y')) THEN --{ /* Bug4523892 */
1775:
1776: x_cascaded_table(n).shipment_header_id := x_header_record.header_record.receipt_header_id;
1777:
1778: IF (g_asn_debug = 'Y') THEN
3640: /* IF (x_is_asn = TRUE) THEN --{ */
3641: /* Forward port for Bug 4523892 , the use of x_is_asn is commented to make it consistent
3642: with the previous code line
3643: */
3644: IF (rcv_roi_header.g_txn_against_asn = 'Y') THEN --{ Bug#4523892
3645: IF (g_asn_debug = 'Y') THEN
3646: asn_debug.put_line('Open ASN Shipment records');
3647: asn_debug.put_line('shipment_header_id ' || temp_cascaded_table(current_n).shipment_header_id);
3648: asn_debug.put_line('shipment_line_id ' || temp_cascaded_table(current_n).shipment_line_id);
3744: asn_debug.put_line('Proceed to open cursor');
3745: END IF;
3746:
3747: /* IF (x_is_asn = TRUE) THEN --{ This call is replaced by forward port of 4523892 */
3748: IF (rcv_roi_header.g_txn_against_asn = 'Y') THEN --{ Bug#4523892
3749: IF (g_asn_debug = 'Y') THEN
3750: asn_debug.put_line('Open ASN Distribution records');
3751: asn_debug.put_line('shipment_header_id ' || temp_cascaded_table(current_n).shipment_header_id);
3752: asn_debug.put_line('shipment_line_id ' || temp_cascaded_table(current_n).shipment_line_id);
3875: */
3876: IF ( x_cascaded_table(n).transaction_type <> 'DELIVER'
3877: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') <> 'DELIVER') THEN --{
3878: /* IF (x_is_asn = TRUE) THEN --{ This is replaced by forward port for bug 4523892 */
3879: IF (rcv_roi_header.g_txn_against_asn = 'Y') THEN --{ Bug#4523892
3880: IF (g_asn_debug = 'Y') THEN
3881: asn_debug.put_line('Count of asn shipments');
3882: END IF;
3883:
3890: FETCH count_shipments INTO x_record_count;
3891: END IF; --}
3892: ELSE --}{
3893: /* IF (x_is_asn = TRUE) THEN --{ This is replaced by forward port for Bug 4523892 */
3894: IF (rcv_roi_header.g_txn_against_asn = 'Y') THEN --{ Bug#4523892
3895: IF (g_asn_debug = 'Y') THEN
3896: asn_debug.put_line('Count of asn distributions');
3897: END IF;
3898:
4576: asn_debug.put_line('Should have give us the exact error ');
4577: END IF;
4578:
4579: /* IF (x_is_asn = TRUE) THEN --{ This is replaced by forward port for Bug 4523892 */
4580: IF (rcv_roi_header.g_txn_against_asn = 'Y') THEN --{ Bug#4523892
4581: /* Error messages specific to asns. */
4582: IF (g_asn_debug = 'Y') THEN
4583: asn_debug.put_line('Error messages specific to asn');
4584: END IF;
4744: * will be for the case of a receipt against a PO shipment.
4745: */
4746: IF ( (x_cascaded_table(n).transaction_type = 'RECEIVE')
4747: AND l_asn_exists_code IN('WARNING', 'REJECT')
4748: AND (rcv_roi_header.g_txn_against_asn = 'N')) THEN --{ Bug#4523892
4749: /* AND (x_is_asn = FALSE)) THEN --{ This is replaced by forward port for 4523892 */
4750: IF (g_asn_debug = 'Y') THEN
4751: asn_debug.put_line('ASN CODE IN Warning or Reject ');
4752: END IF;
4909: NULL;
4910:
4911: /*Bug# 1548597 */
4912: /* IF (x_is_asn = FALSE) THEN --{ Replaced by forward port 4523892 */
4913: IF (rcv_roi_header.g_txn_against_asn = 'N') THEN --{ Bug#4523892
4914: IF (g_asn_debug = 'Y') THEN
4915: asn_debug.put_line('Receiving against a Po');
4916: END IF;
4917:
4964: END IF;
4965: ELSE --} { for txn != deliver
4966: /* Bug# 1548597*/
4967: /* IF (x_is_asn = FALSE) THEN --{ Replaced by forward port 4523892 */
4968: IF (rcv_roi_header.g_txn_against_asn = 'N') THEN --{ Bug#4523892
4969: IF (g_asn_debug = 'Y') THEN
4970: asn_debug.put_line('Direct delivery against a Po');
4971: END IF;
4972:
7626:
7627: /* Bug 5182693 : Skip validate item for ASN transactions with substitute item */
7628:
7629: asn_debug.put_line('substitute_item_id: '|| x_cascaded_table(n).substitute_item_id);
7630: asn_debug.put_line('g_txn_against_asn : '|| rcv_roi_header.g_txn_against_asn);
7631: /** Bug: 5598511
7632: * For ASN, substitution item id will be populated only during ASN creation and
7633: * not during the receipt of ASN. In order to bypass item validation for ASN added the
7634: * condition ' AND rcv_roi_header.g_txn_against_asn = 'N' '
7630: asn_debug.put_line('g_txn_against_asn : '|| rcv_roi_header.g_txn_against_asn);
7631: /** Bug: 5598511
7632: * For ASN, substitution item id will be populated only during ASN creation and
7633: * not during the receipt of ASN. In order to bypass item validation for ASN added the
7634: * condition ' AND rcv_roi_header.g_txn_against_asn = 'N' '
7635: */
7636: IF rcv_roi_header.g_txn_against_asn = 'Y' THEN
7637: l_pol_item_id := nvl(rcv_table_functions.get_pol_row_from_id(x_cascaded_table(n).po_line_id).item_id,-999);
7638: IF x_cascaded_table(n).item_id <> l_pol_item_id THEN
7632: * For ASN, substitution item id will be populated only during ASN creation and
7633: * not during the receipt of ASN. In order to bypass item validation for ASN added the
7634: * condition ' AND rcv_roi_header.g_txn_against_asn = 'N' '
7635: */
7636: IF rcv_roi_header.g_txn_against_asn = 'Y' THEN
7637: l_pol_item_id := nvl(rcv_table_functions.get_pol_row_from_id(x_cascaded_table(n).po_line_id).item_id,-999);
7638: IF x_cascaded_table(n).item_id <> l_pol_item_id THEN
7639: l_asn_sub_item_txn := 'Y';
7640: ELSE
7642: END IF;
7643: ELSE
7644: l_asn_sub_item_txn := 'N';
7645: END IF;
7646: IF (x_cascaded_table(n).substitute_item_id IS NULL AND rcv_roi_header.g_txn_against_asn = 'N')
7647: OR (l_asn_sub_item_txn = 'N' AND rcv_roi_header.g_txn_against_asn = 'Y') --Bug: 5598511
7648: OR rcv_roi_header.g_txn_against_asn = 'N' THEN --{
7649: rcv_roi_header_common.validate_item(x_cascaded_table, n); -- bug 608353
7650: END IF; --}
7643: ELSE
7644: l_asn_sub_item_txn := 'N';
7645: END IF;
7646: IF (x_cascaded_table(n).substitute_item_id IS NULL AND rcv_roi_header.g_txn_against_asn = 'N')
7647: OR (l_asn_sub_item_txn = 'N' AND rcv_roi_header.g_txn_against_asn = 'Y') --Bug: 5598511
7648: OR rcv_roi_header.g_txn_against_asn = 'N' THEN --{
7649: rcv_roi_header_common.validate_item(x_cascaded_table, n); -- bug 608353
7650: END IF; --}
7651: END IF; --}
7644: l_asn_sub_item_txn := 'N';
7645: END IF;
7646: IF (x_cascaded_table(n).substitute_item_id IS NULL AND rcv_roi_header.g_txn_against_asn = 'N')
7647: OR (l_asn_sub_item_txn = 'N' AND rcv_roi_header.g_txn_against_asn = 'Y') --Bug: 5598511
7648: OR rcv_roi_header.g_txn_against_asn = 'N' THEN --{
7649: rcv_roi_header_common.validate_item(x_cascaded_table, n); -- bug 608353
7650: END IF; --}
7651: END IF; --}
7652:
7645: END IF;
7646: IF (x_cascaded_table(n).substitute_item_id IS NULL AND rcv_roi_header.g_txn_against_asn = 'N')
7647: OR (l_asn_sub_item_txn = 'N' AND rcv_roi_header.g_txn_against_asn = 'Y') --Bug: 5598511
7648: OR rcv_roi_header.g_txn_against_asn = 'N' THEN --{
7649: rcv_roi_header_common.validate_item(x_cascaded_table, n); -- bug 608353
7650: END IF; --}
7651: END IF; --}
7652:
7653: asn_debug.put_line('after doing validate item the error status is ' || x_cascaded_table(n).error_status);
7674: IF (g_asn_debug = 'Y') THEN
7675: asn_debug.put_line('Validating Substitute Item');
7676: END IF;
7677:
7678: rcv_roi_header_common.validate_substitute_item(x_cascaded_table, n);
7679: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status, 'SUBSTITUTE_ITEM_NUM');
7680: END IF;
7681:
7682: IF (x_cascaded_table(n).item_id IS NOT NULL) THEN -- Bug 12538097
7679: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status, 'SUBSTITUTE_ITEM_NUM');
7680: END IF;
7681:
7682: IF (x_cascaded_table(n).item_id IS NOT NULL) THEN -- Bug 12538097
7683: rcv_roi_header_common.validate_item_revision(x_cascaded_table, n);
7684: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status, 'ITEM_REVISION');
7685: END IF; -- End Bug 12538097
7686:
7687: EXCEPTION
12748: PROCEDURE default_vendor_trans_del(
12749: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
12750: n IN BINARY_INTEGER
12751: ) IS
12752: p_trx_record rcv_roi_header_common.common_default_record_type;
12753:
12754: CURSOR po_transfer(
12755: v_parent_trx_id NUMBER
12756: ) IS
12850: p_trx_record.processing_mode_code := x_cascaded_table(n).processing_mode_code;
12851: p_trx_record.processing_status_code := x_cascaded_table(n).processing_status_code;
12852: p_trx_record.transaction_status_code := x_cascaded_table(n).transaction_status_code;
12853: p_trx_record.auto_transact_code := x_cascaded_table(n).auto_transact_code;
12854: rcv_roi_header_common.commondefaultcode(p_trx_record);
12855: x_cascaded_table(n).destination_type_code := p_trx_record.destination_type_code;
12856: x_cascaded_table(n).transaction_type := p_trx_record.transaction_type;
12857: x_cascaded_table(n).processing_mode_code := p_trx_record.processing_mode_code;
12858: x_cascaded_table(n).processing_status_code := p_trx_record.processing_status_code;
15556: PROCEDURE default_vendor_correct(
15557: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
15558: n IN BINARY_INTEGER
15559: ) IS
15560: p_trx_record rcv_roi_header_common.common_default_record_type;
15561:
15562: CURSOR po_correct(
15563: v_parent_trx_id NUMBER
15564: ) IS
15694: p_trx_record.processing_mode_code := x_cascaded_table(n).processing_mode_code;
15695: p_trx_record.processing_status_code := x_cascaded_table(n).processing_status_code;
15696: p_trx_record.transaction_status_code := x_cascaded_table(n).transaction_status_code;
15697: p_trx_record.auto_transact_code := x_cascaded_table(n).auto_transact_code;
15698: rcv_roi_header_common.commondefaultcode(p_trx_record);
15699: x_cascaded_table(n).destination_type_code := p_trx_record.destination_type_code;
15700: x_cascaded_table(n).transaction_type := p_trx_record.transaction_type;
15701: x_cascaded_table(n).processing_mode_code := p_trx_record.processing_mode_code;
15702: x_cascaded_table(n).processing_status_code := p_trx_record.processing_status_code;