DBA Data[Home] [Help]

APPS.RCV_ROI_RETURN dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_roi_return
2: /* $Header: RCVPRERB.pls 120.4 2006/05/17 02:38:33 samanna noship $*/
3: AS
4: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
5: x_progress VARCHAR2(3);
6: p_trx_record rcv_roi_header_common.common_default_record_type;
7: default_return_info default_return%ROWTYPE;
8:

Line 17: asn_debug.put_line('enter derive_return_line ');

13: x_header_record IN rcv_roi_preprocessor.header_rec_type
14: ) IS
15: BEGIN
16: x_progress := '010';
17: asn_debug.put_line('enter derive_return_line ');
18: /* Derive the to_org_id */
19: derive_ship_to_org_info(x_cascaded_table,
20: n,
21: x_header_record

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

21: x_header_record
22: );
23:
24: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
25: IF (g_asn_debug = 'Y') THEN
26: asn_debug.put_line('X_progress ' || x_progress);
27: END IF;
28:
29: SELECT muom.uom_code

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

22: );
23:
24: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
25: IF (g_asn_debug = 'Y') THEN
26: asn_debug.put_line('X_progress ' || x_progress);
27: END IF;
28:
29: SELECT muom.uom_code
30: INTO x_cascaded_table(n).uom_code

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

30: INTO x_cascaded_table(n).uom_code
31: FROM mtl_units_of_measure muom
32: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
33: ELSE
34: IF (g_asn_debug = 'Y') THEN
35: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
36: END IF;
37: END IF;
38:

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

31: FROM mtl_units_of_measure muom
32: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
33: ELSE
34: IF (g_asn_debug = 'Y') THEN
35: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
36: END IF;
37: END IF;
38:
39: x_progress := '020';

Line 56: asn_debug.put_line('Enter Default');

52: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
53: n IN BINARY_INTEGER
54: ) IS
55: BEGIN
56: asn_debug.put_line('Enter Default');
57: default_common_lines(x_cascaded_table, n);
58:
59: IF (x_cascaded_table(n).derive = 'Y') THEN --{
60: IF (x_cascaded_table(n).derive_index <> 0) THEN --{

Line 64: asn_debug.put_line('open cursor Default');

60: IF (x_cascaded_table(n).derive_index <> 0) THEN --{
61: NULL;
62: /* Get the values from pl/sql table */
63: ELSE --} {
64: asn_debug.put_line('open cursor Default');
65: OPEN default_return_rti(x_cascaded_table(n).parent_interface_txn_id);
66: END IF; --}
67: ELSE -- } {
68: OPEN default_return(x_cascaded_table(n).parent_transaction_id);

Line 72: asn_debug.put_line('fetch cursor Default ' || x_cascaded_table(n).parent_transaction_id);

68: OPEN default_return(x_cascaded_table(n).parent_transaction_id);
69: END IF; --}
70:
71: IF (default_return%ISOPEN) THEN
72: asn_debug.put_line('fetch cursor Default ' || x_cascaded_table(n).parent_transaction_id);
73: FETCH default_return INTO default_return_info;
74: ELSIF(default_return_rti%ISOPEN) THEN
75: FETCH default_return_rti INTO default_return_info;
76: END IF;

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

154:
155: rcv_roi_transaction.default_to_subloc_info(x_cascaded_table, n);
156: /* FPJ WMS CHANGES END */
157:
158: IF (g_asn_debug = 'Y') THEN
159: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
160: END IF;
161:
162: IF (g_asn_debug = 'Y') THEN

Line 159: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));

155: rcv_roi_transaction.default_to_subloc_info(x_cascaded_table, n);
156: /* FPJ WMS CHANGES END */
157:
158: IF (g_asn_debug = 'Y') THEN
159: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
160: END IF;
161:
162: IF (g_asn_debug = 'Y') THEN
163: asn_debug.put_line('Exit default_vendor_correct');

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

158: IF (g_asn_debug = 'Y') THEN
159: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
160: END IF;
161:
162: IF (g_asn_debug = 'Y') THEN
163: asn_debug.put_line('Exit default_vendor_correct');
164: END IF;
165:
166: IF default_return%ISOPEN THEN

Line 163: asn_debug.put_line('Exit default_vendor_correct');

159: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
160: END IF;
161:
162: IF (g_asn_debug = 'Y') THEN
163: asn_debug.put_line('Exit default_vendor_correct');
164: END IF;
165:
166: IF default_return%ISOPEN THEN
167: CLOSE default_return;

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

183: BEGIN
184: IF (x_cascaded_table(n).error_status IN('S', 'W'))
185: AND ( x_cascaded_table(n).reason_id IS NULL
186: AND x_cascaded_table(n).reason_name IS NOT NULL) THEN
187: IF (g_asn_debug = 'Y') THEN
188: asn_debug.put_line('X_progress ' || x_progress);
189: END IF;
190:
191: reason_id_record.reason_name := x_cascaded_table(n).reason_name;

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

184: IF (x_cascaded_table(n).error_status IN('S', 'W'))
185: AND ( x_cascaded_table(n).reason_id IS NULL
186: AND x_cascaded_table(n).reason_name IS NOT NULL) THEN
187: IF (g_asn_debug = 'Y') THEN
188: asn_debug.put_line('X_progress ' || x_progress);
189: END IF;
190:
191: reason_id_record.reason_name := x_cascaded_table(n).reason_name;
192: reason_id_record.error_record.error_status := 'S';

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

191: reason_id_record.reason_name := x_cascaded_table(n).reason_name;
192: reason_id_record.error_record.error_status := 'S';
193: reason_id_record.error_record.error_message := NULL;
194:
195: IF (g_asn_debug = 'Y') THEN
196: asn_debug.put_line('Derive Reason_id');
197: END IF;
198:
199: rcv_transactions_interface_sv.get_reason_id(reason_id_record);

Line 196: asn_debug.put_line('Derive Reason_id');

192: reason_id_record.error_record.error_status := 'S';
193: reason_id_record.error_record.error_message := NULL;
194:
195: IF (g_asn_debug = 'Y') THEN
196: asn_debug.put_line('Derive Reason_id');
197: END IF;
198:
199: rcv_transactions_interface_sv.get_reason_id(reason_id_record);
200: x_cascaded_table(n).reason_id := reason_id_record.reason_id;

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

214: -- default org from header in case it is null at the line level
215:
216: IF x_cascaded_table(n).to_organization_code IS NULL
217: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
218: IF (g_asn_debug = 'Y') THEN
219: asn_debug.put_line('Attempting to default the org from the ship to location');
220: END IF;
221:
222: IF (x_cascaded_table(n).ship_to_location_code IS NOT NULL) THEN

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

215:
216: IF x_cascaded_table(n).to_organization_code IS NULL
217: AND x_cascaded_table(n).error_status IN('S', 'W') THEN
218: IF (g_asn_debug = 'Y') THEN
219: asn_debug.put_line('Attempting to default the org from the ship to location');
220: END IF;
221:
222: IF (x_cascaded_table(n).ship_to_location_code IS NOT NULL) THEN
223: SELECT max(mp.organization_code)

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

228: AND hl.inventory_organization_id = mp.organization_id;
229:
230: x_cascaded_table(n).to_organization_code := x_to_organization_code;
231:
232: IF (g_asn_debug = 'Y') THEN
233: asn_debug.put_line('Set Org Code using location code = ' || x_cascaded_table(n).to_organization_code);
234: END IF;
235: END IF;
236:

Line 233: asn_debug.put_line('Set Org Code using location code = ' || x_cascaded_table(n).to_organization_code);

229:
230: x_cascaded_table(n).to_organization_code := x_to_organization_code;
231:
232: IF (g_asn_debug = 'Y') THEN
233: asn_debug.put_line('Set Org Code using location code = ' || x_cascaded_table(n).to_organization_code);
234: END IF;
235: END IF;
236:
237: IF ( x_cascaded_table(n).to_organization_code IS NULL

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

235: END IF;
236:
237: IF ( x_cascaded_table(n).to_organization_code IS NULL
238: AND x_header_record.header_record.ship_to_organization_code IS NOT NULL) THEN
239: IF (g_asn_debug = 'Y') THEN
240: asn_debug.put_line('Will default org change DUH to ' || x_header_record.header_record.ship_to_organization_code);
241: END IF;
242:
243: x_cascaded_table(n).to_organization_code := x_header_record.header_record.ship_to_organization_code;

Line 240: asn_debug.put_line('Will default org change DUH to ' || x_header_record.header_record.ship_to_organization_code);

236:
237: IF ( x_cascaded_table(n).to_organization_code IS NULL
238: AND x_header_record.header_record.ship_to_organization_code IS NOT NULL) THEN
239: IF (g_asn_debug = 'Y') THEN
240: asn_debug.put_line('Will default org change DUH to ' || x_header_record.header_record.ship_to_organization_code);
241: END IF;
242:
243: x_cascaded_table(n).to_organization_code := x_header_record.header_record.ship_to_organization_code;
244: END IF;

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

248:
249: IF (x_cascaded_table(n).error_status IN('S', 'W'))
250: AND ( x_cascaded_table(n).to_organization_id IS NULL
251: AND x_cascaded_table(n).to_organization_code IS NOT NULL) THEN
252: IF (g_asn_debug = 'Y') THEN
253: asn_debug.put_line('X_Progress ' || x_progress);
254: END IF;
255:
256: ship_to_org_record.organization_code := x_cascaded_table(n).to_organization_code;

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

249: IF (x_cascaded_table(n).error_status IN('S', 'W'))
250: AND ( x_cascaded_table(n).to_organization_id IS NULL
251: AND x_cascaded_table(n).to_organization_code IS NOT NULL) THEN
252: IF (g_asn_debug = 'Y') THEN
253: asn_debug.put_line('X_Progress ' || x_progress);
254: END IF;
255:
256: ship_to_org_record.organization_code := x_cascaded_table(n).to_organization_code;
257: ship_to_org_record.organization_id := x_cascaded_table(n).to_organization_id;

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

257: ship_to_org_record.organization_id := x_cascaded_table(n).to_organization_id;
258: ship_to_org_record.error_record.error_status := 'S';
259: ship_to_org_record.error_record.error_message := NULL;
260:
261: IF (g_asn_debug = 'Y') THEN
262: asn_debug.put_line('Into Derive Organization Record Procedure');
263: END IF;
264:
265: po_orgs_sv.derive_org_info(ship_to_org_record);

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

258: ship_to_org_record.error_record.error_status := 'S';
259: ship_to_org_record.error_record.error_message := NULL;
260:
261: IF (g_asn_debug = 'Y') THEN
262: asn_debug.put_line('Into Derive Organization Record Procedure');
263: END IF;
264:
265: po_orgs_sv.derive_org_info(ship_to_org_record);
266:

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

263: END IF;
264:
265: po_orgs_sv.derive_org_info(ship_to_org_record);
266:
267: IF (g_asn_debug = 'Y') THEN
268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);

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

264:
265: po_orgs_sv.derive_org_info(ship_to_org_record);
266:
267: IF (g_asn_debug = 'Y') THEN
268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);
272: asn_debug.put_line('Debug organization output over');

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

265: po_orgs_sv.derive_org_info(ship_to_org_record);
266:
267: IF (g_asn_debug = 'Y') THEN
268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);
272: asn_debug.put_line('Debug organization output over');
273: END IF;

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

266:
267: IF (g_asn_debug = 'Y') THEN
268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);
272: asn_debug.put_line('Debug organization output over');
273: END IF;
274:

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

267: IF (g_asn_debug = 'Y') THEN
268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);
272: asn_debug.put_line('Debug organization output over');
273: END IF;
274:
275: x_cascaded_table(n).to_organization_code := ship_to_org_record.organization_code;

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

268: asn_debug.put_line('Debug Output after organization procedure');
269: asn_debug.put_line(ship_to_org_record.organization_code);
270: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
271: asn_debug.put_line(ship_to_org_record.error_record.error_status);
272: asn_debug.put_line('Debug organization output over');
273: END IF;
274:
275: x_cascaded_table(n).to_organization_code := ship_to_org_record.organization_code;
276: x_cascaded_table(n).to_organization_id := ship_to_org_record.organization_id;

Line 377: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);

373: l_return_status VARCHAR2(1) :='S';
374: l_complex_flag varchar2(1);
375:
376: BEGIN
377: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
378:
379: -- try to derive the parent_trx_id from rt. if the parent line is not in rt,
380: -- try get it from rti or plsql table.
381: IF (x_cascaded_table(n).parent_transaction_id IS NULL) THEN

Line 386: asn_debug.put_line('open rt cursor with parent_trx_id: ' || x_cascaded_table(n).parent_transaction_id);

382: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
383: END IF;
384:
385: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
386: asn_debug.put_line('open rt cursor with parent_trx_id: ' || x_cascaded_table(n).parent_transaction_id);
387: OPEN derive_return(x_cascaded_table(n).parent_transaction_id);
388: ELSE
389: IF --{
390: ( (x_cascaded_table(n).error_status <> 'E')

Line 399: asn_debug.put_line('open rti cursor');

395: * If derive_values_from_table is true we will
396: * derive the values from the pl/sql tables later
397: * at the time when we try to see which cursor is open.
398: */
399: asn_debug.put_line('open rti cursor');
400: OPEN derive_return_rti(x_cascaded_table(n).parent_interface_txn_id);
401: END IF;
402: END IF; --}
403:

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

404: /******************************************************************/
405: --check line quanity > 0
406: x_progress := '097';
407:
408: IF (g_asn_debug = 'Y') THEN
409: asn_debug.put_line('X_progress ' || x_progress);
410: END IF;
411:
412: IF x_cascaded_table(n).error_status IN('S', 'W')

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

405: --check line quanity > 0
406: x_progress := '097';
407:
408: IF (g_asn_debug = 'Y') THEN
409: asn_debug.put_line('X_progress ' || x_progress);
410: END IF;
411:
412: IF x_cascaded_table(n).error_status IN('S', 'W')
413: AND x_cascaded_table(n).quantity <= 0 THEN --{

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

410: END IF;
411:
412: IF x_cascaded_table(n).error_status IN('S', 'W')
413: AND x_cascaded_table(n).quantity <= 0 THEN --{
414: IF (g_asn_debug = 'Y') THEN
415: asn_debug.put_line('Quantity is <= zero. quantity derive will fail');
416: END IF;
417:
418: RAISE quantity_not_postive_exception;

Line 415: asn_debug.put_line('Quantity is <= zero. quantity derive will fail');

411:
412: IF x_cascaded_table(n).error_status IN('S', 'W')
413: AND x_cascaded_table(n).quantity <= 0 THEN --{
414: IF (g_asn_debug = 'Y') THEN
415: asn_debug.put_line('Quantity is <= zero. quantity derive will fail');
416: END IF;
417:
418: RAISE quantity_not_postive_exception;
419: END IF; --} end qty > 0 check

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

431: such a way that the ROI validation does'nt error out when
432: po_line_id is populated for one time items. */
433: x_progress := '098';
434:
435: IF (g_asn_debug = 'Y') THEN
436: asn_debug.put_line('X_progress ' || x_progress);
437: END IF;
438:
439: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL

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

432: po_line_id is populated for one time items. */
433: x_progress := '098';
434:
435: IF (g_asn_debug = 'Y') THEN
436: asn_debug.put_line('X_progress ' || x_progress);
437: END IF;
438:
439: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL
440: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)

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

439: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL
440: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)
441: AND x_cascaded_table(n).error_status IN('S', 'W')) THEN --{
442: -- Copy record from main table to temp table
443: IF (g_asn_debug = 'Y') THEN
444: asn_debug.put_line('Copy record from main table to temp table');
445: END IF;
446:
447: current_n := 1;

Line 444: asn_debug.put_line('Copy record from main table to temp table');

440: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)
441: AND x_cascaded_table(n).error_status IN('S', 'W')) THEN --{
442: -- Copy record from main table to temp table
443: IF (g_asn_debug = 'Y') THEN
444: asn_debug.put_line('Copy record from main table to temp table');
445: END IF;
446:
447: current_n := 1;
448: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

447: current_n := 1;
448: temp_cascaded_table(current_n) := x_cascaded_table(n);
449:
450: -- Get all rows which meet this condition
451: IF (g_asn_debug = 'Y') THEN
452: asn_debug.put_line('Get all rows which meet this condition');
453: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
455: END IF;

Line 452: asn_debug.put_line('Get all rows which meet this condition');

448: temp_cascaded_table(current_n) := x_cascaded_table(n);
449:
450: -- Get all rows which meet this condition
451: IF (g_asn_debug = 'Y') THEN
452: asn_debug.put_line('Get all rows which meet this condition');
453: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
455: END IF;
456:

Line 453: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);

449:
450: -- Get all rows which meet this condition
451: IF (g_asn_debug = 'Y') THEN
452: asn_debug.put_line('Get all rows which meet this condition');
453: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
455: END IF;
456:
457: -- Assign shipped quantity to remaining quantity

Line 454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);

450: -- Get all rows which meet this condition
451: IF (g_asn_debug = 'Y') THEN
452: asn_debug.put_line('Get all rows which meet this condition');
453: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
455: END IF;
456:
457: -- Assign shipped quantity to remaining quantity
458: IF (g_asn_debug = 'Y') THEN

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

454: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
455: END IF;
456:
457: -- Assign shipped quantity to remaining quantity
458: IF (g_asn_debug = 'Y') THEN
459: asn_debug.put_line('Assign populated quantity to remaining quantity');
460: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
461: END IF;
462:

Line 459: asn_debug.put_line('Assign populated quantity to remaining quantity');

455: END IF;
456:
457: -- Assign shipped quantity to remaining quantity
458: IF (g_asn_debug = 'Y') THEN
459: asn_debug.put_line('Assign populated quantity to remaining quantity');
460: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
461: END IF;
462:
463: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

Line 460: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));

456:
457: -- Assign shipped quantity to remaining quantity
458: IF (g_asn_debug = 'Y') THEN
459: asn_debug.put_line('Assign populated quantity to remaining quantity');
460: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
461: END IF;
462:
463: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
464: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record

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

463: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
464: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record
465: x_remaining_qty_po_uom := 0;
466:
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('Have assigned the quantity');
469: END IF;
470:
471: -- Calculate tax_amount_factor for calculating tax_amount for

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

464: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record
465: x_remaining_qty_po_uom := 0;
466:
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('Have assigned the quantity');
469: END IF;
470:
471: -- Calculate tax_amount_factor for calculating tax_amount for
472: -- each cascaded line

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

472: -- each cascaded line
473:
474: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
475:
476: IF (g_asn_debug = 'Y') THEN
477: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
478: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
479: END IF;
480:

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

473:
474: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
475:
476: IF (g_asn_debug = 'Y') THEN
477: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
478: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
479: END IF;
480:
481: x_first_trans := TRUE;

Line 478: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));

474: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
475:
476: IF (g_asn_debug = 'Y') THEN
477: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
478: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
479: END IF;
480:
481: x_first_trans := TRUE;
482: transaction_ok := FALSE;

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

480:
481: x_first_trans := TRUE;
482: transaction_ok := FALSE;
483:
484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Before starting Cascade');
486: END IF;
487:
488: IF (g_asn_debug = 'Y') THEN

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

481: x_first_trans := TRUE;
482: transaction_ok := FALSE;
483:
484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Before starting Cascade');
486: END IF;
487:
488: IF (g_asn_debug = 'Y') THEN
489: asn_debug.put_line('Record Count = ' || x_record_count);

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

484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Before starting Cascade');
486: END IF;
487:
488: IF (g_asn_debug = 'Y') THEN
489: asn_debug.put_line('Record Count = ' || x_record_count);
490: END IF;
491:
492: LOOP --{ The loop will be removed since there is no cascading.

Line 489: asn_debug.put_line('Record Count = ' || x_record_count);

485: asn_debug.put_line('Before starting Cascade');
486: END IF;
487:
488: IF (g_asn_debug = 'Y') THEN
489: asn_debug.put_line('Record Count = ' || x_record_count);
490: END IF;
491:
492: LOOP --{ The loop will be removed since there is no cascading.
493: IF (g_asn_debug = 'Y') THEN

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

489: asn_debug.put_line('Record Count = ' || x_record_count);
490: END IF;
491:
492: LOOP --{ The loop will be removed since there is no cascading.
493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
495: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
496: END IF;
497:

Line 494: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));

490: END IF;
491:
492: LOOP --{ The loop will be removed since there is no cascading.
493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
495: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
496: END IF;
497:
498: /*

Line 495: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));

491:
492: LOOP --{ The loop will be removed since there is no cascading.
493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
495: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
496: END IF;
497:
498: /*
499: ** Fetch the appropriate record

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

497:
498: /*
499: ** Fetch the appropriate record
500: */
501: IF (g_asn_debug = 'Y') THEN
502: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
503: END IF;
504:
505: IF (derive_return%ISOPEN) THEN --{

Line 502: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);

498: /*
499: ** Fetch the appropriate record
500: */
501: IF (g_asn_debug = 'Y') THEN
502: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
503: END IF;
504:
505: IF (derive_return%ISOPEN) THEN --{
506: asn_debug.put_line('fetch derive_return');

Line 506: asn_debug.put_line('fetch derive_return');

502: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
503: END IF;
504:
505: IF (derive_return%ISOPEN) THEN --{
506: asn_debug.put_line('fetch derive_return');
507: FETCH derive_return INTO x_derive_returnrec;
508:
509: IF (derive_return%NOTFOUND) THEN
510: EXIT;

Line 515: asn_debug.put_line('pjiang fetch derive_return_rti');

511: END IF;
512:
513: rows_fetched := derive_return%ROWCOUNT;
514: ELSIF(derive_return_rti%ISOPEN) THEN --}{
515: asn_debug.put_line('pjiang fetch derive_return_rti');
516: FETCH derive_return_rti INTO x_derive_returnrec;
517:
518: IF (derive_return_rti%NOTFOUND) THEN
519: EXIT;

Line 525: asn_debug.put_line('pjiang: fetch pl/sql table');

521:
522: rows_fetched := derive_return_rti%ROWCOUNT;
523: ELSIF(temp_cascaded_table(current_n).derive = 'Y') THEN --}{
524: /* GET VALUES FROM THE PLSQL TABLE */
525: asn_debug.put_line('pjiang: fetch pl/sql table');
526: temp_index := temp_cascaded_table(current_n).derive_index;
527: x_derive_returnrec.po_line_location_id := x_cascaded_table(temp_index).po_line_location_id;
528: x_derive_returnrec.po_header_id := x_cascaded_table(temp_index).po_header_id;
529: x_derive_returnrec.po_line_id := x_cascaded_table(temp_index).po_line_id;

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

550: l_complex_flag);
551:
552: IF (l_return_status IS NOT NULL AND
553: l_return_status = FND_API.g_ret_sts_success) THEN
554: IF( g_asn_debug = 'Y' ) THEN
555: asn_debug.put_line('l_return_status ' || l_return_status);
556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
557: END IF;
558: ELSE

Line 555: asn_debug.put_line('l_return_status ' || l_return_status);

551:
552: IF (l_return_status IS NOT NULL AND
553: l_return_status = FND_API.g_ret_sts_success) THEN
554: IF( g_asn_debug = 'Y' ) THEN
555: asn_debug.put_line('l_return_status ' || l_return_status);
556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
557: END IF;
558: ELSE
559: IF( g_asn_debug = 'Y') THEN

Line 556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);

552: IF (l_return_status IS NOT NULL AND
553: l_return_status = FND_API.g_ret_sts_success) THEN
554: IF( g_asn_debug = 'Y' ) THEN
555: asn_debug.put_line('l_return_status ' || l_return_status);
556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
557: END IF;
558: ELSE
559: IF( g_asn_debug = 'Y') THEN
560: asn_debug.put_line('l_return_status ' || l_return_status);

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

555: asn_debug.put_line('l_return_status ' || l_return_status);
556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
557: END IF;
558: ELSE
559: IF( g_asn_debug = 'Y') THEN
560: asn_debug.put_line('l_return_status ' || l_return_status);
561: END IF;
562: END IF;
563:

Line 560: asn_debug.put_line('l_return_status ' || l_return_status);

556: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
557: END IF;
558: ELSE
559: IF( g_asn_debug = 'Y') THEN
560: asn_debug.put_line('l_return_status ' || l_return_status);
561: END IF;
562: END IF;
563:
564: IF (l_complex_flag = 'Y') THEN

Line 565: asn_debug.put_line('We do not support transaction type ' || x_cascaded_table(n).transaction_type || ' for complex work POs');

561: END IF;
562: END IF;
563:
564: IF (l_complex_flag = 'Y') THEN
565: asn_debug.put_line('We do not support transaction type ' || x_cascaded_table(n).transaction_type || ' for complex work POs');
566: rcv_error_pkg.set_error_message('RCV_INVALID_TRANSACTION_TYPE');
567: rcv_error_pkg.log_interface_error('TRANSACTION_TYPE');
568: End if;
569:

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

569:
570: l_parent_transaction_type := x_derive_returnrec.transaction_type;
571: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
572:
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
577: -- since there can only be one parent trx, there will be only one allocating

Line 574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));

570: l_parent_transaction_type := x_derive_returnrec.transaction_type;
571: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
572:
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
577: -- since there can only be one parent trx, there will be only one allocating
578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);

Line 575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));

571: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
572:
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
577: -- since there can only be one parent trx, there will be only one allocating
578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
579: END IF;

Line 576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));

572:
573: IF (g_asn_debug = 'Y') THEN
574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
577: -- since there can only be one parent trx, there will be only one allocating
578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
579: END IF;
580:

Line 578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);

574: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
575: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
576: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
577: -- since there can only be one parent trx, there will be only one allocating
578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
579: END IF;
580:
581: temp_cascaded_table(current_n).unit_of_measure := x_derive_returnrec.unit_of_measure;
582: asn_debug.put_line(' Entering qty calculation for return');

Line 582: asn_debug.put_line(' Entering qty calculation for return');

578: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
579: END IF;
580:
581: temp_cascaded_table(current_n).unit_of_measure := x_derive_returnrec.unit_of_measure;
582: asn_debug.put_line(' Entering qty calculation for return');
583:
584: IF (x_first_trans)
585: AND temp_cascaded_table(current_n).item_id IS NULL THEN
586: temp_cascaded_table(current_n).item_id := x_derive_returnrec.item_id;

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

593: current_n,
594: x_converted_parent_trx_qty
595: );
596:
597: IF (g_asn_debug = 'Y') THEN
598: asn_debug.put_line('return interface qty ' || x_converted_parent_trx_qty);
599: END IF;
600:
601: IF (x_converted_parent_trx_qty = 0) THEN --{

Line 598: asn_debug.put_line('return interface qty ' || x_converted_parent_trx_qty);

594: x_converted_parent_trx_qty
595: );
596:
597: IF (g_asn_debug = 'Y') THEN
598: asn_debug.put_line('return interface qty ' || x_converted_parent_trx_qty);
599: END IF;
600:
601: IF (x_converted_parent_trx_qty = 0) THEN --{
602: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti

Line 605: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);

601: IF (x_converted_parent_trx_qty = 0) THEN --{
602: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti
603: THEN --{
604: x_converted_parent_trx_qty := x_derive_returnrec.quantity;
605: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
606: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
607: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_

Line 606: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));

602: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti
603: THEN --{
604: x_converted_parent_trx_qty := x_derive_returnrec.quantity;
605: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
606: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
607: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);

Line 609: IF (g_asn_debug = 'Y') THEN --{_

605: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
606: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
607: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);

Line 610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);

606: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
607: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);

Line 611: asn_debug.put_line('parameters passed in ............');

607: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);

Line 612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);

608: ELSE --}{
609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');

Line 613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);

609: IF (g_asn_debug = 'Y') THEN --{_
610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');

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

610: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));

Line 615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);

611: asn_debug.put_line('parameters passed in ............');
612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));

Line 616: asn_debug.put_line('5. grand parent id: ' || 'NULL');

612: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);

Line 617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');

613: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));

Line 618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));

614: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
622: END IF; --}

Line 619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));

615: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
622: END IF; --}
623:

Line 620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);

616: asn_debug.put_line('5. grand parent id: ' || 'NULL');
617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
622: END IF; --}
623:
624: rcv_quantities_s.get_available_quantity(x_cascaded_table(n).transaction_type,

Line 621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));

617: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
618: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
619: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
620: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
621: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
622: END IF; --}
623:
624: rcv_quantities_s.get_available_quantity(x_cascaded_table(n).transaction_type,
625: x_derive_returnrec.transaction_id,

Line 637: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for return is ' || x_converted_parent_trx_qty);

633: x_secondary_available_qty
634: );
635: --}
636:
637: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for return is ' || x_converted_parent_trx_qty);
638:
639: IF already_allocated_qty > 0 --?????what if <0 caused by positive return?
640: THEN --{
641: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;

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

640: THEN --{
641: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;
642: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
643:
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));

Line 645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');

641: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;
642: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
643:
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));

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

642: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
643:
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));

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

643:
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
651: END IF;

Line 648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));

644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
651: END IF;
652: END IF; /* if already_allocated_qty is >0 for return */ --}

Line 649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));

645: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
651: END IF;
652: END IF; /* if already_allocated_qty is >0 for return */ --}
653: END IF; /*derive_values_from_rti is false */--}

Line 650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));

646: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
647: asn_debug.put_line('After reducing by allocated qty');
648: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
649: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
650: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
651: END IF;
652: END IF; /* if already_allocated_qty is >0 for return */ --}
653: END IF; /*derive_values_from_rti is false */--}
654: END IF; --} interface_available_qty is 0.

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

660: );
661:
662: IF (x_remaining_qty_parent_uom <= 0) -- this is redundant with the qty check????
663: THEN
664: IF (g_asn_debug = 'Y') THEN
665: asn_debug.put_line(' Return Needs an error message in the interface tables');
666: RAISE quantity_not_postive_exception;
667: END IF;
668: ELSE

Line 665: asn_debug.put_line(' Return Needs an error message in the interface tables');

661:
662: IF (x_remaining_qty_parent_uom <= 0) -- this is redundant with the qty check????
663: THEN
664: IF (g_asn_debug = 'Y') THEN
665: asn_debug.put_line(' Return Needs an error message in the interface tables');
666: RAISE quantity_not_postive_exception;
667: END IF;
668: ELSE
669: /* Converted successfully and have some quantity on which we can act */

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

666: RAISE quantity_not_postive_exception;
667: END IF;
668: ELSE
669: /* Converted successfully and have some quantity on which we can act */
670: IF (g_asn_debug = 'Y') THEN
671: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
672: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
673: END IF;
674:

Line 671: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);

667: END IF;
668: ELSE
669: /* Converted successfully and have some quantity on which we can act */
670: IF (g_asn_debug = 'Y') THEN
671: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
672: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
673: END IF;
674:
675: IF (x_converted_parent_trx_qty > 0) THEN --{

Line 672: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);

668: ELSE
669: /* Converted successfully and have some quantity on which we can act */
670: IF (g_asn_debug = 'Y') THEN
671: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
672: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
673: END IF;
674:
675: IF (x_converted_parent_trx_qty > 0) THEN --{
676: IF (x_converted_parent_trx_qty < x_remaining_qty_parent_uom) THEN --{

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

692: END IF;
693:
694: insert_into_table := TRUE;
695: ELSE --}{
696: IF (g_asn_debug = 'Y') THEN
697: asn_debug.put_line('We are in >= Qty branch ');
698: END IF;
699:
700: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;

Line 697: asn_debug.put_line('We are in >= Qty branch ');

693:
694: insert_into_table := TRUE;
695: ELSE --}{
696: IF (g_asn_debug = 'Y') THEN
697: asn_debug.put_line('We are in >= Qty branch ');
698: END IF;
699:
700: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;
701: insert_into_table := TRUE;

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

705: ELSE /* x_converted_parent_trx_qty >0 */ --}{
706: IF rows_fetched = x_record_count THEN -- {
707: -- last row needs to be inserted anyway
708: -- so that the row can be used based on qty tolerance checks
709: IF (g_asn_debug = 'Y') THEN
710: asn_debug.put_line('Quantity is less then 0 but last record');
711: END IF;
712:
713: insert_into_table := TRUE;

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

706: IF rows_fetched = x_record_count THEN -- {
707: -- last row needs to be inserted anyway
708: -- so that the row can be used based on qty tolerance checks
709: IF (g_asn_debug = 'Y') THEN
710: asn_debug.put_line('Quantity is less then 0 but last record');
711: END IF;
712:
713: insert_into_table := TRUE;
714: x_converted_trx_qty := 0;

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

712:
713: insert_into_table := TRUE;
714: x_converted_trx_qty := 0;
715: ELSE --}{
716: IF (g_asn_debug = 'Y') THEN
717: asn_debug.put_line('<= 0 Quantity but more records in cursor');
718: END IF;
719:
720: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

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

713: insert_into_table := TRUE;
714: x_converted_trx_qty := 0;
715: ELSE --}{
716: IF (g_asn_debug = 'Y') THEN
717: asn_debug.put_line('<= 0 Quantity but more records in cursor');
718: END IF;
719:
720: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
721:

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

718: END IF;
719:
720: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
721:
722: IF (g_asn_debug = 'Y') THEN
723: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
724: END IF;
725:
726: insert_into_table := FALSE;

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

719:
720: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
721:
722: IF (g_asn_debug = 'Y') THEN
723: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
724: END IF;
725:
726: insert_into_table := FALSE;
727: END IF; --}

Line 732: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);

728: END IF; /*x_converted_parent_trx_qty >0 */ --}
729: END IF;
730:
731: /* Converted qty successfully and we have some quantity on which we can act */
732: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
733:
734: IF insert_into_table THEN --{ --start pjiang
735: IF (x_first_trans) THEN --{
736: IF (g_asn_debug = 'Y') THEN

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

732: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
733:
734: IF insert_into_table THEN --{ --start pjiang
735: IF (x_first_trans) THEN --{
736: IF (g_asn_debug = 'Y') THEN
737: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
738: END IF;
739:
740: x_first_trans := FALSE;

Line 737: asn_debug.put_line('First Time ' || TO_CHAR(current_n));

733:
734: IF insert_into_table THEN --{ --start pjiang
735: IF (x_first_trans) THEN --{
736: IF (g_asn_debug = 'Y') THEN
737: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
738: END IF;
739:
740: x_first_trans := FALSE;
741: ELSE --}{

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

738: END IF;
739:
740: x_first_trans := FALSE;
741: ELSE --}{
742: IF (g_asn_debug = 'Y') THEN
743: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
744: END IF;
745:
746: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

Line 743: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));

739:
740: x_first_trans := FALSE;
741: ELSE --}{
742: IF (g_asn_debug = 'Y') THEN
743: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
744: END IF;
745:
746: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
747: END IF; --}

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

761: ELSE
762: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
763: END IF;
764:
765: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
766: current_n := current_n + 1;
767: END IF; --}
768: /* Get the available qty in PRIMARY UOM */
769: /*

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

792:
793: RETURN;
794: END IF;
795:
796: IF (g_asn_debug = 'Y') THEN
797: asn_debug.put_line('Out of the loop');
798: END IF;
799:
800: IF NOT x_first_trans THEN

Line 797: asn_debug.put_line('Out of the loop');

793: RETURN;
794: END IF;
795:
796: IF (g_asn_debug = 'Y') THEN
797: asn_debug.put_line('Out of the loop');
798: END IF;
799:
800: IF NOT x_first_trans THEN
801: -- x_first_trans has been reset which means some cascade has

Line 803: asn_debug.put_line('current_n before is ' || current_n);

799:
800: IF NOT x_first_trans THEN
801: -- x_first_trans has been reset which means some cascade has
802: -- happened. Otherwise current_n = 1
803: asn_debug.put_line('current_n before is ' || current_n);
804: current_n := current_n - 1;
805: END IF;
806:
807: -- do the tolerance act here

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

804: current_n := current_n - 1;
805: END IF;
806:
807: -- do the tolerance act here
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
810: asn_debug.put_line('Check which condition has occured');
811: END IF;
812:

Line 809: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));

805: END IF;
806:
807: -- do the tolerance act here
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
810: asn_debug.put_line('Check which condition has occured');
811: END IF;
812:
813: -- lastrecord...we have run out of rows and we still have quantity to allocate

Line 810: asn_debug.put_line('Check which condition has occured');

806:
807: -- do the tolerance act here
808: IF (g_asn_debug = 'Y') THEN
809: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
810: asn_debug.put_line('Check which condition has occured');
811: END IF;
812:
813: -- lastrecord...we have run out of rows and we still have quantity to allocate
814: -- for return, this means we are trying to return more than the quantity of parent.

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

816: IF x_remaining_quantity > 0 THEN --{
817: -- reject the transaction if this is the case. Can't return more than what we have.
818: RAISE reject_exception;
819:
820: IF (g_asn_debug = 'Y') THEN
821: asn_debug.put_line('There is quantity remaining ');
822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
823: END IF;
824: ELSE -- }{

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

817: -- reject the transaction if this is the case. Can't return more than what we have.
818: RAISE reject_exception;
819:
820: IF (g_asn_debug = 'Y') THEN
821: asn_debug.put_line('There is quantity remaining ');
822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
823: END IF;
824: ELSE -- }{
825: IF (g_asn_debug = 'Y') THEN

Line 822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);

818: RAISE reject_exception;
819:
820: IF (g_asn_debug = 'Y') THEN
821: asn_debug.put_line('There is quantity remaining ');
822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
823: END IF;
824: ELSE -- }{
825: IF (g_asn_debug = 'Y') THEN
826: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));

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

821: asn_debug.put_line('There is quantity remaining ');
822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
823: END IF;
824: ELSE -- }{
825: IF (g_asn_debug = 'Y') THEN
826: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
827: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
828: END IF;
829: END IF; --} ends the check for whether last record has been reached

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

822: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
823: END IF;
824: ELSE -- }{
825: IF (g_asn_debug = 'Y') THEN
826: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
827: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
828: END IF;
829: END IF; --} ends the check for whether last record has been reached
830:

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

823: END IF;
824: ELSE -- }{
825: IF (g_asn_debug = 'Y') THEN
826: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
827: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
828: END IF;
829: END IF; --} ends the check for whether last record has been reached
830:
831: asn_debug.put_line('before exit current_n is ' || current_n);

Line 831: asn_debug.put_line('before exit current_n is ' || current_n);

827: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
828: END IF;
829: END IF; --} ends the check for whether last record has been reached
830:
831: asn_debug.put_line('before exit current_n is ' || current_n);
832: ELSE --} {
833: -- error_status and error_message are set after validate_quantity_shipped
834: IF (g_asn_debug = 'Y') THEN
835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');

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

830:
831: asn_debug.put_line('before exit current_n is ' || current_n);
832: ELSE --} {
833: -- error_status and error_message are set after validate_quantity_shipped
834: IF (g_asn_debug = 'Y') THEN
835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
836: END IF;
837:
838: IF (g_asn_debug = 'Y') THEN

Line 835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');

831: asn_debug.put_line('before exit current_n is ' || current_n);
832: ELSE --} {
833: -- error_status and error_message are set after validate_quantity_shipped
834: IF (g_asn_debug = 'Y') THEN
835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
836: END IF;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);

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

834: IF (g_asn_debug = 'Y') THEN
835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
836: END IF;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
840: END IF;
841:
842: IF x_cascaded_table(n).error_status IN('S', 'W', 'F') THEN --{

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

835: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
836: END IF;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
840: END IF;
841:
842: IF x_cascaded_table(n).error_status IN('S', 'W', 'F') THEN --{
843: RAISE no_parent_line_exception;

Line 849: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);

845:
846: RETURN;
847: END IF; -- } of (asn quantity_shipped was valid)
848:
849: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
850:
851: IF derive_return%ISOPEN THEN
852: CLOSE derive_return;
853: END IF;

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

855: IF derive_return_rti%ISOPEN THEN
856: CLOSE derive_return_rti;
857: END IF;
858:
859: IF (g_asn_debug = 'Y') THEN
860: asn_debug.put_line('Exit explode_line_quantity');
861: END IF;
862: -- handle errors and warnings in exception block
863: EXCEPTION

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

856: CLOSE derive_return_rti;
857: END IF;
858:
859: IF (g_asn_debug = 'Y') THEN
860: asn_debug.put_line('Exit explode_line_quantity');
861: END IF;
862: -- handle errors and warnings in exception block
863: EXCEPTION
864: WHEN quantity_not_postive_exception THEN

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

901: END IF;
902:
903: x_cascaded_table(n).error_status := 'F';
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line(SQLERRM);
908: asn_debug.put_line('error ' || x_progress);
909: END IF;

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

902:
903: x_cascaded_table(n).error_status := 'F';
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line(SQLERRM);
908: asn_debug.put_line('error ' || x_progress);
909: END IF;
910: END derive_return_line_qty;

Line 907: asn_debug.put_line(SQLERRM);

903: x_cascaded_table(n).error_status := 'F';
904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line(SQLERRM);
908: asn_debug.put_line('error ' || x_progress);
909: END IF;
910: END derive_return_line_qty;
911:

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

904:
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line(TO_CHAR(n));
907: asn_debug.put_line(SQLERRM);
908: asn_debug.put_line('error ' || x_progress);
909: END IF;
910: END derive_return_line_qty;
911:
912: PROCEDURE default_common_lines(

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

934: n IN BINARY_INTEGER,
935: default_return_rec IN default_return%ROWTYPE
936: ) IS
937: BEGIN
938: IF (g_asn_debug = 'Y') THEN
939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);

Line 939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);

935: default_return_rec IN default_return%ROWTYPE
936: ) IS
937: BEGIN
938: IF (g_asn_debug = 'Y') THEN
939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);

Line 940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);

936: ) IS
937: BEGIN
938: IF (g_asn_debug = 'Y') THEN
939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);

Line 941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);

937: BEGIN
938: IF (g_asn_debug = 'Y') THEN
939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);

Line 942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);

938: IF (g_asn_debug = 'Y') THEN
939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
946: END IF;

Line 943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);

939: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
946: END IF;
947:

Line 944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);

940: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
946: END IF;
947:
948: x_cascaded_table(n).po_revision_num := default_return_rec.po_revision_num;

Line 945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);

941: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
942: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
943: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
944: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
945: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
946: END IF;
947:
948: x_cascaded_table(n).po_revision_num := default_return_rec.po_revision_num;
949: x_cascaded_table(n).po_header_id := default_return_rec.po_header_id;

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

964: WHERE pll.line_location_id = x_cascaded_table(n).po_line_location_id
965: AND pl.po_line_id = x_cascaded_table(n).po_line_id
966: AND pl.po_line_id = pll.po_line_id;
967:
968: IF (g_asn_debug = 'Y') THEN
969: asn_debug.put_line('Defaulting Return po_unit_price' || x_cascaded_table(n).po_unit_price);
970: END IF;
971:
972: x_cascaded_table(n).po_line_id := default_return_rec.po_line_id;

Line 969: asn_debug.put_line('Defaulting Return po_unit_price' || x_cascaded_table(n).po_unit_price);

965: AND pl.po_line_id = x_cascaded_table(n).po_line_id
966: AND pl.po_line_id = pll.po_line_id;
967:
968: IF (g_asn_debug = 'Y') THEN
969: asn_debug.put_line('Defaulting Return po_unit_price' || x_cascaded_table(n).po_unit_price);
970: END IF;
971:
972: x_cascaded_table(n).po_line_id := default_return_rec.po_line_id;
973: x_cascaded_table(n).po_line_location_id := default_return_rec.po_line_location_id;

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

979: n IN BINARY_INTEGER,
980: default_return_rec IN default_return%ROWTYPE
981: ) IS
982: BEGIN
983: IF (g_asn_debug = 'Y') THEN
984: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
985: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
986: END IF;
987:

Line 984: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);

980: default_return_rec IN default_return%ROWTYPE
981: ) IS
982: BEGIN
983: IF (g_asn_debug = 'Y') THEN
984: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
985: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
986: END IF;
987:
988: x_cascaded_table(n).shipment_header_id := default_return_rec.shipment_header_id;

Line 985: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);

981: ) IS
982: BEGIN
983: IF (g_asn_debug = 'Y') THEN
984: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
985: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
986: END IF;
987:
988: x_cascaded_table(n).shipment_header_id := default_return_rec.shipment_header_id;
989: x_cascaded_table(n).shipment_line_id := default_return_rec.shipment_line_id;

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

994: n IN BINARY_INTEGER,
995: default_return_rec IN default_return%ROWTYPE
996: ) IS
997: BEGIN
998: IF (g_asn_debug = 'Y') THEN
999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);

Line 999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);

995: default_return_rec IN default_return%ROWTYPE
996: ) IS
997: BEGIN
998: IF (g_asn_debug = 'Y') THEN
999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);

Line 1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);

996: ) IS
997: BEGIN
998: IF (g_asn_debug = 'Y') THEN
999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1004: END IF;

Line 1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);

997: BEGIN
998: IF (g_asn_debug = 'Y') THEN
999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1004: END IF;
1005:

Line 1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);

998: IF (g_asn_debug = 'Y') THEN
999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1004: END IF;
1005:
1006: x_cascaded_table(n).wip_entity_id := default_return_rec.wip_entity_id;

Line 1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);

999: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1000: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1001: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1002: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1003: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1004: END IF;
1005:
1006: x_cascaded_table(n).wip_entity_id := default_return_rec.wip_entity_id;
1007: x_cascaded_table(n).wip_line_id := default_return_rec.wip_line_id;

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

1015: n IN BINARY_INTEGER,
1016: default_return_rec IN default_return%ROWTYPE
1017: ) IS
1018: BEGIN
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1021: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1022: END IF;
1023:

Line 1020: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);

1016: default_return_rec IN default_return%ROWTYPE
1017: ) IS
1018: BEGIN
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1021: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1022: END IF;
1023:
1024: x_cascaded_table(n).oe_order_header_id := default_return_rec.oe_order_header_id;

Line 1021: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);

1017: ) IS
1018: BEGIN
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1021: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1022: END IF;
1023:
1024: x_cascaded_table(n).oe_order_header_id := default_return_rec.oe_order_header_id;
1025: x_cascaded_table(n).oe_order_line_id := default_return_rec.oe_order_line_id;

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

1030: n IN BINARY_INTEGER,
1031: default_return_rec IN default_return%ROWTYPE
1032: ) IS
1033: BEGIN
1034: IF (g_asn_debug = 'Y') THEN
1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);

Line 1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);

1031: default_return_rec IN default_return%ROWTYPE
1032: ) IS
1033: BEGIN
1034: IF (g_asn_debug = 'Y') THEN
1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1039: END IF;

Line 1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);

1032: ) IS
1033: BEGIN
1034: IF (g_asn_debug = 'Y') THEN
1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1039: END IF;
1040:

Line 1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);

1033: BEGIN
1034: IF (g_asn_debug = 'Y') THEN
1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1039: END IF;
1040:
1041: x_cascaded_table(n).currency_code := default_return_rec.currency_code;

Line 1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);

1034: IF (g_asn_debug = 'Y') THEN
1035: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1036: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1037: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1038: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1039: END IF;
1040:
1041: x_cascaded_table(n).currency_code := default_return_rec.currency_code;
1042: x_cascaded_table(n).currency_conversion_type := default_return_rec.currency_conversion_type;

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

1049: n IN BINARY_INTEGER,
1050: default_return_rec IN default_return%ROWTYPE
1051: ) IS
1052: BEGIN
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1055: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1056: END IF;
1057:

Line 1054: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);

1050: default_return_rec IN default_return%ROWTYPE
1051: ) IS
1052: BEGIN
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1055: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1056: END IF;
1057:
1058: x_cascaded_table(n).vendor_id := default_return_rec.vendor_id;

Line 1055: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);

1051: ) IS
1052: BEGIN
1053: IF (g_asn_debug = 'Y') THEN
1054: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1055: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1056: END IF;
1057:
1058: x_cascaded_table(n).vendor_id := default_return_rec.vendor_id;
1059: x_cascaded_table(n).vendor_site_id := default_return_rec.vendor_site_id;

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

1064: n IN BINARY_INTEGER,
1065: default_return_rec IN default_return%ROWTYPE
1066: ) IS
1067: BEGIN
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1070: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1071: END IF;
1072:

Line 1069: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);

1065: default_return_rec IN default_return%ROWTYPE
1066: ) IS
1067: BEGIN
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1070: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1071: END IF;
1072:
1073: x_cascaded_table(n).customer_id := default_return_rec.customer_id;

Line 1070: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);

1066: ) IS
1067: BEGIN
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1070: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1071: END IF;
1072:
1073: x_cascaded_table(n).customer_id := default_return_rec.customer_id;
1074: x_cascaded_table(n).customer_site_id := default_return_rec.customer_site_id;

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

1079: n IN BINARY_INTEGER,
1080: default_return_rec IN default_return%ROWTYPE
1081: ) IS
1082: BEGIN
1083: IF (g_asn_debug = 'Y') THEN
1084: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1085: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1086: END IF;
1087:

Line 1084: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);

1080: default_return_rec IN default_return%ROWTYPE
1081: ) IS
1082: BEGIN
1083: IF (g_asn_debug = 'Y') THEN
1084: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1085: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1086: END IF;
1087:
1088: x_cascaded_table(n).deliver_to_person_id := default_return_rec.deliver_to_person_id;

Line 1085: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);

1081: ) IS
1082: BEGIN
1083: IF (g_asn_debug = 'Y') THEN
1084: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1085: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1086: END IF;
1087:
1088: x_cascaded_table(n).deliver_to_person_id := default_return_rec.deliver_to_person_id;
1089: x_cascaded_table(n).deliver_to_location_id := default_return_rec.deliver_to_location_id;

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

1094: n IN BINARY_INTEGER,
1095: default_return_rec IN default_return%ROWTYPE
1096: ) IS
1097: BEGIN
1098: IF (g_asn_debug = 'Y') THEN
1099: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1100: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1101: END IF;
1102:

Line 1099: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);

1095: default_return_rec IN default_return%ROWTYPE
1096: ) IS
1097: BEGIN
1098: IF (g_asn_debug = 'Y') THEN
1099: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1100: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1101: END IF;
1102:
1103: x_cascaded_table(n).receipt_source_code := default_return_rec.receipt_source_code;

Line 1100: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);

1096: ) IS
1097: BEGIN
1098: IF (g_asn_debug = 'Y') THEN
1099: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1100: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1101: END IF;
1102:
1103: x_cascaded_table(n).receipt_source_code := default_return_rec.receipt_source_code;
1104: x_cascaded_table(n).source_document_code := default_return_rec.source_document_code;

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

1109: n IN BINARY_INTEGER,
1110: default_return_rec IN default_return%ROWTYPE
1111: ) IS
1112: BEGIN
1113: IF (g_asn_debug = 'Y') THEN
1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);

Line 1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);

1110: default_return_rec IN default_return%ROWTYPE
1111: ) IS
1112: BEGIN
1113: IF (g_asn_debug = 'Y') THEN
1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);

Line 1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);

1111: ) IS
1112: BEGIN
1113: IF (g_asn_debug = 'Y') THEN
1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);

Line 1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);

1112: BEGIN
1113: IF (g_asn_debug = 'Y') THEN
1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1120: END IF;

Line 1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);

1113: IF (g_asn_debug = 'Y') THEN
1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1120: END IF;
1121:

Line 1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);

1114: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1120: END IF;
1121:
1122: x_cascaded_table(n).primary_unit_of_measure := default_return_rec.primary_unit_of_measure;

Line 1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);

1115: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1116: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1117: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1118: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1119: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1120: END IF;
1121:
1122: x_cascaded_table(n).primary_unit_of_measure := default_return_rec.primary_unit_of_measure;
1123: x_cascaded_table(n).item_description := default_return_rec.item_description;

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

1132: n IN BINARY_INTEGER,
1133: default_return_rec IN default_return%ROWTYPE
1134: ) IS
1135: BEGIN
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1138: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1139: END IF;
1140:

Line 1137: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);

1133: default_return_rec IN default_return%ROWTYPE
1134: ) IS
1135: BEGIN
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1138: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1139: END IF;
1140:
1141: x_cascaded_table(n).destination_context := default_return_rec.destination_context;

Line 1138: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);

1134: ) IS
1135: BEGIN
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1138: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1139: END IF;
1140:
1141: x_cascaded_table(n).destination_context := default_return_rec.destination_context;
1142: x_cascaded_table(n).to_organization_id := default_return_rec.OID;

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

1147: n IN BINARY_INTEGER,
1148: default_return_rec IN default_return%ROWTYPE
1149: ) IS
1150: BEGIN
1151: IF (g_asn_debug = 'Y') THEN
1152: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1153: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1154: END IF;
1155:

Line 1152: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);

1148: default_return_rec IN default_return%ROWTYPE
1149: ) IS
1150: BEGIN
1151: IF (g_asn_debug = 'Y') THEN
1152: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1153: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1154: END IF;
1155:
1156: x_cascaded_table(n).location_id := default_return_rec.location_id;

Line 1153: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);

1149: ) IS
1150: BEGIN
1151: IF (g_asn_debug = 'Y') THEN
1152: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1153: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1154: END IF;
1155:
1156: x_cascaded_table(n).location_id := default_return_rec.location_id;
1157: x_cascaded_table(n).locator_id := default_return_rec.locator_id;

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

1162: n IN BINARY_INTEGER,
1163: default_return_rec IN default_return%ROWTYPE
1164: ) IS
1165: BEGIN
1166: IF (g_asn_debug = 'Y') THEN
1167: asn_debug.put_line('Defaulting return movement_id ' || default_return_rec.movement_id);
1168: END IF;
1169:
1170: x_cascaded_table(n).movement_id := default_return_rec.movement_id;

Line 1167: asn_debug.put_line('Defaulting return movement_id ' || default_return_rec.movement_id);

1163: default_return_rec IN default_return%ROWTYPE
1164: ) IS
1165: BEGIN
1166: IF (g_asn_debug = 'Y') THEN
1167: asn_debug.put_line('Defaulting return movement_id ' || default_return_rec.movement_id);
1168: END IF;
1169:
1170: x_cascaded_table(n).movement_id := default_return_rec.movement_id;
1171: END default_movement_id;

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

1175: n IN BINARY_INTEGER,
1176: default_return_rec IN default_return%ROWTYPE
1177: ) IS
1178: BEGIN
1179: IF (g_asn_debug = 'Y') THEN
1180: asn_debug.put_line('Defaulting return bom_resource_id ' || default_return_rec.bom_resource_id);
1181: END IF;
1182:
1183: x_cascaded_table(n).bom_resource_id := default_return_rec.bom_resource_id;

Line 1180: asn_debug.put_line('Defaulting return bom_resource_id ' || default_return_rec.bom_resource_id);

1176: default_return_rec IN default_return%ROWTYPE
1177: ) IS
1178: BEGIN
1179: IF (g_asn_debug = 'Y') THEN
1180: asn_debug.put_line('Defaulting return bom_resource_id ' || default_return_rec.bom_resource_id);
1181: END IF;
1182:
1183: x_cascaded_table(n).bom_resource_id := default_return_rec.bom_resource_id;
1184: END default_bom_resource_id;

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

1361: IF (lot_rows%ISOPEN) THEN --{
1362: FETCH lot_rows INTO l_lot;
1363: EXIT WHEN lot_rows%NOTFOUND;
1364:
1365: IF (g_asn_debug = 'Y') THEN
1366: asn_debug.put_line('lot_number ' || l_lot.lot_number);
1367: END IF;
1368:
1369: l_lot_number := l_lot.lot_number;

Line 1366: asn_debug.put_line('lot_number ' || l_lot.lot_number);

1362: FETCH lot_rows INTO l_lot;
1363: EXIT WHEN lot_rows%NOTFOUND;
1364:
1365: IF (g_asn_debug = 'Y') THEN
1366: asn_debug.put_line('lot_number ' || l_lot.lot_number);
1367: END IF;
1368:
1369: l_lot_number := l_lot.lot_number;
1370: l_primary_qty := ABS(rcv_transactions_interface_sv.convert_into_correct_qty(l_lot.transaction_quantity,