DBA Data[Home] [Help]

APPS.RCV_RMA_TRANSACTIONS dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_rma_transactions
2: /* $Header: RCVRMATB.pls 120.7.12000000.4 2007/08/15 19:47:10 vthevark ship $*/
3: AS
4: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
5: x_progress VARCHAR2(3);
6: TYPE t_used_rma_line_amounts is table of number index by binary_integer;
7: g_used_rma_line_amounts t_used_rma_line_amounts;
8:

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

280: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
281: x_header_record IN rcv_roi_preprocessor.header_rec_type
282: ) IS
283: BEGIN
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));

Line 285: asn_debug.put_line('Enter derive_rma_line');

281: x_header_record IN rcv_roi_preprocessor.header_rec_type
282: ) IS
283: BEGIN
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));
289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));

Line 286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));

282: ) IS
283: BEGIN
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));
289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));
290: END IF;

Line 287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);

283: BEGIN
284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));
289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));
290: END IF;
291:

Line 288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));

284: IF (g_asn_debug = 'Y') THEN
285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));
289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));
290: END IF;
291:
292: x_progress := '000';

Line 289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));

285: asn_debug.put_line('Enter derive_rma_line');
286: asn_debug.put_line('Current pointer in actual table ' || TO_CHAR(n));
287: asn_debug.put_line('Current error status ' || x_cascaded_table(n).error_status);
288: asn_debug.put_line('To Organization Id ' || NVL(TO_CHAR(x_cascaded_table(n).to_organization_id), 'NULL'));
289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));
290: END IF;
291:
292: x_progress := '000';
293: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

Line 293: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

289: asn_debug.put_line('To Organization Code ' || NVL(x_cascaded_table(n).to_organization_code, 'NULL'));
290: END IF;
291:
292: x_progress := '000';
293: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
294: -- derive_location_info(x_cascaded_table, n);
295: rcv_roi_transaction.derive_location_info(x_cascaded_table, n);
296: rcv_roi_transaction.derive_ship_to_location_info(x_cascaded_table, n);
297: x_progress := '010';

Line 298: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

294: -- derive_location_info(x_cascaded_table, n);
295: rcv_roi_transaction.derive_location_info(x_cascaded_table, n);
296: rcv_roi_transaction.derive_ship_to_location_info(x_cascaded_table, n);
297: x_progress := '010';
298: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
299: --derive_org_info(x_cascaded_table, n, x_header_record);
300: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,
301: n,
302: x_header_record

Line 305: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

301: n,
302: x_header_record
303: );
304: x_progress := '020';
305: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
306: derive_customer_info(x_cascaded_table, n);
307: x_progress := '030';
308: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
309: derive_order_header_info(x_cascaded_table, n);

Line 308: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

304: x_progress := '020';
305: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
306: derive_customer_info(x_cascaded_table, n);
307: x_progress := '030';
308: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
309: derive_order_header_info(x_cascaded_table, n);
310: x_progress := '040';
311: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
312: -- derive_item_info(x_cascaded_table, n);

Line 311: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

307: x_progress := '030';
308: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
309: derive_order_header_info(x_cascaded_table, n);
310: x_progress := '040';
311: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
312: -- derive_item_info(x_cascaded_table, n);
313: rcv_roi_transaction.derive_item_info(x_cascaded_table, n);
314: x_progress := '050';
315: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

Line 315: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

311: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
312: -- derive_item_info(x_cascaded_table, n);
313: rcv_roi_transaction.derive_item_info(x_cascaded_table, n);
314: x_progress := '050';
315: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
316: derive_order_line_info(x_cascaded_table, n);
317: x_progress := '060';
318: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
319: derive_document_line_info(x_cascaded_table, n);

Line 318: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

314: x_progress := '050';
315: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
316: derive_order_line_info(x_cascaded_table, n);
317: x_progress := '060';
318: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
319: derive_document_line_info(x_cascaded_table, n);
320: x_progress := '070';
321: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
322: derive_uom_info(x_cascaded_table, n);

Line 321: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

317: x_progress := '060';
318: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
319: derive_document_line_info(x_cascaded_table, n);
320: x_progress := '070';
321: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
322: derive_uom_info(x_cascaded_table, n);
323: x_progress := '080';
324: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
325: derive_transit_org_info(x_cascaded_table, n);

Line 324: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

320: x_progress := '070';
321: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
322: derive_uom_info(x_cascaded_table, n);
323: x_progress := '080';
324: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
325: derive_transit_org_info(x_cascaded_table, n);
326: x_progress := '090';
327: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
328: -- derive_routing_info(x_cascaded_table, n);

Line 327: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

323: x_progress := '080';
324: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
325: derive_transit_org_info(x_cascaded_table, n);
326: x_progress := '090';
327: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
328: -- derive_routing_info(x_cascaded_table, n);
329: rcv_roi_transaction.derive_routing_header_info(x_cascaded_table, n);
330: rcv_roi_transaction.derive_routing_step_info(x_cascaded_table, n);
331: x_progress := '100';

Line 332: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

328: -- derive_routing_info(x_cascaded_table, n);
329: rcv_roi_transaction.derive_routing_header_info(x_cascaded_table, n);
330: rcv_roi_transaction.derive_routing_step_info(x_cascaded_table, n);
331: x_progress := '100';
332: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
333: derive_deliver_to_info(x_cascaded_table, n);
334: x_progress := '120';
335: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
336: -- derive_locator_info(x_cascaded_table, n);

Line 335: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

331: x_progress := '100';
332: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
333: derive_deliver_to_info(x_cascaded_table, n);
334: x_progress := '120';
335: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
336: -- derive_locator_info(x_cascaded_table, n);
337: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n);
338: x_progress := '130';
339: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

Line 339: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

335: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
336: -- derive_locator_info(x_cascaded_table, n);
337: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n);
338: x_progress := '130';
339: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
340: -- derive_reason_info(x_cascaded_table, n);
341: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
342: x_progress := '140';
343: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

Line 343: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

339: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
340: -- derive_reason_info(x_cascaded_table, n);
341: rcv_roi_transaction.derive_reason_info(x_cascaded_table, n);
342: x_progress := '140';
343: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
344: derive_auto_transact_info(x_cascaded_table, n);
345: x_progress := '150';
346: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
347: explode_line_quantity(x_cascaded_table,

Line 346: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

342: x_progress := '140';
343: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
344: derive_auto_transact_info(x_cascaded_table, n);
345: x_progress := '150';
346: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
347: explode_line_quantity(x_cascaded_table,
348: n,
349: temp_cascaded_table,
350: x_header_record

Line 353: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));

349: temp_cascaded_table,
350: x_header_record
351: );
352: x_progress := '170';
353: asn_debug.put_line('RMA derive ' || x_progress || ' error status: ' || NVL(x_cascaded_table(n).error_status, 'NULL'));
354: END derive_rma_line;
355:
356: PROCEDURE derive_rma_trans_del(
357: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,

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

359: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
360: x_header_record IN rcv_roi_preprocessor.header_rec_type
361: ) IS
362: BEGIN
363: IF (g_asn_debug = 'Y') THEN
364: asn_debug.put_line('enter derive_cust_trans_del ');
365: END IF;
366:
367: /* Derive the to_org_id */

Line 364: asn_debug.put_line('enter derive_cust_trans_del ');

360: x_header_record IN rcv_roi_preprocessor.header_rec_type
361: ) IS
362: BEGIN
363: IF (g_asn_debug = 'Y') THEN
364: asn_debug.put_line('enter derive_cust_trans_del ');
365: END IF;
366:
367: /* Derive the to_org_id */
368: derive_org_info(x_cascaded_table,

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

370: x_header_record
371: );
372:
373: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
374: IF (g_asn_debug = 'Y') THEN
375: asn_debug.put_line('X_progress ' || x_progress);
376: END IF;
377:
378: SELECT muom.uom_code

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

371: );
372:
373: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
374: IF (g_asn_debug = 'Y') THEN
375: asn_debug.put_line('X_progress ' || x_progress);
376: END IF;
377:
378: SELECT muom.uom_code
379: INTO x_cascaded_table(n).uom_code

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

379: INTO x_cascaded_table(n).uom_code
380: FROM mtl_units_of_measure muom
381: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
382: ELSE
383: IF (g_asn_debug = 'Y') THEN
384: asn_debug.put_line('uom_code not derived as unit_of_measure is null');
385: END IF;
386: END IF;
387:

Line 384: asn_debug.put_line('uom_code not derived as unit_of_measure is null');

380: FROM mtl_units_of_measure muom
381: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
382: ELSE
383: IF (g_asn_debug = 'Y') THEN
384: asn_debug.put_line('uom_code not derived as unit_of_measure is null');
385: END IF;
386: END IF;
387:
388: x_progress := '026';

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

415: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
416: x_header_record IN rcv_roi_preprocessor.header_rec_type
417: ) IS
418: BEGIN
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line('enter derive_correction_line ');
421: END IF;
422:
423: /* Derive the to_org_id */

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

416: x_header_record IN rcv_roi_preprocessor.header_rec_type
417: ) IS
418: BEGIN
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line('enter derive_correction_line ');
421: END IF;
422:
423: /* Derive the to_org_id */
424: derive_org_info(x_cascaded_table,

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

426: x_header_record
427: );
428:
429: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
430: IF (g_asn_debug = 'Y') THEN
431: asn_debug.put_line('X_progress ' || x_progress);
432: END IF;
433:
434: SELECT muom.uom_code

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

427: );
428:
429: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
430: IF (g_asn_debug = 'Y') THEN
431: asn_debug.put_line('X_progress ' || x_progress);
432: END IF;
433:
434: SELECT muom.uom_code
435: INTO x_cascaded_table(n).uom_code

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

435: INTO x_cascaded_table(n).uom_code
436: FROM mtl_units_of_measure muom
437: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
438: ELSE
439: IF (g_asn_debug = 'Y') THEN
440: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
441: END IF;
442: END IF;
443:

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

436: FROM mtl_units_of_measure muom
437: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
438: ELSE
439: IF (g_asn_debug = 'Y') THEN
440: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
441: END IF;
442: END IF;
443:
444: x_progress := '091';

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

463: x_default_locator_id NUMBER;
464: x_success BOOLEAN;
465: x_tax_name VARCHAR2(50); -- Bug 6331613
466: BEGIN
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('In default_rma_line');
469: END IF;
470:
471: x_progress := '000';

Line 468: asn_debug.put_line('In default_rma_line');

464: x_success BOOLEAN;
465: x_tax_name VARCHAR2(50); -- Bug 6331613
466: BEGIN
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('In default_rma_line');
469: END IF;
470:
471: x_progress := '000';
472: -- set default_rma values

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

498: END IF;
499:
500: x_progress := '010';
501:
502: IF (g_asn_debug = 'Y') THEN
503: asn_debug.put_line('Exit default_rma_line');
504: END IF;
505: END default_rma_line;
506:

Line 503: asn_debug.put_line('Exit default_rma_line');

499:
500: x_progress := '010';
501:
502: IF (g_asn_debug = 'Y') THEN
503: asn_debug.put_line('Exit default_rma_line');
504: END IF;
505: END default_rma_line;
506:
507: /*===========================================================================

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

514: n IN BINARY_INTEGER,
515: x_header_record IN rcv_roi_preprocessor.header_rec_type
516: ) IS
517: BEGIN
518: IF (g_asn_debug = 'Y') THEN
519: asn_debug.put_line('Enter validate_rma_line');
520: END IF;
521:
522: x_progress := '000';

Line 519: asn_debug.put_line('Enter validate_rma_line');

515: x_header_record IN rcv_roi_preprocessor.header_rec_type
516: ) IS
517: BEGIN
518: IF (g_asn_debug = 'Y') THEN
519: asn_debug.put_line('Enter validate_rma_line');
520: END IF;
521:
522: x_progress := '000';
523:

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

553: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
554: rcv_error_pkg.set_sql_error_message('validate_rma_line', x_progress);
555: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
556:
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('I have hit an exception');
559: asn_debug.put_line(SQLERRM);
560: asn_debug.put_line('Exit validate_rma_line');
561: END IF;

Line 558: asn_debug.put_line('I have hit an exception');

554: rcv_error_pkg.set_sql_error_message('validate_rma_line', x_progress);
555: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
556:
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('I have hit an exception');
559: asn_debug.put_line(SQLERRM);
560: asn_debug.put_line('Exit validate_rma_line');
561: END IF;
562: END validate_rma_line;

Line 559: asn_debug.put_line(SQLERRM);

555: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
556:
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('I have hit an exception');
559: asn_debug.put_line(SQLERRM);
560: asn_debug.put_line('Exit validate_rma_line');
561: END IF;
562: END validate_rma_line;
563:

Line 560: asn_debug.put_line('Exit validate_rma_line');

556:
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('I have hit an exception');
559: asn_debug.put_line(SQLERRM);
560: asn_debug.put_line('Exit validate_rma_line');
561: END IF;
562: END validate_rma_line;
563:
564: /**

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

587: FROM mtl_system_items
588: WHERE mtl_system_items.inventory_item_id = x_cascaded_table(n).item_id
589: AND mtl_system_items.organization_id = x_cascaded_table(n).to_organization_id;
590:
591: IF (g_asn_debug = 'Y') THEN
592: asn_debug.put_line('Primary UOM: ' || x_cascaded_table(n).primary_unit_of_measure);
593: END IF;
594: EXCEPTION
595: WHEN NO_DATA_FOUND THEN

Line 592: asn_debug.put_line('Primary UOM: ' || x_cascaded_table(n).primary_unit_of_measure);

588: WHERE mtl_system_items.inventory_item_id = x_cascaded_table(n).item_id
589: AND mtl_system_items.organization_id = x_cascaded_table(n).to_organization_id;
590:
591: IF (g_asn_debug = 'Y') THEN
592: asn_debug.put_line('Primary UOM: ' || x_cascaded_table(n).primary_unit_of_measure);
593: END IF;
594: EXCEPTION
595: WHEN NO_DATA_FOUND THEN
596: x_cascaded_table(n).error_status := 'W';

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

595: WHEN NO_DATA_FOUND THEN
596: x_cascaded_table(n).error_status := 'W';
597: x_cascaded_table(n).error_message := 'Need an error message';
598:
599: IF (g_asn_debug = 'Y') THEN
600: asn_debug.put_line('Primary UOM error');
601: END IF;
602: END;
603: END IF;

Line 600: asn_debug.put_line('Primary UOM error');

596: x_cascaded_table(n).error_status := 'W';
597: x_cascaded_table(n).error_message := 'Need an error message';
598:
599: IF (g_asn_debug = 'Y') THEN
600: asn_debug.put_line('Primary UOM error');
601: END IF;
602: END;
603: END IF;
604:

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

603: END IF;
604:
605: -- uom_code
606: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
607: IF (g_asn_debug = 'Y') THEN
608: asn_debug.put_line('X_progress ' || x_progress);
609: END IF;
610:
611: SELECT muom.uom_code

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

604:
605: -- uom_code
606: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
607: IF (g_asn_debug = 'Y') THEN
608: asn_debug.put_line('X_progress ' || x_progress);
609: END IF;
610:
611: SELECT muom.uom_code
612: INTO x_cascaded_table(n).uom_code

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

612: INTO x_cascaded_table(n).uom_code
613: FROM mtl_units_of_measure muom
614: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
615: ELSE
616: IF (g_asn_debug = 'Y') THEN
617: asn_debug.put_line('uom_code not derived as unit_of_measure is null');
618: END IF;
619: END IF;
620: END derive_uom_info;

Line 617: asn_debug.put_line('uom_code not derived as unit_of_measure is null');

613: FROM mtl_units_of_measure muom
614: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
615: ELSE
616: IF (g_asn_debug = 'Y') THEN
617: asn_debug.put_line('uom_code not derived as unit_of_measure is null');
618: END IF;
619: END IF;
620: END derive_uom_info;
621:

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

635: IF x_cascaded_table(n).error_status IN('S', 'W')
636: AND x_cascaded_table(n).oe_order_header_id IS NULL
637: AND x_cascaded_table(n).oe_order_num IS NOT NULL
638: AND x_cascaded_table(n).to_organization_id IS NOT NULL THEN
639: IF (g_asn_debug = 'Y') THEN
640: asn_debug.put_line('Deriving order_header_id');
641: END IF;
642:
643: -- bug 3224001: change query to get the correct header for the given order_num

Line 640: asn_debug.put_line('Deriving order_header_id');

636: AND x_cascaded_table(n).oe_order_header_id IS NULL
637: AND x_cascaded_table(n).oe_order_num IS NOT NULL
638: AND x_cascaded_table(n).to_organization_id IS NOT NULL THEN
639: IF (g_asn_debug = 'Y') THEN
640: asn_debug.put_line('Deriving order_header_id');
641: END IF;
642:
643: -- bug 3224001: change query to get the correct header for the given order_num
644:

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

660: FROM oe_order_lines_all oela
661: WHERE oela.header_id = oeh.header_id
662: AND oela.ship_from_org_id = x_cascaded_table(n).to_organization_id));
663:
664: IF (g_asn_debug = 'Y') THEN
665: asn_debug.put_line('Derived oe_order_header_id ' || x_cascaded_table(n).oe_order_header_id);
666: END IF;
667: END IF;
668: EXCEPTION

Line 665: asn_debug.put_line('Derived oe_order_header_id ' || x_cascaded_table(n).oe_order_header_id);

661: WHERE oela.header_id = oeh.header_id
662: AND oela.ship_from_org_id = x_cascaded_table(n).to_organization_id));
663:
664: IF (g_asn_debug = 'Y') THEN
665: asn_debug.put_line('Derived oe_order_header_id ' || x_cascaded_table(n).oe_order_header_id);
666: END IF;
667: END IF;
668: EXCEPTION
669: WHEN NO_DATA_FOUND THEN

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

666: END IF;
667: END IF;
668: EXCEPTION
669: WHEN NO_DATA_FOUND THEN
670: IF (g_asn_debug = 'Y') THEN
671: asn_debug.put_line('Cannot derive order_header_id - no data found');
672: END IF;
673:
674: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 671: asn_debug.put_line('Cannot derive order_header_id - no data found');

667: END IF;
668: EXCEPTION
669: WHEN NO_DATA_FOUND THEN
670: IF (g_asn_debug = 'Y') THEN
671: asn_debug.put_line('Cannot derive order_header_id - no data found');
672: END IF;
673:
674: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
675: rcv_error_pkg.set_error_message('RCV_ITEM_ORDER_HEADER_ID', x_cascaded_table(n).error_message);

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

675: rcv_error_pkg.set_error_message('RCV_ITEM_ORDER_HEADER_ID', x_cascaded_table(n).error_message);
676: rcv_error_pkg.set_token('NUMBER', x_cascaded_table(n).oe_order_num);
677: rcv_error_pkg.log_interface_error('OE_ORDER_NUM', FALSE);
678: WHEN TOO_MANY_ROWS THEN
679: IF (g_asn_debug = 'Y') THEN
680: asn_debug.put_line('Cannot derive order_header_id - too many rows');
681: END IF;
682:
683: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 680: asn_debug.put_line('Cannot derive order_header_id - too many rows');

676: rcv_error_pkg.set_token('NUMBER', x_cascaded_table(n).oe_order_num);
677: rcv_error_pkg.log_interface_error('OE_ORDER_NUM', FALSE);
678: WHEN TOO_MANY_ROWS THEN
679: IF (g_asn_debug = 'Y') THEN
680: asn_debug.put_line('Cannot derive order_header_id - too many rows');
681: END IF;
682:
683: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
684: rcv_error_pkg.set_error_message('RCV_ITEM_ORDER_HEADER_ID', x_cascaded_table(n).error_message);

Line 717: IF g_asn_debug = 'Y' THEN

713: AND flow_status_code = 'AWAITING_RETURN';
714:
715: x_cascaded_table(n).oe_order_line_id := my_line_id;
716:
717: IF g_asn_debug = 'Y' THEN
718: asn_debug.put_line('Derived oe_order_line_id ' || TO_CHAR(x_cascaded_table(n).oe_order_line_id));
719: END IF;
720:
721: IF x_cascaded_table(n).item_id IS NULL THEN

Line 718: asn_debug.put_line('Derived oe_order_line_id ' || TO_CHAR(x_cascaded_table(n).oe_order_line_id));

714:
715: x_cascaded_table(n).oe_order_line_id := my_line_id;
716:
717: IF g_asn_debug = 'Y' THEN
718: asn_debug.put_line('Derived oe_order_line_id ' || TO_CHAR(x_cascaded_table(n).oe_order_line_id));
719: END IF;
720:
721: IF x_cascaded_table(n).item_id IS NULL THEN
722: x_cascaded_table(n).item_id := my_item_id;

Line 724: IF g_asn_debug = 'Y' THEN

720:
721: IF x_cascaded_table(n).item_id IS NULL THEN
722: x_cascaded_table(n).item_id := my_item_id;
723:
724: IF g_asn_debug = 'Y' THEN
725: asn_debug.put_line('Derived item_id ' || TO_CHAR(x_cascaded_table(n).item_id));
726: END IF;
727: END IF;
728: END IF;

Line 725: asn_debug.put_line('Derived item_id ' || TO_CHAR(x_cascaded_table(n).item_id));

721: IF x_cascaded_table(n).item_id IS NULL THEN
722: x_cascaded_table(n).item_id := my_item_id;
723:
724: IF g_asn_debug = 'Y' THEN
725: asn_debug.put_line('Derived item_id ' || TO_CHAR(x_cascaded_table(n).item_id));
726: END IF;
727: END IF;
728: END IF;
729: EXCEPTION

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

762: BEGIN
763: -- derive customer_id from customer_account_number
764: IF x_cascaded_table(n).customer_id IS NULL
765: AND x_cascaded_table(n).customer_account_number IS NOT NULL THEN
766: IF (g_asn_debug = 'Y') THEN
767: asn_debug.put_line('Deriving customer_id from customer_account_number');
768: END IF;
769:
770: SELECT acct.cust_account_id

Line 767: asn_debug.put_line('Deriving customer_id from customer_account_number');

763: -- derive customer_id from customer_account_number
764: IF x_cascaded_table(n).customer_id IS NULL
765: AND x_cascaded_table(n).customer_account_number IS NOT NULL THEN
766: IF (g_asn_debug = 'Y') THEN
767: asn_debug.put_line('Deriving customer_id from customer_account_number');
768: END IF;
769:
770: SELECT acct.cust_account_id
771: INTO x_cascaded_table(n).customer_id

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

771: INTO x_cascaded_table(n).customer_id
772: FROM hz_cust_accounts acct
773: WHERE acct.account_number = x_cascaded_table(n).customer_account_number;
774:
775: IF (g_asn_debug = 'Y') THEN
776: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);
777: END IF;
778: END IF;
779:

Line 776: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);

772: FROM hz_cust_accounts acct
773: WHERE acct.account_number = x_cascaded_table(n).customer_account_number;
774:
775: IF (g_asn_debug = 'Y') THEN
776: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);
777: END IF;
778: END IF;
779:
780: -- derive customer_id from customer_party_name if name is unique

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

779:
780: -- derive customer_id from customer_party_name if name is unique
781: IF x_cascaded_table(n).customer_id IS NULL
782: AND x_cascaded_table(n).customer_party_name IS NOT NULL THEN
783: IF (g_asn_debug = 'Y') THEN
784: asn_debug.put_line('Deriving customer_id from customer_account_number');
785: END IF;
786:
787: BEGIN

Line 784: asn_debug.put_line('Deriving customer_id from customer_account_number');

780: -- derive customer_id from customer_party_name if name is unique
781: IF x_cascaded_table(n).customer_id IS NULL
782: AND x_cascaded_table(n).customer_party_name IS NOT NULL THEN
783: IF (g_asn_debug = 'Y') THEN
784: asn_debug.put_line('Deriving customer_id from customer_account_number');
785: END IF;
786:
787: BEGIN
788: SELECT acct.cust_account_id

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

795: WHEN TOO_MANY_ROWS THEN
796: NULL;
797: END;
798:
799: IF (g_asn_debug = 'Y') THEN
800: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);
801: END IF;
802: END IF;
803:

Line 800: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);

796: NULL;
797: END;
798:
799: IF (g_asn_debug = 'Y') THEN
800: asn_debug.put_line('Derived customer_id ' || x_cascaded_table(n).customer_id);
801: END IF;
802: END IF;
803:
804: -- derive customer_site_id from from_organization_id

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

803:
804: -- derive customer_site_id from from_organization_id
805: IF x_cascaded_table(n).customer_site_id IS NULL
806: AND x_cascaded_table(n).from_organization_id IS NOT NULL THEN
807: IF (g_asn_debug = 'Y') THEN
808: asn_debug.put_line('Deriving customer_site_id from from_organization_id');
809: END IF;
810:
811: x_cascaded_table(n).customer_account_number := x_cascaded_table(n).from_organization_id;

Line 808: asn_debug.put_line('Deriving customer_site_id from from_organization_id');

804: -- derive customer_site_id from from_organization_id
805: IF x_cascaded_table(n).customer_site_id IS NULL
806: AND x_cascaded_table(n).from_organization_id IS NOT NULL THEN
807: IF (g_asn_debug = 'Y') THEN
808: asn_debug.put_line('Deriving customer_site_id from from_organization_id');
809: END IF;
810:
811: x_cascaded_table(n).customer_account_number := x_cascaded_table(n).from_organization_id;
812:

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

809: END IF;
810:
811: x_cascaded_table(n).customer_account_number := x_cascaded_table(n).from_organization_id;
812:
813: IF (g_asn_debug = 'Y') THEN
814: asn_debug.put_line('Derived customer_site_id ' || x_cascaded_table(n).customer_site_id);
815: END IF;
816: END IF;
817: END derive_customer_info;

Line 814: asn_debug.put_line('Derived customer_site_id ' || x_cascaded_table(n).customer_site_id);

810:
811: x_cascaded_table(n).customer_account_number := x_cascaded_table(n).from_organization_id;
812:
813: IF (g_asn_debug = 'Y') THEN
814: asn_debug.put_line('Derived customer_site_id ' || x_cascaded_table(n).customer_site_id);
815: END IF;
816: END IF;
817: END derive_customer_info;
818:

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

826: -- derive from location_info
827: IF x_cascaded_table(n).to_organization_id IS NULL
828: AND x_cascaded_table(n).to_organization_code IS NULL
829: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
830: IF (g_asn_debug = 'Y') THEN
831: asn_debug.put_line('Attempting to derive the org from the ship to location');
832: END IF;
833:
834: IF (x_cascaded_table(n).ship_to_location_id IS NOT NULL) THEN

Line 831: asn_debug.put_line('Attempting to derive the org from the ship to location');

827: IF x_cascaded_table(n).to_organization_id IS NULL
828: AND x_cascaded_table(n).to_organization_code IS NULL
829: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
830: IF (g_asn_debug = 'Y') THEN
831: asn_debug.put_line('Attempting to derive the org from the ship to location');
832: END IF;
833:
834: IF (x_cascaded_table(n).ship_to_location_id IS NOT NULL) THEN
835: SELECT MAX(org.organization_id)

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

838: HR_ALL_ORGANIZATION_UNITS org --Bug 5217526. Earlier used org_organization_definitions
839: WHERE x_cascaded_table(n).ship_to_location_id = hl.location_id
840: AND hl.inventory_organization_id = org.organization_id;
841:
842: IF (g_asn_debug = 'Y') THEN
843: asn_debug.put_line('Set Org using location id ');
844: END IF;
845: ELSIF(x_cascaded_table(n).ship_to_location_code IS NOT NULL) THEN
846: SELECT MAX(org.organization_id)

Line 843: asn_debug.put_line('Set Org using location id ');

839: WHERE x_cascaded_table(n).ship_to_location_id = hl.location_id
840: AND hl.inventory_organization_id = org.organization_id;
841:
842: IF (g_asn_debug = 'Y') THEN
843: asn_debug.put_line('Set Org using location id ');
844: END IF;
845: ELSIF(x_cascaded_table(n).ship_to_location_code IS NOT NULL) THEN
846: SELECT MAX(org.organization_id)
847: INTO x_cascaded_table(n).to_organization_code

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

849: HR_ALL_ORGANIZATION_UNITS org --Bug 5217526. Earlier used org_organization_definitions
850: WHERE x_cascaded_table(n).ship_to_location_code = hl.location_code
851: AND hl.inventory_organization_id = org.organization_id;
852:
853: IF (g_asn_debug = 'Y') THEN
854: asn_debug.put_line('Set Org using location code ');
855: END IF;
856: END IF;
857: END IF;

Line 854: asn_debug.put_line('Set Org using location code ');

850: WHERE x_cascaded_table(n).ship_to_location_code = hl.location_code
851: AND hl.inventory_organization_id = org.organization_id;
852:
853: IF (g_asn_debug = 'Y') THEN
854: asn_debug.put_line('Set Org using location code ');
855: END IF;
856: END IF;
857: END IF;
858:

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

859: -- derive from to_organization_code
860: IF x_cascaded_table(n).error_status IN('S', 'W')
861: AND x_cascaded_table(n).to_organization_id IS NULL
862: AND x_cascaded_table(n).to_organization_code IS NOT NULL THEN
863: IF (g_asn_debug = 'Y') THEN
864: asn_debug.put_line('X_Progress ' || x_progress);
865: END IF;
866:
867: ship_to_org_record.organization_code := x_cascaded_table(n).to_organization_code;

Line 864: asn_debug.put_line('X_Progress ' || x_progress);

860: IF x_cascaded_table(n).error_status IN('S', 'W')
861: AND x_cascaded_table(n).to_organization_id IS NULL
862: AND x_cascaded_table(n).to_organization_code IS NOT NULL THEN
863: IF (g_asn_debug = 'Y') THEN
864: asn_debug.put_line('X_Progress ' || x_progress);
865: END IF;
866:
867: ship_to_org_record.organization_code := x_cascaded_table(n).to_organization_code;
868: ship_to_org_record.organization_id := x_cascaded_table(n).to_organization_id;

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

868: ship_to_org_record.organization_id := x_cascaded_table(n).to_organization_id;
869: ship_to_org_record.error_record.error_status := 'S';
870: ship_to_org_record.error_record.error_message := NULL;
871:
872: IF (g_asn_debug = 'Y') THEN
873: asn_debug.put_line('Into Derive Organization Record Procedure');
874: END IF;
875:
876: po_orgs_sv.derive_org_info(ship_to_org_record);

Line 873: asn_debug.put_line('Into Derive Organization Record Procedure');

869: ship_to_org_record.error_record.error_status := 'S';
870: ship_to_org_record.error_record.error_message := NULL;
871:
872: IF (g_asn_debug = 'Y') THEN
873: asn_debug.put_line('Into Derive Organization Record Procedure');
874: END IF;
875:
876: po_orgs_sv.derive_org_info(ship_to_org_record);
877:

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

874: END IF;
875:
876: po_orgs_sv.derive_org_info(ship_to_org_record);
877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);

Line 879: asn_debug.put_line('Debug Output after organization procedure');

875:
876: po_orgs_sv.derive_org_info(ship_to_org_record);
877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);
883: asn_debug.put_line('Debug organization output over');

Line 880: asn_debug.put_line(ship_to_org_record.organization_code);

876: po_orgs_sv.derive_org_info(ship_to_org_record);
877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);
883: asn_debug.put_line('Debug organization output over');
884: END IF;

Line 881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));

877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);
883: asn_debug.put_line('Debug organization output over');
884: END IF;
885:

Line 882: asn_debug.put_line(ship_to_org_record.error_record.error_status);

878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);
883: asn_debug.put_line('Debug organization output over');
884: END IF;
885:
886: x_cascaded_table(n).to_organization_code := ship_to_org_record.organization_code;

Line 883: asn_debug.put_line('Debug organization output over');

879: asn_debug.put_line('Debug Output after organization procedure');
880: asn_debug.put_line(ship_to_org_record.organization_code);
881: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
882: asn_debug.put_line(ship_to_org_record.error_record.error_status);
883: asn_debug.put_line('Debug organization output over');
884: END IF;
885:
886: x_cascaded_table(n).to_organization_code := ship_to_org_record.organization_code;
887: x_cascaded_table(n).to_organization_id := ship_to_org_record.organization_id;

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

891:
892: -- couldn't derive, default from header instead
893: IF x_cascaded_table(n).error_status IN('S', 'W')
894: AND x_cascaded_table(n).to_organization_id IS NULL THEN
895: IF (g_asn_debug = 'Y') THEN
896: asn_debug.put_line('Will default org id from header ' || x_header_record.header_record.ship_to_organization_id);
897: END IF;
898:
899: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;

Line 896: asn_debug.put_line('Will default org id from header ' || x_header_record.header_record.ship_to_organization_id);

892: -- couldn't derive, default from header instead
893: IF x_cascaded_table(n).error_status IN('S', 'W')
894: AND x_cascaded_table(n).to_organization_id IS NULL THEN
895: IF (g_asn_debug = 'Y') THEN
896: asn_debug.put_line('Will default org id from header ' || x_header_record.header_record.ship_to_organization_id);
897: END IF;
898:
899: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;
900: END IF;

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

898:
899: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;
900: END IF;
901:
902: IF (g_asn_debug = 'Y') THEN
903: asn_debug.put_line('Derived to_organization_id ' || x_cascaded_table(n).to_organization_id);
904: END IF;
905: END derive_org_info;
906:

Line 903: asn_debug.put_line('Derived to_organization_id ' || x_cascaded_table(n).to_organization_id);

899: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;
900: END IF;
901:
902: IF (g_asn_debug = 'Y') THEN
903: asn_debug.put_line('Derived to_organization_id ' || x_cascaded_table(n).to_organization_id);
904: END IF;
905: END derive_org_info;
906:
907: PROCEDURE derive_transit_org_info(

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

912: BEGIN
913: IF (x_cascaded_table(n).error_status IN('S', 'W'))
914: AND ( x_cascaded_table(n).intransit_owning_org_id IS NULL
915: AND x_cascaded_table(n).intransit_owning_org_code IS NOT NULL) THEN
916: IF (g_asn_debug = 'Y') THEN
917: asn_debug.put_line('X_progress ' || x_progress);
918: END IF;
919:
920: transit_org_record.organization_code := x_cascaded_table(n).intransit_owning_org_code;

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

913: IF (x_cascaded_table(n).error_status IN('S', 'W'))
914: AND ( x_cascaded_table(n).intransit_owning_org_id IS NULL
915: AND x_cascaded_table(n).intransit_owning_org_code IS NOT NULL) THEN
916: IF (g_asn_debug = 'Y') THEN
917: asn_debug.put_line('X_progress ' || x_progress);
918: END IF;
919:
920: transit_org_record.organization_code := x_cascaded_table(n).intransit_owning_org_code;
921: transit_org_record.organization_id := x_cascaded_table(n).intransit_owning_org_id;

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

921: transit_org_record.organization_id := x_cascaded_table(n).intransit_owning_org_id;
922: transit_org_record.error_record.error_status := 'S';
923: transit_org_record.error_record.error_message := NULL;
924:
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('In Intransit Owning Org Record Procedure');
927: END IF;
928:
929: po_orgs_sv.derive_org_info(transit_org_record);

Line 926: asn_debug.put_line('In Intransit Owning Org Record Procedure');

922: transit_org_record.error_record.error_status := 'S';
923: transit_org_record.error_record.error_message := NULL;
924:
925: IF (g_asn_debug = 'Y') THEN
926: asn_debug.put_line('In Intransit Owning Org Record Procedure');
927: END IF;
928:
929: po_orgs_sv.derive_org_info(transit_org_record);
930:

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

927: END IF;
928:
929: po_orgs_sv.derive_org_info(transit_org_record);
930:
931: IF (g_asn_debug = 'Y') THEN
932: asn_debug.put_line('Intransit organization code ' || transit_org_record.organization_code);
933: asn_debug.put_line('Intransit organization id ' || TO_CHAR(transit_org_record.organization_id));
934: asn_debug.put_line('Intransit error status ' || transit_org_record.error_record.error_status);
935: END IF;

Line 932: asn_debug.put_line('Intransit organization code ' || transit_org_record.organization_code);

928:
929: po_orgs_sv.derive_org_info(transit_org_record);
930:
931: IF (g_asn_debug = 'Y') THEN
932: asn_debug.put_line('Intransit organization code ' || transit_org_record.organization_code);
933: asn_debug.put_line('Intransit organization id ' || TO_CHAR(transit_org_record.organization_id));
934: asn_debug.put_line('Intransit error status ' || transit_org_record.error_record.error_status);
935: END IF;
936:

Line 933: asn_debug.put_line('Intransit organization id ' || TO_CHAR(transit_org_record.organization_id));

929: po_orgs_sv.derive_org_info(transit_org_record);
930:
931: IF (g_asn_debug = 'Y') THEN
932: asn_debug.put_line('Intransit organization code ' || transit_org_record.organization_code);
933: asn_debug.put_line('Intransit organization id ' || TO_CHAR(transit_org_record.organization_id));
934: asn_debug.put_line('Intransit error status ' || transit_org_record.error_record.error_status);
935: END IF;
936:
937: x_cascaded_table(n).intransit_owning_org_code := transit_org_record.organization_code;

Line 934: asn_debug.put_line('Intransit error status ' || transit_org_record.error_record.error_status);

930:
931: IF (g_asn_debug = 'Y') THEN
932: asn_debug.put_line('Intransit organization code ' || transit_org_record.organization_code);
933: asn_debug.put_line('Intransit organization id ' || TO_CHAR(transit_org_record.organization_id));
934: asn_debug.put_line('Intransit error status ' || transit_org_record.error_record.error_status);
935: END IF;
936:
937: x_cascaded_table(n).intransit_owning_org_code := transit_org_record.organization_code;
938: x_cascaded_table(n).intransit_owning_org_id := transit_org_record.organization_id;

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

951: -- deliver_to_person_id
952: IF (x_cascaded_table(n).error_status IN('S', 'W'))
953: AND ( x_cascaded_table(n).deliver_to_person_id IS NULL
954: AND x_cascaded_table(n).deliver_to_person_name IS NOT NULL) THEN
955: IF (g_asn_debug = 'Y') THEN
956: asn_debug.put_line('X_progress ' || x_progress);
957: END IF;
958:
959: employee_id_record.employee_name := x_cascaded_table(n).deliver_to_person_name;

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

952: IF (x_cascaded_table(n).error_status IN('S', 'W'))
953: AND ( x_cascaded_table(n).deliver_to_person_id IS NULL
954: AND x_cascaded_table(n).deliver_to_person_name IS NOT NULL) THEN
955: IF (g_asn_debug = 'Y') THEN
956: asn_debug.put_line('X_progress ' || x_progress);
957: END IF;
958:
959: employee_id_record.employee_name := x_cascaded_table(n).deliver_to_person_name;
960: employee_id_record.employee_id := x_cascaded_table(n).deliver_to_person_id;

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

960: employee_id_record.employee_id := x_cascaded_table(n).deliver_to_person_id;
961: employee_id_record.error_record.error_status := 'S';
962: employee_id_record.error_record.error_message := NULL;
963:
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('In Derive deliver_to_person_id Information');
966: END IF;
967:
968: po_employees_sv.derive_employee_info(employee_id_record);

Line 965: asn_debug.put_line('In Derive deliver_to_person_id Information');

961: employee_id_record.error_record.error_status := 'S';
962: employee_id_record.error_record.error_message := NULL;
963:
964: IF (g_asn_debug = 'Y') THEN
965: asn_debug.put_line('In Derive deliver_to_person_id Information');
966: END IF;
967:
968: po_employees_sv.derive_employee_info(employee_id_record);
969:

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

966: END IF;
967:
968: po_employees_sv.derive_employee_info(employee_id_record);
969:
970: IF (g_asn_debug = 'Y') THEN
971: asn_debug.put_line('Employee name ' || employee_id_record.employee_name);
972: asn_debug.put_line('Employee id ' || TO_CHAR(employee_id_record.employee_id));
973: asn_debug.put_line('Employee error status ' || employee_id_record.error_record.error_status);
974: END IF;

Line 971: asn_debug.put_line('Employee name ' || employee_id_record.employee_name);

967:
968: po_employees_sv.derive_employee_info(employee_id_record);
969:
970: IF (g_asn_debug = 'Y') THEN
971: asn_debug.put_line('Employee name ' || employee_id_record.employee_name);
972: asn_debug.put_line('Employee id ' || TO_CHAR(employee_id_record.employee_id));
973: asn_debug.put_line('Employee error status ' || employee_id_record.error_record.error_status);
974: END IF;
975:

Line 972: asn_debug.put_line('Employee id ' || TO_CHAR(employee_id_record.employee_id));

968: po_employees_sv.derive_employee_info(employee_id_record);
969:
970: IF (g_asn_debug = 'Y') THEN
971: asn_debug.put_line('Employee name ' || employee_id_record.employee_name);
972: asn_debug.put_line('Employee id ' || TO_CHAR(employee_id_record.employee_id));
973: asn_debug.put_line('Employee error status ' || employee_id_record.error_record.error_status);
974: END IF;
975:
976: x_cascaded_table(n).deliver_to_person_name := employee_id_record.employee_name;

Line 973: asn_debug.put_line('Employee error status ' || employee_id_record.error_record.error_status);

969:
970: IF (g_asn_debug = 'Y') THEN
971: asn_debug.put_line('Employee name ' || employee_id_record.employee_name);
972: asn_debug.put_line('Employee id ' || TO_CHAR(employee_id_record.employee_id));
973: asn_debug.put_line('Employee error status ' || employee_id_record.error_record.error_status);
974: END IF;
975:
976: x_cascaded_table(n).deliver_to_person_name := employee_id_record.employee_name;
977: x_cascaded_table(n).deliver_to_person_id := employee_id_record.employee_id;

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

982: -- deliver_to_location
983: IF (x_cascaded_table(n).error_status IN('S', 'W'))
984: AND ( x_cascaded_table(n).deliver_to_location_id IS NULL
985: AND x_cascaded_table(n).deliver_to_location_code IS NOT NULL) THEN
986: IF (g_asn_debug = 'Y') THEN
987: asn_debug.put_line('X_progress ' || x_progress);
988: END IF;
989:
990: location_id_record.location_code := x_cascaded_table(n).deliver_to_location_code;

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

983: IF (x_cascaded_table(n).error_status IN('S', 'W'))
984: AND ( x_cascaded_table(n).deliver_to_location_id IS NULL
985: AND x_cascaded_table(n).deliver_to_location_code IS NOT NULL) THEN
986: IF (g_asn_debug = 'Y') THEN
987: asn_debug.put_line('X_progress ' || x_progress);
988: END IF;
989:
990: location_id_record.location_code := x_cascaded_table(n).deliver_to_location_code;
991: location_id_record.error_record.error_status := 'S';

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

990: location_id_record.location_code := x_cascaded_table(n).deliver_to_location_code;
991: location_id_record.error_record.error_status := 'S';
992: location_id_record.error_record.error_message := NULL;
993:
994: IF (g_asn_debug = 'Y') THEN
995: asn_debug.put_line('Derive deliver_to_location_id');
996: END IF;
997:
998: rcv_transactions_interface_sv.get_location_id(location_id_record);

Line 995: asn_debug.put_line('Derive deliver_to_location_id');

991: location_id_record.error_record.error_status := 'S';
992: location_id_record.error_record.error_message := NULL;
993:
994: IF (g_asn_debug = 'Y') THEN
995: asn_debug.put_line('Derive deliver_to_location_id');
996: END IF;
997:
998: rcv_transactions_interface_sv.get_location_id(location_id_record);
999: x_cascaded_table(n).deliver_to_location_id := location_id_record.location_id;

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

1008: ) IS
1009: BEGIN
1010: IF (x_cascaded_table(n).error_status IN('S', 'W'))
1011: AND x_cascaded_table(n).auto_transact_code IS NULL THEN
1012: IF (g_asn_debug = 'Y') THEN
1013: asn_debug.put_line('X_progress ' || x_progress);
1014: asn_debug.put_line('Setting auto_transact_code to transaction_type ' || x_cascaded_table(n).transaction_type);
1015: END IF;
1016:

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

1009: BEGIN
1010: IF (x_cascaded_table(n).error_status IN('S', 'W'))
1011: AND x_cascaded_table(n).auto_transact_code IS NULL THEN
1012: IF (g_asn_debug = 'Y') THEN
1013: asn_debug.put_line('X_progress ' || x_progress);
1014: asn_debug.put_line('Setting auto_transact_code to transaction_type ' || x_cascaded_table(n).transaction_type);
1015: END IF;
1016:
1017: x_cascaded_table(n).auto_transact_code := x_cascaded_table(n).transaction_type;

Line 1014: asn_debug.put_line('Setting auto_transact_code to transaction_type ' || x_cascaded_table(n).transaction_type);

1010: IF (x_cascaded_table(n).error_status IN('S', 'W'))
1011: AND x_cascaded_table(n).auto_transact_code IS NULL THEN
1012: IF (g_asn_debug = 'Y') THEN
1013: asn_debug.put_line('X_progress ' || x_progress);
1014: asn_debug.put_line('Setting auto_transact_code to transaction_type ' || x_cascaded_table(n).transaction_type);
1015: END IF;
1016:
1017: x_cascaded_table(n).auto_transact_code := x_cascaded_table(n).transaction_type;
1018: END IF;

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

1132: BEGIN
1133: --check line quanity > 0
1134: x_progress := '097';
1135:
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('X_progress ' || x_progress);
1138: END IF;
1139:
1140: IF x_cascaded_table(n).error_status NOT IN('S', 'W')

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

1133: --check line quanity > 0
1134: x_progress := '097';
1135:
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('X_progress ' || x_progress);
1138: END IF;
1139:
1140: IF x_cascaded_table(n).error_status NOT IN('S', 'W')
1141: OR x_cascaded_table(n).quantity <= 0 THEN --{

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

1138: END IF;
1139:
1140: IF x_cascaded_table(n).error_status NOT IN('S', 'W')
1141: OR x_cascaded_table(n).quantity <= 0 THEN --{
1142: IF (g_asn_debug = 'Y') THEN
1143: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
1144: END IF;
1145:
1146: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 1143: asn_debug.put_line('Quantity is <= zero. Cascade will fail');

1139:
1140: IF x_cascaded_table(n).error_status NOT IN('S', 'W')
1141: OR x_cascaded_table(n).quantity <= 0 THEN --{
1142: IF (g_asn_debug = 'Y') THEN
1143: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
1144: END IF;
1145:
1146: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1147: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

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

1156: * the rma is consumed. (Cascade)
1157: */
1158: x_progress := '098';
1159:
1160: IF (g_asn_debug = 'Y') THEN
1161: asn_debug.put_line('X_progress ' || x_progress);
1162: END IF;
1163:
1164: -- check order info

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

1157: */
1158: x_progress := '098';
1159:
1160: IF (g_asn_debug = 'Y') THEN
1161: asn_debug.put_line('X_progress ' || x_progress);
1162: END IF;
1163:
1164: -- check order info
1165: IF ( x_cascaded_table(n).oe_order_header_id IS NULL

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

1166: OR ( x_cascaded_table(n).item_id IS NULL
1167: AND x_cascaded_table(n).customer_item_num IS NULL
1168: AND x_cascaded_table(n).oe_order_line_id IS NULL
1169: AND x_cascaded_table(n).document_line_num IS NULL)) THEN --{
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('No oe_order_header_id/item_id ');
1172: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
1173: END IF;
1174:

Line 1171: asn_debug.put_line('No oe_order_header_id/item_id ');

1167: AND x_cascaded_table(n).customer_item_num IS NULL
1168: AND x_cascaded_table(n).oe_order_line_id IS NULL
1169: AND x_cascaded_table(n).document_line_num IS NULL)) THEN --{
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('No oe_order_header_id/item_id ');
1172: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
1173: END IF;
1174:
1175: -- only set error if not already set

Line 1172: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);

1168: AND x_cascaded_table(n).oe_order_line_id IS NULL
1169: AND x_cascaded_table(n).document_line_num IS NULL)) THEN --{
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('No oe_order_header_id/item_id ');
1172: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
1173: END IF;
1174:
1175: -- only set error if not already set
1176: IF x_cascaded_table(n).error_status IN('S', 'W', 'F') THEN --{

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

1184:
1185: -- }
1186:
1187: -- Assign shipped quantity to remaining quantity
1188: IF (g_asn_debug = 'Y') THEN
1189: asn_debug.put_line('Assign txn quantity to remaining quantity');
1190: END IF;
1191:
1192: txn_remaining_qty := x_cascaded_table(n).quantity;

Line 1189: asn_debug.put_line('Assign txn quantity to remaining quantity');

1185: -- }
1186:
1187: -- Assign shipped quantity to remaining quantity
1188: IF (g_asn_debug = 'Y') THEN
1189: asn_debug.put_line('Assign txn quantity to remaining quantity');
1190: END IF;
1191:
1192: txn_remaining_qty := x_cascaded_table(n).quantity;
1193:

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

1190: END IF;
1191:
1192: txn_remaining_qty := x_cascaded_table(n).quantity;
1193:
1194: IF (g_asn_debug = 'Y') THEN
1195: asn_debug.put_line('Have assigned the quantity');
1196: END IF;
1197:
1198: -- Calculate tax_amount_factor for calculating tax_amount for

Line 1195: asn_debug.put_line('Have assigned the quantity');

1191:
1192: txn_remaining_qty := x_cascaded_table(n).quantity;
1193:
1194: IF (g_asn_debug = 'Y') THEN
1195: asn_debug.put_line('Have assigned the quantity');
1196: END IF;
1197:
1198: -- Calculate tax_amount_factor for calculating tax_amount for
1199: -- each cascaded line

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

1198: -- Calculate tax_amount_factor for calculating tax_amount for
1199: -- each cascaded line
1200: tax_amount_factor := NVL(x_cascaded_table(n).tax_amount, 0) / txn_remaining_qty;
1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1204: asn_debug.put_line('Txn Quantity : ' || TO_CHAR(txn_remaining_qty));
1205: asn_debug.put_line('Before starting Cascade');
1206: END IF;

Line 1203: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));

1199: -- each cascaded line
1200: tax_amount_factor := NVL(x_cascaded_table(n).tax_amount, 0) / txn_remaining_qty;
1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1204: asn_debug.put_line('Txn Quantity : ' || TO_CHAR(txn_remaining_qty));
1205: asn_debug.put_line('Before starting Cascade');
1206: END IF;
1207:

Line 1204: asn_debug.put_line('Txn Quantity : ' || TO_CHAR(txn_remaining_qty));

1200: tax_amount_factor := NVL(x_cascaded_table(n).tax_amount, 0) / txn_remaining_qty;
1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1204: asn_debug.put_line('Txn Quantity : ' || TO_CHAR(txn_remaining_qty));
1205: asn_debug.put_line('Before starting Cascade');
1206: END IF;
1207:
1208: -- make sure the temp table is clean before we start using it

Line 1205: asn_debug.put_line('Before starting Cascade');

1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1204: asn_debug.put_line('Txn Quantity : ' || TO_CHAR(txn_remaining_qty));
1205: asn_debug.put_line('Before starting Cascade');
1206: END IF;
1207:
1208: -- make sure the temp table is clean before we start using it
1209: temp_cascaded_table.DELETE;

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

1207:
1208: -- make sure the temp table is clean before we start using it
1209: temp_cascaded_table.DELETE;
1210:
1211: IF (g_asn_debug = 'Y') THEN
1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);

Line 1212: asn_debug.put_line('Executing RMA Lines cursor with:');

1208: -- make sure the temp table is clean before we start using it
1209: temp_cascaded_table.DELETE;
1210:
1211: IF (g_asn_debug = 'Y') THEN
1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);

Line 1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);

1209: temp_cascaded_table.DELETE;
1210:
1211: IF (g_asn_debug = 'Y') THEN
1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);
1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);

Line 1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);

1210:
1211: IF (g_asn_debug = 'Y') THEN
1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);
1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);
1218: END IF;

Line 1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);

1211: IF (g_asn_debug = 'Y') THEN
1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);
1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);
1218: END IF;
1219:

Line 1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);

1212: asn_debug.put_line('Executing RMA Lines cursor with:');
1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);
1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);
1218: END IF;
1219:
1220: FOR x_rma_line_record IN rma_lines(x_cascaded_table(n).oe_order_header_id,

Line 1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);

1213: asn_debug.put_line('oe_order_header_id: ' || x_cascaded_table(n).oe_order_header_id);
1214: asn_debug.put_line('item_id: ' || x_cascaded_table(n).item_id);
1215: asn_debug.put_line('oe_order_line_num: ' || x_cascaded_table(n).oe_order_line_num);
1216: asn_debug.put_line('to_organization_id: ' || x_cascaded_table(n).to_organization_id);
1217: asn_debug.put_line('customer_item_num: ' || x_cascaded_table(n).customer_item_num);
1218: END IF;
1219:
1220: FOR x_rma_line_record IN rma_lines(x_cascaded_table(n).oe_order_header_id,
1221: x_cascaded_table(n).oe_order_line_id, --bug 4740567

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

1226: ) LOOP --{
1227: -- preserve a count to use after cursor is closed
1228: rma_lines_fetched := rma_lines%ROWCOUNT;
1229:
1230: IF (g_asn_debug = 'Y') THEN
1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);

Line 1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));

1227: -- preserve a count to use after cursor is closed
1228: rma_lines_fetched := rma_lines%ROWCOUNT;
1229:
1230: IF (g_asn_debug = 'Y') THEN
1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);
1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);

Line 1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));

1228: rma_lines_fetched := rma_lines%ROWCOUNT;
1229:
1230: IF (g_asn_debug = 'Y') THEN
1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);
1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);
1236: END IF;

Line 1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);

1229:
1230: IF (g_asn_debug = 'Y') THEN
1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);
1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);
1236: END IF;
1237:

Line 1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);

1230: IF (g_asn_debug = 'Y') THEN
1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);
1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);
1236: END IF;
1237:
1238: -- done allocating transaction quantity

Line 1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);

1231: asn_debug.put_line('RMA Lines fetched ' || TO_CHAR(rma_lines_fetched));
1232: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(txn_remaining_qty));
1233: asn_debug.put_line('Fetched order header id ' || x_rma_line_record.oe_order_header_id);
1234: asn_debug.put_line('Fetched order line id ' || x_rma_line_record.oe_order_line_id);
1235: asn_debug.put_line('Fetched order number ' || x_rma_line_record.oe_order_num);
1236: END IF;
1237:
1238: -- done allocating transaction quantity
1239: IF txn_remaining_qty <= 0 THEN

Line 1240: asn_debug.put_line('Done allocating transaction quantity');

1236: END IF;
1237:
1238: -- done allocating transaction quantity
1239: IF txn_remaining_qty <= 0 THEN
1240: asn_debug.put_line('Done allocating transaction quantity');
1241: EXIT;
1242: END IF;
1243:
1244: -- maintain a dense table

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

1249: -- copy from previous row
1250: temp_cascaded_table(temp_cascaded_table.COUNT + 1) := temp_cascaded_table(temp_cascaded_table.LAST);
1251: END IF;
1252:
1253: IF (g_asn_debug = 'Y') THEN
1254: asn_debug.put_line('Count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1255: asn_debug.put_line('Cursor record ' || TO_CHAR(rma_lines%ROWCOUNT));
1256: asn_debug.put_line('Check date tolerance');
1257: END IF;

Line 1254: asn_debug.put_line('Count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));

1250: temp_cascaded_table(temp_cascaded_table.COUNT + 1) := temp_cascaded_table(temp_cascaded_table.LAST);
1251: END IF;
1252:
1253: IF (g_asn_debug = 'Y') THEN
1254: asn_debug.put_line('Count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1255: asn_debug.put_line('Cursor record ' || TO_CHAR(rma_lines%ROWCOUNT));
1256: asn_debug.put_line('Check date tolerance');
1257: END IF;
1258:

Line 1255: asn_debug.put_line('Cursor record ' || TO_CHAR(rma_lines%ROWCOUNT));

1251: END IF;
1252:
1253: IF (g_asn_debug = 'Y') THEN
1254: asn_debug.put_line('Count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1255: asn_debug.put_line('Cursor record ' || TO_CHAR(rma_lines%ROWCOUNT));
1256: asn_debug.put_line('Check date tolerance');
1257: END IF;
1258:
1259: -- default to successful matching to current line

Line 1256: asn_debug.put_line('Check date tolerance');

1252:
1253: IF (g_asn_debug = 'Y') THEN
1254: asn_debug.put_line('Count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
1255: asn_debug.put_line('Cursor record ' || TO_CHAR(rma_lines%ROWCOUNT));
1256: asn_debug.put_line('Check date tolerance');
1257: END IF;
1258:
1259: -- default to successful matching to current line
1260: insert_into_table := TRUE;

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

1287: rcv_error_pkg.log_interface_error('DOCUMENT_NUM', FALSE);
1288: insert_into_table := FALSE;
1289: END IF; --}
1290:
1291: IF (g_asn_debug = 'Y') THEN
1292: asn_debug.put_line('Days exception Code ' || NVL(x_rcv_date_exception, 'NONE'));
1293: END IF;
1294:
1295: /*

Line 1292: asn_debug.put_line('Days exception Code ' || NVL(x_rcv_date_exception, 'NONE'));

1288: insert_into_table := FALSE;
1289: END IF; --}
1290:
1291: IF (g_asn_debug = 'Y') THEN
1292: asn_debug.put_line('Days exception Code ' || NVL(x_rcv_date_exception, 'NONE'));
1293: END IF;
1294:
1295: /*
1296: ** Get the available quantity for the line

Line 1318: asn_debug.put_line('amount '||already_allocated_qty||' already allocated for order line '||x_rma_line_record.oe_order_line_id);

1314: */
1315:
1316: IF g_used_rma_line_amounts.exists(x_rma_line_record.oe_order_line_id) THEN
1317: already_allocated_qty := g_used_rma_line_amounts(x_rma_line_record.oe_order_line_id);
1318: asn_debug.put_line('amount '||already_allocated_qty||' already allocated for order line '||x_rma_line_record.oe_order_line_id);
1319: END IF;
1320:
1321: END IF;
1322:

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

1319: END IF;
1320:
1321: END IF;
1322:
1323: IF (g_asn_debug = 'Y') THEN
1324: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1325: END IF;
1326:
1327: -- if qty has already been allocated then reduce available and tolerable

Line 1324: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));

1320:
1321: END IF;
1322:
1323: IF (g_asn_debug = 'Y') THEN
1324: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1325: END IF;
1326:
1327: -- if qty has already been allocated then reduce available and tolerable
1328: -- qty by the allocated amount

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

1332: IF rma_line_qty < 0 THEN
1333: rma_line_qty := 0;
1334: END IF;
1335:
1336: IF (g_asn_debug = 'Y') THEN
1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');
1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
1339: asn_debug.put_line('After reducing by allocated qty');
1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));

Line 1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');

1333: rma_line_qty := 0;
1334: END IF;
1335:
1336: IF (g_asn_debug = 'Y') THEN
1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');
1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
1339: asn_debug.put_line('After reducing by allocated qty');
1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1341: END IF;

Line 1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));

1334: END IF;
1335:
1336: IF (g_asn_debug = 'Y') THEN
1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');
1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
1339: asn_debug.put_line('After reducing by allocated qty');
1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1341: END IF;
1342: END IF;

Line 1339: asn_debug.put_line('After reducing by allocated qty');

1335:
1336: IF (g_asn_debug = 'Y') THEN
1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');
1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
1339: asn_debug.put_line('After reducing by allocated qty');
1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1341: END IF;
1342: END IF;
1343:

Line 1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));

1336: IF (g_asn_debug = 'Y') THEN
1337: asn_debug.put_line('Have some allocated quantity. Will reduce qty');
1338: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
1339: asn_debug.put_line('After reducing by allocated qty');
1340: asn_debug.put_line('Available Quantity ' || TO_CHAR(rma_line_qty));
1341: END IF;
1342: END IF;
1343:
1344: --}

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

1379: OR rma_primary_uom_qty = 0 THEN
1380: --{ PO -> ASN uom, PO -> PRIMARY UOM
1381: -- no point in going further for this record
1382: -- as we cannot convert between the ASN -> PO uoms
1383: IF (g_asn_debug = 'Y') THEN
1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);

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

1380: --{ PO -> ASN uom, PO -> PRIMARY UOM
1381: -- no point in going further for this record
1382: -- as we cannot convert between the ASN -> PO uoms
1383: IF (g_asn_debug = 'Y') THEN
1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);
1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));

Line 1385: asn_debug.put_line('Cannot interconvert between diff UOMs');

1381: -- no point in going further for this record
1382: -- as we cannot convert between the ASN -> PO uoms
1383: IF (g_asn_debug = 'Y') THEN
1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);
1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));
1389: insert_into_table := FALSE;

Line 1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');

1382: -- as we cannot convert between the ASN -> PO uoms
1383: IF (g_asn_debug = 'Y') THEN
1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);
1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));
1389: insert_into_table := FALSE;
1390: END IF;

Line 1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);

1383: IF (g_asn_debug = 'Y') THEN
1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);
1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));
1389: insert_into_table := FALSE;
1390: END IF;
1391: ELSE --}{

Line 1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));

1384: asn_debug.put_line('Need an error message in the interface tables');
1385: asn_debug.put_line('Cannot interconvert between diff UOMs');
1386: asn_debug.put_line('This RMA line cannot be used as the uoms ');
1387: asn_debug.put_line(temp_cascaded_table(1).unit_of_measure || ' ' || x_rma_line_record.unit_of_measure);
1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));
1389: insert_into_table := FALSE;
1390: END IF;
1391: ELSE --}{
1392: IF (g_asn_debug = 'Y') THEN

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

1388: asn_debug.put_line('cannot be converted for item ' || TO_CHAR(temp_cascaded_table(1).item_id));
1389: insert_into_table := FALSE;
1390: END IF;
1391: ELSE --}{
1392: IF (g_asn_debug = 'Y') THEN
1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));

Line 1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));

1389: insert_into_table := FALSE;
1390: END IF;
1391: ELSE --}{
1392: IF (g_asn_debug = 'Y') THEN
1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);

Line 1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));

1390: END IF;
1391: ELSE --}{
1392: IF (g_asn_debug = 'Y') THEN
1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);
1398: END IF;

Line 1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);

1391: ELSE --}{
1392: IF (g_asn_debug = 'Y') THEN
1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);
1398: END IF;
1399: END IF; --}

Line 1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));

1392: IF (g_asn_debug = 'Y') THEN
1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);
1398: END IF;
1399: END IF; --}
1400:

Line 1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);

1393: asn_debug.put_line('Current Item Id ' || TO_CHAR(temp_cascaded_table(1).item_id));
1394: asn_debug.put_line('Current Txn Quantity ' || TO_CHAR(txn_remaining_qty));
1395: asn_debug.put_line('Current Txn UOM ' || temp_cascaded_table(1).unit_of_measure);
1396: asn_debug.put_line('Converted RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1397: asn_debug.put_line('RMA UOM ' || x_rma_line_record.unit_of_measure);
1398: END IF;
1399: END IF; --}
1400:
1401: IF insert_into_table THEN --{ allocate part of the txn qty to this line

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

1415: ELSE
1416: allocate_qty := txn_remaining_qty_rma_uom;
1417: END IF;
1418:
1419: IF (g_asn_debug = 'Y') THEN
1420: asn_debug.put_line('Quantity to allocate to this line: ' || allocate_qty);
1421: END IF;
1422:
1423: --bug 4505906, record the used quantity in this session

Line 1420: asn_debug.put_line('Quantity to allocate to this line: ' || allocate_qty);

1416: allocate_qty := txn_remaining_qty_rma_uom;
1417: END IF;
1418:
1419: IF (g_asn_debug = 'Y') THEN
1420: asn_debug.put_line('Quantity to allocate to this line: ' || allocate_qty);
1421: END IF;
1422:
1423: --bug 4505906, record the used quantity in this session
1424: g_used_rma_line_amounts(x_rma_line_record.oe_order_line_id) := already_allocated_qty + allocate_qty;

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

1449: temp_cascaded_table(temp_cascaded_table.LAST).primary_unit_of_measure
1450: );
1451: temp_cascaded_table(temp_cascaded_table.LAST).tax_amount := ROUND(temp_cascaded_table(temp_cascaded_table.LAST).quantity * tax_amount_factor, 4);
1452:
1453: IF (g_asn_debug = 'Y') THEN
1454: asn_debug.put_line('Current Tax Amount ' || TO_CHAR(temp_cascaded_table(temp_cascaded_table.LAST).tax_amount));
1455: END IF;
1456:
1457: -- update the remaining quantity

Line 1454: asn_debug.put_line('Current Tax Amount ' || TO_CHAR(temp_cascaded_table(temp_cascaded_table.LAST).tax_amount));

1450: );
1451: temp_cascaded_table(temp_cascaded_table.LAST).tax_amount := ROUND(temp_cascaded_table(temp_cascaded_table.LAST).quantity * tax_amount_factor, 4);
1452:
1453: IF (g_asn_debug = 'Y') THEN
1454: asn_debug.put_line('Current Tax Amount ' || TO_CHAR(temp_cascaded_table(temp_cascaded_table.LAST).tax_amount));
1455: END IF;
1456:
1457: -- update the remaining quantity
1458: txn_remaining_qty_rma_uom := txn_remaining_qty_rma_uom - allocate_qty;

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

1469:
1470: --}
1471:
1472: -- finished processing all lines
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('Hit exit condition');
1475: asn_debug.put_line('Temp table size ' || TO_CHAR(temp_cascaded_table.COUNT));
1476: asn_debug.put_line('Rows fetched ' || TO_CHAR(rma_lines_fetched));
1477: END IF;

Line 1474: asn_debug.put_line('Hit exit condition');

1470: --}
1471:
1472: -- finished processing all lines
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('Hit exit condition');
1475: asn_debug.put_line('Temp table size ' || TO_CHAR(temp_cascaded_table.COUNT));
1476: asn_debug.put_line('Rows fetched ' || TO_CHAR(rma_lines_fetched));
1477: END IF;
1478:

Line 1475: asn_debug.put_line('Temp table size ' || TO_CHAR(temp_cascaded_table.COUNT));

1471:
1472: -- finished processing all lines
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('Hit exit condition');
1475: asn_debug.put_line('Temp table size ' || TO_CHAR(temp_cascaded_table.COUNT));
1476: asn_debug.put_line('Rows fetched ' || TO_CHAR(rma_lines_fetched));
1477: END IF;
1478:
1479: -- if nothing was processed, find out why, and quit

Line 1476: asn_debug.put_line('Rows fetched ' || TO_CHAR(rma_lines_fetched));

1472: -- finished processing all lines
1473: IF (g_asn_debug = 'Y') THEN
1474: asn_debug.put_line('Hit exit condition');
1475: asn_debug.put_line('Temp table size ' || TO_CHAR(temp_cascaded_table.COUNT));
1476: asn_debug.put_line('Rows fetched ' || TO_CHAR(rma_lines_fetched));
1477: END IF;
1478:
1479: -- if nothing was processed, find out why, and quit
1480: IF x_cascaded_table(n).quantity > 0

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

1479: -- if nothing was processed, find out why, and quit
1480: IF x_cascaded_table(n).quantity > 0
1481: AND txn_remaining_qty = x_cascaded_table(n).quantity THEN --{
1482: IF rma_lines_fetched = 0 THEN
1483: IF (g_asn_debug = 'Y') THEN
1484: asn_debug.put_line('No rows were retrieved from cursor.');
1485: END IF;
1486: ELSE
1487: IF (g_asn_debug = 'Y') THEN

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

1480: IF x_cascaded_table(n).quantity > 0
1481: AND txn_remaining_qty = x_cascaded_table(n).quantity THEN --{
1482: IF rma_lines_fetched = 0 THEN
1483: IF (g_asn_debug = 'Y') THEN
1484: asn_debug.put_line('No rows were retrieved from cursor.');
1485: END IF;
1486: ELSE
1487: IF (g_asn_debug = 'Y') THEN
1488: asn_debug.put_line('No rows were cascaded');

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

1483: IF (g_asn_debug = 'Y') THEN
1484: asn_debug.put_line('No rows were retrieved from cursor.');
1485: END IF;
1486: ELSE
1487: IF (g_asn_debug = 'Y') THEN
1488: asn_debug.put_line('No rows were cascaded');
1489: END IF;
1490: END IF;
1491:

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

1484: asn_debug.put_line('No rows were retrieved from cursor.');
1485: END IF;
1486: ELSE
1487: IF (g_asn_debug = 'Y') THEN
1488: asn_debug.put_line('No rows were cascaded');
1489: END IF;
1490: END IF;
1491:
1492: BEGIN

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

1617:
1618: -- check remaining qty vs tolerance qty using the last rma line's tolerance
1619: IF (txn_remaining_qty_rma_uom > rma_line_qty * x_qty_rcv_tolerance / 100) THEN
1620: -- the txn qty exceeds the tolerable qty
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('Extra Txn UOM Quantity ' || TO_CHAR(txn_remaining_qty));
1623: asn_debug.put_line('Extra RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1624: asn_debug.put_line('delete the temp table ');
1625: END IF;

Line 1622: asn_debug.put_line('Extra Txn UOM Quantity ' || TO_CHAR(txn_remaining_qty));

1618: -- check remaining qty vs tolerance qty using the last rma line's tolerance
1619: IF (txn_remaining_qty_rma_uom > rma_line_qty * x_qty_rcv_tolerance / 100) THEN
1620: -- the txn qty exceeds the tolerable qty
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('Extra Txn UOM Quantity ' || TO_CHAR(txn_remaining_qty));
1623: asn_debug.put_line('Extra RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1624: asn_debug.put_line('delete the temp table ');
1625: END IF;
1626:

Line 1623: asn_debug.put_line('Extra RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));

1619: IF (txn_remaining_qty_rma_uom > rma_line_qty * x_qty_rcv_tolerance / 100) THEN
1620: -- the txn qty exceeds the tolerable qty
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('Extra Txn UOM Quantity ' || TO_CHAR(txn_remaining_qty));
1623: asn_debug.put_line('Extra RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1624: asn_debug.put_line('delete the temp table ');
1625: END IF;
1626:
1627: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

1620: -- the txn qty exceeds the tolerable qty
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('Extra Txn UOM Quantity ' || TO_CHAR(txn_remaining_qty));
1623: asn_debug.put_line('Extra RMA UOM Quantity ' || TO_CHAR(txn_remaining_qty_rma_uom));
1624: asn_debug.put_line('delete the temp table ');
1625: END IF;
1626:
1627: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1628: rcv_error_pkg.set_error_message('RCV_SHIP_QTY_OVER_TOLERANCE', x_cascaded_table(n).error_message);

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

1630: rcv_error_pkg.set_token('QTY_B', x_cascaded_table(n).quantity - txn_remaining_qty);
1631: rcv_error_pkg.log_interface_error('QUANTITY', FALSE);
1632: temp_cascaded_table.DELETE;
1633:
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('mark the actual table with error status');
1636: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
1638: END IF;

Line 1635: asn_debug.put_line('mark the actual table with error status');

1631: rcv_error_pkg.log_interface_error('QUANTITY', FALSE);
1632: temp_cascaded_table.DELETE;
1633:
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('mark the actual table with error status');
1636: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
1638: END IF;
1639: ELSE

Line 1636: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);

1632: temp_cascaded_table.DELETE;
1633:
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('mark the actual table with error status');
1636: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
1638: END IF;
1639: ELSE
1640: -- }{ the txn qty does not exceed tolerance, allocate remaining to last row

Line 1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);

1633:
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('mark the actual table with error status');
1636: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
1638: END IF;
1639: ELSE
1640: -- }{ the txn qty does not exceed tolerance, allocate remaining to last row
1641: IF (g_asn_debug = 'Y') THEN

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

1637: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
1638: END IF;
1639: ELSE
1640: -- }{ the txn qty does not exceed tolerance, allocate remaining to last row
1641: IF (g_asn_debug = 'Y') THEN
1642: asn_debug.put_line('txn qty does not exceed tolerance');
1643: END IF;
1644:
1645: /** Bug 5408054:

Line 1642: asn_debug.put_line('txn qty does not exceed tolerance');

1638: END IF;
1639: ELSE
1640: -- }{ the txn qty does not exceed tolerance, allocate remaining to last row
1641: IF (g_asn_debug = 'Y') THEN
1642: asn_debug.put_line('txn qty does not exceed tolerance');
1643: END IF;
1644:
1645: /** Bug 5408054:
1646: * When the cursor 'rma_lines' fetches only 1 record, then transaction qty is not getting

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

1673:
1674: -- successful execution
1675:
1676: IF txn_remaining_qty = 0 THEN
1677: IF (g_asn_debug = 'Y') THEN
1678: asn_debug.put_line('Remaining Txn UOM quantity is zero ' || TO_CHAR(txn_remaining_qty));
1679: asn_debug.put_line('Remaining RMA UOM quantity is zero ' || TO_CHAR(txn_remaining_qty_rma_uom));
1680: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1681: END IF;

Line 1678: asn_debug.put_line('Remaining Txn UOM quantity is zero ' || TO_CHAR(txn_remaining_qty));

1674: -- successful execution
1675:
1676: IF txn_remaining_qty = 0 THEN
1677: IF (g_asn_debug = 'Y') THEN
1678: asn_debug.put_line('Remaining Txn UOM quantity is zero ' || TO_CHAR(txn_remaining_qty));
1679: asn_debug.put_line('Remaining RMA UOM quantity is zero ' || TO_CHAR(txn_remaining_qty_rma_uom));
1680: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1681: END IF;
1682: END IF;

Line 1679: asn_debug.put_line('Remaining RMA UOM quantity is zero ' || TO_CHAR(txn_remaining_qty_rma_uom));

1675:
1676: IF txn_remaining_qty = 0 THEN
1677: IF (g_asn_debug = 'Y') THEN
1678: asn_debug.put_line('Remaining Txn UOM quantity is zero ' || TO_CHAR(txn_remaining_qty));
1679: asn_debug.put_line('Remaining RMA UOM quantity is zero ' || TO_CHAR(txn_remaining_qty_rma_uom));
1680: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1681: END IF;
1682: END IF;
1683:

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

1676: IF txn_remaining_qty = 0 THEN
1677: IF (g_asn_debug = 'Y') THEN
1678: asn_debug.put_line('Remaining Txn UOM quantity is zero ' || TO_CHAR(txn_remaining_qty));
1679: asn_debug.put_line('Remaining RMA UOM quantity is zero ' || TO_CHAR(txn_remaining_qty_rma_uom));
1680: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1681: END IF;
1682: END IF;
1683:
1684: -- OPM change.Bug# 3061052

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

1695: END LOOP;
1696: END IF;
1697: END IF;
1698: /* end , INVCONV*/
1699: IF (g_asn_debug = 'Y') THEN
1700: asn_debug.put_line('Exit explode_line_quantity');
1701: END IF;
1702: EXCEPTION
1703: WHEN OTHERS THEN

Line 1700: asn_debug.put_line('Exit explode_line_quantity');

1696: END IF;
1697: END IF;
1698: /* end , INVCONV*/
1699: IF (g_asn_debug = 'Y') THEN
1700: asn_debug.put_line('Exit explode_line_quantity');
1701: END IF;
1702: EXCEPTION
1703: WHEN OTHERS THEN
1704: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;

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

1704: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;
1705: rcv_error_pkg.set_sql_error_message('explode_line_quantity', x_progress);
1706: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1707:
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line(TO_CHAR(n));
1710: asn_debug.put_line(SQLERRM);
1711: asn_debug.put_line('error ' || x_progress);
1712: END IF;

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

1705: rcv_error_pkg.set_sql_error_message('explode_line_quantity', x_progress);
1706: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1707:
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line(TO_CHAR(n));
1710: asn_debug.put_line(SQLERRM);
1711: asn_debug.put_line('error ' || x_progress);
1712: END IF;
1713: END explode_line_quantity;

Line 1710: asn_debug.put_line(SQLERRM);

1706: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
1707:
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line(TO_CHAR(n));
1710: asn_debug.put_line(SQLERRM);
1711: asn_debug.put_line('error ' || x_progress);
1712: END IF;
1713: END explode_line_quantity;
1714:

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

1707:
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line(TO_CHAR(n));
1710: asn_debug.put_line(SQLERRM);
1711: asn_debug.put_line('error ' || x_progress);
1712: END IF;
1713: END explode_line_quantity;
1714:
1715: PROCEDURE default_source_info(

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

1724:
1725: IF x_cascaded_table(n).source_document_code IS NULL THEN
1726: x_cascaded_table(n).source_document_code := 'RMA';
1727:
1728: IF (g_asn_debug = 'Y') THEN
1729: asn_debug.put_line('Defaulting SOURCE_DOCUMENT_CODE ' || x_cascaded_table(n).source_document_code);
1730: END IF;
1731: END IF;
1732:

Line 1729: asn_debug.put_line('Defaulting SOURCE_DOCUMENT_CODE ' || x_cascaded_table(n).source_document_code);

1725: IF x_cascaded_table(n).source_document_code IS NULL THEN
1726: x_cascaded_table(n).source_document_code := 'RMA';
1727:
1728: IF (g_asn_debug = 'Y') THEN
1729: asn_debug.put_line('Defaulting SOURCE_DOCUMENT_CODE ' || x_cascaded_table(n).source_document_code);
1730: END IF;
1731: END IF;
1732:
1733: /* Bug3593237 - START */

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

1744: IF ( NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') = 'DELIVER'
1745: OR x_cascaded_table(n).transaction_type = 'DELIVER') THEN
1746: x_cascaded_table(n).location_id := x_cascaded_table(n).deliver_to_location_id;
1747:
1748: IF (g_asn_debug = 'Y') THEN
1749: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).deliver_to_location_id);
1750: END IF;
1751: ELSE
1752: x_cascaded_table(n).location_id := x_cascaded_table(n).ship_to_location_id;

Line 1749: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).deliver_to_location_id);

1745: OR x_cascaded_table(n).transaction_type = 'DELIVER') THEN
1746: x_cascaded_table(n).location_id := x_cascaded_table(n).deliver_to_location_id;
1747:
1748: IF (g_asn_debug = 'Y') THEN
1749: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).deliver_to_location_id);
1750: END IF;
1751: ELSE
1752: x_cascaded_table(n).location_id := x_cascaded_table(n).ship_to_location_id;
1753:

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

1750: END IF;
1751: ELSE
1752: x_cascaded_table(n).location_id := x_cascaded_table(n).ship_to_location_id;
1753:
1754: IF (g_asn_debug = 'Y') THEN
1755: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).ship_to_location_id);
1756: END IF;
1757: END IF;
1758: END IF;

Line 1755: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).ship_to_location_id);

1751: ELSE
1752: x_cascaded_table(n).location_id := x_cascaded_table(n).ship_to_location_id;
1753:
1754: IF (g_asn_debug = 'Y') THEN
1755: asn_debug.put_line('Defaulting LOCATION_ID ' || x_cascaded_table(n).ship_to_location_id);
1756: END IF;
1757: END IF;
1758: END IF;
1759: /* Bug3593237 - END */

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

1768: OR ( x_cascaded_table(n).destination_type_code = 'INVENTORY'
1769: AND x_cascaded_table(n).auto_transact_code = 'RECEIVE') THEN
1770: x_cascaded_table(n).destination_type_code := 'RECEIVING';
1771:
1772: IF (g_asn_debug = 'Y') THEN
1773: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE ' || x_cascaded_table(n).destination_type_code);
1774: END IF;
1775: END IF;
1776:

Line 1773: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE ' || x_cascaded_table(n).destination_type_code);

1769: AND x_cascaded_table(n).auto_transact_code = 'RECEIVE') THEN
1770: x_cascaded_table(n).destination_type_code := 'RECEIVING';
1771:
1772: IF (g_asn_debug = 'Y') THEN
1773: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE ' || x_cascaded_table(n).destination_type_code);
1774: END IF;
1775: END IF;
1776:
1777: /* Bug 3592340.

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

1783: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'
1784: AND x_cascaded_table(n).auto_transact_code = 'DELIVER') THEN
1785: x_cascaded_table(n).destination_type_code := 'INVENTORY';
1786:
1787: IF (g_asn_debug = 'Y') THEN
1788: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE for direct delivery ' || x_cascaded_table(n).destination_type_code);
1789: END IF;
1790: END IF;
1791:

Line 1788: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE for direct delivery ' || x_cascaded_table(n).destination_type_code);

1784: AND x_cascaded_table(n).auto_transact_code = 'DELIVER') THEN
1785: x_cascaded_table(n).destination_type_code := 'INVENTORY';
1786:
1787: IF (g_asn_debug = 'Y') THEN
1788: asn_debug.put_line('Defaulting DESTINATION_TYPE_CODE for direct delivery ' || x_cascaded_table(n).destination_type_code);
1789: END IF;
1790: END IF;
1791:
1792: IF x_cascaded_table(n).destination_context IS NULL THEN

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

1791:
1792: IF x_cascaded_table(n).destination_context IS NULL THEN
1793: x_cascaded_table(n).destination_context := x_cascaded_table(n).destination_type_code;
1794:
1795: IF (g_asn_debug = 'Y') THEN
1796: asn_debug.put_line('Defaulting DESTINATION_CONTEXT ' || x_cascaded_table(n).destination_context);
1797: END IF;
1798: END IF;
1799: END default_destination_info;

Line 1796: asn_debug.put_line('Defaulting DESTINATION_CONTEXT ' || x_cascaded_table(n).destination_context);

1792: IF x_cascaded_table(n).destination_context IS NULL THEN
1793: x_cascaded_table(n).destination_context := x_cascaded_table(n).destination_type_code;
1794:
1795: IF (g_asn_debug = 'Y') THEN
1796: asn_debug.put_line('Defaulting DESTINATION_CONTEXT ' || x_cascaded_table(n).destination_context);
1797: END IF;
1798: END IF;
1799: END default_destination_info;
1800:

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

1805: BEGIN
1806: IF x_cascaded_table(n).transaction_type IS NULL THEN
1807: x_cascaded_table(n).transaction_type := 'RECEIVE';
1808:
1809: IF (g_asn_debug = 'Y') THEN
1810: asn_debug.put_line('Defaulting TRANSACTION_TYPE ' || x_cascaded_table(n).transaction_type);
1811: END IF;
1812: END IF;
1813: END default_transaction_info;

Line 1810: asn_debug.put_line('Defaulting TRANSACTION_TYPE ' || x_cascaded_table(n).transaction_type);

1806: IF x_cascaded_table(n).transaction_type IS NULL THEN
1807: x_cascaded_table(n).transaction_type := 'RECEIVE';
1808:
1809: IF (g_asn_debug = 'Y') THEN
1810: asn_debug.put_line('Defaulting TRANSACTION_TYPE ' || x_cascaded_table(n).transaction_type);
1811: END IF;
1812: END IF;
1813: END default_transaction_info;
1814:

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

1819: BEGIN
1820: IF x_cascaded_table(n).processing_mode_code IS NULL THEN
1821: x_cascaded_table(n).processing_mode_code := 'BATCH';
1822:
1823: IF (g_asn_debug = 'Y') THEN
1824: asn_debug.put_line('Defaulting PROCESSING_MODE_CODE ' || x_cascaded_table(n).processing_mode_code);
1825: END IF;
1826: END IF;
1827:

Line 1824: asn_debug.put_line('Defaulting PROCESSING_MODE_CODE ' || x_cascaded_table(n).processing_mode_code);

1820: IF x_cascaded_table(n).processing_mode_code IS NULL THEN
1821: x_cascaded_table(n).processing_mode_code := 'BATCH';
1822:
1823: IF (g_asn_debug = 'Y') THEN
1824: asn_debug.put_line('Defaulting PROCESSING_MODE_CODE ' || x_cascaded_table(n).processing_mode_code);
1825: END IF;
1826: END IF;
1827:
1828: x_cascaded_table(n).processing_status_code := 'RUNNING';

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

1831: -- This has to be set to running otherwise C code in rvtbm
1832: -- will not pick it up
1833: x_cascaded_table(n).processing_status_code := 'RUNNING';
1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Defaulting PROCESSING_STATUS_CODE ' || x_cascaded_table(n).processing_status_code);
1837: END IF;
1838: END IF;
1839: END default_processing_info;

Line 1836: asn_debug.put_line('Defaulting PROCESSING_STATUS_CODE ' || x_cascaded_table(n).processing_status_code);

1832: -- will not pick it up
1833: x_cascaded_table(n).processing_status_code := 'RUNNING';
1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Defaulting PROCESSING_STATUS_CODE ' || x_cascaded_table(n).processing_status_code);
1837: END IF;
1838: END IF;
1839: END default_processing_info;
1840:

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

1858: INTO x_cascaded_table(n).routing_header_id
1859: FROM rcv_parameters
1860: WHERE organization_id = x_cascaded_table(n).to_organization_id;
1861:
1862: IF (g_asn_debug = 'Y') THEN
1863: asn_debug.put_line('Defaulted routing_header_id ' || x_cascaded_table(n).routing_header_id);
1864: END IF;
1865: END IF;
1866:

Line 1863: asn_debug.put_line('Defaulted routing_header_id ' || x_cascaded_table(n).routing_header_id);

1859: FROM rcv_parameters
1860: WHERE organization_id = x_cascaded_table(n).to_organization_id;
1861:
1862: IF (g_asn_debug = 'Y') THEN
1863: asn_debug.put_line('Defaulted routing_header_id ' || x_cascaded_table(n).routing_header_id);
1864: END IF;
1865: END IF;
1866:
1867: IF x_cascaded_table(n).routing_step_id IS NULL THEN

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

1866:
1867: IF x_cascaded_table(n).routing_step_id IS NULL THEN
1868: x_cascaded_table(n).routing_step_id := 1;
1869:
1870: IF (g_asn_debug = 'Y') THEN
1871: asn_debug.put_line('Defaulting routing_step_id ' || x_cascaded_table(n).routing_step_id);
1872: END IF;
1873: END IF;
1874: END default_routing_info;

Line 1871: asn_debug.put_line('Defaulting routing_step_id ' || x_cascaded_table(n).routing_step_id);

1867: IF x_cascaded_table(n).routing_step_id IS NULL THEN
1868: x_cascaded_table(n).routing_step_id := 1;
1869:
1870: IF (g_asn_debug = 'Y') THEN
1871: asn_debug.put_line('Defaulting routing_step_id ' || x_cascaded_table(n).routing_step_id);
1872: END IF;
1873: END IF;
1874: END default_routing_info;
1875:

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

1955: */
1956: IF x_cascaded_table(n).item_revision IS NULL
1957: AND (NVL(x_cascaded_table(n).mobile_txn, 'N') = 'N')
1958: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
1959: IF (g_asn_debug = 'Y') THEN
1960: asn_debug.put_line('Defaulting item revision');
1961: END IF;
1962:
1963: item_id_record.item_id := x_cascaded_table(n).item_id;

Line 1960: asn_debug.put_line('Defaulting item revision');

1956: IF x_cascaded_table(n).item_revision IS NULL
1957: AND (NVL(x_cascaded_table(n).mobile_txn, 'N') = 'N')
1958: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
1959: IF (g_asn_debug = 'Y') THEN
1960: asn_debug.put_line('Defaulting item revision');
1961: END IF;
1962:
1963: item_id_record.item_id := x_cascaded_table(n).item_id;
1964: item_id_record.po_line_id := x_cascaded_table(n).oe_order_line_id;

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

1968: item_id_record.error_record.error_message := NULL;
1969: default_item_revision(item_id_record);
1970: x_cascaded_table(n).item_revision := item_id_record.item_revision;
1971:
1972: IF (g_asn_debug = 'Y') THEN
1973: asn_debug.put_line(NVL(item_id_record.item_revision, 'Item Revision is null'));
1974: END IF;
1975:
1976: x_cascaded_table(n).error_status := item_id_record.error_record.error_status;

Line 1973: asn_debug.put_line(NVL(item_id_record.item_revision, 'Item Revision is null'));

1969: default_item_revision(item_id_record);
1970: x_cascaded_table(n).item_revision := item_id_record.item_revision;
1971:
1972: IF (g_asn_debug = 'Y') THEN
1973: asn_debug.put_line(NVL(item_id_record.item_revision, 'Item Revision is null'));
1974: END IF;
1975:
1976: x_cascaded_table(n).error_status := item_id_record.error_record.error_status;
1977: x_cascaded_table(n).error_message := item_id_record.error_record.error_message;

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

1979:
1980: -- default the category_id
1981: IF x_cascaded_table(n).error_status IN('S', 'W')
1982: AND x_cascaded_table(n).category_id IS NULL THEN
1983: IF (g_asn_debug = 'Y') THEN
1984: asn_debug.put_line('Defaulting item category id');
1985: END IF;
1986:
1987: -- get the default category_set_id for PO

Line 1984: asn_debug.put_line('Defaulting item category id');

1980: -- default the category_id
1981: IF x_cascaded_table(n).error_status IN('S', 'W')
1982: AND x_cascaded_table(n).category_id IS NULL THEN
1983: IF (g_asn_debug = 'Y') THEN
1984: asn_debug.put_line('Defaulting item category id');
1985: END IF;
1986:
1987: -- get the default category_set_id for PO
1988: -- refer to INIT_RCV_CONTROL_BLOCK in POXCOSEU.pld, which eventually calls PO_CORE_S.get_item_category_structure

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

1999: WHERE inventory_item_id = x_cascaded_table(n).item_id
2000: AND organization_id = x_cascaded_table(n).to_organization_id
2001: AND category_set_id = l_category_set_id;
2002:
2003: IF (g_asn_debug = 'Y') THEN
2004: asn_debug.put_line('Defaulted category_id ' || x_cascaded_table(n).category_id);
2005: END IF;
2006: END IF;
2007: EXCEPTION

Line 2004: asn_debug.put_line('Defaulted category_id ' || x_cascaded_table(n).category_id);

2000: AND organization_id = x_cascaded_table(n).to_organization_id
2001: AND category_set_id = l_category_set_id;
2002:
2003: IF (g_asn_debug = 'Y') THEN
2004: asn_debug.put_line('Defaulted category_id ' || x_cascaded_table(n).category_id);
2005: END IF;
2006: END IF;
2007: EXCEPTION
2008: WHEN OTHERS THEN

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

2095: -- ship_to_org
2096: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2097: AND x_cascaded_table(n).to_organization_id IS NULL
2098: AND default_rma_record.to_organization_id IS NOT NULL) THEN
2099: IF (g_asn_debug = 'Y') THEN
2100: asn_debug.put_line('Defaulting org id from default RMA');
2101: END IF;
2102:
2103: x_cascaded_table(n).to_organization_id := default_rma_record.to_organization_id;

Line 2100: asn_debug.put_line('Defaulting org id from default RMA');

2096: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2097: AND x_cascaded_table(n).to_organization_id IS NULL
2098: AND default_rma_record.to_organization_id IS NOT NULL) THEN
2099: IF (g_asn_debug = 'Y') THEN
2100: asn_debug.put_line('Defaulting org id from default RMA');
2101: END IF;
2102:
2103: x_cascaded_table(n).to_organization_id := default_rma_record.to_organization_id;
2104: END IF;

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

2112: BEGIN
2113: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2114: AND x_cascaded_table(n).customer_id IS NULL) THEN
2115: IF (x_header_record.header_record.customer_id IS NOT NULL) THEN
2116: IF (g_asn_debug = 'Y') THEN
2117: asn_debug.put_line('Defaulting customer info from header');
2118: END IF;
2119:
2120: x_cascaded_table(n).customer_id := x_header_record.header_record.customer_id;

Line 2117: asn_debug.put_line('Defaulting customer info from header');

2113: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2114: AND x_cascaded_table(n).customer_id IS NULL) THEN
2115: IF (x_header_record.header_record.customer_id IS NOT NULL) THEN
2116: IF (g_asn_debug = 'Y') THEN
2117: asn_debug.put_line('Defaulting customer info from header');
2118: END IF;
2119:
2120: x_cascaded_table(n).customer_id := x_header_record.header_record.customer_id;
2121: ELSE

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

2118: END IF;
2119:
2120: x_cascaded_table(n).customer_id := x_header_record.header_record.customer_id;
2121: ELSE
2122: IF (g_asn_debug = 'Y') THEN
2123: asn_debug.put_line('No customer info available');
2124: END IF;
2125:
2126: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 2123: asn_debug.put_line('No customer info available');

2119:
2120: x_cascaded_table(n).customer_id := x_header_record.header_record.customer_id;
2121: ELSE
2122: IF (g_asn_debug = 'Y') THEN
2123: asn_debug.put_line('No customer info available');
2124: END IF;
2125:
2126: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
2127: rcv_error_pkg.set_error_message('PO_PDOI_DERV_ERROR', x_cascaded_table(n).error_message);

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

2140: BEGIN
2141: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2142: AND x_cascaded_table(n).customer_site_id IS NULL) THEN
2143: IF (x_header_record.header_record.customer_site_id IS NOT NULL) THEN
2144: IF (g_asn_debug = 'Y') THEN
2145: asn_debug.put_line('Defaulting customer site info from header');
2146: END IF;
2147:
2148: x_cascaded_table(n).customer_site_id := x_header_record.header_record.customer_site_id;

Line 2145: asn_debug.put_line('Defaulting customer site info from header');

2141: IF ( x_cascaded_table(n).error_status IN('S', 'W')
2142: AND x_cascaded_table(n).customer_site_id IS NULL) THEN
2143: IF (x_header_record.header_record.customer_site_id IS NOT NULL) THEN
2144: IF (g_asn_debug = 'Y') THEN
2145: asn_debug.put_line('Defaulting customer site info from header');
2146: END IF;
2147:
2148: x_cascaded_table(n).customer_site_id := x_header_record.header_record.customer_site_id;
2149: ELSE

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

2146: END IF;
2147:
2148: x_cascaded_table(n).customer_site_id := x_header_record.header_record.customer_site_id;
2149: ELSE
2150: IF (g_asn_debug = 'Y') THEN
2151: asn_debug.put_line('No customer site info available');
2152: END IF;
2153:
2154: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 2151: asn_debug.put_line('No customer site info available');

2147:
2148: x_cascaded_table(n).customer_site_id := x_header_record.header_record.customer_site_id;
2149: ELSE
2150: IF (g_asn_debug = 'Y') THEN
2151: asn_debug.put_line('No customer site info available');
2152: END IF;
2153:
2154: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
2155: rcv_error_pkg.set_error_message('PO_PDOI_DERV_ERROR', x_cascaded_table(n).error_message);

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

2170: AND x_cascaded_table(n).from_organization_code IS NULL THEN
2171: x_cascaded_table(n).from_organization_id := x_header_record.header_record.from_organization_id;
2172: x_cascaded_table(n).from_organization_code := x_header_record.header_record.from_organization_code;
2173:
2174: IF (g_asn_debug = 'Y') THEN
2175: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).from_organization_id));
2176: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_CODE ' || x_cascaded_table(n).from_organization_code);
2177: END IF;
2178: END IF;

Line 2175: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).from_organization_id));

2171: x_cascaded_table(n).from_organization_id := x_header_record.header_record.from_organization_id;
2172: x_cascaded_table(n).from_organization_code := x_header_record.header_record.from_organization_code;
2173:
2174: IF (g_asn_debug = 'Y') THEN
2175: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).from_organization_id));
2176: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_CODE ' || x_cascaded_table(n).from_organization_code);
2177: END IF;
2178: END IF;
2179: END default_from_org_header;

Line 2176: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_CODE ' || x_cascaded_table(n).from_organization_code);

2172: x_cascaded_table(n).from_organization_code := x_header_record.header_record.from_organization_code;
2173:
2174: IF (g_asn_debug = 'Y') THEN
2175: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).from_organization_id));
2176: asn_debug.put_line('Defaulting from HEADER FROM_ORGANIZATION_CODE ' || x_cascaded_table(n).from_organization_code);
2177: END IF;
2178: END IF;
2179: END default_from_org_header;
2180:

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

2189: AND x_cascaded_table(n).to_organization_code IS NULL THEN
2190: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;
2191: x_cascaded_table(n).to_organization_code := x_header_record.header_record.ship_to_organization_code;
2192:
2193: IF (g_asn_debug = 'Y') THEN
2194: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).to_organization_id));
2195: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_CODE ' || x_cascaded_table(n).to_organization_code);
2196: END IF;
2197: END IF;

Line 2194: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).to_organization_id));

2190: x_cascaded_table(n).to_organization_id := x_header_record.header_record.ship_to_organization_id;
2191: x_cascaded_table(n).to_organization_code := x_header_record.header_record.ship_to_organization_code;
2192:
2193: IF (g_asn_debug = 'Y') THEN
2194: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).to_organization_id));
2195: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_CODE ' || x_cascaded_table(n).to_organization_code);
2196: END IF;
2197: END IF;
2198:

Line 2195: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_CODE ' || x_cascaded_table(n).to_organization_code);

2191: x_cascaded_table(n).to_organization_code := x_header_record.header_record.ship_to_organization_code;
2192:
2193: IF (g_asn_debug = 'Y') THEN
2194: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_ID ' || TO_CHAR(x_cascaded_table(n).to_organization_id));
2195: asn_debug.put_line('Defaulting from HEADER TO_ORGANIZATION_CODE ' || x_cascaded_table(n).to_organization_code);
2196: END IF;
2197: END IF;
2198:
2199: -- ship_to_location

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

2201: AND x_cascaded_table(n).ship_to_location_code IS NULL) THEN -- Check this with George
2202: x_cascaded_table(n).ship_to_location_code := x_header_record.header_record.location_code;
2203: x_cascaded_table(n).ship_to_location_id := x_header_record.header_record.location_id;
2204:
2205: IF (g_asn_debug = 'Y') THEN
2206: asn_debug.put_line('Defaulting from HEADER LOCATION_ID ' || TO_CHAR(x_cascaded_table(n).location_id));
2207: END IF;
2208: END IF;
2209: END default_ship_to_header;

Line 2206: asn_debug.put_line('Defaulting from HEADER LOCATION_ID ' || TO_CHAR(x_cascaded_table(n).location_id));

2202: x_cascaded_table(n).ship_to_location_code := x_header_record.header_record.location_code;
2203: x_cascaded_table(n).ship_to_location_id := x_header_record.header_record.location_id;
2204:
2205: IF (g_asn_debug = 'Y') THEN
2206: asn_debug.put_line('Defaulting from HEADER LOCATION_ID ' || TO_CHAR(x_cascaded_table(n).location_id));
2207: END IF;
2208: END IF;
2209: END default_ship_to_header;
2210:

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

2222: x_cascaded_table(n).currency_conversion_type := x_header_record.header_record.conversion_rate_type;
2223: x_cascaded_table(n).currency_conversion_rate := x_header_record.header_record.conversion_rate;
2224: x_cascaded_table(n).currency_conversion_date := x_header_record.header_record.conversion_rate_date;
2225:
2226: IF (g_asn_debug = 'Y') THEN
2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);
2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);
2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));
2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));

Line 2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);

2223: x_cascaded_table(n).currency_conversion_rate := x_header_record.header_record.conversion_rate;
2224: x_cascaded_table(n).currency_conversion_date := x_header_record.header_record.conversion_rate_date;
2225:
2226: IF (g_asn_debug = 'Y') THEN
2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);
2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);
2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));
2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));
2231: END IF;

Line 2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);

2224: x_cascaded_table(n).currency_conversion_date := x_header_record.header_record.conversion_rate_date;
2225:
2226: IF (g_asn_debug = 'Y') THEN
2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);
2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);
2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));
2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));
2231: END IF;
2232: END IF;

Line 2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));

2225:
2226: IF (g_asn_debug = 'Y') THEN
2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);
2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);
2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));
2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));
2231: END IF;
2232: END IF;
2233: END default_currency_info_header;

Line 2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));

2226: IF (g_asn_debug = 'Y') THEN
2227: asn_debug.put_line('Defaulting from HEADER CURRENCY_CODE ' || x_cascaded_table(n).currency_code);
2228: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_TYPE ' || x_cascaded_table(n).currency_conversion_type);
2229: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_RATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_rate));
2230: asn_debug.put_line('Defaulting from HEADER CURRENCY_CONVERSION_DATE ' || TO_CHAR(x_cascaded_table(n).currency_conversion_date, 'DD/MM/YYYY'));
2231: END IF;
2232: END IF;
2233: END default_currency_info_header;
2234:

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

2240: BEGIN
2241: IF x_cascaded_table(n).shipment_num IS NULL THEN
2242: x_cascaded_table(n).shipment_num := x_header_record.header_record.shipment_num;
2243:
2244: IF (g_asn_debug = 'Y') THEN
2245: asn_debug.put_line('Defaulting from HEADER SHIPMENT_NUM ' || x_cascaded_table(n).shipment_num);
2246: END IF;
2247: END IF;
2248: END default_shipment_num_header;

Line 2245: asn_debug.put_line('Defaulting from HEADER SHIPMENT_NUM ' || x_cascaded_table(n).shipment_num);

2241: IF x_cascaded_table(n).shipment_num IS NULL THEN
2242: x_cascaded_table(n).shipment_num := x_header_record.header_record.shipment_num;
2243:
2244: IF (g_asn_debug = 'Y') THEN
2245: asn_debug.put_line('Defaulting from HEADER SHIPMENT_NUM ' || x_cascaded_table(n).shipment_num);
2246: END IF;
2247: END IF;
2248: END default_shipment_num_header;
2249:

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

2255: BEGIN
2256: IF x_cascaded_table(n).freight_carrier_code IS NULL THEN
2257: x_cascaded_table(n).freight_carrier_code := x_header_record.header_record.freight_carrier_code;
2258:
2259: IF (g_asn_debug = 'Y') THEN
2260: asn_debug.put_line('Defaulting from HEADER FREIGHT_CARRIER_CODE ' || x_cascaded_table(n).freight_carrier_code);
2261: END IF;
2262: END IF;
2263: END default_freight_carrier_header;

Line 2260: asn_debug.put_line('Defaulting from HEADER FREIGHT_CARRIER_CODE ' || x_cascaded_table(n).freight_carrier_code);

2256: IF x_cascaded_table(n).freight_carrier_code IS NULL THEN
2257: x_cascaded_table(n).freight_carrier_code := x_header_record.header_record.freight_carrier_code;
2258:
2259: IF (g_asn_debug = 'Y') THEN
2260: asn_debug.put_line('Defaulting from HEADER FREIGHT_CARRIER_CODE ' || x_cascaded_table(n).freight_carrier_code);
2261: END IF;
2262: END IF;
2263: END default_freight_carrier_header;
2264:

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

2270: BEGIN
2271: IF x_cascaded_table(n).bill_of_lading IS NULL THEN
2272: x_cascaded_table(n).bill_of_lading := x_header_record.header_record.bill_of_lading;
2273:
2274: IF (g_asn_debug = 'Y') THEN
2275: asn_debug.put_line('Defaulting from HEADER BILL_OF_LADING ' || x_cascaded_table(n).bill_of_lading);
2276: END IF;
2277: END IF;
2278: END default_bill_of_lading_header;

Line 2275: asn_debug.put_line('Defaulting from HEADER BILL_OF_LADING ' || x_cascaded_table(n).bill_of_lading);

2271: IF x_cascaded_table(n).bill_of_lading IS NULL THEN
2272: x_cascaded_table(n).bill_of_lading := x_header_record.header_record.bill_of_lading;
2273:
2274: IF (g_asn_debug = 'Y') THEN
2275: asn_debug.put_line('Defaulting from HEADER BILL_OF_LADING ' || x_cascaded_table(n).bill_of_lading);
2276: END IF;
2277: END IF;
2278: END default_bill_of_lading_header;
2279:

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

2285: BEGIN
2286: IF x_cascaded_table(n).packing_slip IS NULL THEN
2287: x_cascaded_table(n).packing_slip := x_header_record.header_record.packing_slip;
2288:
2289: IF (g_asn_debug = 'Y') THEN
2290: asn_debug.put_line('Defaulting from HEADER PACKING_SLIP ' || x_cascaded_table(n).packing_slip);
2291: END IF;
2292: END IF;
2293: END default_packing_slip_header;

Line 2290: asn_debug.put_line('Defaulting from HEADER PACKING_SLIP ' || x_cascaded_table(n).packing_slip);

2286: IF x_cascaded_table(n).packing_slip IS NULL THEN
2287: x_cascaded_table(n).packing_slip := x_header_record.header_record.packing_slip;
2288:
2289: IF (g_asn_debug = 'Y') THEN
2290: asn_debug.put_line('Defaulting from HEADER PACKING_SLIP ' || x_cascaded_table(n).packing_slip);
2291: END IF;
2292: END IF;
2293: END default_packing_slip_header;
2294:

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

2300: BEGIN
2301: IF x_cascaded_table(n).shipped_date IS NULL THEN
2302: x_cascaded_table(n).shipped_date := x_header_record.header_record.shipped_date;
2303:
2304: IF (g_asn_debug = 'Y') THEN
2305: asn_debug.put_line('Defaulting from HEADER SHIPPED_DATE ' || TO_CHAR(x_cascaded_table(n).shipped_date, 'DD/MM/YYYY'));
2306: END IF;
2307: END IF;
2308: END default_ship_date_header;

Line 2305: asn_debug.put_line('Defaulting from HEADER SHIPPED_DATE ' || TO_CHAR(x_cascaded_table(n).shipped_date, 'DD/MM/YYYY'));

2301: IF x_cascaded_table(n).shipped_date IS NULL THEN
2302: x_cascaded_table(n).shipped_date := x_header_record.header_record.shipped_date;
2303:
2304: IF (g_asn_debug = 'Y') THEN
2305: asn_debug.put_line('Defaulting from HEADER SHIPPED_DATE ' || TO_CHAR(x_cascaded_table(n).shipped_date, 'DD/MM/YYYY'));
2306: END IF;
2307: END IF;
2308: END default_ship_date_header;
2309:

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

2315: BEGIN
2316: IF x_cascaded_table(n).expected_receipt_date IS NULL THEN
2317: x_cascaded_table(n).expected_receipt_date := x_header_record.header_record.expected_receipt_date;
2318:
2319: IF (g_asn_debug = 'Y') THEN
2320: asn_debug.put_line('Defaulting from HEADER EXPECTED_RECEIPT_DATE ' || TO_CHAR(x_cascaded_table(n).expected_receipt_date, 'DD/MM/YYYY'));
2321: END IF;
2322: END IF;
2323: END default_receipt_date_header;

Line 2320: asn_debug.put_line('Defaulting from HEADER EXPECTED_RECEIPT_DATE ' || TO_CHAR(x_cascaded_table(n).expected_receipt_date, 'DD/MM/YYYY'));

2316: IF x_cascaded_table(n).expected_receipt_date IS NULL THEN
2317: x_cascaded_table(n).expected_receipt_date := x_header_record.header_record.expected_receipt_date;
2318:
2319: IF (g_asn_debug = 'Y') THEN
2320: asn_debug.put_line('Defaulting from HEADER EXPECTED_RECEIPT_DATE ' || TO_CHAR(x_cascaded_table(n).expected_receipt_date, 'DD/MM/YYYY'));
2321: END IF;
2322: END IF;
2323: END default_receipt_date_header;
2324:

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

2330: BEGIN
2331: IF x_cascaded_table(n).num_of_containers IS NULL THEN
2332: x_cascaded_table(n).num_of_containers := x_header_record.header_record.num_of_containers;
2333:
2334: IF (g_asn_debug = 'Y') THEN
2335: asn_debug.put_line('Defaulting from HEADER NUM_OF_CONTAINERS ' || TO_CHAR(x_cascaded_table(n).num_of_containers));
2336: END IF;
2337: END IF;
2338: END default_num_containers_header;

Line 2335: asn_debug.put_line('Defaulting from HEADER NUM_OF_CONTAINERS ' || TO_CHAR(x_cascaded_table(n).num_of_containers));

2331: IF x_cascaded_table(n).num_of_containers IS NULL THEN
2332: x_cascaded_table(n).num_of_containers := x_header_record.header_record.num_of_containers;
2333:
2334: IF (g_asn_debug = 'Y') THEN
2335: asn_debug.put_line('Defaulting from HEADER NUM_OF_CONTAINERS ' || TO_CHAR(x_cascaded_table(n).num_of_containers));
2336: END IF;
2337: END IF;
2338: END default_num_containers_header;
2339:

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

2345: BEGIN
2346: IF x_cascaded_table(n).waybill_airbill_num IS NULL THEN
2347: x_cascaded_table(n).waybill_airbill_num := x_header_record.header_record.waybill_airbill_num;
2348:
2349: IF (g_asn_debug = 'Y') THEN
2350: asn_debug.put_line('Defaulting from HEADER WAYBILL_AIRBILL_NUM ' || x_cascaded_table(n).waybill_airbill_num);
2351: END IF;
2352: END IF;
2353: END default_waybill_header;

Line 2350: asn_debug.put_line('Defaulting from HEADER WAYBILL_AIRBILL_NUM ' || x_cascaded_table(n).waybill_airbill_num);

2346: IF x_cascaded_table(n).waybill_airbill_num IS NULL THEN
2347: x_cascaded_table(n).waybill_airbill_num := x_header_record.header_record.waybill_airbill_num;
2348:
2349: IF (g_asn_debug = 'Y') THEN
2350: asn_debug.put_line('Defaulting from HEADER WAYBILL_AIRBILL_NUM ' || x_cascaded_table(n).waybill_airbill_num);
2351: END IF;
2352: END IF;
2353: END default_waybill_header;
2354:

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

2360: BEGIN
2361: IF x_cascaded_table(n).tax_name IS NULL THEN
2362: x_cascaded_table(n).tax_name := x_header_record.header_record.tax_name;
2363:
2364: IF (g_asn_debug = 'Y') THEN
2365: asn_debug.put_line('Defaulting from HEADER TAX_NAME ' || x_cascaded_table(n).tax_name);
2366: END IF;
2367: END IF;
2368: END default_tax_name_header;

Line 2365: asn_debug.put_line('Defaulting from HEADER TAX_NAME ' || x_cascaded_table(n).tax_name);

2361: IF x_cascaded_table(n).tax_name IS NULL THEN
2362: x_cascaded_table(n).tax_name := x_header_record.header_record.tax_name;
2363:
2364: IF (g_asn_debug = 'Y') THEN
2365: asn_debug.put_line('Defaulting from HEADER TAX_NAME ' || x_cascaded_table(n).tax_name);
2366: END IF;
2367: END IF;
2368: END default_tax_name_header;
2369:

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

2392: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
2393: RETURN;
2394: END IF;
2395:
2396: IF (g_asn_debug = 'Y') THEN
2397: asn_debug.put_line('Before call to validate UOM');
2398: asn_debug.put_line('Quantity ' || TO_CHAR(x_cascaded_table(n).quantity));
2399: END IF;
2400:

Line 2397: asn_debug.put_line('Before call to validate UOM');

2393: RETURN;
2394: END IF;
2395:
2396: IF (g_asn_debug = 'Y') THEN
2397: asn_debug.put_line('Before call to validate UOM');
2398: asn_debug.put_line('Quantity ' || TO_CHAR(x_cascaded_table(n).quantity));
2399: END IF;
2400:
2401: /* Commenting the following line because OE stores UOM differently

Line 2398: asn_debug.put_line('Quantity ' || TO_CHAR(x_cascaded_table(n).quantity));

2394: END IF;
2395:
2396: IF (g_asn_debug = 'Y') THEN
2397: asn_debug.put_line('Before call to validate UOM');
2398: asn_debug.put_line('Quantity ' || TO_CHAR(x_cascaded_table(n).quantity));
2399: END IF;
2400:
2401: /* Commenting the following line because OE stores UOM differently
2402: * from PO, causing conversion problems.

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

2412: uom_record.primary_unit_of_measure := x_cascaded_table(n).primary_unit_of_measure;
2413: uom_record.error_record.error_status := 'S';
2414: uom_record.error_record.error_message := NULL;
2415:
2416: IF (g_asn_debug = 'Y') THEN
2417: asn_debug.put_line('Validating UOM');
2418: END IF;
2419:
2420: validate_uom(uom_record);

Line 2417: asn_debug.put_line('Validating UOM');

2413: uom_record.error_record.error_status := 'S';
2414: uom_record.error_record.error_message := NULL;
2415:
2416: IF (g_asn_debug = 'Y') THEN
2417: asn_debug.put_line('Validating UOM');
2418: END IF;
2419:
2420: validate_uom(uom_record);
2421: x_cascaded_table(n).error_status := uom_record.error_record.error_status;

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

2449: item_id_record.use_mtl_serial := x_cascaded_table(n).use_mtl_serial;
2450: item_id_record.error_record.error_status := 'S';
2451: item_id_record.error_record.error_message := NULL;
2452:
2453: IF (g_asn_debug = 'Y') THEN
2454: asn_debug.put_line('Validating Item');
2455: asn_debug.put_line(TO_CHAR(x_cascaded_table(n).item_id));
2456: END IF;
2457:

Line 2454: asn_debug.put_line('Validating Item');

2450: item_id_record.error_record.error_status := 'S';
2451: item_id_record.error_record.error_message := NULL;
2452:
2453: IF (g_asn_debug = 'Y') THEN
2454: asn_debug.put_line('Validating Item');
2455: asn_debug.put_line(TO_CHAR(x_cascaded_table(n).item_id));
2456: END IF;
2457:
2458: /*

Line 2455: asn_debug.put_line(TO_CHAR(x_cascaded_table(n).item_id));

2451: item_id_record.error_record.error_message := NULL;
2452:
2453: IF (g_asn_debug = 'Y') THEN
2454: asn_debug.put_line('Validating Item');
2455: asn_debug.put_line(TO_CHAR(x_cascaded_table(n).item_id));
2456: END IF;
2457:
2458: /*
2459: ** If this is a one time item shipment and you've matched up based on a

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

2475: item_id_record.item_description := x_cascaded_table(n).item_description;
2476: item_id_record.error_record.error_status := 'S';
2477: item_id_record.error_record.error_message := NULL;
2478:
2479: IF (g_asn_debug = 'Y') THEN
2480: asn_debug.put_line('Validating Item Description ' || item_id_record.item_description);
2481: END IF;
2482:
2483: rcv_transactions_interface_sv1.validate_item_description(item_id_record);

Line 2480: asn_debug.put_line('Validating Item Description ' || item_id_record.item_description);

2476: item_id_record.error_record.error_status := 'S';
2477: item_id_record.error_record.error_message := NULL;
2478:
2479: IF (g_asn_debug = 'Y') THEN
2480: asn_debug.put_line('Validating Item Description ' || item_id_record.item_description);
2481: END IF;
2482:
2483: rcv_transactions_interface_sv1.validate_item_description(item_id_record);
2484: x_cascaded_table(n).error_status := item_id_record.error_record.error_status;

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

2484: x_cascaded_table(n).error_status := item_id_record.error_record.error_status;
2485: x_cascaded_table(n).error_message := item_id_record.error_record.error_message;
2486: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status, 'ITEM_DESCRIPTION');
2487:
2488: IF (g_asn_debug = 'Y') THEN
2489: asn_debug.put_line('Error status after validate item description ' || x_cascaded_table(n).error_status);
2490: END IF;
2491:
2492: -- item_revision

Line 2489: asn_debug.put_line('Error status after validate item description ' || x_cascaded_table(n).error_status);

2485: x_cascaded_table(n).error_message := item_id_record.error_record.error_message;
2486: rcv_error_pkg.log_interface_message(x_cascaded_table(n).error_status, 'ITEM_DESCRIPTION');
2487:
2488: IF (g_asn_debug = 'Y') THEN
2489: asn_debug.put_line('Error status after validate item description ' || x_cascaded_table(n).error_status);
2490: END IF;
2491:
2492: -- item_revision
2493: IF (x_cascaded_table(n).item_revision IS NOT NULL) THEN

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

2497: item_revision_record.item_id := x_cascaded_table(n).item_id;
2498: item_revision_record.error_record.error_status := 'S';
2499: item_revision_record.error_record.error_message := NULL;
2500:
2501: IF (g_asn_debug = 'Y') THEN
2502: asn_debug.put_line('Validating Item Revision');
2503: END IF;
2504:
2505: validate_item_revision(item_revision_record);

Line 2502: asn_debug.put_line('Validating Item Revision');

2498: item_revision_record.error_record.error_status := 'S';
2499: item_revision_record.error_record.error_message := NULL;
2500:
2501: IF (g_asn_debug = 'Y') THEN
2502: asn_debug.put_line('Validating Item Revision');
2503: END IF;
2504:
2505: validate_item_revision(item_revision_record);
2506: x_cascaded_table(n).error_status := item_revision_record.error_record.error_status;

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

2542: INTO x_sob_id
2543: FROM financials_system_parameters;
2544: EXCEPTION
2545: WHEN NO_DATA_FOUND THEN
2546: IF (g_asn_debug = 'Y') THEN
2547: asn_debug.put_line('Set of books id not defined');
2548: END IF;
2549: END;
2550:

Line 2547: asn_debug.put_line('Set of books id not defined');

2543: FROM financials_system_parameters;
2544: EXCEPTION
2545: WHEN NO_DATA_FOUND THEN
2546: IF (g_asn_debug = 'Y') THEN
2547: asn_debug.put_line('Set of books id not defined');
2548: END IF;
2549: END;
2550:
2551: BEGIN

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

2620: freight_carrier_record.po_header_id := x_cascaded_table(n).po_header_id;
2621: freight_carrier_record.error_record.error_status := 'S';
2622: freight_carrier_record.error_record.error_message := NULL;
2623:
2624: IF (g_asn_debug = 'Y') THEN
2625: asn_debug.put_line('Validating Freight Carrier');
2626: END IF;
2627:
2628: rcv_transactions_interface_sv1.validate_freight_carrier(freight_carrier_record);

Line 2625: asn_debug.put_line('Validating Freight Carrier');

2621: freight_carrier_record.error_record.error_status := 'S';
2622: freight_carrier_record.error_record.error_message := NULL;
2623:
2624: IF (g_asn_debug = 'Y') THEN
2625: asn_debug.put_line('Validating Freight Carrier');
2626: END IF;
2627:
2628: rcv_transactions_interface_sv1.validate_freight_carrier(freight_carrier_record);
2629: x_cascaded_table(n).error_status := freight_carrier_record.error_record.error_status;

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

2652: po_lookup_code_record.lookup_type := 'RCV DESTINATION TYPE';
2653: po_lookup_code_record.error_record.error_status := 'S';
2654: po_lookup_code_record.error_record.error_message := NULL;
2655:
2656: IF (g_asn_debug = 'Y') THEN
2657: asn_debug.put_line('Validating Destination Type Code');
2658: END IF;
2659:
2660: rcv_transactions_interface_sv1.validate_po_lookup_code(po_lookup_code_record);

Line 2657: asn_debug.put_line('Validating Destination Type Code');

2653: po_lookup_code_record.error_record.error_status := 'S';
2654: po_lookup_code_record.error_record.error_message := NULL;
2655:
2656: IF (g_asn_debug = 'Y') THEN
2657: asn_debug.put_line('Validating Destination Type Code');
2658: END IF;
2659:
2660: rcv_transactions_interface_sv1.validate_po_lookup_code(po_lookup_code_record);
2661: x_cascaded_table(n).error_status := po_lookup_code_record.error_record.error_status;

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

2685: employee_record.transaction_date := x_cascaded_table(n).transaction_date;
2686: employee_record.error_record.error_status := 'S';
2687: employee_record.error_record.error_message := NULL;
2688:
2689: IF (g_asn_debug = 'Y') THEN
2690: asn_debug.put_line('Validating Deliver to Person');
2691: END IF;
2692:
2693: rcv_transactions_interface_sv1.validate_employee(employee_record);

Line 2690: asn_debug.put_line('Validating Deliver to Person');

2686: employee_record.error_record.error_status := 'S';
2687: employee_record.error_record.error_message := NULL;
2688:
2689: IF (g_asn_debug = 'Y') THEN
2690: asn_debug.put_line('Validating Deliver to Person');
2691: END IF;
2692:
2693: rcv_transactions_interface_sv1.validate_employee(employee_record);
2694: x_cascaded_table(n).error_status := employee_record.error_record.error_status;

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

2707: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
2708: RETURN;
2709: END IF;
2710:
2711: IF (g_asn_debug = 'Y') THEN
2712: asn_debug.put_line('Validating tax_name: ' || x_cascaded_table(n).tax_name);
2713: END IF;
2714: END validate_tax_name;
2715:

Line 2712: asn_debug.put_line('Validating tax_name: ' || x_cascaded_table(n).tax_name);

2708: RETURN;
2709: END IF;
2710:
2711: IF (g_asn_debug = 'Y') THEN
2712: asn_debug.put_line('Validating tax_name: ' || x_cascaded_table(n).tax_name);
2713: END IF;
2714: END validate_tax_name;
2715:
2716: PROCEDURE validate_country_of_origin(

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

2722: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
2723: RETURN;
2724: END IF;
2725:
2726: IF (g_asn_debug = 'Y') THEN
2727: asn_debug.put_line('Validating country_of_origin_code: ' || x_cascaded_table(n).country_of_origin_code);
2728: END IF;
2729:
2730: IF (x_cascaded_table(n).country_of_origin_code IS NOT NULL) THEN

Line 2727: asn_debug.put_line('Validating country_of_origin_code: ' || x_cascaded_table(n).country_of_origin_code);

2723: RETURN;
2724: END IF;
2725:
2726: IF (g_asn_debug = 'Y') THEN
2727: asn_debug.put_line('Validating country_of_origin_code: ' || x_cascaded_table(n).country_of_origin_code);
2728: END IF;
2729:
2730: IF (x_cascaded_table(n).country_of_origin_code IS NOT NULL) THEN
2731: country_of_origin_record.country_of_origin_code := x_cascaded_table(n).country_of_origin_code;

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

2731: country_of_origin_record.country_of_origin_code := x_cascaded_table(n).country_of_origin_code;
2732: country_of_origin_record.error_record.error_status := 'S';
2733: country_of_origin_record.error_record.error_message := NULL;
2734:
2735: IF (g_asn_debug = 'Y') THEN
2736: asn_debug.put_line('Validating Country of Origin Code');
2737: END IF;
2738:
2739: rcv_transactions_interface_sv1.validate_country_of_origin(country_of_origin_record);

Line 2736: asn_debug.put_line('Validating Country of Origin Code');

2732: country_of_origin_record.error_record.error_status := 'S';
2733: country_of_origin_record.error_record.error_message := NULL;
2734:
2735: IF (g_asn_debug = 'Y') THEN
2736: asn_debug.put_line('Validating Country of Origin Code');
2737: END IF;
2738:
2739: rcv_transactions_interface_sv1.validate_country_of_origin(country_of_origin_record);
2740: x_cascaded_table(n).error_status := country_of_origin_record.error_record.error_status;

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

2842: RAISE rcv_error_pkg.e_fatal_error;
2843: END IF;
2844:
2845: /* bug 608353, do not support lot and serial control if DELIVER is used */
2846: IF (g_asn_debug = 'Y') THEN
2847: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
2848: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
2849: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
2850: END IF;

Line 2847: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);

2843: END IF;
2844:
2845: /* bug 608353, do not support lot and serial control if DELIVER is used */
2846: IF (g_asn_debug = 'Y') THEN
2847: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
2848: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
2849: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
2850: END IF;
2851: /* We now support Lot-serial Transactions. Hence removed the code that

Line 2848: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);

2844:
2845: /* bug 608353, do not support lot and serial control if DELIVER is used */
2846: IF (g_asn_debug = 'Y') THEN
2847: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
2848: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
2849: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
2850: END IF;
2851: /* We now support Lot-serial Transactions. Hence removed the code that
2852: * sets error message to RCV_LOT_SERIAL_NOT_SUPPORTED.

Line 2849: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);

2845: /* bug 608353, do not support lot and serial control if DELIVER is used */
2846: IF (g_asn_debug = 'Y') THEN
2847: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
2848: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
2849: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
2850: END IF;
2851: /* We now support Lot-serial Transactions. Hence removed the code that
2852: * sets error message to RCV_LOT_SERIAL_NOT_SUPPORTED.
2853: */

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

2916: IF (x_inventory_item <> 0) THEN
2917: RETURN;
2918: END IF;
2919:
2920: IF (g_asn_debug = 'Y') THEN
2921: asn_debug.put_line('Item is not under revision control');
2922: END IF;
2923:
2924: rcv_error_pkg.set_error_message('RCV_ITEM_REV_NOT_ALLOWED');

Line 2921: asn_debug.put_line('Item is not under revision control');

2917: RETURN;
2918: END IF;
2919:
2920: IF (g_asn_debug = 'Y') THEN
2921: asn_debug.put_line('Item is not under revision control');
2922: END IF;
2923:
2924: rcv_error_pkg.set_error_message('RCV_ITEM_REV_NOT_ALLOWED');
2925: RAISE rcv_error_pkg.e_fatal_error;

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

2926: END IF;
2927:
2928: -- Check whether the revision number exists
2929:
2930: IF (g_asn_debug = 'Y') THEN
2931: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);
2932: END IF;
2933:
2934: SELECT NVL(MAX(inventory_item_id), 0)

Line 2931: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);

2927:
2928: -- Check whether the revision number exists
2929:
2930: IF (g_asn_debug = 'Y') THEN
2931: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);
2932: END IF;
2933:
2934: SELECT NVL(MAX(inventory_item_id), 0)
2935: INTO x_inventory_item

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

2994: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
2995: RETURN;
2996: END IF;
2997:
2998: IF (g_asn_debug = 'Y') THEN
2999: asn_debug.put_line('Validating ref integrity');
3000: END IF;
3001:
3002: -- check customer item number

Line 2999: asn_debug.put_line('Validating ref integrity');

2995: RETURN;
2996: END IF;
2997:
2998: IF (g_asn_debug = 'Y') THEN
2999: asn_debug.put_line('Validating ref integrity');
3000: END IF;
3001:
3002: -- check customer item number
3003: IF (x_cascaded_table(n).customer_item_num IS NOT NULL) THEN

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

3084: END IF;
3085:
3086: x_new_conversion := 0;
3087:
3088: IF (g_asn_debug = 'Y') THEN
3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);

Line 3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));

3085:
3086: x_new_conversion := 0;
3087:
3088: IF (g_asn_debug = 'Y') THEN
3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);
3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);

Line 3090: asn_debug.put_line(x_uom_record.unit_of_measure);

3086: x_new_conversion := 0;
3087:
3088: IF (g_asn_debug = 'Y') THEN
3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);
3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
3094: END IF;

Line 3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));

3087:
3088: IF (g_asn_debug = 'Y') THEN
3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);
3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
3094: END IF;
3095:

Line 3092: asn_debug.put_line(x_primary_unit_of_measure);

3088: IF (g_asn_debug = 'Y') THEN
3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);
3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
3094: END IF;
3095:
3096: po_uom_s.uom_convert(x_uom_record.quantity_shipped,

Line 3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);

3089: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
3090: asn_debug.put_line(x_uom_record.unit_of_measure);
3091: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
3092: asn_debug.put_line(x_primary_unit_of_measure);
3093: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
3094: END IF;
3095:
3096: po_uom_s.uom_convert(x_uom_record.quantity_shipped,
3097: x_uom_record.unit_of_measure,

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

3175: end if
3176: else
3177: item should not have any revisions which we will validate in the validation phase */
3178: IF x_revision_control_flag = 'Y' THEN
3179: IF (g_asn_debug = 'Y') THEN
3180: asn_debug.put_line('Item is under revision control');
3181: END IF;
3182:
3183: IF x_item_revision_record.item_revision IS NULL THEN -- pick up revision from source document

Line 3180: asn_debug.put_line('Item is under revision control');

3176: else
3177: item should not have any revisions which we will validate in the validation phase */
3178: IF x_revision_control_flag = 'Y' THEN
3179: IF (g_asn_debug = 'Y') THEN
3180: asn_debug.put_line('Item is under revision control');
3181: END IF;
3182:
3183: IF x_item_revision_record.item_revision IS NULL THEN -- pick up revision from source document
3184: IF (g_asn_debug = 'Y') THEN

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

3180: asn_debug.put_line('Item is under revision control');
3181: END IF;
3182:
3183: IF x_item_revision_record.item_revision IS NULL THEN -- pick up revision from source document
3184: IF (g_asn_debug = 'Y') THEN
3185: asn_debug.put_line('Picking up from source document');
3186: END IF;
3187:
3188: SELECT item_revision

Line 3185: asn_debug.put_line('Picking up from source document');

3181: END IF;
3182:
3183: IF x_item_revision_record.item_revision IS NULL THEN -- pick up revision from source document
3184: IF (g_asn_debug = 'Y') THEN
3185: asn_debug.put_line('Picking up from source document');
3186: END IF;
3187:
3188: SELECT item_revision
3189: INTO x_item_revision_record.item_revision

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

3191: WHERE oe_order_lines_all.line_id = x_item_revision_record.po_line_id;
3192: END IF;
3193:
3194: IF x_item_revision_record.item_revision IS NULL THEN
3195: IF (g_asn_debug = 'Y') THEN
3196: asn_debug.put_line('Picking up latest implementation since source doc is null');
3197: END IF;
3198:
3199: po_items_sv2.get_latest_item_rev(x_item_revision_record.item_id,

Line 3196: asn_debug.put_line('Picking up latest implementation since source doc is null');

3192: END IF;
3193:
3194: IF x_item_revision_record.item_revision IS NULL THEN
3195: IF (g_asn_debug = 'Y') THEN
3196: asn_debug.put_line('Picking up latest implementation since source doc is null');
3197: END IF;
3198:
3199: po_items_sv2.get_latest_item_rev(x_item_revision_record.item_id,
3200: x_item_revision_record.to_organization_id,

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

3204: END IF;
3205: END IF;
3206: EXCEPTION
3207: WHEN OTHERS THEN
3208: IF (g_asn_debug = 'Y') THEN
3209: asn_debug.put_line('Exception in procedure default_item_revision');
3210: END IF;
3211: END default_item_revision;
3212:

Line 3209: asn_debug.put_line('Exception in procedure default_item_revision');

3205: END IF;
3206: EXCEPTION
3207: WHEN OTHERS THEN
3208: IF (g_asn_debug = 'Y') THEN
3209: asn_debug.put_line('Exception in procedure default_item_revision');
3210: END IF;
3211: END default_item_revision;
3212:
3213: /*===========================================================================

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

3225: x_sysdate DATE := SYSDATE;
3226: high_range_date DATE;
3227: low_range_date DATE;
3228: BEGIN
3229: IF (g_asn_debug = 'Y') THEN
3230: asn_debug.put_line('Check date tolerance');
3231: END IF;
3232:
3233: IF (expected_receipt_date IS NOT NULL) THEN

Line 3230: asn_debug.put_line('Check date tolerance');

3226: high_range_date DATE;
3227: low_range_date DATE;
3228: BEGIN
3229: IF (g_asn_debug = 'Y') THEN
3230: asn_debug.put_line('Check date tolerance');
3231: END IF;
3232:
3233: IF (expected_receipt_date IS NOT NULL) THEN
3234: IF (promised_date IS NOT NULL) THEN

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

3253: receipt_days_exception_code := 'NONE';
3254: END IF;
3255:
3256: IF receipt_days_exception_code IS NULL THEN
3257: IF (g_asn_debug = 'Y') THEN
3258: asn_debug.put_line('In null days exception code');
3259: END IF;
3260:
3261: receipt_days_exception_code := 'NONE';

Line 3258: asn_debug.put_line('In null days exception code');

3254: END IF;
3255:
3256: IF receipt_days_exception_code IS NULL THEN
3257: IF (g_asn_debug = 'Y') THEN
3258: asn_debug.put_line('In null days exception code');
3259: END IF;
3260:
3261: receipt_days_exception_code := 'NONE';
3262: END IF;

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

3284:
3285: RETURN(correct_qty);
3286: EXCEPTION
3287: WHEN OTHERS THEN
3288: IF (g_asn_debug = 'Y') THEN
3289: asn_debug.put_line('Could not convert between UOMs');
3290: asn_debug.put_line('Will return 0');
3291: END IF;
3292:

Line 3289: asn_debug.put_line('Could not convert between UOMs');

3285: RETURN(correct_qty);
3286: EXCEPTION
3287: WHEN OTHERS THEN
3288: IF (g_asn_debug = 'Y') THEN
3289: asn_debug.put_line('Could not convert between UOMs');
3290: asn_debug.put_line('Will return 0');
3291: END IF;
3292:
3293: correct_qty := 0;

Line 3290: asn_debug.put_line('Will return 0');

3286: EXCEPTION
3287: WHEN OTHERS THEN
3288: IF (g_asn_debug = 'Y') THEN
3289: asn_debug.put_line('Could not convert between UOMs');
3290: asn_debug.put_line('Will return 0');
3291: END IF;
3292:
3293: correct_qty := 0;
3294: RETURN(correct_qty);

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

3327: PROCEDURE get_locator_id(
3328: x_locator_id_record IN OUT NOCOPY rcv_shipment_line_sv.locator_id_record_type
3329: ) IS
3330: BEGIN
3331: IF (g_asn_debug = 'Y') THEN
3332: asn_debug.put_line('inside get_locator_id');
3333: END IF;
3334:
3335: IF (x_locator_id_record.subinventory IS NULL) THEN

Line 3332: asn_debug.put_line('inside get_locator_id');

3328: x_locator_id_record IN OUT NOCOPY rcv_shipment_line_sv.locator_id_record_type
3329: ) IS
3330: BEGIN
3331: IF (g_asn_debug = 'Y') THEN
3332: asn_debug.put_line('inside get_locator_id');
3333: END IF;
3334:
3335: IF (x_locator_id_record.subinventory IS NULL) THEN
3336: SELECT MAX(ml.inventory_location_id)