DBA Data[Home] [Help]

APPS.RCV_INT_ORDER_PP_PVT dependencies on ASN_DEBUG

Line 5: g_asn_debug VARCHAR2(1) := asn_debug.is_debug_on; -- Bug 9152790

1: PACKAGE BODY rcv_int_order_pp_pvt AS
2: /* $Header: RCVPPIOB.pls 120.12.12020000.2 2012/07/10 09:27:24 ptkumar ship $ */
3:
4: -- GLOBAL VARIABLES
5: g_asn_debug VARCHAR2(1) := asn_debug.is_debug_on; -- Bug 9152790
6: x_progress VARCHAR2(3);
7:
8: -- LOCAL PROCEDURES
9:

Line 106: IF (g_asn_debug = 'Y') THEN

102: ) IS
103: x_count NUMBER;
104: BEGIN
105: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
106: IF (g_asn_debug = 'Y') THEN
107: asn_debug.put_line('Shipment header Id has been provided');
108: END IF;
109:
110: RETURN;

Line 107: asn_debug.put_line('Shipment header Id has been provided');

103: x_count NUMBER;
104: BEGIN
105: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
106: IF (g_asn_debug = 'Y') THEN
107: asn_debug.put_line('Shipment header Id has been provided');
108: END IF;
109:
110: RETURN;
111: END IF;

Line 119: IF (g_asn_debug = 'Y') THEN

115: OR REPLACE(p_header_record.header_record.shipment_num,
116: ' ',
117: ''
118: ) IS NULL) THEN
119: IF (g_asn_debug = 'Y') THEN
120: asn_debug.put_line('Shipment num is still null');
121: /* Bug 4907179 */
122: asn_debug.put_line('Not able to default shipment_header_id, erroring out the transaction');
123: END IF;

Line 120: asn_debug.put_line('Shipment num is still null');

116: ' ',
117: ''
118: ) IS NULL) THEN
119: IF (g_asn_debug = 'Y') THEN
120: asn_debug.put_line('Shipment num is still null');
121: /* Bug 4907179 */
122: asn_debug.put_line('Not able to default shipment_header_id, erroring out the transaction');
123: END IF;
124:

Line 122: asn_debug.put_line('Not able to default shipment_header_id, erroring out the transaction');

118: ) IS NULL) THEN
119: IF (g_asn_debug = 'Y') THEN
120: asn_debug.put_line('Shipment num is still null');
121: /* Bug 4907179 */
122: asn_debug.put_line('Not able to default shipment_header_id, erroring out the transaction');
123: END IF;
124:
125: /* Bug 4907179: Logging error in PO_INTERFACE_ERRORS table and erroring out the transaction, as
126: we are not able to default the shipment_header_id.

Line 144: IF (g_asn_debug = 'Y') THEN

140: WHERE shipment_num = p_header_record.header_record.shipment_num
141: AND receipt_source_code IN('INVENTORY', 'INTERNAL ORDER');
142: EXCEPTION
143: WHEN OTHERS THEN
144: IF (g_asn_debug = 'Y') THEN
145: asn_debug.put_line('Exception in when others in default_shipment_info ');
146: END IF;
147:
148: rcv_error_pkg.set_sql_error_message('default_shipment_info', '000');

Line 145: asn_debug.put_line('Exception in when others in default_shipment_info ');

141: AND receipt_source_code IN('INVENTORY', 'INTERNAL ORDER');
142: EXCEPTION
143: WHEN OTHERS THEN
144: IF (g_asn_debug = 'Y') THEN
145: asn_debug.put_line('Exception in when others in default_shipment_info ');
146: END IF;
147:
148: rcv_error_pkg.set_sql_error_message('default_shipment_info', '000');
149: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_unexp_error;

Line 158: IF (g_asn_debug = 'Y') THEN

154: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
155: ) IS
156: BEGIN
157: -- Bug 12591134: Start
158: IF (g_asn_debug = 'Y') THEN
159: asn_debug.put_line('enter update_header');
160: END IF;
161:
162: IF NVL(p_header_record.header_record.test_flag, 'N') = 'Y' THEN

Line 159: asn_debug.put_line('enter update_header');

155: ) IS
156: BEGIN
157: -- Bug 12591134: Start
158: IF (g_asn_debug = 'Y') THEN
159: asn_debug.put_line('enter update_header');
160: END IF;
161:
162: IF NVL(p_header_record.header_record.test_flag, 'N') = 'Y' THEN
163: IF (p_header_record.header_record.receipt_num IS NOT NULL) THEN

Line 177: IF (g_asn_debug = 'Y') THEN

173: program_update_date = SYSDATE
174: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id
175: AND receipt_num IS NULL;
176:
177: IF (g_asn_debug = 'Y') THEN
178: asn_debug.put_line('Updated receipt_num in RSH');
179: END IF;
180: EXCEPTION
181: WHEN NO_DATA_FOUND THEN NULL;

Line 178: asn_debug.put_line('Updated receipt_num in RSH');

174: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id
175: AND receipt_num IS NULL;
176:
177: IF (g_asn_debug = 'Y') THEN
178: asn_debug.put_line('Updated receipt_num in RSH');
179: END IF;
180: EXCEPTION
181: WHEN NO_DATA_FOUND THEN NULL;
182: END;

Line 273: IF (g_asn_debug = 'Y') THEN

269: ) IS
270: BEGIN
271: x_progress := '000';
272:
273: IF (g_asn_debug = 'Y') THEN
274: asn_debug.put_line('enter internal order receiving line');
275: END IF;
276:
277: -- 1) derive ship to org info

Line 274: asn_debug.put_line('enter internal order receiving line');

270: BEGIN
271: x_progress := '000';
272:
273: IF (g_asn_debug = 'Y') THEN
274: asn_debug.put_line('enter internal order receiving line');
275: END IF;
276:
277: -- 1) derive ship to org info
278: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,

Line 284: IF (g_asn_debug = 'Y') THEN

280: x_header_record
281: );
282: x_progress := '002';
283:
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('x_progress ' || x_progress);
286: END IF;
287:
288: x_progress := '010';

Line 285: asn_debug.put_line('x_progress ' || x_progress);

281: );
282: x_progress := '002';
283:
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('x_progress ' || x_progress);
286: END IF;
287:
288: x_progress := '010';
289: -- 5) derive item info

Line 302: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);

298: x_progress := '035';
299: -- 12) derive routing header info
300: rcv_roi_transaction.derive_routing_header_info(x_cascaded_table, n);
301: x_progress := '070';
302: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
303: -- derive auto transact code
304: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
305: -- 13) bug 3379550
306: x_progress := '071';

Line 307: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);

303: -- derive auto transact code
304: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
305: -- 13) bug 3379550
306: x_progress := '071';
307: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
308: /* Bug 3684984.
309: * We are getting all the values we used to get in the foll. code
310: * in the cursor in derive_io_rcv_line_qty.
311: derive_io_shipment_info(x_cascaded_table, n);

Line 313: asn_debug.put_line('progress in Internal Orders rcv : before derive qty');

309: * We are getting all the values we used to get in the foll. code
310: * in the cursor in derive_io_rcv_line_qty.
311: derive_io_shipment_info(x_cascaded_table, n);
312: */
313: asn_debug.put_line('progress in Internal Orders rcv : before derive qty');
314: -- quantity > 0
315: derive_io_rcv_line_qty(x_cascaded_table,
316: n,
317: temp_cascaded_table

Line 328: asn_debug.put_line('progress in Internal Orders rcv : after derive_to_locator_id -> locator_id = ' || temp_cascaded_table(n).locator_id);

324: */
325: /* Bug3591830 - START */
326: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n);
327: temp_cascaded_table(n).locator_id := x_cascaded_table(n).locator_id;
328: asn_debug.put_line('progress in Internal Orders rcv : after derive_to_locator_id -> locator_id = ' || temp_cascaded_table(n).locator_id);
329: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status,
330: 'LOCATOR_ID',
331: FALSE
332: );

Line 343: IF (g_asn_debug = 'Y') THEN

339: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
340: x_header_record IN rcv_roi_preprocessor.header_rec_type
341: ) IS
342: BEGIN
343: IF (g_asn_debug = 'Y') THEN
344: asn_debug.put_line('enter derive_io_trans_line ');
345: END IF;
346:
347: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);

Line 344: asn_debug.put_line('enter derive_io_trans_line ');

340: x_header_record IN rcv_roi_preprocessor.header_rec_type
341: ) IS
342: BEGIN
343: IF (g_asn_debug = 'Y') THEN
344: asn_debug.put_line('enter derive_io_trans_line ');
345: END IF;
346:
347: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
348: /* Derive the to_org_id */

Line 355: IF (g_asn_debug = 'Y') THEN

351: x_header_record
352: );
353:
354: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
355: IF (g_asn_debug = 'Y') THEN
356: asn_debug.put_line('X_progress ' || x_progress);
357: END IF;
358:
359: SELECT muom.uom_code

Line 356: asn_debug.put_line('X_progress ' || x_progress);

352: );
353:
354: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
355: IF (g_asn_debug = 'Y') THEN
356: asn_debug.put_line('X_progress ' || x_progress);
357: END IF;
358:
359: SELECT muom.uom_code
360: INTO x_cascaded_table(n).uom_code

Line 364: IF (g_asn_debug = 'Y') THEN

360: INTO x_cascaded_table(n).uom_code
361: FROM mtl_units_of_measure muom
362: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
363: ELSE
364: IF (g_asn_debug = 'Y') THEN
365: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
366: END IF;
367: END IF;
368:

Line 365: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');

361: FROM mtl_units_of_measure muom
362: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
363: ELSE
364: IF (g_asn_debug = 'Y') THEN
365: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
366: END IF;
367: END IF;
368:
369: x_progress := '026';

Line 379: asn_debug.put_line('doing ship to location /locator derivations ');

375: /* Bug#4037821 - START */
376: /* Derive the locator_id even in case of deliver transactions */
377: IF (x_cascaded_table(n).transaction_type IN ('TRANSFER','DELIVER')) THEN
378: IF (x_cascaded_table(n).transaction_type = 'TRANSFER') THEN
379: asn_debug.put_line('doing ship to location /locator derivations ');
380: rcv_roi_transaction.derive_location_info(x_cascaded_table, n);
381: rcv_roi_transaction.derive_from_locator_id(x_cascaded_table, n); -- WMS Change
382: END IF;
383: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n); -- WMS Change

Line 388: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);

384: END IF;
385: /* Bug#4037821 - END */
386:
387: x_progress := '071';
388: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
389: derive_io_shipment_info(x_cascaded_table, n);
390: x_progress := '091';
391: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
392: /* Auto_transact_code is null for all these transaction types */

Line 407: IF (g_asn_debug = 'Y') THEN

403: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
404: x_header_record IN rcv_roi_preprocessor.header_rec_type
405: ) IS
406: BEGIN
407: IF (g_asn_debug = 'Y') THEN
408: asn_debug.put_line('enter derive_correction_line ');
409: END IF;
410:
411: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);

Line 408: asn_debug.put_line('enter derive_correction_line ');

404: x_header_record IN rcv_roi_preprocessor.header_rec_type
405: ) IS
406: BEGIN
407: IF (g_asn_debug = 'Y') THEN
408: asn_debug.put_line('enter derive_correction_line ');
409: END IF;
410:
411: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
412: /* Derive the to_org_id */

Line 419: IF (g_asn_debug = 'Y') THEN

415: x_header_record
416: );
417:
418: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line('x_progress ' || x_progress);
421: END IF;
422:
423: SELECT muom.uom_code

Line 420: asn_debug.put_line('x_progress ' || x_progress);

416: );
417:
418: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line('x_progress ' || x_progress);
421: END IF;
422:
423: SELECT muom.uom_code
424: INTO x_cascaded_table(n).uom_code

Line 428: IF (g_asn_debug = 'Y') THEN

424: INTO x_cascaded_table(n).uom_code
425: FROM mtl_units_of_measure muom
426: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
427: ELSE
428: IF (g_asn_debug = 'Y') THEN
429: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
430: END IF;
431: END IF;
432:

Line 429: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');

425: FROM mtl_units_of_measure muom
426: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
427: ELSE
428: IF (g_asn_debug = 'Y') THEN
429: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
430: END IF;
431: END IF;
432:
433: x_progress := '071';

Line 434: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);

430: END IF;
431: END IF;
432:
433: x_progress := '071';
434: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
435: derive_io_shipment_info(x_cascaded_table, n);
436: x_progress := '091';
437: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
438: /* Auto_transact_code is null for all these transaction types */

Line 531: IF (g_asn_debug = 'Y') THEN

527: ) IS
528: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
529: l_skip_validation NUMBER := 0; --Bug#6375015
530: BEGIN
531: IF (g_asn_debug = 'Y') THEN
532: asn_debug.put_line('Enter validate_io_receive_line');
533: END IF;
534:
535: x_progress := '000';

Line 532: asn_debug.put_line('Enter validate_io_receive_line');

528: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
529: l_skip_validation NUMBER := 0; --Bug#6375015
530: BEGIN
531: IF (g_asn_debug = 'Y') THEN
532: asn_debug.put_line('Enter validate_io_receive_line');
533: END IF;
534:
535: x_progress := '000';
536: rcv_roi_transaction.validate_shipment_source(x_cascaded_table, n); /* bug9705269 */

Line 575: IF (g_asn_debug = 'Y') THEN

571: from the parent transaction.
572: */
573: /* code fix for the Bug:6375015 starts */
574: IF (x_cascaded_table(n).deliver_to_person_id is null) THEN
575: IF (g_asn_debug = 'Y') THEN
576: asn_debug.put_line('Inside deliver_to_person_id is null...');
577: END IF;
578:
579: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

Line 576: asn_debug.put_line('Inside deliver_to_person_id is null...');

572: */
573: /* code fix for the Bug:6375015 starts */
574: IF (x_cascaded_table(n).deliver_to_person_id is null) THEN
575: IF (g_asn_debug = 'Y') THEN
576: asn_debug.put_line('Inside deliver_to_person_id is null...');
577: END IF;
578:
579: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
580: --In case of transaction_type DELIVER, we need parent transaction.

Line 584: IF (g_asn_debug = 'Y') THEN

580: --In case of transaction_type DELIVER, we need parent transaction.
581: --If this condition is not added, it will try to defalut the deliver_to_person
582: --of the parent transaction. But form is not behaving like that.
583: --So added this condition to default the deliver_to_person of the source document.
584: IF (g_asn_debug = 'Y') THEN
585: asn_debug.put_line('Transaction type is DELIVER...');
586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
587: END IF;
588: get_deliver_to_person_from_rsl(x_cascaded_table,n);

Line 585: asn_debug.put_line('Transaction type is DELIVER...');

581: --If this condition is not added, it will try to defalut the deliver_to_person
582: --of the parent transaction. But form is not behaving like that.
583: --So added this condition to default the deliver_to_person of the source document.
584: IF (g_asn_debug = 'Y') THEN
585: asn_debug.put_line('Transaction type is DELIVER...');
586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
587: END IF;
588: get_deliver_to_person_from_rsl(x_cascaded_table,n);
589: IF (g_asn_debug = 'Y') THEN

Line 586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');

582: --of the parent transaction. But form is not behaving like that.
583: --So added this condition to default the deliver_to_person of the source document.
584: IF (g_asn_debug = 'Y') THEN
585: asn_debug.put_line('Transaction type is DELIVER...');
586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
587: END IF;
588: get_deliver_to_person_from_rsl(x_cascaded_table,n);
589: IF (g_asn_debug = 'Y') THEN
590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

Line 589: IF (g_asn_debug = 'Y') THEN

585: asn_debug.put_line('Transaction type is DELIVER...');
586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
587: END IF;
588: get_deliver_to_person_from_rsl(x_cascaded_table,n);
589: IF (g_asn_debug = 'Y') THEN
590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
591: END IF;
592: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
593: IF (g_asn_debug = 'Y') THEN

Line 590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

586: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
587: END IF;
588: get_deliver_to_person_from_rsl(x_cascaded_table,n);
589: IF (g_asn_debug = 'Y') THEN
590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
591: END IF;
592: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
593: IF (g_asn_debug = 'Y') THEN
594: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

Line 593: IF (g_asn_debug = 'Y') THEN

589: IF (g_asn_debug = 'Y') THEN
590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
591: END IF;
592: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
593: IF (g_asn_debug = 'Y') THEN
594: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
595: END IF;
596: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
597: --We can safely skip the validate_deliver_to_person call

Line 594: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

590: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
591: END IF;
592: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
593: IF (g_asn_debug = 'Y') THEN
594: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
595: END IF;
596: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
597: --We can safely skip the validate_deliver_to_person call
598: l_skip_validation := 1;

Line 600: IF (g_asn_debug = 'Y') THEN

596: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
597: --We can safely skip the validate_deliver_to_person call
598: l_skip_validation := 1;
599: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
600: IF (g_asn_debug = 'Y') THEN
601: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
602: END IF;
603: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
604: IF (g_asn_debug = 'Y') THEN

Line 601: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);

597: --We can safely skip the validate_deliver_to_person call
598: l_skip_validation := 1;
599: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
600: IF (g_asn_debug = 'Y') THEN
601: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
602: END IF;
603: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);

Line 604: IF (g_asn_debug = 'Y') THEN

600: IF (g_asn_debug = 'Y') THEN
601: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
602: END IF;
603: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
606: END IF;
607: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
608: --We can safely skip the validate_deliver_to_person call

Line 605: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);

601: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
602: END IF;
603: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
606: END IF;
607: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
608: --We can safely skip the validate_deliver_to_person call
609: l_skip_validation := 1;

Line 611: IF (g_asn_debug = 'Y') THEN

607: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
608: --We can safely skip the validate_deliver_to_person call
609: l_skip_validation := 1;
610: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
611: IF (g_asn_debug = 'Y') THEN
612: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
613: END IF;
614: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
615: IF (g_asn_debug = 'Y') THEN

Line 612: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);

608: --We can safely skip the validate_deliver_to_person call
609: l_skip_validation := 1;
610: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
611: IF (g_asn_debug = 'Y') THEN
612: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
613: END IF;
614: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
615: IF (g_asn_debug = 'Y') THEN
616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');

Line 615: IF (g_asn_debug = 'Y') THEN

611: IF (g_asn_debug = 'Y') THEN
612: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
613: END IF;
614: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
615: IF (g_asn_debug = 'Y') THEN
616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
617: END IF;
618: get_deliver_to_person_from_rsl(x_cascaded_table,n);
619: IF (g_asn_debug = 'Y') THEN

Line 616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');

612: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
613: END IF;
614: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
615: IF (g_asn_debug = 'Y') THEN
616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
617: END IF;
618: get_deliver_to_person_from_rsl(x_cascaded_table,n);
619: IF (g_asn_debug = 'Y') THEN
620: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

Line 619: IF (g_asn_debug = 'Y') THEN

615: IF (g_asn_debug = 'Y') THEN
616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
617: END IF;
618: get_deliver_to_person_from_rsl(x_cascaded_table,n);
619: IF (g_asn_debug = 'Y') THEN
620: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
621: END IF;
622: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
623: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)

Line 620: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

616: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
617: END IF;
618: get_deliver_to_person_from_rsl(x_cascaded_table,n);
619: IF (g_asn_debug = 'Y') THEN
620: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
621: END IF;
622: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
623: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
624: IF (g_asn_debug = 'Y') THEN

Line 624: IF (g_asn_debug = 'Y') THEN

620: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
621: END IF;
622: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
623: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
624: IF (g_asn_debug = 'Y') THEN
625: asn_debug.put_line('Inside deliver_to_person_id is not null and the value is :'||x_cascaded_table(n).deliver_to_person_id);
626: END IF;
627:
628: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

Line 625: asn_debug.put_line('Inside deliver_to_person_id is not null and the value is :'||x_cascaded_table(n).deliver_to_person_id);

621: END IF;
622: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
623: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
624: IF (g_asn_debug = 'Y') THEN
625: asn_debug.put_line('Inside deliver_to_person_id is not null and the value is :'||x_cascaded_table(n).deliver_to_person_id);
626: END IF;
627:
628: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
629: --In forms user can select any active deliver_to_person for DELIVER transaction.

Line 634: IF (g_asn_debug = 'Y') THEN

630: --In case of transaction_type DELIVER, we need parent transaction.
631: --If this condition is not added, it will validate against the deliver_to_person mentioned
632: --the parent RECEIVE transaction. But form is not behaving like that.
633: --So, added this condition to skip deliver_to_person validation against parent txn
634: IF (g_asn_debug = 'Y') THEN
635: asn_debug.put_line('Transaction type is DELIVER...');
636: END IF;
637: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
638: IF (g_asn_debug = 'Y') THEN

Line 635: asn_debug.put_line('Transaction type is DELIVER...');

631: --If this condition is not added, it will validate against the deliver_to_person mentioned
632: --the parent RECEIVE transaction. But form is not behaving like that.
633: --So, added this condition to skip deliver_to_person validation against parent txn
634: IF (g_asn_debug = 'Y') THEN
635: asn_debug.put_line('Transaction type is DELIVER...');
636: END IF;
637: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
638: IF (g_asn_debug = 'Y') THEN
639: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

Line 638: IF (g_asn_debug = 'Y') THEN

634: IF (g_asn_debug = 'Y') THEN
635: asn_debug.put_line('Transaction type is DELIVER...');
636: END IF;
637: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
638: IF (g_asn_debug = 'Y') THEN
639: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
640: END IF;
641: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
642: --We can safely skip the validate_deliver_to_person call, validation against

Line 639: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

635: asn_debug.put_line('Transaction type is DELIVER...');
636: END IF;
637: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
638: IF (g_asn_debug = 'Y') THEN
639: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
640: END IF;
641: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
642: --We can safely skip the validate_deliver_to_person call, validation against
643: --parent transaction is handled here itself.

Line 646: IF (g_asn_debug = 'Y') THEN

642: --We can safely skip the validate_deliver_to_person call, validation against
643: --parent transaction is handled here itself.
644: l_skip_validation := 1;
645: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
646: IF (g_asn_debug = 'Y') THEN
647: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
648: END IF;
649: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
650: x_cascaded_table(n).deliver_to_person_id := null;

Line 647: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');

643: --parent transaction is handled here itself.
644: l_skip_validation := 1;
645: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
646: IF (g_asn_debug = 'Y') THEN
647: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
648: END IF;
649: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
650: x_cascaded_table(n).deliver_to_person_id := null;
651: x_cascaded_table(n).deliver_to_person_name := null;

Line 655: IF (g_asn_debug = 'Y') THEN

651: x_cascaded_table(n).deliver_to_person_name := null;
652:
653: --set the deliver_to_person_id to that of parent transaction
654: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
657: END IF;
658: END IF;
659: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN

Line 656: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');

652:
653: --set the deliver_to_person_id to that of parent transaction
654: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
657: END IF;
658: END IF;
659: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
660: IF (g_asn_debug = 'Y') THEN

Line 660: IF (g_asn_debug = 'Y') THEN

656: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
657: END IF;
658: END IF;
659: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
660: IF (g_asn_debug = 'Y') THEN
661: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
662: END IF;
663: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
664: --We can safely skip the validate_deliver_to_person call, validation against

Line 661: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);

657: END IF;
658: END IF;
659: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
660: IF (g_asn_debug = 'Y') THEN
661: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
662: END IF;
663: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
664: --We can safely skip the validate_deliver_to_person call, validation against
665: --parent transaction is handled here itself.

Line 668: IF (g_asn_debug = 'Y') THEN

664: --We can safely skip the validate_deliver_to_person call, validation against
665: --parent transaction is handled here itself.
666: l_skip_validation := 1;
667: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
670: END IF;
671: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
672: x_cascaded_table(n).deliver_to_person_id := null;

Line 669: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');

665: --parent transaction is handled here itself.
666: l_skip_validation := 1;
667: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
670: END IF;
671: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
672: x_cascaded_table(n).deliver_to_person_id := null;
673: x_cascaded_table(n).deliver_to_person_name := null;

Line 678: IF (g_asn_debug = 'Y') THEN

674:
675: --set the deliver_to_person_id to that of parent transaction
676: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
677:
678: IF (g_asn_debug = 'Y') THEN
679: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
680: END IF;
681: END IF;
682: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

Line 679: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');

675: --set the deliver_to_person_id to that of parent transaction
676: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
677:
678: IF (g_asn_debug = 'Y') THEN
679: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
680: END IF;
681: END IF;
682: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
683: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)

Line 686: IF (g_asn_debug = 'Y') THEN

682: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
683: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)
684:
685: IF l_skip_validation = 0 THEN
686: IF (g_asn_debug = 'Y') THEN
687: asn_debug.put_line('validate_deliver_to_person is called');
688: END IF;
689: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
690: IF (g_asn_debug = 'Y') THEN

Line 687: asn_debug.put_line('validate_deliver_to_person is called');

683: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)
684:
685: IF l_skip_validation = 0 THEN
686: IF (g_asn_debug = 'Y') THEN
687: asn_debug.put_line('validate_deliver_to_person is called');
688: END IF;
689: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
690: IF (g_asn_debug = 'Y') THEN
691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);

Line 690: IF (g_asn_debug = 'Y') THEN

686: IF (g_asn_debug = 'Y') THEN
687: asn_debug.put_line('validate_deliver_to_person is called');
688: END IF;
689: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
690: IF (g_asn_debug = 'Y') THEN
691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
692: END IF;
693: ELSE
694: IF (g_asn_debug = 'Y') THEN

Line 691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);

687: asn_debug.put_line('validate_deliver_to_person is called');
688: END IF;
689: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
690: IF (g_asn_debug = 'Y') THEN
691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
692: END IF;
693: ELSE
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('call to validate_deliver_to_person is skipped');

Line 694: IF (g_asn_debug = 'Y') THEN

690: IF (g_asn_debug = 'Y') THEN
691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
692: END IF;
693: ELSE
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('call to validate_deliver_to_person is skipped');
696: END IF;
697: END IF;/* code fix for the Bug:6375015 ends */
698:

Line 695: asn_debug.put_line('call to validate_deliver_to_person is skipped');

691: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
692: END IF;
693: ELSE
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('call to validate_deliver_to_person is skipped');
696: END IF;
697: END IF;/* code fix for the Bug:6375015 ends */
698:
699: rcv_roi_transaction.validate_routing_record(x_cascaded_table, n);

Line 854: IF (g_asn_debug = 'Y') THEN

850: l_shipment_header_id rcv_shipment_headers.shipment_header_id%TYPE; -- Bugfix 5201155
851: BEGIN
852: x_progress := '097';
853:
854: IF (g_asn_debug = 'Y') THEN
855: asn_debug.put_line('inside line qty calculation of int org rcv');
856: asn_debug.put_line('x_progress ' || x_progress);
857: END IF;
858:

Line 855: asn_debug.put_line('inside line qty calculation of int org rcv');

851: BEGIN
852: x_progress := '097';
853:
854: IF (g_asn_debug = 'Y') THEN
855: asn_debug.put_line('inside line qty calculation of int org rcv');
856: asn_debug.put_line('x_progress ' || x_progress);
857: END IF;
858:
859: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN

Line 856: asn_debug.put_line('x_progress ' || x_progress);

852: x_progress := '097';
853:
854: IF (g_asn_debug = 'Y') THEN
855: asn_debug.put_line('inside line qty calculation of int org rcv');
856: asn_debug.put_line('x_progress ' || x_progress);
857: END IF;
858:
859: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN
860: RETURN;

Line 864: IF (g_asn_debug = 'Y') THEN

860: RETURN;
861: END IF;
862:
863: IF x_cascaded_table(n).quantity <= 0 THEN --{
864: IF (g_asn_debug = 'Y') THEN
865: asn_debug.put_line('quantity is <= zero. cascade will fail');
866: END IF;
867:
868: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 865: asn_debug.put_line('quantity is <= zero. cascade will fail');

861: END IF;
862:
863: IF x_cascaded_table(n).quantity <= 0 THEN --{
864: IF (g_asn_debug = 'Y') THEN
865: asn_debug.put_line('quantity is <= zero. cascade will fail');
866: END IF;
867:
868: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
869: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

Line 876: IF (g_asn_debug = 'Y') THEN

872: END IF; --} end qty > 0 check
873:
874: x_progress := '098';
875:
876: IF (g_asn_debug = 'Y') THEN
877: asn_debug.put_line('x_progress ' || x_progress);
878: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
879: END IF;
880:

Line 877: asn_debug.put_line('x_progress ' || x_progress);

873:
874: x_progress := '098';
875:
876: IF (g_asn_debug = 'Y') THEN
877: asn_debug.put_line('x_progress ' || x_progress);
878: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
879: END IF;
880:
881: -- as long as shipment num or shipment header id is specified we can continue

Line 878: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);

874: x_progress := '098';
875:
876: IF (g_asn_debug = 'Y') THEN
877: asn_debug.put_line('x_progress ' || x_progress);
878: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
879: END IF;
880:
881: -- as long as shipment num or shipment header id is specified we can continue
882: IF ( x_cascaded_table(n).shipment_header_id IS NULL

Line 885: IF (g_asn_debug = 'Y') THEN

881: -- as long as shipment num or shipment header id is specified we can continue
882: IF ( x_cascaded_table(n).shipment_header_id IS NULL
883: AND x_cascaded_table(n).shipment_num IS NULL) THEN
884: -- error_status and error_message are set after validate_quantity_shipped
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('no shipment num/shipment header specified ');
887: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
888: END IF;
889:

Line 886: asn_debug.put_line('no shipment num/shipment header specified ');

882: IF ( x_cascaded_table(n).shipment_header_id IS NULL
883: AND x_cascaded_table(n).shipment_num IS NULL) THEN
884: -- error_status and error_message are set after validate_quantity_shipped
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('no shipment num/shipment header specified ');
887: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
888: END IF;
889:
890: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 887: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);

883: AND x_cascaded_table(n).shipment_num IS NULL) THEN
884: -- error_status and error_message are set after validate_quantity_shipped
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('no shipment num/shipment header specified ');
887: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
888: END IF;
889:
890: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
891: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);

Line 898: IF (g_asn_debug = 'Y') THEN

894: END IF; -- } of (asn quantity_shipped was valid)
895:
896: -- copy record from main table to temp table
897:
898: IF (g_asn_debug = 'Y') THEN
899: asn_debug.put_line('copy record from main table to temp table');
900: END IF;
901:
902: current_n := 1;

Line 899: asn_debug.put_line('copy record from main table to temp table');

895:
896: -- copy record from main table to temp table
897:
898: IF (g_asn_debug = 'Y') THEN
899: asn_debug.put_line('copy record from main table to temp table');
900: END IF;
901:
902: current_n := 1;
903: temp_cascaded_table(current_n) := x_cascaded_table(n);

Line 908: IF (g_asn_debug = 'Y') THEN

904:
905: -- Bugfix 5201155
906: IF ( x_cascaded_table(n).shipment_header_id IS NULL
907: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
910: END IF;
911:
912: /* Bug:6313315

Line 909: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );

905: -- Bugfix 5201155
906: IF ( x_cascaded_table(n).shipment_header_id IS NULL
907: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
910: END IF;
911:
912: /* Bug:6313315
913: Added where clause condition rsh.receipt_source_code = 'INTERNAL ORDER'.

Line 928: IF (g_asn_debug = 'Y') THEN

924: AND rsl.to_organization_id = NVL(temp_cascaded_table(current_n).to_organization_id, to_organization_id)
925: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
926: AND rsh.receipt_source_code = 'INTERNAL ORDER';--Bug: 6313315
927:
928: IF (g_asn_debug = 'Y') THEN
929: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
930: END IF;
931: EXCEPTION
932: WHEN NO_DATA_FOUND

Line 929: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );

925: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
926: AND rsh.receipt_source_code = 'INTERNAL ORDER';--Bug: 6313315
927:
928: IF (g_asn_debug = 'Y') THEN
929: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
930: END IF;
931: EXCEPTION
932: WHEN NO_DATA_FOUND
933: THEN

Line 939: IF (g_asn_debug = 'Y') THEN

935: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);
936: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
937: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
938:
939: IF (g_asn_debug = 'Y') THEN
940: asn_debug.put_line(TO_CHAR(n));
941: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
942: asn_debug.put_line('error ' || x_progress);
943: END IF;

Line 940: asn_debug.put_line(TO_CHAR(n));

936: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
937: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
938:
939: IF (g_asn_debug = 'Y') THEN
940: asn_debug.put_line(TO_CHAR(n));
941: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
942: asn_debug.put_line('error ' || x_progress);
943: END IF;
944: WHEN OTHERS

Line 941: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );

937: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
938:
939: IF (g_asn_debug = 'Y') THEN
940: asn_debug.put_line(TO_CHAR(n));
941: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
942: asn_debug.put_line('error ' || x_progress);
943: END IF;
944: WHEN OTHERS
945: THEN

Line 942: asn_debug.put_line('error ' || x_progress);

938:
939: IF (g_asn_debug = 'Y') THEN
940: asn_debug.put_line(TO_CHAR(n));
941: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
942: asn_debug.put_line('error ' || x_progress);
943: END IF;
944: WHEN OTHERS
945: THEN
946: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;

Line 951: IF (g_asn_debug = 'Y') THEN

947: rcv_error_pkg.set_sql_error_message('derive_int_org_rcv_line_qty', x_progress);
948: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
949: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
950:
951: IF (g_asn_debug = 'Y') THEN
952: asn_debug.put_line(TO_CHAR(n));
953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
954: asn_debug.put_line(sqlerrm);
955: asn_debug.put_line('error ' || x_progress);

Line 952: asn_debug.put_line(TO_CHAR(n));

948: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
949: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
950:
951: IF (g_asn_debug = 'Y') THEN
952: asn_debug.put_line(TO_CHAR(n));
953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
954: asn_debug.put_line(sqlerrm);
955: asn_debug.put_line('error ' || x_progress);
956: END IF;

Line 953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );

949: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
950:
951: IF (g_asn_debug = 'Y') THEN
952: asn_debug.put_line(TO_CHAR(n));
953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
954: asn_debug.put_line(sqlerrm);
955: asn_debug.put_line('error ' || x_progress);
956: END IF;
957: END;

Line 954: asn_debug.put_line(sqlerrm);

950:
951: IF (g_asn_debug = 'Y') THEN
952: asn_debug.put_line(TO_CHAR(n));
953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
954: asn_debug.put_line(sqlerrm);
955: asn_debug.put_line('error ' || x_progress);
956: END IF;
957: END;
958: ELSE

Line 955: asn_debug.put_line('error ' || x_progress);

951: IF (g_asn_debug = 'Y') THEN
952: asn_debug.put_line(TO_CHAR(n));
953: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
954: asn_debug.put_line(sqlerrm);
955: asn_debug.put_line('error ' || x_progress);
956: END IF;
957: END;
958: ELSE
959: l_shipment_header_id := temp_cascaded_table(current_n).shipment_header_id;

Line 964: IF (g_asn_debug = 'Y') THEN

960: END IF; -- } deriving shipment_header_id if it NULL from shipment_num
961: -- End of code for Bugfix 5201155
962:
963: -- get all rows which meet this condition
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('get all rows which meet this condition');
966: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
968: END IF;

Line 965: asn_debug.put_line('get all rows which meet this condition');

961: -- End of code for Bugfix 5201155
962:
963: -- get all rows which meet this condition
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('get all rows which meet this condition');
966: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
968: END IF;
969:

Line 966: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);

962:
963: -- get all rows which meet this condition
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('get all rows which meet this condition');
966: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
968: END IF;
969:
970: --{ open the cursors

Line 967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);

963: -- get all rows which meet this condition
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('get all rows which meet this condition');
966: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
968: END IF;
969:
970: --{ open the cursors
971: IF (g_asn_debug = 'Y') THEN

Line 971: IF (g_asn_debug = 'Y') THEN

967: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
968: END IF;
969:
970: --{ open the cursors
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));

Line 972: asn_debug.put_line('open shipment records');

968: END IF;
969:
970: --{ open the cursors
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));

Line 973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));

969:
970: --{ open the cursors
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));

Line 974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));

970: --{ open the cursors
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257

Line 975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));

971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257
979: asn_debug.put_line('proceed to open cursor');

Line 976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));

972: asn_debug.put_line('open shipment records');
973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257
979: asn_debug.put_line('proceed to open cursor');
980: END IF;

Line 977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));

973: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257
979: asn_debug.put_line('proceed to open cursor');
980: END IF;
981:

Line 978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257

974: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257
979: asn_debug.put_line('proceed to open cursor');
980: END IF;
981:
982: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201155

Line 979: asn_debug.put_line('proceed to open cursor');

975: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
976: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
977: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
978: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 8374257
979: asn_debug.put_line('proceed to open cursor');
980: END IF;
981:
982: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201155
983: -- temp_cascaded_table(current_n).shipment_num, -- Bugfix 5201155

Line 1006: IF (g_asn_debug = 'Y') THEN

1002:
1003: -- }
1004:
1005: -- assign shipped quantity to remaining quantity
1006: IF (g_asn_debug = 'Y') THEN
1007: asn_debug.put_line('assign shipped quantity to remaining quantity');
1008: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
1009: END IF;
1010:

Line 1007: asn_debug.put_line('assign shipped quantity to remaining quantity');

1003: -- }
1004:
1005: -- assign shipped quantity to remaining quantity
1006: IF (g_asn_debug = 'Y') THEN
1007: asn_debug.put_line('assign shipped quantity to remaining quantity');
1008: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
1009: END IF;
1010:
1011: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

Line 1008: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));

1004:
1005: -- assign shipped quantity to remaining quantity
1006: IF (g_asn_debug = 'Y') THEN
1007: asn_debug.put_line('assign shipped quantity to remaining quantity');
1008: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
1009: END IF;
1010:
1011: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1012: x_remaining_qty_po_uom := 0;

Line 1014: IF (g_asn_debug = 'Y') THEN

1010:
1011: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1012: x_remaining_qty_po_uom := 0;
1013:
1014: IF (g_asn_debug = 'Y') THEN
1015: asn_debug.put_line('have assigned the quantity');
1016: END IF;
1017:
1018: -- calculate tax_amount_factor for calculating tax_amount for

Line 1015: asn_debug.put_line('have assigned the quantity');

1011: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1012: x_remaining_qty_po_uom := 0;
1013:
1014: IF (g_asn_debug = 'Y') THEN
1015: asn_debug.put_line('have assigned the quantity');
1016: END IF;
1017:
1018: -- calculate tax_amount_factor for calculating tax_amount for
1019: -- each cascaded line

Line 1027: IF (g_asn_debug = 'Y') THEN

1023: ELSE
1024: tax_amount_factor := 0;
1025: END IF;
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
1029: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
1030: END IF;
1031:

Line 1028: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));

1024: tax_amount_factor := 0;
1025: END IF;
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
1029: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
1030: END IF;
1031:
1032: x_first_trans := TRUE;

Line 1029: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));

1025: END IF;
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
1029: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
1030: END IF;
1031:
1032: x_first_trans := TRUE;
1033: transaction_ok := FALSE;

Line 1040: IF (g_asn_debug = 'Y') THEN

1036: */
1037: FETCH count_shipments INTO x_countshipmentrec;
1038: x_record_count := x_countshipmentrec.line_count;
1039:
1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('before starting cascade');
1042: END IF;
1043:
1044: IF (g_asn_debug = 'Y') THEN

Line 1041: asn_debug.put_line('before starting cascade');

1037: FETCH count_shipments INTO x_countshipmentrec;
1038: x_record_count := x_countshipmentrec.line_count;
1039:
1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('before starting cascade');
1042: END IF;
1043:
1044: IF (g_asn_debug = 'Y') THEN
1045: asn_debug.put_line('record count = ' || x_record_count);

Line 1044: IF (g_asn_debug = 'Y') THEN

1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('before starting cascade');
1042: END IF;
1043:
1044: IF (g_asn_debug = 'Y') THEN
1045: asn_debug.put_line('record count = ' || x_record_count);
1046: END IF;
1047:
1048: LOOP --{ over the count of shipment records obtained

Line 1045: asn_debug.put_line('record count = ' || x_record_count);

1041: asn_debug.put_line('before starting cascade');
1042: END IF;
1043:
1044: IF (g_asn_debug = 'Y') THEN
1045: asn_debug.put_line('record count = ' || x_record_count);
1046: END IF;
1047:
1048: LOOP --{ over the count of shipment records obtained
1049: IF (g_asn_debug = 'Y') THEN

Line 1049: IF (g_asn_debug = 'Y') THEN

1045: asn_debug.put_line('record count = ' || x_record_count);
1046: END IF;
1047:
1048: LOOP --{ over the count of shipment records obtained
1049: IF (g_asn_debug = 'Y') THEN
1050: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1051: END IF;
1052:
1053: IF (g_asn_debug = 'Y') THEN

Line 1050: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));

1046: END IF;
1047:
1048: LOOP --{ over the count of shipment records obtained
1049: IF (g_asn_debug = 'Y') THEN
1050: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1051: END IF;
1052:
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('open shipments and fetch');

Line 1053: IF (g_asn_debug = 'Y') THEN

1049: IF (g_asn_debug = 'Y') THEN
1050: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1051: END IF;
1052:
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('open shipments and fetch');
1055: END IF;
1056:
1057: /*

Line 1054: asn_debug.put_line('open shipments and fetch');

1050: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1051: END IF;
1052:
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('open shipments and fetch');
1055: END IF;
1056:
1057: /*
1058: ** fetch the cursor

Line 1061: IF (g_asn_debug = 'Y') THEN

1057: /*
1058: ** fetch the cursor
1059: */
1060: --{
1061: IF (g_asn_debug = 'Y') THEN
1062: asn_debug.put_line('fetching shipments cursor');
1063: END IF;
1064:
1065: FETCH shipments INTO x_shipmentrec;

Line 1062: asn_debug.put_line('fetching shipments cursor');

1058: ** fetch the cursor
1059: */
1060: --{
1061: IF (g_asn_debug = 'Y') THEN
1062: asn_debug.put_line('fetching shipments cursor');
1063: END IF;
1064:
1065: FETCH shipments INTO x_shipmentrec;
1066:

Line 1076: IF (g_asn_debug = 'Y') THEN

1072: END IF;
1073:
1074: rows_fetched := shipments%ROWCOUNT;
1075:
1076: IF (g_asn_debug = 'Y') THEN
1077: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
1078: END IF;
1079:
1080: -- }

Line 1077: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));

1073:
1074: rows_fetched := shipments%ROWCOUNT;
1075:
1076: IF (g_asn_debug = 'Y') THEN
1077: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
1078: END IF;
1079:
1080: -- }
1081:

Line 1085: IF (g_asn_debug = 'Y') THEN

1081:
1082:
1083: IF ( lastrecord
1084: OR x_remaining_quantity <= 0) THEN --{
1085: IF (g_asn_debug = 'Y') THEN
1086: asn_debug.put_line('hit exit condition');
1087: END IF;
1088:
1089: IF NOT x_first_trans THEN

Line 1086: asn_debug.put_line('hit exit condition');

1082:
1083: IF ( lastrecord
1084: OR x_remaining_quantity <= 0) THEN --{
1085: IF (g_asn_debug = 'Y') THEN
1086: asn_debug.put_line('hit exit condition');
1087: END IF;
1088:
1089: IF NOT x_first_trans THEN
1090: -- x_first_trans has been reset which means some cascade has

Line 1096: IF (g_asn_debug = 'Y') THEN

1092: current_n := current_n - 1;
1093: END IF;
1094:
1095: -- do the tolerance act here
1096: IF (g_asn_debug = 'Y') THEN
1097: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1098: asn_debug.put_line('check which condition has occured');
1099: END IF;
1100:

Line 1097: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));

1093: END IF;
1094:
1095: -- do the tolerance act here
1096: IF (g_asn_debug = 'Y') THEN
1097: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1098: asn_debug.put_line('check which condition has occured');
1099: END IF;
1100:
1101: -- lastrecord...we have run out of rows and we still have quantity to allocate

Line 1098: asn_debug.put_line('check which condition has occured');

1094:
1095: -- do the tolerance act here
1096: IF (g_asn_debug = 'Y') THEN
1097: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1098: asn_debug.put_line('check which condition has occured');
1099: END IF;
1100:
1101: -- lastrecord...we have run out of rows and we still have quantity to allocate
1102: IF x_remaining_quantity > 0 THEN --{

Line 1103: IF (g_asn_debug = 'Y') THEN

1099: END IF;
1100:
1101: -- lastrecord...we have run out of rows and we still have quantity to allocate
1102: IF x_remaining_quantity > 0 THEN --{
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line('There is quantity remaining');
1105: asn_debug.put_line('Need to check qty tolerances');
1106: END IF;
1107:

Line 1104: asn_debug.put_line('There is quantity remaining');

1100:
1101: -- lastrecord...we have run out of rows and we still have quantity to allocate
1102: IF x_remaining_quantity > 0 THEN --{
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line('There is quantity remaining');
1105: asn_debug.put_line('Need to check qty tolerances');
1106: END IF;
1107:
1108: IF rows_fetched > 0

Line 1105: asn_debug.put_line('Need to check qty tolerances');

1101: -- lastrecord...we have run out of rows and we still have quantity to allocate
1102: IF x_remaining_quantity > 0 THEN --{
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line('There is quantity remaining');
1105: asn_debug.put_line('Need to check qty tolerances');
1106: END IF;
1107:
1108: IF rows_fetched > 0
1109: AND NOT x_first_trans THEN --{

Line 1110: IF (g_asn_debug = 'Y') THEN

1106: END IF;
1107:
1108: IF rows_fetched > 0
1109: AND NOT x_first_trans THEN --{
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1112: END IF;
1113:
1114: IF (g_asn_debug = 'Y') THEN

Line 1111: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));

1107:
1108: IF rows_fetched > 0
1109: AND NOT x_first_trans THEN --{
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1112: END IF;
1113:
1114: IF (g_asn_debug = 'Y') THEN
1115: asn_debug.put_line('delete the temp table ');

Line 1114: IF (g_asn_debug = 'Y') THEN

1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1112: END IF;
1113:
1114: IF (g_asn_debug = 'Y') THEN
1115: asn_debug.put_line('delete the temp table ');
1116: END IF;
1117:
1118: IF temp_cascaded_table.COUNT > 0 THEN

Line 1115: asn_debug.put_line('delete the temp table ');

1111: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1112: END IF;
1113:
1114: IF (g_asn_debug = 'Y') THEN
1115: asn_debug.put_line('delete the temp table ');
1116: END IF;
1117:
1118: IF temp_cascaded_table.COUNT > 0 THEN
1119: FOR i IN 1 .. temp_cascaded_table.COUNT LOOP

Line 1124: IF (g_asn_debug = 'Y') THEN

1120: temp_cascaded_table.DELETE(i);
1121: END LOOP;
1122: END IF;
1123:
1124: IF (g_asn_debug = 'Y') THEN
1125: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
1126: END IF;
1127:
1128: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 1125: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');

1121: END LOOP;
1122: END IF;
1123:
1124: IF (g_asn_debug = 'Y') THEN
1125: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
1126: END IF;
1127:
1128: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1129: rcv_error_pkg.set_error_message('RCV_SHIP_QTY_OVER_TOLERANCE', x_cascaded_table(n).error_message);

Line 1135: IF (g_asn_debug = 'Y') THEN

1131: rcv_error_pkg.set_token('QTY_B', x_cascaded_table(n).quantity - x_remaining_quantity);
1132: rcv_error_pkg.log_interface_error('QUANTITY');
1133: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1134: IF rows_fetched = 0 THEN
1135: IF (g_asn_debug = 'Y') THEN
1136: asn_debug.put_line('No rows were retrieved from cursor.');
1137: END IF;
1138: ELSIF x_first_trans THEN
1139: IF (g_asn_debug = 'Y') THEN

Line 1136: asn_debug.put_line('No rows were retrieved from cursor.');

1132: rcv_error_pkg.log_interface_error('QUANTITY');
1133: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1134: IF rows_fetched = 0 THEN
1135: IF (g_asn_debug = 'Y') THEN
1136: asn_debug.put_line('No rows were retrieved from cursor.');
1137: END IF;
1138: ELSIF x_first_trans THEN
1139: IF (g_asn_debug = 'Y') THEN
1140: asn_debug.put_line('No rows were cascaded');

Line 1139: IF (g_asn_debug = 'Y') THEN

1135: IF (g_asn_debug = 'Y') THEN
1136: asn_debug.put_line('No rows were retrieved from cursor.');
1137: END IF;
1138: ELSIF x_first_trans THEN
1139: IF (g_asn_debug = 'Y') THEN
1140: asn_debug.put_line('No rows were cascaded');
1141: END IF;
1142: END IF;
1143:

Line 1140: asn_debug.put_line('No rows were cascaded');

1136: asn_debug.put_line('No rows were retrieved from cursor.');
1137: END IF;
1138: ELSIF x_first_trans THEN
1139: IF (g_asn_debug = 'Y') THEN
1140: asn_debug.put_line('No rows were cascaded');
1141: END IF;
1142: END IF;
1143:
1144: -- 1) should we check to see why no rows were fetched ??

Line 1164: IF (g_asn_debug = 'Y') THEN

1160: -- all the rows in the temp cascaded table
1161: -- will be deleted
1162: -- as we cannot over/under receive against a inter-org transfer receive
1163: ELSE -- }{
1164: IF (g_asn_debug = 'Y') THEN
1165: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1166: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1167: END IF;
1168: END IF; --} ends the check for whether last record has been reached

Line 1165: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));

1161: -- will be deleted
1162: -- as we cannot over/under receive against a inter-org transfer receive
1163: ELSE -- }{
1164: IF (g_asn_debug = 'Y') THEN
1165: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1166: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1167: END IF;
1168: END IF; --} ends the check for whether last record has been reached
1169:

Line 1166: asn_debug.put_line('Return the cascaded rows back to the calling procedure');

1162: -- as we cannot over/under receive against a inter-org transfer receive
1163: ELSE -- }{
1164: IF (g_asn_debug = 'Y') THEN
1165: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1166: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1167: END IF;
1168: END IF; --} ends the check for whether last record has been reached
1169:
1170: -- close cursors

Line 1172: IF (g_asn_debug = 'Y') THEN

1168: END IF; --} ends the check for whether last record has been reached
1169:
1170: -- close cursors
1171:
1172: IF (g_asn_debug = 'Y') THEN
1173: asn_debug.put_line('close cursors shipments, count_shipments');
1174: END IF;
1175:
1176: IF shipments%ISOPEN THEN

Line 1173: asn_debug.put_line('close cursors shipments, count_shipments');

1169:
1170: -- close cursors
1171:
1172: IF (g_asn_debug = 'Y') THEN
1173: asn_debug.put_line('close cursors shipments, count_shipments');
1174: END IF;
1175:
1176: IF shipments%ISOPEN THEN
1177: CLOSE shipments;

Line 1189: IF (g_asn_debug = 'Y') THEN

1185: END IF; --} matches lastrecord or x_remaining_quantity <= 0
1186:
1187: -- eliminate the row if it fails the date check
1188:
1189: IF (g_asn_debug = 'Y') THEN
1190: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1191: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1192: asn_debug.put_line('int org rcv : calling get available qty');
1193: END IF;

Line 1190: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));

1186:
1187: -- eliminate the row if it fails the date check
1188:
1189: IF (g_asn_debug = 'Y') THEN
1190: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1191: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1192: asn_debug.put_line('int org rcv : calling get available qty');
1193: END IF;
1194:

Line 1191: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));

1187: -- eliminate the row if it fails the date check
1188:
1189: IF (g_asn_debug = 'Y') THEN
1190: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1191: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1192: asn_debug.put_line('int org rcv : calling get available qty');
1193: END IF;
1194:
1195: -- removed rcv_transactions_interface_sv.check_date_tolerance;

Line 1192: asn_debug.put_line('int org rcv : calling get available qty');

1188:
1189: IF (g_asn_debug = 'Y') THEN
1190: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1191: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1192: asn_debug.put_line('int org rcv : calling get available qty');
1193: END IF;
1194:
1195: -- removed rcv_transactions_interface_sv.check_date_tolerance;
1196: -- removed check shipto_location enforcement

Line 1218: IF (g_asn_debug = 'Y') THEN

1214: ** that is available for allocation by this interface transaction
1215: ** the available qty can only be found from rsl
1216: ** the else condition should never arise : confirm from priya ??
1217: */
1218: IF (g_asn_debug = 'Y') THEN
1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));

Line 1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));

1215: ** the available qty can only be found from rsl
1216: ** the else condition should never arise : confirm from priya ??
1217: */
1218: IF (g_asn_debug = 'Y') THEN
1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);

Line 1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);

1216: ** the else condition should never arise : confirm from priya ??
1217: */
1218: IF (g_asn_debug = 'Y') THEN
1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1224: END IF;

Line 1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));

1217: */
1218: IF (g_asn_debug = 'Y') THEN
1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1224: END IF;
1225:

Line 1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));

1218: IF (g_asn_debug = 'Y') THEN
1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1224: END IF;
1225:
1226: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'

Line 1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);

1219: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1220: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1221: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1222: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1223: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1224: END IF;
1225:
1226: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'
1227: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') IN('RECEIVE', 'DELIVER')) THEN --{

Line 1261: IF (g_asn_debug = 'Y') THEN

1257: END LOOP;
1258: END IF;
1259: END IF; --}
1260:
1261: IF (g_asn_debug = 'Y') THEN
1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

Line 1262: asn_debug.put_line('after call to get_available quantity');

1258: END IF;
1259: END IF; --}
1260:
1261: IF (g_asn_debug = 'Y') THEN
1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);

Line 1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));

1259: END IF; --}
1260:
1261: IF (g_asn_debug = 'Y') THEN
1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1267: END IF;

Line 1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));

1260:
1261: IF (g_asn_debug = 'Y') THEN
1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1267: END IF;
1268:

Line 1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

1261: IF (g_asn_debug = 'Y') THEN
1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1267: END IF;
1268:
1269: -- if qty has already been allocated then reduce available and tolerable

Line 1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);

1262: asn_debug.put_line('after call to get_available quantity');
1263: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1264: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1265: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1266: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1267: END IF;
1268:
1269: -- if qty has already been allocated then reduce available and tolerable
1270: -- qty by the allocated amount

Line 1284: IF (g_asn_debug = 'Y') THEN

1280: IF x_tolerable_qty < 0 THEN
1281: x_tolerable_qty := 0;
1282: END IF;
1283:
1284: IF (g_asn_debug = 'Y') THEN
1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));

Line 1285: asn_debug.put_line('have some allocated quantity. will reduce qty');

1281: x_tolerable_qty := 0;
1282: END IF;
1283:
1284: IF (g_asn_debug = 'Y') THEN
1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));

Line 1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));

1282: END IF;
1283:
1284: IF (g_asn_debug = 'Y') THEN
1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

Line 1287: asn_debug.put_line('after reducing by allocated qty');

1283:
1284: IF (g_asn_debug = 'Y') THEN
1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1291: END IF;

Line 1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));

1284: IF (g_asn_debug = 'Y') THEN
1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1291: END IF;
1292: END IF; --}

Line 1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));

1285: asn_debug.put_line('have some allocated quantity. will reduce qty');
1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1291: END IF;
1292: END IF; --}
1293: -- we can use the first record since the item_id and uom are not going to change

Line 1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

1286: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1287: asn_debug.put_line('after reducing by allocated qty');
1288: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1289: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1290: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1291: END IF;
1292: END IF; --}
1293: -- we can use the first record since the item_id and uom are not going to change
1294: -- check that we can convert between asn-> po uom

Line 1307: IF (g_asn_debug = 'Y') THEN

1303: x_shipmentrec.unit_of_measure
1304: );
1305:
1306: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1307: IF (g_asn_debug = 'Y') THEN
1308: asn_debug.put_line('need an error message in the interface tables');
1309: asn_debug.put_line('cannot interconvert between diff uoms');
1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {

Line 1308: asn_debug.put_line('need an error message in the interface tables');

1304: );
1305:
1306: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1307: IF (g_asn_debug = 'Y') THEN
1308: asn_debug.put_line('need an error message in the interface tables');
1309: asn_debug.put_line('cannot interconvert between diff uoms');
1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN

Line 1309: asn_debug.put_line('cannot interconvert between diff uoms');

1305:
1306: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1307: IF (g_asn_debug = 'Y') THEN
1308: asn_debug.put_line('need an error message in the interface tables');
1309: asn_debug.put_line('cannot interconvert between diff uoms');
1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));

Line 1312: IF (g_asn_debug = 'Y') THEN

1308: asn_debug.put_line('need an error message in the interface tables');
1309: asn_debug.put_line('cannot interconvert between diff uoms');
1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));

Line 1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));

1309: asn_debug.put_line('cannot interconvert between diff uoms');
1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1317: END IF;

Line 1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));

1310: END IF;
1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1317: END IF;
1318:

Line 1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);

1311: ELSE -- we have converted the qty between uoms succesfully } {
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1317: END IF;
1318:
1319: IF x_converted_trx_qty > 0 THEN --{

Line 1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));

1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1314: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1315: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1316: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1317: END IF;
1318:
1319: IF x_converted_trx_qty > 0 THEN --{
1320: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {

Line 1321: IF (g_asn_debug = 'Y') THEN

1317: END IF;
1318:
1319: IF x_converted_trx_qty > 0 THEN --{
1320: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
1321: IF (g_asn_debug = 'Y') THEN
1322: asn_debug.put_line('total qty available to be received is less than remaining qty');
1323: END IF;
1324:
1325: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;

Line 1322: asn_debug.put_line('total qty available to be received is less than remaining qty');

1318:
1319: IF x_converted_trx_qty > 0 THEN --{
1320: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
1321: IF (g_asn_debug = 'Y') THEN
1322: asn_debug.put_line('total qty available to be received is less than remaining qty');
1323: END IF;
1324:
1325: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;
1326: -- change rsl uom qty to uom of first line in cascaded table so both qtys are in sync

Line 1342: IF (g_asn_debug = 'Y') THEN

1338: END IF;
1339: -- Bug 13744041: End
1340: insert_into_table := TRUE;
1341: ELSE --} {
1342: IF (g_asn_debug = 'Y') THEN
1343: asn_debug.put_line('total qty available to be received is > remaining qty ');
1344: END IF;
1345:
1346: x_converted_trx_qty := x_remaining_qty_rsl_uom;

Line 1343: asn_debug.put_line('total qty available to be received is > remaining qty ');

1339: -- Bug 13744041: End
1340: insert_into_table := TRUE;
1341: ELSE --} {
1342: IF (g_asn_debug = 'Y') THEN
1343: asn_debug.put_line('total qty available to be received is > remaining qty ');
1344: END IF;
1345:
1346: x_converted_trx_qty := x_remaining_qty_rsl_uom;
1347: insert_into_table := TRUE;

Line 1354: IF (g_asn_debug = 'Y') THEN

1350: END IF; --}
1351: ELSE -- no qty for this record but if last row we need it } {
1352: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
1353: -- so that the row can be used based on qty tolerance checks
1354: IF (g_asn_debug = 'Y') THEN
1355: asn_debug.put_line('quantity is less then 0 but last record');
1356: END IF;
1357:
1358: insert_into_table := TRUE;

Line 1355: asn_debug.put_line('quantity is less then 0 but last record');

1351: ELSE -- no qty for this record but if last row we need it } {
1352: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
1353: -- so that the row can be used based on qty tolerance checks
1354: IF (g_asn_debug = 'Y') THEN
1355: asn_debug.put_line('quantity is less then 0 but last record');
1356: END IF;
1357:
1358: insert_into_table := TRUE;
1359: x_converted_trx_qty := 0;

Line 1361: IF (g_asn_debug = 'Y') THEN

1357:
1358: insert_into_table := TRUE;
1359: x_converted_trx_qty := 0;
1360: ELSE --} {
1361: IF (g_asn_debug = 'Y') THEN
1362: asn_debug.put_line('<= 0 quantity but more records in cursor');
1363: END IF;
1364:
1365: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

Line 1362: asn_debug.put_line('<= 0 quantity but more records in cursor');

1358: insert_into_table := TRUE;
1359: x_converted_trx_qty := 0;
1360: ELSE --} {
1361: IF (g_asn_debug = 'Y') THEN
1362: asn_debug.put_line('<= 0 quantity but more records in cursor');
1363: END IF;
1364:
1365: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1366:

Line 1367: IF (g_asn_debug = 'Y') THEN

1363: END IF;
1364:
1365: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1366:
1367: IF (g_asn_debug = 'Y') THEN
1368: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
1369: END IF;
1370:
1371: insert_into_table := FALSE;

Line 1368: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');

1364:
1365: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1366:
1367: IF (g_asn_debug = 'Y') THEN
1368: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
1369: END IF;
1370:
1371: insert_into_table := FALSE;
1372: END IF; --}

Line 1378: IF (g_asn_debug = 'Y') THEN

1374: END IF; --} remaining_qty_po_uom <> 0
1375:
1376: IF insert_into_table THEN --{
1377: IF (x_first_trans) THEN --{
1378: IF (g_asn_debug = 'Y') THEN
1379: asn_debug.put_line('first time ' || TO_CHAR(current_n));
1380: END IF;
1381:
1382: x_first_trans := FALSE;

Line 1379: asn_debug.put_line('first time ' || TO_CHAR(current_n));

1375:
1376: IF insert_into_table THEN --{
1377: IF (x_first_trans) THEN --{
1378: IF (g_asn_debug = 'Y') THEN
1379: asn_debug.put_line('first time ' || TO_CHAR(current_n));
1380: END IF;
1381:
1382: x_first_trans := FALSE;
1383: ELSE --} { not x_first_trans

Line 1384: IF (g_asn_debug = 'Y') THEN

1380: END IF;
1381:
1382: x_first_trans := FALSE;
1383: ELSE --} { not x_first_trans
1384: IF (g_asn_debug = 'Y') THEN
1385: asn_debug.put_line('next time ' || TO_CHAR(current_n));
1386: END IF;
1387:
1388: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

Line 1385: asn_debug.put_line('next time ' || TO_CHAR(current_n));

1381:
1382: x_first_trans := FALSE;
1383: ELSE --} { not x_first_trans
1384: IF (g_asn_debug = 'Y') THEN
1385: asn_debug.put_line('next time ' || TO_CHAR(current_n));
1386: END IF;
1387:
1388: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
1389: END IF; --} matches x_first_transfer

Line 1407: IF (g_asn_debug = 'Y') THEN

1403: ELSE
1404: temp_cascaded_table(current_n).quantity := round (x_converted_trx_qty,5); -- Bug 13744041
1405: END IF;
1406:
1407: IF (g_asn_debug = 'Y') THEN
1408: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
1409: END IF;
1410:
1411: -- primary qty in primary uom

Line 1408: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);

1404: temp_cascaded_table(current_n).quantity := round (x_converted_trx_qty,5); -- Bug 13744041
1405: END IF;
1406:
1407: IF (g_asn_debug = 'Y') THEN
1408: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
1409: END IF;
1410:
1411: -- primary qty in primary uom
1412: IF (temp_cascaded_table(current_n).primary_unit_of_measure <> x_shipmentrec.unit_of_measure) THEN

Line 1422: IF (g_asn_debug = 'Y') THEN

1418: temp_cascaded_table(current_n).primary_quantity := round (temp_cascaded_table(current_n).primary_quantity,5); -- Bug 13744041
1419: ELSE
1420: temp_cascaded_table(current_n).primary_quantity := round(x_converted_trx_qty,5); -- Bug 13744041
1421:
1422: IF (g_asn_debug = 'Y') THEN
1423: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
1424: END IF;
1425:
1426: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';

Line 1423: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);

1419: ELSE
1420: temp_cascaded_table(current_n).primary_quantity := round(x_converted_trx_qty,5); -- Bug 13744041
1421:
1422: IF (g_asn_debug = 'Y') THEN
1423: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
1424: END IF;
1425:
1426: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';
1427: temp_cascaded_table(current_n).interface_source_code := 'RCV';

Line 1431: IF (g_asn_debug = 'Y') THEN

1427: temp_cascaded_table(current_n).interface_source_code := 'RCV';
1428: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
1429: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
1430:
1431: IF (g_asn_debug = 'Y') THEN
1432: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1433: END IF;
1434:
1435: -- confirm the data in rsh and rsl for the provided info

Line 1432: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));

1428: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
1429: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
1430:
1431: IF (g_asn_debug = 'Y') THEN
1432: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1433: END IF;
1434:
1435: -- confirm the data in rsh and rsl for the provided info
1436: IF (g_asn_debug = 'Y') THEN

Line 1436: IF (g_asn_debug = 'Y') THEN

1432: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1433: END IF;
1434:
1435: -- confirm the data in rsh and rsl for the provided info
1436: IF (g_asn_debug = 'Y') THEN
1437: asn_debug.put_line( 'rsl : cat '
1438: || x_shipmentrec.category_id
1439: || ' item desc '
1440: || x_shipmentrec.item_description

Line 1437: asn_debug.put_line( 'rsl : cat '

1433: END IF;
1434:
1435: -- confirm the data in rsh and rsl for the provided info
1436: IF (g_asn_debug = 'Y') THEN
1437: asn_debug.put_line( 'rsl : cat '
1438: || x_shipmentrec.category_id
1439: || ' item desc '
1440: || x_shipmentrec.item_description
1441: || ' header '

Line 1525: IF (g_asn_debug = 'Y') THEN

1521: EXCEPTION
1522: WHEN NO_DATA_FOUND THEN
1523: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1524:
1525: IF (g_asn_debug = 'Y') THEN
1526: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1527: asn_debug.put_line(' so it is cleared off');
1528: END IF;
1529: WHEN OTHERS THEN

Line 1526: asn_debug.put_line('the deliver to person entered in po is currently inactive');

1522: WHEN NO_DATA_FOUND THEN
1523: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1524:
1525: IF (g_asn_debug = 'Y') THEN
1526: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1527: asn_debug.put_line(' so it is cleared off');
1528: END IF;
1529: WHEN OTHERS THEN
1530: temp_cascaded_table(current_n).deliver_to_person_id := NULL;

Line 1527: asn_debug.put_line(' so it is cleared off');

1523: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1524:
1525: IF (g_asn_debug = 'Y') THEN
1526: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1527: asn_debug.put_line(' so it is cleared off');
1528: END IF;
1529: WHEN OTHERS THEN
1530: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1531:

Line 1532: IF (g_asn_debug = 'Y') THEN

1528: END IF;
1529: WHEN OTHERS THEN
1530: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1531:
1532: IF (g_asn_debug = 'Y') THEN
1533: asn_debug.put_line('some exception has occured');
1534: asn_debug.put_line('this exception is due to the po deliver to person');
1535: asn_debug.put_line('the deliver to person is optional');
1536: asn_debug.put_line('so cleared off the deliver to person');

Line 1533: asn_debug.put_line('some exception has occured');

1529: WHEN OTHERS THEN
1530: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1531:
1532: IF (g_asn_debug = 'Y') THEN
1533: asn_debug.put_line('some exception has occured');
1534: asn_debug.put_line('this exception is due to the po deliver to person');
1535: asn_debug.put_line('the deliver to person is optional');
1536: asn_debug.put_line('so cleared off the deliver to person');
1537: END IF;

Line 1534: asn_debug.put_line('this exception is due to the po deliver to person');

1530: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1531:
1532: IF (g_asn_debug = 'Y') THEN
1533: asn_debug.put_line('some exception has occured');
1534: asn_debug.put_line('this exception is due to the po deliver to person');
1535: asn_debug.put_line('the deliver to person is optional');
1536: asn_debug.put_line('so cleared off the deliver to person');
1537: END IF;
1538: END;

Line 1535: asn_debug.put_line('the deliver to person is optional');

1531:
1532: IF (g_asn_debug = 'Y') THEN
1533: asn_debug.put_line('some exception has occured');
1534: asn_debug.put_line('this exception is due to the po deliver to person');
1535: asn_debug.put_line('the deliver to person is optional');
1536: asn_debug.put_line('so cleared off the deliver to person');
1537: END IF;
1538: END;
1539: END IF; --}

Line 1536: asn_debug.put_line('so cleared off the deliver to person');

1532: IF (g_asn_debug = 'Y') THEN
1533: asn_debug.put_line('some exception has occured');
1534: asn_debug.put_line('this exception is due to the po deliver to person');
1535: asn_debug.put_line('the deliver to person is optional');
1536: asn_debug.put_line('so cleared off the deliver to person');
1537: END IF;
1538: END;
1539: END IF; --}
1540: END IF; --}

Line 1554: IF (g_asn_debug = 'Y') THEN

1550: END IF; --} matches txn not deliver
1551:
1552: current_n := current_n + 1;
1553:
1554: IF (g_asn_debug = 'Y') THEN
1555: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
1556: END IF;
1557: END IF; --} matches if insert into table
1558: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none

Line 1555: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));

1551:
1552: current_n := current_n + 1;
1553:
1554: IF (g_asn_debug = 'Y') THEN
1555: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
1556: END IF;
1557: END IF; --} matches if insert into table
1558: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none
1559: END LOOP; --}

Line 1583: IF (g_asn_debug = 'Y') THEN

1579: IF count_shipments%ISOPEN THEN
1580: CLOSE count_shipments;
1581: END IF;
1582:
1583: IF (g_asn_debug = 'Y') THEN
1584: asn_debug.put_line('exit derive_io_rcv_line_qty');
1585: END IF;
1586: EXCEPTION
1587: WHEN rcv_error_pkg.e_fatal_error THEN

Line 1584: asn_debug.put_line('exit derive_io_rcv_line_qty');

1580: CLOSE count_shipments;
1581: END IF;
1582:
1583: IF (g_asn_debug = 'Y') THEN
1584: asn_debug.put_line('exit derive_io_rcv_line_qty');
1585: END IF;
1586: EXCEPTION
1587: WHEN rcv_error_pkg.e_fatal_error THEN
1588: IF shipments%ISOPEN THEN

Line 1608: IF (g_asn_debug = 'Y') THEN

1604: rcv_error_pkg.set_sql_error_message('derive_io_rcv_line_qty', x_progress);
1605: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
1606: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1607:
1608: IF (g_asn_debug = 'Y') THEN
1609: asn_debug.put_line(TO_CHAR(n));
1610: asn_debug.put_line(SQLERRM);
1611: asn_debug.put_line('error ' || x_progress);
1612: END IF;

Line 1609: asn_debug.put_line(TO_CHAR(n));

1605: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
1606: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1607:
1608: IF (g_asn_debug = 'Y') THEN
1609: asn_debug.put_line(TO_CHAR(n));
1610: asn_debug.put_line(SQLERRM);
1611: asn_debug.put_line('error ' || x_progress);
1612: END IF;
1613: END derive_io_rcv_line_qty;

Line 1610: asn_debug.put_line(SQLERRM);

1606: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1607:
1608: IF (g_asn_debug = 'Y') THEN
1609: asn_debug.put_line(TO_CHAR(n));
1610: asn_debug.put_line(SQLERRM);
1611: asn_debug.put_line('error ' || x_progress);
1612: END IF;
1613: END derive_io_rcv_line_qty;
1614:

Line 1611: asn_debug.put_line('error ' || x_progress);

1607:
1608: IF (g_asn_debug = 'Y') THEN
1609: asn_debug.put_line(TO_CHAR(n));
1610: asn_debug.put_line(SQLERRM);
1611: asn_debug.put_line('error ' || x_progress);
1612: END IF;
1613: END derive_io_rcv_line_qty;
1614:
1615: PROCEDURE derive_trans_del_line_quantity(

Line 1733: IF (g_asn_debug = 'Y') THEN

1729: l_deliver_to_person_id NUMBER;
1730: l_rsl_count NUMBER;
1731: BEGIN
1732: --At this point shipment_line_id would haven been defaulted/derived
1733: IF (g_asn_debug = 'Y') THEN
1734: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1735: END IF;
1736: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1737: IF (g_asn_debug = 'Y') THEN

Line 1734: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');

1730: l_rsl_count NUMBER;
1731: BEGIN
1732: --At this point shipment_line_id would haven been defaulted/derived
1733: IF (g_asn_debug = 'Y') THEN
1734: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1735: END IF;
1736: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1737: IF (g_asn_debug = 'Y') THEN
1738: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);

Line 1737: IF (g_asn_debug = 'Y') THEN

1733: IF (g_asn_debug = 'Y') THEN
1734: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1735: END IF;
1736: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1737: IF (g_asn_debug = 'Y') THEN
1738: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);
1739: END IF;
1740:
1741: BEGIN

Line 1738: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);

1734: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1735: END IF;
1736: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1737: IF (g_asn_debug = 'Y') THEN
1738: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);
1739: END IF;
1740:
1741: BEGIN
1742: select deliver_to_person_id

Line 1748: IF (g_asn_debug = 'Y') THEN

1744: from rcv_shipment_lines
1745: where shipment_line_id = x_cascaded_table(n).shipment_line_id;
1746:
1747: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1748: IF (g_asn_debug = 'Y') THEN
1749: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1750: END IF;
1751: EXCEPTION
1752: WHEN OTHERS then

Line 1749: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);

1745: where shipment_line_id = x_cascaded_table(n).shipment_line_id;
1746:
1747: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1748: IF (g_asn_debug = 'Y') THEN
1749: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1750: END IF;
1751: EXCEPTION
1752: WHEN OTHERS then
1753: IF (g_asn_debug = 'Y') THEN

Line 1753: IF (g_asn_debug = 'Y') THEN

1749: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1750: END IF;
1751: EXCEPTION
1752: WHEN OTHERS then
1753: IF (g_asn_debug = 'Y') THEN
1754: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1755: END IF;
1756: END;
1757: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN

Line 1754: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');

1750: END IF;
1751: EXCEPTION
1752: WHEN OTHERS then
1753: IF (g_asn_debug = 'Y') THEN
1754: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1755: END IF;
1756: END;
1757: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1758: IF (g_asn_debug = 'Y') THEN

Line 1758: IF (g_asn_debug = 'Y') THEN

1754: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1755: END IF;
1756: END;
1757: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1758: IF (g_asn_debug = 'Y') THEN
1759: asn_debug.put_line('Inside rsh not null..rsh value :'||x_cascaded_table(n).shipment_header_id);
1760: END IF;
1761:
1762: BEGIN

Line 1759: asn_debug.put_line('Inside rsh not null..rsh value :'||x_cascaded_table(n).shipment_header_id);

1755: END IF;
1756: END;
1757: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1758: IF (g_asn_debug = 'Y') THEN
1759: asn_debug.put_line('Inside rsh not null..rsh value :'||x_cascaded_table(n).shipment_header_id);
1760: END IF;
1761:
1762: BEGIN
1763: select count(shipment_line_id)

Line 1768: IF (g_asn_debug = 'Y') THEN

1764: into l_rsl_count
1765: from rcv_shipment_lines
1766: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1767:
1768: IF (g_asn_debug = 'Y') THEN
1769: asn_debug.put_line('Inside rsh not null..l_rsl_count:'||l_rsl_count);
1770: END IF;
1771:
1772: IF l_rsl_count = 1 THEN

Line 1769: asn_debug.put_line('Inside rsh not null..l_rsl_count:'||l_rsl_count);

1765: from rcv_shipment_lines
1766: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1767:
1768: IF (g_asn_debug = 'Y') THEN
1769: asn_debug.put_line('Inside rsh not null..l_rsl_count:'||l_rsl_count);
1770: END IF;
1771:
1772: IF l_rsl_count = 1 THEN
1773: select deliver_to_person_id

Line 1778: IF (g_asn_debug = 'Y') THEN

1774: into l_deliver_to_person_id
1775: from rcv_shipment_lines
1776: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1777: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1778: IF (g_asn_debug = 'Y') THEN
1779: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1780: END IF;
1781: ELSE--l_rsl_count = 1
1782: IF (g_asn_debug = 'Y') THEN

Line 1779: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);

1775: from rcv_shipment_lines
1776: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1777: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1778: IF (g_asn_debug = 'Y') THEN
1779: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1780: END IF;
1781: ELSE--l_rsl_count = 1
1782: IF (g_asn_debug = 'Y') THEN
1783: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');

Line 1782: IF (g_asn_debug = 'Y') THEN

1778: IF (g_asn_debug = 'Y') THEN
1779: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1780: END IF;
1781: ELSE--l_rsl_count = 1
1782: IF (g_asn_debug = 'Y') THEN
1783: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');
1784: END IF;
1785: END IF;--l_rsl_count = 1
1786: EXCEPTION

Line 1783: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');

1779: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1780: END IF;
1781: ELSE--l_rsl_count = 1
1782: IF (g_asn_debug = 'Y') THEN
1783: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');
1784: END IF;
1785: END IF;--l_rsl_count = 1
1786: EXCEPTION
1787: WHEN OTHERS then

Line 1788: IF (g_asn_debug = 'Y') THEN

1784: END IF;
1785: END IF;--l_rsl_count = 1
1786: EXCEPTION
1787: WHEN OTHERS then
1788: IF (g_asn_debug = 'Y') THEN
1789: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsh');
1790: END IF;
1791: END;
1792: END IF;--(x_cascaded_table(n).shipment_line_id is not null)

Line 1789: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsh');

1785: END IF;--l_rsl_count = 1
1786: EXCEPTION
1787: WHEN OTHERS then
1788: IF (g_asn_debug = 'Y') THEN
1789: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsh');
1790: END IF;
1791: END;
1792: END IF;--(x_cascaded_table(n).shipment_line_id is not null)
1793: END get_deliver_to_person_from_rsl;

Line 1810: IF (g_asn_debug = 'Y') THEN

1806: into l_parent_deliver_to_person_id
1807: from rcv_transactions
1808: where transaction_id = x_cascaded_table(n).parent_transaction_id;
1809:
1810: IF (g_asn_debug = 'Y') THEN
1811: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1812: END IF;
1813: return l_parent_deliver_to_person_id;
1814: EXCEPTION

Line 1811: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);

1807: from rcv_transactions
1808: where transaction_id = x_cascaded_table(n).parent_transaction_id;
1809:
1810: IF (g_asn_debug = 'Y') THEN
1811: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1812: END IF;
1813: return l_parent_deliver_to_person_id;
1814: EXCEPTION
1815: WHEN OTHERS then

Line 1816: IF (g_asn_debug = 'Y') THEN

1812: END IF;
1813: return l_parent_deliver_to_person_id;
1814: EXCEPTION
1815: WHEN OTHERS then
1816: IF (g_asn_debug = 'Y') THEN
1817: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rt');
1818: END IF;
1819: return null;
1820: END get_deliver_to_person_from_rt;

Line 1817: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rt');

1813: return l_parent_deliver_to_person_id;
1814: EXCEPTION
1815: WHEN OTHERS then
1816: IF (g_asn_debug = 'Y') THEN
1817: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rt');
1818: END IF;
1819: return null;
1820: END get_deliver_to_person_from_rt;
1821:

Line 1838: IF (g_asn_debug = 'Y') THEN

1834: into l_parent_deliver_to_person_id
1835: from rcv_transactions_interface
1836: where interface_transaction_id = x_cascaded_table(n).parent_transaction_id;
1837:
1838: IF (g_asn_debug = 'Y') THEN
1839: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1840: END IF;
1841: return l_parent_deliver_to_person_id;
1842: EXCEPTION

Line 1839: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);

1835: from rcv_transactions_interface
1836: where interface_transaction_id = x_cascaded_table(n).parent_transaction_id;
1837:
1838: IF (g_asn_debug = 'Y') THEN
1839: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1840: END IF;
1841: return l_parent_deliver_to_person_id;
1842: EXCEPTION
1843: WHEN OTHERS then

Line 1844: IF (g_asn_debug = 'Y') THEN

1840: END IF;
1841: return l_parent_deliver_to_person_id;
1842: EXCEPTION
1843: WHEN OTHERS then
1844: IF (g_asn_debug = 'Y') THEN
1845: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rti');
1846: END IF;
1847: return null;
1848: END get_deliver_to_person_from_rti;

Line 1845: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rti');

1841: return l_parent_deliver_to_person_id;
1842: EXCEPTION
1843: WHEN OTHERS then
1844: IF (g_asn_debug = 'Y') THEN
1845: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rti');
1846: END IF;
1847: return null;
1848: END get_deliver_to_person_from_rti;
1849: