DBA Data[Home] [Help]

APPS.RCV_INT_ORDER_PP_PVT dependencies on ASN_DEBUG

Line 5: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');

1: PACKAGE BODY rcv_int_order_pp_pvt AS
2: /* $Header: RCVPPIOB.pls 120.3.12000000.5 2007/10/22 15:55:37 srnatara ship $ */
3:
4: -- GLOBAL VARIABLES
5: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
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 243: IF (g_asn_debug = 'Y') THEN

239: ) IS
240: BEGIN
241: x_progress := '000';
242:
243: IF (g_asn_debug = 'Y') THEN
244: asn_debug.put_line('enter internal order receiving line');
245: END IF;
246:
247: -- 1) derive ship to org info

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

240: BEGIN
241: x_progress := '000';
242:
243: IF (g_asn_debug = 'Y') THEN
244: asn_debug.put_line('enter internal order receiving line');
245: END IF;
246:
247: -- 1) derive ship to org info
248: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,

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

250: x_header_record
251: );
252: x_progress := '002';
253:
254: IF (g_asn_debug = 'Y') THEN
255: asn_debug.put_line('x_progress ' || x_progress);
256: END IF;
257:
258: x_progress := '010';

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

251: );
252: x_progress := '002';
253:
254: IF (g_asn_debug = 'Y') THEN
255: asn_debug.put_line('x_progress ' || x_progress);
256: END IF;
257:
258: x_progress := '010';
259: -- 5) derive item info

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

268: x_progress := '035';
269: -- 12) derive routing header info
270: rcv_roi_transaction.derive_routing_header_info(x_cascaded_table, n);
271: x_progress := '070';
272: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
273: -- derive auto transact code
274: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
275: -- 13) bug 3379550
276: x_progress := '071';

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

273: -- derive auto transact code
274: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
275: -- 13) bug 3379550
276: x_progress := '071';
277: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
278: /* Bug 3684984.
279: * We are getting all the values we used to get in the foll. code
280: * in the cursor in derive_io_rcv_line_qty.
281: derive_io_shipment_info(x_cascaded_table, n);

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

279: * We are getting all the values we used to get in the foll. code
280: * in the cursor in derive_io_rcv_line_qty.
281: derive_io_shipment_info(x_cascaded_table, n);
282: */
283: asn_debug.put_line('progress in Internal Orders rcv : before derive qty');
284: -- quantity > 0
285: derive_io_rcv_line_qty(x_cascaded_table,
286: n,
287: temp_cascaded_table

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

294: */
295: /* Bug3591830 - START */
296: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n);
297: temp_cascaded_table(n).locator_id := x_cascaded_table(n).locator_id;
298: asn_debug.put_line('progress in Internal Orders rcv : after derive_to_locator_id -> locator_id = ' || temp_cascaded_table(n).locator_id);
299: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status,
300: 'LOCATOR_ID',
301: FALSE
302: );

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

309: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
310: x_header_record IN rcv_roi_preprocessor.header_rec_type
311: ) IS
312: BEGIN
313: IF (g_asn_debug = 'Y') THEN
314: asn_debug.put_line('enter derive_io_trans_line ');
315: END IF;
316:
317: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);

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

310: x_header_record IN rcv_roi_preprocessor.header_rec_type
311: ) IS
312: BEGIN
313: IF (g_asn_debug = 'Y') THEN
314: asn_debug.put_line('enter derive_io_trans_line ');
315: END IF;
316:
317: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
318: /* Derive the to_org_id */

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

321: x_header_record
322: );
323:
324: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
325: IF (g_asn_debug = 'Y') THEN
326: asn_debug.put_line('X_progress ' || x_progress);
327: END IF;
328:
329: SELECT muom.uom_code

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

322: );
323:
324: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
325: IF (g_asn_debug = 'Y') THEN
326: asn_debug.put_line('X_progress ' || x_progress);
327: END IF;
328:
329: SELECT muom.uom_code
330: INTO x_cascaded_table(n).uom_code

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

330: INTO x_cascaded_table(n).uom_code
331: FROM mtl_units_of_measure muom
332: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
333: ELSE
334: IF (g_asn_debug = 'Y') THEN
335: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
336: END IF;
337: END IF;
338:

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

331: FROM mtl_units_of_measure muom
332: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
333: ELSE
334: IF (g_asn_debug = 'Y') THEN
335: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
336: END IF;
337: END IF;
338:
339: x_progress := '026';

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

345: /* Bug#4037821 - START */
346: /* Derive the locator_id even in case of deliver transactions */
347: IF (x_cascaded_table(n).transaction_type IN ('TRANSFER','DELIVER')) THEN
348: IF (x_cascaded_table(n).transaction_type = 'TRANSFER') THEN
349: asn_debug.put_line('doing ship to location /locator derivations ');
350: rcv_roi_transaction.derive_location_info(x_cascaded_table, n);
351: rcv_roi_transaction.derive_from_locator_id(x_cascaded_table, n); -- WMS Change
352: END IF;
353: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n); -- WMS Change

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

354: END IF;
355: /* Bug#4037821 - END */
356:
357: x_progress := '071';
358: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
359: derive_io_shipment_info(x_cascaded_table, n);
360: x_progress := '091';
361: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
362: /* Auto_transact_code is null for all these transaction types */

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

373: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
374: x_header_record IN rcv_roi_preprocessor.header_rec_type
375: ) IS
376: BEGIN
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('enter derive_correction_line ');
379: END IF;
380:
381: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);

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

374: x_header_record IN rcv_roi_preprocessor.header_rec_type
375: ) IS
376: BEGIN
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('enter derive_correction_line ');
379: END IF;
380:
381: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
382: /* Derive the to_org_id */

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

385: x_header_record
386: );
387:
388: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
389: IF (g_asn_debug = 'Y') THEN
390: asn_debug.put_line('x_progress ' || x_progress);
391: END IF;
392:
393: SELECT muom.uom_code

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

386: );
387:
388: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
389: IF (g_asn_debug = 'Y') THEN
390: asn_debug.put_line('x_progress ' || x_progress);
391: END IF;
392:
393: SELECT muom.uom_code
394: INTO x_cascaded_table(n).uom_code

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

394: INTO x_cascaded_table(n).uom_code
395: FROM mtl_units_of_measure muom
396: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
397: ELSE
398: IF (g_asn_debug = 'Y') THEN
399: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
400: END IF;
401: END IF;
402:

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

395: FROM mtl_units_of_measure muom
396: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
397: ELSE
398: IF (g_asn_debug = 'Y') THEN
399: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
400: END IF;
401: END IF;
402:
403: x_progress := '071';

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

400: END IF;
401: END IF;
402:
403: x_progress := '071';
404: asn_debug.put_line('progress in Internal Orders rcv : x progress = ' || x_progress);
405: derive_io_shipment_info(x_cascaded_table, n);
406: x_progress := '091';
407: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
408: /* Auto_transact_code is null for all these transaction types */

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

497: ) IS
498: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
499: l_skip_validation NUMBER := 0; --Bug#6375015
500: BEGIN
501: IF (g_asn_debug = 'Y') THEN
502: asn_debug.put_line('Enter validate_io_receive_line');
503: END IF;
504:
505: x_progress := '000';

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

498: l_parent_deliver_to_person_id NUMBER := null; --Bug#6375015
499: l_skip_validation NUMBER := 0; --Bug#6375015
500: BEGIN
501: IF (g_asn_debug = 'Y') THEN
502: asn_debug.put_line('Enter validate_io_receive_line');
503: END IF;
504:
505: x_progress := '000';
506: rcv_roi_transaction.validate_transaction_date(x_cascaded_table, n);

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

529: from the parent transaction.
530: */
531: /* code fix for the Bug:6375015 starts */
532: IF (x_cascaded_table(n).deliver_to_person_id is null) THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('Inside deliver_to_person_id is null...');
535: END IF;
536:
537: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

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

530: */
531: /* code fix for the Bug:6375015 starts */
532: IF (x_cascaded_table(n).deliver_to_person_id is null) THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('Inside deliver_to_person_id is null...');
535: END IF;
536:
537: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
538: --In case of transaction_type DELIVER, we need parent transaction.

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

538: --In case of transaction_type DELIVER, we need parent transaction.
539: --If this condition is not added, it will try to defalut the deliver_to_person
540: --of the parent transaction. But form is not behaving like that.
541: --So added this condition to default the deliver_to_person of the source document.
542: IF (g_asn_debug = 'Y') THEN
543: asn_debug.put_line('Transaction type is DELIVER...');
544: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
545: END IF;
546: get_deliver_to_person_from_rsl(x_cascaded_table,n);

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

539: --If this condition is not added, it will try to defalut the deliver_to_person
540: --of the parent transaction. But form is not behaving like that.
541: --So added this condition to default the deliver_to_person of the source document.
542: IF (g_asn_debug = 'Y') THEN
543: asn_debug.put_line('Transaction type is DELIVER...');
544: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
545: END IF;
546: get_deliver_to_person_from_rsl(x_cascaded_table,n);
547: IF (g_asn_debug = 'Y') THEN

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

540: --of the parent transaction. But form is not behaving like that.
541: --So added this condition to default the deliver_to_person of the source document.
542: IF (g_asn_debug = 'Y') THEN
543: asn_debug.put_line('Transaction type is DELIVER...');
544: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
545: END IF;
546: get_deliver_to_person_from_rsl(x_cascaded_table,n);
547: IF (g_asn_debug = 'Y') THEN
548: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

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

543: asn_debug.put_line('Transaction type is DELIVER...');
544: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
545: END IF;
546: get_deliver_to_person_from_rsl(x_cascaded_table,n);
547: IF (g_asn_debug = 'Y') THEN
548: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
549: END IF;
550: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
551: IF (g_asn_debug = 'Y') THEN

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

544: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
545: END IF;
546: get_deliver_to_person_from_rsl(x_cascaded_table,n);
547: IF (g_asn_debug = 'Y') THEN
548: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
549: END IF;
550: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

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

547: IF (g_asn_debug = 'Y') THEN
548: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
549: END IF;
550: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
553: END IF;
554: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
555: --We can safely skip the validate_deliver_to_person call

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

548: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
549: END IF;
550: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
553: END IF;
554: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
555: --We can safely skip the validate_deliver_to_person call
556: l_skip_validation := 1;

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

554: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
555: --We can safely skip the validate_deliver_to_person call
556: l_skip_validation := 1;
557: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
558: IF (g_asn_debug = 'Y') THEN
559: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
560: END IF;
561: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
562: IF (g_asn_debug = 'Y') THEN

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

555: --We can safely skip the validate_deliver_to_person call
556: l_skip_validation := 1;
557: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
558: IF (g_asn_debug = 'Y') THEN
559: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
560: END IF;
561: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
562: IF (g_asn_debug = 'Y') THEN
563: 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 562: IF (g_asn_debug = 'Y') THEN

558: IF (g_asn_debug = 'Y') THEN
559: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
560: END IF;
561: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
562: IF (g_asn_debug = 'Y') THEN
563: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
564: END IF;
565: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
566: --We can safely skip the validate_deliver_to_person call

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

559: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
560: END IF;
561: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
562: IF (g_asn_debug = 'Y') THEN
563: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
564: END IF;
565: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
566: --We can safely skip the validate_deliver_to_person call
567: l_skip_validation := 1;

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

565: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
566: --We can safely skip the validate_deliver_to_person call
567: l_skip_validation := 1;
568: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
569: IF (g_asn_debug = 'Y') THEN
570: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
571: END IF;
572: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
573: IF (g_asn_debug = 'Y') THEN

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

566: --We can safely skip the validate_deliver_to_person call
567: l_skip_validation := 1;
568: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
569: IF (g_asn_debug = 'Y') THEN
570: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
571: END IF;
572: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');

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

569: IF (g_asn_debug = 'Y') THEN
570: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
571: END IF;
572: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
575: END IF;
576: get_deliver_to_person_from_rsl(x_cascaded_table,n);
577: IF (g_asn_debug = 'Y') THEN

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

570: asn_debug.put_line('deliver_to_person_is is set to :'||l_parent_deliver_to_person_id);
571: END IF;
572: ELSE--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
575: END IF;
576: get_deliver_to_person_from_rsl(x_cascaded_table,n);
577: IF (g_asn_debug = 'Y') THEN
578: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');

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

573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
575: END IF;
576: get_deliver_to_person_from_rsl(x_cascaded_table,n);
577: IF (g_asn_debug = 'Y') THEN
578: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
579: END IF;
580: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
581: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)

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

574: asn_debug.put_line('defaulting deliver_to_person_id from RSL...');
575: END IF;
576: get_deliver_to_person_from_rsl(x_cascaded_table,n);
577: IF (g_asn_debug = 'Y') THEN
578: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
579: END IF;
580: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
581: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
582: IF (g_asn_debug = 'Y') THEN

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

578: asn_debug.put_line('After call to get_deliver_to_person_from_rsl...');
579: END IF;
580: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
581: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Inside deliver_to_person_id is not null and the value is :'||x_cascaded_table(n).deliver_to_person_id);
584: END IF;
585:
586: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

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

579: END IF;
580: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
581: ELSE--(x_cascaded_table(n).deliver_to_person_id is null)
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Inside deliver_to_person_id is not null and the value is :'||x_cascaded_table(n).deliver_to_person_id);
584: END IF;
585:
586: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
587: --In forms user can select any active deliver_to_person for DELIVER transaction.

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

588: --In case of transaction_type DELIVER, we need parent transaction.
589: --If this condition is not added, it will validate against the deliver_to_person mentioned
590: --the parent RECEIVE transaction. But form is not behaving like that.
591: --So, added this condition to skip deliver_to_person validation against parent txn
592: IF (g_asn_debug = 'Y') THEN
593: asn_debug.put_line('Transaction type is DELIVER...');
594: END IF;
595: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
596: IF (g_asn_debug = 'Y') THEN

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

589: --If this condition is not added, it will validate against the deliver_to_person mentioned
590: --the parent RECEIVE transaction. But form is not behaving like that.
591: --So, added this condition to skip deliver_to_person validation against parent txn
592: IF (g_asn_debug = 'Y') THEN
593: asn_debug.put_line('Transaction type is DELIVER...');
594: END IF;
595: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
596: IF (g_asn_debug = 'Y') THEN
597: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);

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

592: IF (g_asn_debug = 'Y') THEN
593: asn_debug.put_line('Transaction type is DELIVER...');
594: END IF;
595: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
596: IF (g_asn_debug = 'Y') THEN
597: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
598: END IF;
599: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
600: --We can safely skip the validate_deliver_to_person call, validation against

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

593: asn_debug.put_line('Transaction type is DELIVER...');
594: END IF;
595: ELSIF (x_cascaded_table(n).parent_transaction_id is not null) THEN
596: IF (g_asn_debug = 'Y') THEN
597: asn_debug.put_line('Inside parent_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_transaction_id);
598: END IF;
599: l_parent_deliver_to_person_id := get_deliver_to_person_from_rt(x_cascaded_table,n);
600: --We can safely skip the validate_deliver_to_person call, validation against
601: --parent transaction is handled here itself.

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

600: --We can safely skip the validate_deliver_to_person call, validation against
601: --parent transaction is handled here itself.
602: l_skip_validation := 1;
603: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
606: END IF;
607: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
608: x_cascaded_table(n).deliver_to_person_id := null;

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

601: --parent transaction is handled here itself.
602: l_skip_validation := 1;
603: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
606: END IF;
607: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
608: x_cascaded_table(n).deliver_to_person_id := null;
609: x_cascaded_table(n).deliver_to_person_name := null;

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

609: x_cascaded_table(n).deliver_to_person_name := null;
610:
611: --set the deliver_to_person_id to that of parent transaction
612: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
613: IF (g_asn_debug = 'Y') THEN
614: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
615: END IF;
616: END IF;
617: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN

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

610:
611: --set the deliver_to_person_id to that of parent transaction
612: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
613: IF (g_asn_debug = 'Y') THEN
614: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
615: END IF;
616: END IF;
617: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
618: IF (g_asn_debug = 'Y') THEN

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

614: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
615: END IF;
616: END IF;
617: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
618: IF (g_asn_debug = 'Y') THEN
619: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
620: END IF;
621: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
622: --We can safely skip the validate_deliver_to_person call, validation against

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

615: END IF;
616: END IF;
617: ELSIF (x_cascaded_table(n).parent_interface_txn_id is not null) THEN
618: IF (g_asn_debug = 'Y') THEN
619: asn_debug.put_line('Inside parent_interface_transaction_id.is not null and the value is:'||x_cascaded_table(n).parent_interface_txn_id);
620: END IF;
621: l_parent_deliver_to_person_id := get_deliver_to_person_from_rti(x_cascaded_table,n);
622: --We can safely skip the validate_deliver_to_person call, validation against
623: --parent transaction is handled here itself.

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

622: --We can safely skip the validate_deliver_to_person call, validation against
623: --parent transaction is handled here itself.
624: l_skip_validation := 1;
625: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
626: IF (g_asn_debug = 'Y') THEN
627: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
628: END IF;
629: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
630: x_cascaded_table(n).deliver_to_person_id := null;

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

623: --parent transaction is handled here itself.
624: l_skip_validation := 1;
625: IF nvl(l_parent_deliver_to_person_id,-99) <> x_cascaded_table(n).deliver_to_person_id THEN
626: IF (g_asn_debug = 'Y') THEN
627: asn_debug.put_line('RTI.deliver_to_person_id is different to that of parent txn...');
628: END IF;
629: --deliver_to_person_id mismatches with the parent txn's deliver_to_person, so clear it off
630: x_cascaded_table(n).deliver_to_person_id := null;
631: x_cascaded_table(n).deliver_to_person_name := null;

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

632:
633: --set the deliver_to_person_id to that of parent transaction
634: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
635:
636: IF (g_asn_debug = 'Y') THEN
637: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
638: END IF;
639: END IF;
640: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN

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

633: --set the deliver_to_person_id to that of parent transaction
634: x_cascaded_table(n).deliver_to_person_id := l_parent_deliver_to_person_id;
635:
636: IF (g_asn_debug = 'Y') THEN
637: asn_debug.put_line('deliver_to_person_is is set to that of parent RT txn');
638: END IF;
639: END IF;
640: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
641: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)

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

640: END IF;--IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
641: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)
642:
643: IF l_skip_validation = 0 THEN
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line('validate_deliver_to_person is called');
646: END IF;
647: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
648: IF (g_asn_debug = 'Y') THEN

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

641: END IF;--(x_cascaded_table(n).deliver_to_person_id is null)
642:
643: IF l_skip_validation = 0 THEN
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line('validate_deliver_to_person is called');
646: END IF;
647: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
648: IF (g_asn_debug = 'Y') THEN
649: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);

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

644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line('validate_deliver_to_person is called');
646: END IF;
647: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
648: IF (g_asn_debug = 'Y') THEN
649: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
650: END IF;
651: ELSE
652: IF (g_asn_debug = 'Y') THEN

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

645: asn_debug.put_line('validate_deliver_to_person is called');
646: END IF;
647: rcv_roi_transaction.validate_deliver_to_person(x_cascaded_table, n);
648: IF (g_asn_debug = 'Y') THEN
649: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
650: END IF;
651: ELSE
652: IF (g_asn_debug = 'Y') THEN
653: asn_debug.put_line('call to validate_deliver_to_person is skipped');

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

648: IF (g_asn_debug = 'Y') THEN
649: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
650: END IF;
651: ELSE
652: IF (g_asn_debug = 'Y') THEN
653: asn_debug.put_line('call to validate_deliver_to_person is skipped');
654: END IF;
655: END IF;/* code fix for the Bug:6375015 ends */
656:

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

649: asn_debug.put_line('After validate_deliver_to_person: ' || x_cascaded_table(n).error_status);
650: END IF;
651: ELSE
652: IF (g_asn_debug = 'Y') THEN
653: asn_debug.put_line('call to validate_deliver_to_person is skipped');
654: END IF;
655: END IF;/* code fix for the Bug:6375015 ends */
656:
657: rcv_roi_transaction.validate_routing_record(x_cascaded_table, n);

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

804: l_shipment_header_id rcv_shipment_headers.shipment_header_id%TYPE; -- Bugfix 5201155
805: BEGIN
806: x_progress := '097';
807:
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('inside line qty calculation of int org rcv');
810: asn_debug.put_line('x_progress ' || x_progress);
811: END IF;
812:

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

805: BEGIN
806: x_progress := '097';
807:
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('inside line qty calculation of int org rcv');
810: asn_debug.put_line('x_progress ' || x_progress);
811: END IF;
812:
813: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN

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

806: x_progress := '097';
807:
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('inside line qty calculation of int org rcv');
810: asn_debug.put_line('x_progress ' || x_progress);
811: END IF;
812:
813: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN
814: RETURN;

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

814: RETURN;
815: END IF;
816:
817: IF x_cascaded_table(n).quantity <= 0 THEN --{
818: IF (g_asn_debug = 'Y') THEN
819: asn_debug.put_line('quantity is <= zero. cascade will fail');
820: END IF;
821:
822: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

815: END IF;
816:
817: IF x_cascaded_table(n).quantity <= 0 THEN --{
818: IF (g_asn_debug = 'Y') THEN
819: asn_debug.put_line('quantity is <= zero. cascade will fail');
820: END IF;
821:
822: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
823: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

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

826: END IF; --} end qty > 0 check
827:
828: x_progress := '098';
829:
830: IF (g_asn_debug = 'Y') THEN
831: asn_debug.put_line('x_progress ' || x_progress);
832: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
833: END IF;
834:

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

827:
828: x_progress := '098';
829:
830: IF (g_asn_debug = 'Y') THEN
831: asn_debug.put_line('x_progress ' || x_progress);
832: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
833: END IF;
834:
835: -- as long as shipment num or shipment header id is specified we can continue

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

828: x_progress := '098';
829:
830: IF (g_asn_debug = 'Y') THEN
831: asn_debug.put_line('x_progress ' || x_progress);
832: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
833: END IF;
834:
835: -- as long as shipment num or shipment header id is specified we can continue
836: IF ( x_cascaded_table(n).shipment_header_id IS NULL

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

835: -- as long as shipment num or shipment header id is specified we can continue
836: IF ( x_cascaded_table(n).shipment_header_id IS NULL
837: AND x_cascaded_table(n).shipment_num IS NULL) THEN
838: -- error_status and error_message are set after validate_quantity_shipped
839: IF (g_asn_debug = 'Y') THEN
840: asn_debug.put_line('no shipment num/shipment header specified ');
841: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
842: END IF;
843:

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

836: IF ( x_cascaded_table(n).shipment_header_id IS NULL
837: AND x_cascaded_table(n).shipment_num IS NULL) THEN
838: -- error_status and error_message are set after validate_quantity_shipped
839: IF (g_asn_debug = 'Y') THEN
840: asn_debug.put_line('no shipment num/shipment header specified ');
841: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
842: END IF;
843:
844: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

837: AND x_cascaded_table(n).shipment_num IS NULL) THEN
838: -- error_status and error_message are set after validate_quantity_shipped
839: IF (g_asn_debug = 'Y') THEN
840: asn_debug.put_line('no shipment num/shipment header specified ');
841: asn_debug.put_line('status = ' || x_cascaded_table(n).error_status);
842: END IF;
843:
844: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
845: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);

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

848: END IF; -- } of (asn quantity_shipped was valid)
849:
850: -- copy record from main table to temp table
851:
852: IF (g_asn_debug = 'Y') THEN
853: asn_debug.put_line('copy record from main table to temp table');
854: END IF;
855:
856: current_n := 1;

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

849:
850: -- copy record from main table to temp table
851:
852: IF (g_asn_debug = 'Y') THEN
853: asn_debug.put_line('copy record from main table to temp table');
854: END IF;
855:
856: current_n := 1;
857: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

858:
859: -- Bugfix 5201155
860: IF ( x_cascaded_table(n).shipment_header_id IS NULL
861: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
862: IF (g_asn_debug = 'Y') THEN
863: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
864: END IF;
865:
866: /* Bug:6313315

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

859: -- Bugfix 5201155
860: IF ( x_cascaded_table(n).shipment_header_id IS NULL
861: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
862: IF (g_asn_debug = 'Y') THEN
863: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
864: END IF;
865:
866: /* Bug:6313315
867: Added where clause condition rsh.receipt_source_code = 'INTERNAL ORDER'.

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

878: AND rsl.to_organization_id = NVL(temp_cascaded_table(current_n).to_organization_id, to_organization_id)
879: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
880: AND rsh.receipt_source_code = 'INTERNAL ORDER';--Bug: 6313315
881:
882: IF (g_asn_debug = 'Y') THEN
883: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
884: END IF;
885: EXCEPTION
886: WHEN NO_DATA_FOUND

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

879: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
880: AND rsh.receipt_source_code = 'INTERNAL ORDER';--Bug: 6313315
881:
882: IF (g_asn_debug = 'Y') THEN
883: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
884: END IF;
885: EXCEPTION
886: WHEN NO_DATA_FOUND
887: THEN

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

889: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);
890: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
891: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line(TO_CHAR(n));
895: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
896: asn_debug.put_line('error ' || x_progress);
897: END IF;

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

890: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
891: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line(TO_CHAR(n));
895: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
896: asn_debug.put_line('error ' || x_progress);
897: END IF;
898: WHEN OTHERS

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

891: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line(TO_CHAR(n));
895: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
896: asn_debug.put_line('error ' || x_progress);
897: END IF;
898: WHEN OTHERS
899: THEN

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

892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line(TO_CHAR(n));
895: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
896: asn_debug.put_line('error ' || x_progress);
897: END IF;
898: WHEN OTHERS
899: THEN
900: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;

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

901: rcv_error_pkg.set_sql_error_message('derive_int_org_rcv_line_qty', x_progress);
902: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
903: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
908: asn_debug.put_line(sqlerrm);
909: asn_debug.put_line('error ' || x_progress);

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

902: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
903: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
908: asn_debug.put_line(sqlerrm);
909: asn_debug.put_line('error ' || x_progress);
910: END IF;

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

903: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
908: asn_debug.put_line(sqlerrm);
909: asn_debug.put_line('error ' || x_progress);
910: END IF;
911: END;

Line 908: asn_debug.put_line(sqlerrm);

904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
908: asn_debug.put_line(sqlerrm);
909: asn_debug.put_line('error ' || x_progress);
910: END IF;
911: END;
912: ELSE

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

905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
908: asn_debug.put_line(sqlerrm);
909: asn_debug.put_line('error ' || x_progress);
910: END IF;
911: END;
912: ELSE
913: l_shipment_header_id := temp_cascaded_table(current_n).shipment_header_id;

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

914: END IF; -- } deriving shipment_header_id if it NULL from shipment_num
915: -- End of code for Bugfix 5201155
916:
917: -- get all rows which meet this condition
918: IF (g_asn_debug = 'Y') THEN
919: asn_debug.put_line('get all rows which meet this condition');
920: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
921: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
922: END IF;

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

915: -- End of code for Bugfix 5201155
916:
917: -- get all rows which meet this condition
918: IF (g_asn_debug = 'Y') THEN
919: asn_debug.put_line('get all rows which meet this condition');
920: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
921: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
922: END IF;
923:

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

916:
917: -- get all rows which meet this condition
918: IF (g_asn_debug = 'Y') THEN
919: asn_debug.put_line('get all rows which meet this condition');
920: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
921: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
922: END IF;
923:
924: --{ open the cursors

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

917: -- get all rows which meet this condition
918: IF (g_asn_debug = 'Y') THEN
919: asn_debug.put_line('get all rows which meet this condition');
920: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
921: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
922: END IF;
923:
924: --{ open the cursors
925: IF (g_asn_debug = 'Y') THEN

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

921: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
922: END IF;
923:
924: --{ open the cursors
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));

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

922: END IF;
923:
924: --{ open the cursors
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));

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

923:
924: --{ open the cursors
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));

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

924: --{ open the cursors
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
932: asn_debug.put_line('proceed to open cursor');

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

925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
932: asn_debug.put_line('proceed to open cursor');
933: END IF;

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

926: asn_debug.put_line('open shipment records');
927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
932: asn_debug.put_line('proceed to open cursor');
933: END IF;
934:

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

927: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
932: asn_debug.put_line('proceed to open cursor');
933: END IF;
934:
935: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201155

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

928: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
929: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
930: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
931: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
932: asn_debug.put_line('proceed to open cursor');
933: END IF;
934:
935: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201155
936: -- temp_cascaded_table(current_n).shipment_num, -- Bugfix 5201155

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

953:
954: -- }
955:
956: -- assign shipped quantity to remaining quantity
957: IF (g_asn_debug = 'Y') THEN
958: asn_debug.put_line('assign shipped quantity to remaining quantity');
959: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
960: END IF;
961:

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

954: -- }
955:
956: -- assign shipped quantity to remaining quantity
957: IF (g_asn_debug = 'Y') THEN
958: asn_debug.put_line('assign shipped quantity to remaining quantity');
959: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
960: END IF;
961:
962: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

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

955:
956: -- assign shipped quantity to remaining quantity
957: IF (g_asn_debug = 'Y') THEN
958: asn_debug.put_line('assign shipped quantity to remaining quantity');
959: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
960: END IF;
961:
962: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
963: x_remaining_qty_po_uom := 0;

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

961:
962: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
963: x_remaining_qty_po_uom := 0;
964:
965: IF (g_asn_debug = 'Y') THEN
966: asn_debug.put_line('have assigned the quantity');
967: END IF;
968:
969: -- calculate tax_amount_factor for calculating tax_amount for

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

962: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
963: x_remaining_qty_po_uom := 0;
964:
965: IF (g_asn_debug = 'Y') THEN
966: asn_debug.put_line('have assigned the quantity');
967: END IF;
968:
969: -- calculate tax_amount_factor for calculating tax_amount for
970: -- each cascaded line

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

974: ELSE
975: tax_amount_factor := 0;
976: END IF;
977:
978: IF (g_asn_debug = 'Y') THEN
979: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
980: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
981: END IF;
982:

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

975: tax_amount_factor := 0;
976: END IF;
977:
978: IF (g_asn_debug = 'Y') THEN
979: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
980: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
981: END IF;
982:
983: x_first_trans := TRUE;

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

976: END IF;
977:
978: IF (g_asn_debug = 'Y') THEN
979: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
980: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
981: END IF;
982:
983: x_first_trans := TRUE;
984: transaction_ok := FALSE;

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

987: */
988: FETCH count_shipments INTO x_countshipmentrec;
989: x_record_count := x_countshipmentrec.line_count;
990:
991: IF (g_asn_debug = 'Y') THEN
992: asn_debug.put_line('before starting cascade');
993: END IF;
994:
995: IF (g_asn_debug = 'Y') THEN

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

988: FETCH count_shipments INTO x_countshipmentrec;
989: x_record_count := x_countshipmentrec.line_count;
990:
991: IF (g_asn_debug = 'Y') THEN
992: asn_debug.put_line('before starting cascade');
993: END IF;
994:
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('record count = ' || x_record_count);

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

991: IF (g_asn_debug = 'Y') THEN
992: asn_debug.put_line('before starting cascade');
993: END IF;
994:
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('record count = ' || x_record_count);
997: END IF;
998:
999: LOOP --{ over the count of shipment records obtained

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

992: asn_debug.put_line('before starting cascade');
993: END IF;
994:
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('record count = ' || x_record_count);
997: END IF;
998:
999: LOOP --{ over the count of shipment records obtained
1000: IF (g_asn_debug = 'Y') THEN

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

996: asn_debug.put_line('record count = ' || x_record_count);
997: END IF;
998:
999: LOOP --{ over the count of shipment records obtained
1000: IF (g_asn_debug = 'Y') THEN
1001: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1002: END IF;
1003:
1004: IF (g_asn_debug = 'Y') THEN

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

997: END IF;
998:
999: LOOP --{ over the count of shipment records obtained
1000: IF (g_asn_debug = 'Y') THEN
1001: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1002: END IF;
1003:
1004: IF (g_asn_debug = 'Y') THEN
1005: asn_debug.put_line('open shipments and fetch');

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

1000: IF (g_asn_debug = 'Y') THEN
1001: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1002: END IF;
1003:
1004: IF (g_asn_debug = 'Y') THEN
1005: asn_debug.put_line('open shipments and fetch');
1006: END IF;
1007:
1008: /*

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

1001: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
1002: END IF;
1003:
1004: IF (g_asn_debug = 'Y') THEN
1005: asn_debug.put_line('open shipments and fetch');
1006: END IF;
1007:
1008: /*
1009: ** fetch the cursor

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

1008: /*
1009: ** fetch the cursor
1010: */
1011: --{
1012: IF (g_asn_debug = 'Y') THEN
1013: asn_debug.put_line('fetching shipments cursor');
1014: END IF;
1015:
1016: FETCH shipments INTO x_shipmentrec;

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

1009: ** fetch the cursor
1010: */
1011: --{
1012: IF (g_asn_debug = 'Y') THEN
1013: asn_debug.put_line('fetching shipments cursor');
1014: END IF;
1015:
1016: FETCH shipments INTO x_shipmentrec;
1017:

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

1023: END IF;
1024:
1025: rows_fetched := shipments%ROWCOUNT;
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
1029: END IF;
1030:
1031: -- }

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

1024:
1025: rows_fetched := shipments%ROWCOUNT;
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
1029: END IF;
1030:
1031: -- }
1032:

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

1032:
1033:
1034: IF ( lastrecord
1035: OR x_remaining_quantity <= 0) THEN --{
1036: IF (g_asn_debug = 'Y') THEN
1037: asn_debug.put_line('hit exit condition');
1038: END IF;
1039:
1040: IF NOT x_first_trans THEN

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

1033:
1034: IF ( lastrecord
1035: OR x_remaining_quantity <= 0) THEN --{
1036: IF (g_asn_debug = 'Y') THEN
1037: asn_debug.put_line('hit exit condition');
1038: END IF;
1039:
1040: IF NOT x_first_trans THEN
1041: -- x_first_trans has been reset which means some cascade has

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

1043: current_n := current_n - 1;
1044: END IF;
1045:
1046: -- do the tolerance act here
1047: IF (g_asn_debug = 'Y') THEN
1048: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1049: asn_debug.put_line('check which condition has occured');
1050: END IF;
1051:

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

1044: END IF;
1045:
1046: -- do the tolerance act here
1047: IF (g_asn_debug = 'Y') THEN
1048: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1049: asn_debug.put_line('check which condition has occured');
1050: END IF;
1051:
1052: -- lastrecord...we have run out of rows and we still have quantity to allocate

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

1045:
1046: -- do the tolerance act here
1047: IF (g_asn_debug = 'Y') THEN
1048: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
1049: asn_debug.put_line('check which condition has occured');
1050: END IF;
1051:
1052: -- lastrecord...we have run out of rows and we still have quantity to allocate
1053: IF x_remaining_quantity > 0 THEN --{

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

1050: END IF;
1051:
1052: -- lastrecord...we have run out of rows and we still have quantity to allocate
1053: IF x_remaining_quantity > 0 THEN --{
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('There is quantity remaining');
1056: asn_debug.put_line('Need to check qty tolerances');
1057: END IF;
1058:

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

1051:
1052: -- lastrecord...we have run out of rows and we still have quantity to allocate
1053: IF x_remaining_quantity > 0 THEN --{
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('There is quantity remaining');
1056: asn_debug.put_line('Need to check qty tolerances');
1057: END IF;
1058:
1059: IF rows_fetched > 0

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

1052: -- lastrecord...we have run out of rows and we still have quantity to allocate
1053: IF x_remaining_quantity > 0 THEN --{
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('There is quantity remaining');
1056: asn_debug.put_line('Need to check qty tolerances');
1057: END IF;
1058:
1059: IF rows_fetched > 0
1060: AND NOT x_first_trans THEN --{

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

1057: END IF;
1058:
1059: IF rows_fetched > 0
1060: AND NOT x_first_trans THEN --{
1061: IF (g_asn_debug = 'Y') THEN
1062: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1063: END IF;
1064:
1065: IF (g_asn_debug = 'Y') THEN

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

1058:
1059: IF rows_fetched > 0
1060: AND NOT x_first_trans THEN --{
1061: IF (g_asn_debug = 'Y') THEN
1062: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1063: END IF;
1064:
1065: IF (g_asn_debug = 'Y') THEN
1066: asn_debug.put_line('delete the temp table ');

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

1061: IF (g_asn_debug = 'Y') THEN
1062: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1063: END IF;
1064:
1065: IF (g_asn_debug = 'Y') THEN
1066: asn_debug.put_line('delete the temp table ');
1067: END IF;
1068:
1069: IF temp_cascaded_table.COUNT > 0 THEN

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

1062: asn_debug.put_line(' in internal order transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
1063: END IF;
1064:
1065: IF (g_asn_debug = 'Y') THEN
1066: asn_debug.put_line('delete the temp table ');
1067: END IF;
1068:
1069: IF temp_cascaded_table.COUNT > 0 THEN
1070: FOR i IN 1 .. temp_cascaded_table.COUNT LOOP

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

1071: temp_cascaded_table.DELETE(i);
1072: END LOOP;
1073: END IF;
1074:
1075: IF (g_asn_debug = 'Y') THEN
1076: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
1077: END IF;
1078:
1079: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

1072: END LOOP;
1073: END IF;
1074:
1075: IF (g_asn_debug = 'Y') THEN
1076: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
1077: END IF;
1078:
1079: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1080: rcv_error_pkg.set_error_message('RCV_SHIP_QTY_OVER_TOLERANCE', x_cascaded_table(n).error_message);

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

1082: rcv_error_pkg.set_token('QTY_B', x_cascaded_table(n).quantity - x_remaining_quantity);
1083: rcv_error_pkg.log_interface_error('QUANTITY');
1084: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1085: IF rows_fetched = 0 THEN
1086: IF (g_asn_debug = 'Y') THEN
1087: asn_debug.put_line('No rows were retrieved from cursor.');
1088: END IF;
1089: ELSIF x_first_trans THEN
1090: IF (g_asn_debug = 'Y') THEN

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

1083: rcv_error_pkg.log_interface_error('QUANTITY');
1084: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1085: IF rows_fetched = 0 THEN
1086: IF (g_asn_debug = 'Y') THEN
1087: asn_debug.put_line('No rows were retrieved from cursor.');
1088: END IF;
1089: ELSIF x_first_trans THEN
1090: IF (g_asn_debug = 'Y') THEN
1091: asn_debug.put_line('No rows were cascaded');

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

1086: IF (g_asn_debug = 'Y') THEN
1087: asn_debug.put_line('No rows were retrieved from cursor.');
1088: END IF;
1089: ELSIF x_first_trans THEN
1090: IF (g_asn_debug = 'Y') THEN
1091: asn_debug.put_line('No rows were cascaded');
1092: END IF;
1093: END IF;
1094:

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

1087: asn_debug.put_line('No rows were retrieved from cursor.');
1088: END IF;
1089: ELSIF x_first_trans THEN
1090: IF (g_asn_debug = 'Y') THEN
1091: asn_debug.put_line('No rows were cascaded');
1092: END IF;
1093: END IF;
1094:
1095: -- 1) should we check to see why no rows were fetched ??

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

1111: -- all the rows in the temp cascaded table
1112: -- will be deleted
1113: -- as we cannot over/under receive against a inter-org transfer receive
1114: ELSE -- }{
1115: IF (g_asn_debug = 'Y') THEN
1116: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1117: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1118: END IF;
1119: END IF; --} ends the check for whether last record has been reached

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

1112: -- will be deleted
1113: -- as we cannot over/under receive against a inter-org transfer receive
1114: ELSE -- }{
1115: IF (g_asn_debug = 'Y') THEN
1116: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1117: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1118: END IF;
1119: END IF; --} ends the check for whether last record has been reached
1120:

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

1113: -- as we cannot over/under receive against a inter-org transfer receive
1114: ELSE -- }{
1115: IF (g_asn_debug = 'Y') THEN
1116: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1117: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1118: END IF;
1119: END IF; --} ends the check for whether last record has been reached
1120:
1121: -- close cursors

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

1119: END IF; --} ends the check for whether last record has been reached
1120:
1121: -- close cursors
1122:
1123: IF (g_asn_debug = 'Y') THEN
1124: asn_debug.put_line('close cursors shipments, count_shipments');
1125: END IF;
1126:
1127: IF shipments%ISOPEN THEN

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

1120:
1121: -- close cursors
1122:
1123: IF (g_asn_debug = 'Y') THEN
1124: asn_debug.put_line('close cursors shipments, count_shipments');
1125: END IF;
1126:
1127: IF shipments%ISOPEN THEN
1128: CLOSE shipments;

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

1136: END IF; --} matches lastrecord or x_remaining_quantity <= 0
1137:
1138: -- eliminate the row if it fails the date check
1139:
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1142: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1143: asn_debug.put_line('int org rcv : calling get available qty');
1144: END IF;

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

1137:
1138: -- eliminate the row if it fails the date check
1139:
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1142: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1143: asn_debug.put_line('int org rcv : calling get available qty');
1144: END IF;
1145:

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

1138: -- eliminate the row if it fails the date check
1139:
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1142: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1143: asn_debug.put_line('int org rcv : calling get available qty');
1144: END IF;
1145:
1146: -- removed rcv_transactions_interface_sv.check_date_tolerance;

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

1139:
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1142: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
1143: asn_debug.put_line('int org rcv : calling get available qty');
1144: END IF;
1145:
1146: -- removed rcv_transactions_interface_sv.check_date_tolerance;
1147: -- removed check shipto_location enforcement

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

1165: ** that is available for allocation by this interface transaction
1166: ** the available qty can only be found from rsl
1167: ** the else condition should never arise : confirm from priya ??
1168: */
1169: IF (g_asn_debug = 'Y') THEN
1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));

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

1166: ** the available qty can only be found from rsl
1167: ** the else condition should never arise : confirm from priya ??
1168: */
1169: IF (g_asn_debug = 'Y') THEN
1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1174: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);

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

1167: ** the else condition should never arise : confirm from priya ??
1168: */
1169: IF (g_asn_debug = 'Y') THEN
1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1174: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1175: END IF;

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

1168: */
1169: IF (g_asn_debug = 'Y') THEN
1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1174: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1175: END IF;
1176:

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

1169: IF (g_asn_debug = 'Y') THEN
1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1174: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1175: END IF;
1176:
1177: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'

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

1170: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
1171: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
1172: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
1173: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
1174: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
1175: END IF;
1176:
1177: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'
1178: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') IN('RECEIVE', 'DELIVER')) THEN --{

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

1208: END LOOP;
1209: END IF;
1210: END IF; --}
1211:
1212: IF (g_asn_debug = 'Y') THEN
1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

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

1209: END IF;
1210: END IF; --}
1211:
1212: IF (g_asn_debug = 'Y') THEN
1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1217: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);

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

1210: END IF; --}
1211:
1212: IF (g_asn_debug = 'Y') THEN
1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1217: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1218: END IF;

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

1211:
1212: IF (g_asn_debug = 'Y') THEN
1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1217: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1218: END IF;
1219:

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

1212: IF (g_asn_debug = 'Y') THEN
1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1217: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1218: END IF;
1219:
1220: -- if qty has already been allocated then reduce available and tolerable

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

1213: asn_debug.put_line('after call to get_available quantity');
1214: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1215: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1216: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1217: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
1218: END IF;
1219:
1220: -- if qty has already been allocated then reduce available and tolerable
1221: -- qty by the allocated amount

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

1231: IF x_tolerable_qty < 0 THEN
1232: x_tolerable_qty := 0;
1233: END IF;
1234:
1235: IF (g_asn_debug = 'Y') THEN
1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));

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

1232: x_tolerable_qty := 0;
1233: END IF;
1234:
1235: IF (g_asn_debug = 'Y') THEN
1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));

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

1233: END IF;
1234:
1235: IF (g_asn_debug = 'Y') THEN
1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1241: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

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

1234:
1235: IF (g_asn_debug = 'Y') THEN
1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1241: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1242: END IF;

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

1235: IF (g_asn_debug = 'Y') THEN
1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1241: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1242: END IF;
1243: END IF; --}

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

1236: asn_debug.put_line('have some allocated quantity. will reduce qty');
1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1241: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1242: END IF;
1243: END IF; --}
1244: -- we can use the first record since the item_id and uom are not going to change

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

1237: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
1238: asn_debug.put_line('after reducing by allocated qty');
1239: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
1240: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
1241: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
1242: END IF;
1243: END IF; --}
1244: -- we can use the first record since the item_id and uom are not going to change
1245: -- check that we can convert between asn-> po uom

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

1254: x_shipmentrec.unit_of_measure
1255: );
1256:
1257: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1258: IF (g_asn_debug = 'Y') THEN
1259: asn_debug.put_line('need an error message in the interface tables');
1260: asn_debug.put_line('cannot interconvert between diff uoms');
1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {

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

1255: );
1256:
1257: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1258: IF (g_asn_debug = 'Y') THEN
1259: asn_debug.put_line('need an error message in the interface tables');
1260: asn_debug.put_line('cannot interconvert between diff uoms');
1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN

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

1256:
1257: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
1258: IF (g_asn_debug = 'Y') THEN
1259: asn_debug.put_line('need an error message in the interface tables');
1260: asn_debug.put_line('cannot interconvert between diff uoms');
1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));

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

1259: asn_debug.put_line('need an error message in the interface tables');
1260: asn_debug.put_line('cannot interconvert between diff uoms');
1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1265: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1266: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1267: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));

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

1260: asn_debug.put_line('cannot interconvert between diff uoms');
1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1265: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1266: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1267: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1268: END IF;

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

1261: END IF;
1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1265: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1266: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1267: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1268: END IF;
1269:

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

1262: ELSE -- we have converted the qty between uoms succesfully } {
1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1265: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1266: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1267: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1268: END IF;
1269:
1270: IF x_converted_trx_qty > 0 THEN --{

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

1263: IF (g_asn_debug = 'Y') THEN
1264: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1265: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
1266: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
1267: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
1268: END IF;
1269:
1270: IF x_converted_trx_qty > 0 THEN --{
1271: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {

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

1268: END IF;
1269:
1270: IF x_converted_trx_qty > 0 THEN --{
1271: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
1272: IF (g_asn_debug = 'Y') THEN
1273: asn_debug.put_line('total qty available to be received is less than remaining qty');
1274: END IF;
1275:
1276: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;

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

1269:
1270: IF x_converted_trx_qty > 0 THEN --{
1271: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
1272: IF (g_asn_debug = 'Y') THEN
1273: asn_debug.put_line('total qty available to be received is less than remaining qty');
1274: END IF;
1275:
1276: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;
1277: -- change rsl uom qty to uom of first line in cascaded table so both qtys are in sync

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

1281: temp_cascaded_table(1).unit_of_measure
1282: );
1283: insert_into_table := TRUE;
1284: ELSE --} {
1285: IF (g_asn_debug = 'Y') THEN
1286: asn_debug.put_line('total qty available to be received is > remaining qty ');
1287: END IF;
1288:
1289: x_converted_trx_qty := x_remaining_qty_rsl_uom;

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

1282: );
1283: insert_into_table := TRUE;
1284: ELSE --} {
1285: IF (g_asn_debug = 'Y') THEN
1286: asn_debug.put_line('total qty available to be received is > remaining qty ');
1287: END IF;
1288:
1289: x_converted_trx_qty := x_remaining_qty_rsl_uom;
1290: insert_into_table := TRUE;

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

1293: END IF; --}
1294: ELSE -- no qty for this record but if last row we need it } {
1295: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
1296: -- so that the row can be used based on qty tolerance checks
1297: IF (g_asn_debug = 'Y') THEN
1298: asn_debug.put_line('quantity is less then 0 but last record');
1299: END IF;
1300:
1301: insert_into_table := TRUE;

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

1294: ELSE -- no qty for this record but if last row we need it } {
1295: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
1296: -- so that the row can be used based on qty tolerance checks
1297: IF (g_asn_debug = 'Y') THEN
1298: asn_debug.put_line('quantity is less then 0 but last record');
1299: END IF;
1300:
1301: insert_into_table := TRUE;
1302: x_converted_trx_qty := 0;

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

1300:
1301: insert_into_table := TRUE;
1302: x_converted_trx_qty := 0;
1303: ELSE --} {
1304: IF (g_asn_debug = 'Y') THEN
1305: asn_debug.put_line('<= 0 quantity but more records in cursor');
1306: END IF;
1307:
1308: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

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

1301: insert_into_table := TRUE;
1302: x_converted_trx_qty := 0;
1303: ELSE --} {
1304: IF (g_asn_debug = 'Y') THEN
1305: asn_debug.put_line('<= 0 quantity but more records in cursor');
1306: END IF;
1307:
1308: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1309:

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

1306: END IF;
1307:
1308: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1309:
1310: IF (g_asn_debug = 'Y') THEN
1311: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
1312: END IF;
1313:
1314: insert_into_table := FALSE;

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

1307:
1308: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
1309:
1310: IF (g_asn_debug = 'Y') THEN
1311: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
1312: END IF;
1313:
1314: insert_into_table := FALSE;
1315: END IF; --}

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

1317: END IF; --} remaining_qty_po_uom <> 0
1318:
1319: IF insert_into_table THEN --{
1320: IF (x_first_trans) THEN --{
1321: IF (g_asn_debug = 'Y') THEN
1322: asn_debug.put_line('first time ' || TO_CHAR(current_n));
1323: END IF;
1324:
1325: x_first_trans := FALSE;

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

1318:
1319: IF insert_into_table THEN --{
1320: IF (x_first_trans) THEN --{
1321: IF (g_asn_debug = 'Y') THEN
1322: asn_debug.put_line('first time ' || TO_CHAR(current_n));
1323: END IF;
1324:
1325: x_first_trans := FALSE;
1326: ELSE --} { not x_first_trans

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

1323: END IF;
1324:
1325: x_first_trans := FALSE;
1326: ELSE --} { not x_first_trans
1327: IF (g_asn_debug = 'Y') THEN
1328: asn_debug.put_line('next time ' || TO_CHAR(current_n));
1329: END IF;
1330:
1331: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

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

1324:
1325: x_first_trans := FALSE;
1326: ELSE --} { not x_first_trans
1327: IF (g_asn_debug = 'Y') THEN
1328: asn_debug.put_line('next time ' || TO_CHAR(current_n));
1329: END IF;
1330:
1331: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
1332: END IF; --} matches x_first_transfer

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

1345: ELSE
1346: temp_cascaded_table(current_n).quantity := x_converted_trx_qty;
1347: END IF;
1348:
1349: IF (g_asn_debug = 'Y') THEN
1350: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
1351: END IF;
1352:
1353: -- primary qty in primary uom

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

1346: temp_cascaded_table(current_n).quantity := x_converted_trx_qty;
1347: END IF;
1348:
1349: IF (g_asn_debug = 'Y') THEN
1350: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
1351: END IF;
1352:
1353: -- primary qty in primary uom
1354: IF (temp_cascaded_table(current_n).primary_unit_of_measure <> x_shipmentrec.unit_of_measure) THEN

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

1359: );
1360: ELSE
1361: temp_cascaded_table(current_n).primary_quantity := x_converted_trx_qty;
1362:
1363: IF (g_asn_debug = 'Y') THEN
1364: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
1365: END IF;
1366:
1367: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';

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

1360: ELSE
1361: temp_cascaded_table(current_n).primary_quantity := x_converted_trx_qty;
1362:
1363: IF (g_asn_debug = 'Y') THEN
1364: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
1365: END IF;
1366:
1367: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';
1368: temp_cascaded_table(current_n).interface_source_code := 'RCV';

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

1368: temp_cascaded_table(current_n).interface_source_code := 'RCV';
1369: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
1370: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
1371:
1372: IF (g_asn_debug = 'Y') THEN
1373: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1374: END IF;
1375:
1376: -- confirm the data in rsh and rsl for the provided info

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

1369: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
1370: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
1371:
1372: IF (g_asn_debug = 'Y') THEN
1373: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1374: END IF;
1375:
1376: -- confirm the data in rsh and rsl for the provided info
1377: IF (g_asn_debug = 'Y') THEN

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

1373: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
1374: END IF;
1375:
1376: -- confirm the data in rsh and rsl for the provided info
1377: IF (g_asn_debug = 'Y') THEN
1378: asn_debug.put_line( 'rsl : cat '
1379: || x_shipmentrec.category_id
1380: || ' item desc '
1381: || x_shipmentrec.item_description

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

1374: END IF;
1375:
1376: -- confirm the data in rsh and rsl for the provided info
1377: IF (g_asn_debug = 'Y') THEN
1378: asn_debug.put_line( 'rsl : cat '
1379: || x_shipmentrec.category_id
1380: || ' item desc '
1381: || x_shipmentrec.item_description
1382: || ' header '

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

1462: EXCEPTION
1463: WHEN NO_DATA_FOUND THEN
1464: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1465:
1466: IF (g_asn_debug = 'Y') THEN
1467: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1468: asn_debug.put_line(' so it is cleared off');
1469: END IF;
1470: WHEN OTHERS THEN

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

1463: WHEN NO_DATA_FOUND THEN
1464: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1465:
1466: IF (g_asn_debug = 'Y') THEN
1467: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1468: asn_debug.put_line(' so it is cleared off');
1469: END IF;
1470: WHEN OTHERS THEN
1471: temp_cascaded_table(current_n).deliver_to_person_id := NULL;

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

1464: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1465:
1466: IF (g_asn_debug = 'Y') THEN
1467: asn_debug.put_line('the deliver to person entered in po is currently inactive');
1468: asn_debug.put_line(' so it is cleared off');
1469: END IF;
1470: WHEN OTHERS THEN
1471: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1472:

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

1469: END IF;
1470: WHEN OTHERS THEN
1471: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1472:
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('some exception has occured');
1475: asn_debug.put_line('this exception is due to the po deliver to person');
1476: asn_debug.put_line('the deliver to person is optional');
1477: asn_debug.put_line('so cleared off the deliver to person');

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

1470: WHEN OTHERS THEN
1471: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1472:
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('some exception has occured');
1475: asn_debug.put_line('this exception is due to the po deliver to person');
1476: asn_debug.put_line('the deliver to person is optional');
1477: asn_debug.put_line('so cleared off the deliver to person');
1478: END IF;

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

1471: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
1472:
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('some exception has occured');
1475: asn_debug.put_line('this exception is due to the po deliver to person');
1476: asn_debug.put_line('the deliver to person is optional');
1477: asn_debug.put_line('so cleared off the deliver to person');
1478: END IF;
1479: END;

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

1472:
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('some exception has occured');
1475: asn_debug.put_line('this exception is due to the po deliver to person');
1476: asn_debug.put_line('the deliver to person is optional');
1477: asn_debug.put_line('so cleared off the deliver to person');
1478: END IF;
1479: END;
1480: END IF; --}

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

1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('some exception has occured');
1475: asn_debug.put_line('this exception is due to the po deliver to person');
1476: asn_debug.put_line('the deliver to person is optional');
1477: asn_debug.put_line('so cleared off the deliver to person');
1478: END IF;
1479: END;
1480: END IF; --}
1481: END IF; --}

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

1491: END IF; --} matches txn not deliver
1492:
1493: current_n := current_n + 1;
1494:
1495: IF (g_asn_debug = 'Y') THEN
1496: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
1497: END IF;
1498: END IF; --} matches if insert into table
1499: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none

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

1492:
1493: current_n := current_n + 1;
1494:
1495: IF (g_asn_debug = 'Y') THEN
1496: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
1497: END IF;
1498: END IF; --} matches if insert into table
1499: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none
1500: END LOOP; --}

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

1520: IF count_shipments%ISOPEN THEN
1521: CLOSE count_shipments;
1522: END IF;
1523:
1524: IF (g_asn_debug = 'Y') THEN
1525: asn_debug.put_line('exit derive_io_rcv_line_qty');
1526: END IF;
1527: EXCEPTION
1528: WHEN rcv_error_pkg.e_fatal_error THEN

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

1521: CLOSE count_shipments;
1522: END IF;
1523:
1524: IF (g_asn_debug = 'Y') THEN
1525: asn_debug.put_line('exit derive_io_rcv_line_qty');
1526: END IF;
1527: EXCEPTION
1528: WHEN rcv_error_pkg.e_fatal_error THEN
1529: IF shipments%ISOPEN THEN

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

1545: rcv_error_pkg.set_sql_error_message('derive_io_rcv_line_qty', x_progress);
1546: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
1547: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1548:
1549: IF (g_asn_debug = 'Y') THEN
1550: asn_debug.put_line(TO_CHAR(n));
1551: asn_debug.put_line(SQLERRM);
1552: asn_debug.put_line('error ' || x_progress);
1553: END IF;

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

1546: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
1547: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1548:
1549: IF (g_asn_debug = 'Y') THEN
1550: asn_debug.put_line(TO_CHAR(n));
1551: asn_debug.put_line(SQLERRM);
1552: asn_debug.put_line('error ' || x_progress);
1553: END IF;
1554: END derive_io_rcv_line_qty;

Line 1551: asn_debug.put_line(SQLERRM);

1547: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1548:
1549: IF (g_asn_debug = 'Y') THEN
1550: asn_debug.put_line(TO_CHAR(n));
1551: asn_debug.put_line(SQLERRM);
1552: asn_debug.put_line('error ' || x_progress);
1553: END IF;
1554: END derive_io_rcv_line_qty;
1555:

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

1548:
1549: IF (g_asn_debug = 'Y') THEN
1550: asn_debug.put_line(TO_CHAR(n));
1551: asn_debug.put_line(SQLERRM);
1552: asn_debug.put_line('error ' || x_progress);
1553: END IF;
1554: END derive_io_rcv_line_qty;
1555:
1556: PROCEDURE derive_trans_del_line_quantity(

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

1666: l_deliver_to_person_id NUMBER;
1667: l_rsl_count NUMBER;
1668: BEGIN
1669: --At this point shipment_line_id would haven been defaulted/derived
1670: IF (g_asn_debug = 'Y') THEN
1671: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1672: END IF;
1673: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1674: IF (g_asn_debug = 'Y') THEN

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

1667: l_rsl_count NUMBER;
1668: BEGIN
1669: --At this point shipment_line_id would haven been defaulted/derived
1670: IF (g_asn_debug = 'Y') THEN
1671: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1672: END IF;
1673: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1674: IF (g_asn_debug = 'Y') THEN
1675: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);

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

1670: IF (g_asn_debug = 'Y') THEN
1671: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1672: END IF;
1673: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1674: IF (g_asn_debug = 'Y') THEN
1675: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);
1676: END IF;
1677:
1678: BEGIN

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

1671: asn_debug.put_line('Inside get_deliver_to_person_from_rsl...');
1672: END IF;
1673: IF (x_cascaded_table(n).shipment_line_id is not null) THEN
1674: IF (g_asn_debug = 'Y') THEN
1675: asn_debug.put_line('Inside rsl is not null..rsl value :'||x_cascaded_table(n).shipment_line_id);
1676: END IF;
1677:
1678: BEGIN
1679: select deliver_to_person_id

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

1681: from rcv_shipment_lines
1682: where shipment_line_id = x_cascaded_table(n).shipment_line_id;
1683:
1684: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1685: IF (g_asn_debug = 'Y') THEN
1686: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1687: END IF;
1688: EXCEPTION
1689: WHEN OTHERS then

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

1682: where shipment_line_id = x_cascaded_table(n).shipment_line_id;
1683:
1684: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1685: IF (g_asn_debug = 'Y') THEN
1686: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1687: END IF;
1688: EXCEPTION
1689: WHEN OTHERS then
1690: IF (g_asn_debug = 'Y') THEN

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

1686: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1687: END IF;
1688: EXCEPTION
1689: WHEN OTHERS then
1690: IF (g_asn_debug = 'Y') THEN
1691: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1692: END IF;
1693: END;
1694: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN

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

1687: END IF;
1688: EXCEPTION
1689: WHEN OTHERS then
1690: IF (g_asn_debug = 'Y') THEN
1691: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1692: END IF;
1693: END;
1694: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1695: IF (g_asn_debug = 'Y') THEN

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

1691: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsl');
1692: END IF;
1693: END;
1694: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1695: IF (g_asn_debug = 'Y') THEN
1696: asn_debug.put_line('Inside rsh not null..rsh value :'||x_cascaded_table(n).shipment_header_id);
1697: END IF;
1698:
1699: BEGIN

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

1692: END IF;
1693: END;
1694: ELSIF (x_cascaded_table(n).shipment_header_id is not null) THEN
1695: IF (g_asn_debug = 'Y') THEN
1696: asn_debug.put_line('Inside rsh not null..rsh value :'||x_cascaded_table(n).shipment_header_id);
1697: END IF;
1698:
1699: BEGIN
1700: select count(shipment_line_id)

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

1701: into l_rsl_count
1702: from rcv_shipment_lines
1703: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1704:
1705: IF (g_asn_debug = 'Y') THEN
1706: asn_debug.put_line('Inside rsh not null..l_rsl_count:'||l_rsl_count);
1707: END IF;
1708:
1709: IF l_rsl_count = 1 THEN

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

1702: from rcv_shipment_lines
1703: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1704:
1705: IF (g_asn_debug = 'Y') THEN
1706: asn_debug.put_line('Inside rsh not null..l_rsl_count:'||l_rsl_count);
1707: END IF;
1708:
1709: IF l_rsl_count = 1 THEN
1710: select deliver_to_person_id

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

1711: into l_deliver_to_person_id
1712: from rcv_shipment_lines
1713: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1714: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1715: IF (g_asn_debug = 'Y') THEN
1716: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1717: END IF;
1718: ELSE--l_rsl_count = 1
1719: IF (g_asn_debug = 'Y') THEN

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

1712: from rcv_shipment_lines
1713: where shipment_header_id = x_cascaded_table(n).shipment_header_id;
1714: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
1715: IF (g_asn_debug = 'Y') THEN
1716: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1717: END IF;
1718: ELSE--l_rsl_count = 1
1719: IF (g_asn_debug = 'Y') THEN
1720: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');

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

1715: IF (g_asn_debug = 'Y') THEN
1716: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1717: END IF;
1718: ELSE--l_rsl_count = 1
1719: IF (g_asn_debug = 'Y') THEN
1720: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');
1721: END IF;
1722: END IF;--l_rsl_count = 1
1723: EXCEPTION

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

1716: asn_debug.put_line('defaulted deliver_to_person_id as:'||l_deliver_to_person_id);
1717: END IF;
1718: ELSE--l_rsl_count = 1
1719: IF (g_asn_debug = 'Y') THEN
1720: asn_debug.put_line('deliver_to_person_id not defalued as rsh has more than 1 rsl');
1721: END IF;
1722: END IF;--l_rsl_count = 1
1723: EXCEPTION
1724: WHEN OTHERS then

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

1721: END IF;
1722: END IF;--l_rsl_count = 1
1723: EXCEPTION
1724: WHEN OTHERS then
1725: IF (g_asn_debug = 'Y') THEN
1726: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsh');
1727: END IF;
1728: END;
1729: END IF;--(x_cascaded_table(n).shipment_line_id is not null)

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

1722: END IF;--l_rsl_count = 1
1723: EXCEPTION
1724: WHEN OTHERS then
1725: IF (g_asn_debug = 'Y') THEN
1726: asn_debug.put_line('Exception occured while getting deliver_to_person_id thru rsh');
1727: END IF;
1728: END;
1729: END IF;--(x_cascaded_table(n).shipment_line_id is not null)
1730: END get_deliver_to_person_from_rsl;

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

1743: into l_parent_deliver_to_person_id
1744: from rcv_transactions
1745: where transaction_id = x_cascaded_table(n).parent_transaction_id;
1746:
1747: IF (g_asn_debug = 'Y') THEN
1748: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1749: END IF;
1750: return l_parent_deliver_to_person_id;
1751: EXCEPTION

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

1744: from rcv_transactions
1745: where transaction_id = x_cascaded_table(n).parent_transaction_id;
1746:
1747: IF (g_asn_debug = 'Y') THEN
1748: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1749: END IF;
1750: return l_parent_deliver_to_person_id;
1751: EXCEPTION
1752: WHEN OTHERS then

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

1749: END IF;
1750: return l_parent_deliver_to_person_id;
1751: EXCEPTION
1752: WHEN OTHERS then
1753: IF (g_asn_debug = 'Y') THEN
1754: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rt');
1755: END IF;
1756: return null;
1757: END get_deliver_to_person_from_rt;

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

1750: return l_parent_deliver_to_person_id;
1751: EXCEPTION
1752: WHEN OTHERS then
1753: IF (g_asn_debug = 'Y') THEN
1754: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rt');
1755: END IF;
1756: return null;
1757: END get_deliver_to_person_from_rt;
1758:

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

1771: into l_parent_deliver_to_person_id
1772: from rcv_transactions_interface
1773: where interface_transaction_id = x_cascaded_table(n).parent_transaction_id;
1774:
1775: IF (g_asn_debug = 'Y') THEN
1776: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1777: END IF;
1778: return l_parent_deliver_to_person_id;
1779: EXCEPTION

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

1772: from rcv_transactions_interface
1773: where interface_transaction_id = x_cascaded_table(n).parent_transaction_id;
1774:
1775: IF (g_asn_debug = 'Y') THEN
1776: asn_debug.put_line('Got deliver_to_person_id of parent txn as:'||l_parent_deliver_to_person_id);
1777: END IF;
1778: return l_parent_deliver_to_person_id;
1779: EXCEPTION
1780: WHEN OTHERS then

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

1777: END IF;
1778: return l_parent_deliver_to_person_id;
1779: EXCEPTION
1780: WHEN OTHERS then
1781: IF (g_asn_debug = 'Y') THEN
1782: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rti');
1783: END IF;
1784: return null;
1785: END get_deliver_to_person_from_rti;

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

1778: return l_parent_deliver_to_person_id;
1779: EXCEPTION
1780: WHEN OTHERS then
1781: IF (g_asn_debug = 'Y') THEN
1782: asn_debug.put_line('Exception occured in get_deliver_to_person_from_rti');
1783: END IF;
1784: return null;
1785: END get_deliver_to_person_from_rti;
1786: