DBA Data[Home] [Help]

APPS.RCV_ROI_RETURN dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_roi_return
2: /* $Header: RCVPRERB.pls 120.6.12020000.2 2012/07/10 09:27:37 ptkumar ship $*/
3: AS
4: g_asn_debug VARCHAR2(1) := asn_debug.is_debug_on; -- Bug 9152790
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 386: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);

382: l_complex_flag varchar2(1);
383: l_exist VARCHAR2(30); -- bug 8640033
384:
385: BEGIN
386: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
387:
388: -- try to derive the parent_trx_id from rt. if the parent line is not in rt,
389: -- try get it from rti or plsql table.
390: IF (x_cascaded_table(n).parent_transaction_id IS NULL) THEN

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

391: rcv_roi_transaction.derive_parent_id(x_cascaded_table, n);
392: END IF;
393:
394: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
395: asn_debug.put_line('open rt cursor with parent_trx_id: ' || x_cascaded_table(n).parent_transaction_id);
396: OPEN derive_return(x_cascaded_table(n).parent_transaction_id);
397: ELSE
398: IF --{
399: ( (x_cascaded_table(n).error_status <> 'E')

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

404: * If derive_values_from_table is true we will
405: * derive the values from the pl/sql tables later
406: * at the time when we try to see which cursor is open.
407: */
408: asn_debug.put_line('open rti cursor');
409: OPEN derive_return_rti(x_cascaded_table(n).parent_interface_txn_id);
410: END IF;
411: END IF; --}
412:

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

413: /******************************************************************/
414: --check line quanity > 0
415: x_progress := '097';
416:
417: IF (g_asn_debug = 'Y') THEN
418: asn_debug.put_line('X_progress ' || x_progress);
419: END IF;
420:
421: IF x_cascaded_table(n).error_status IN('S', 'W')

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

414: --check line quanity > 0
415: x_progress := '097';
416:
417: IF (g_asn_debug = 'Y') THEN
418: asn_debug.put_line('X_progress ' || x_progress);
419: END IF;
420:
421: IF x_cascaded_table(n).error_status IN('S', 'W')
422: AND x_cascaded_table(n).quantity <= 0 THEN --{

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

419: END IF;
420:
421: IF x_cascaded_table(n).error_status IN('S', 'W')
422: AND x_cascaded_table(n).quantity <= 0 THEN --{
423: IF (g_asn_debug = 'Y') THEN
424: asn_debug.put_line('Quantity is <= zero. quantity derive will fail');
425: END IF;
426:
427: RAISE quantity_not_postive_exception;

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

420:
421: IF x_cascaded_table(n).error_status IN('S', 'W')
422: AND x_cascaded_table(n).quantity <= 0 THEN --{
423: IF (g_asn_debug = 'Y') THEN
424: asn_debug.put_line('Quantity is <= zero. quantity derive will fail');
425: END IF;
426:
427: RAISE quantity_not_postive_exception;
428: END IF; --} end qty > 0 check

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

440: such a way that the ROI validation does'nt error out when
441: po_line_id is populated for one time items. */
442: x_progress := '098';
443:
444: IF (g_asn_debug = 'Y') THEN
445: asn_debug.put_line('X_progress ' || x_progress);
446: END IF;
447:
448: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL

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

441: po_line_id is populated for one time items. */
442: x_progress := '098';
443:
444: IF (g_asn_debug = 'Y') THEN
445: asn_debug.put_line('X_progress ' || x_progress);
446: END IF;
447:
448: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL
449: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)

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

448: IF ( ( x_cascaded_table(n).parent_transaction_id IS NOT NULL
449: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)
450: AND x_cascaded_table(n).error_status IN('S', 'W')) THEN --{
451: -- Copy record from main table to temp table
452: IF (g_asn_debug = 'Y') THEN
453: asn_debug.put_line('Copy record from main table to temp table');
454: END IF;
455:
456: current_n := 1;

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

449: OR x_cascaded_table(n).parent_interface_txn_id IS NOT NULL)
450: AND x_cascaded_table(n).error_status IN('S', 'W')) THEN --{
451: -- Copy record from main table to temp table
452: IF (g_asn_debug = 'Y') THEN
453: asn_debug.put_line('Copy record from main table to temp table');
454: END IF;
455:
456: current_n := 1;
457: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

456: current_n := 1;
457: temp_cascaded_table(current_n) := x_cascaded_table(n);
458:
459: -- Get all rows which meet this condition
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line('Get all rows which meet this condition');
462: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
463: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
464: END IF;

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

457: temp_cascaded_table(current_n) := x_cascaded_table(n);
458:
459: -- Get all rows which meet this condition
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line('Get all rows which meet this condition');
462: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
463: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
464: END IF;
465:

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

458:
459: -- Get all rows which meet this condition
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line('Get all rows which meet this condition');
462: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
463: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
464: END IF;
465:
466: -- Assign shipped quantity to remaining quantity

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

459: -- Get all rows which meet this condition
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line('Get all rows which meet this condition');
462: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
463: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
464: END IF;
465:
466: -- Assign shipped quantity to remaining quantity
467: IF (g_asn_debug = 'Y') THEN

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

463: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
464: END IF;
465:
466: -- Assign shipped quantity to remaining quantity
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('Assign populated quantity to remaining quantity');
469: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
470: END IF;
471:

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

464: END IF;
465:
466: -- Assign shipped quantity to remaining quantity
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('Assign populated quantity to remaining quantity');
469: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
470: END IF;
471:
472: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

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

465:
466: -- Assign shipped quantity to remaining quantity
467: IF (g_asn_debug = 'Y') THEN
468: asn_debug.put_line('Assign populated quantity to remaining quantity');
469: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
470: END IF;
471:
472: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
473: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record

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

472: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
473: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record
474: x_remaining_qty_po_uom := 0;
475:
476: IF (g_asn_debug = 'Y') THEN
477: asn_debug.put_line('Have assigned the quantity');
478: END IF;
479:
480: -- Calculate tax_amount_factor for calculating tax_amount for

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

473: x_bkp_qty := x_remaining_quantity; -- used for decrementing cum qty for first record
474: x_remaining_qty_po_uom := 0;
475:
476: IF (g_asn_debug = 'Y') THEN
477: asn_debug.put_line('Have assigned the quantity');
478: END IF;
479:
480: -- Calculate tax_amount_factor for calculating tax_amount for
481: -- each cascaded line

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

481: -- each cascaded line
482:
483: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
484:
485: IF (g_asn_debug = 'Y') THEN
486: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
487: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
488: END IF;
489:

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

482:
483: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
484:
485: IF (g_asn_debug = 'Y') THEN
486: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
487: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
488: END IF;
489:
490: x_first_trans := TRUE;

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

483: tax_amount_factor := NVL(temp_cascaded_table(current_n).tax_amount, 0) / x_remaining_quantity;
484:
485: IF (g_asn_debug = 'Y') THEN
486: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
487: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
488: END IF;
489:
490: x_first_trans := TRUE;
491: transaction_ok := FALSE;

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

489:
490: x_first_trans := TRUE;
491: transaction_ok := FALSE;
492:
493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Before starting Cascade');
495: END IF;
496:
497: IF (g_asn_debug = 'Y') THEN

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

490: x_first_trans := TRUE;
491: transaction_ok := FALSE;
492:
493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Before starting Cascade');
495: END IF;
496:
497: IF (g_asn_debug = 'Y') THEN
498: asn_debug.put_line('Record Count = ' || x_record_count);

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

493: IF (g_asn_debug = 'Y') THEN
494: asn_debug.put_line('Before starting Cascade');
495: END IF;
496:
497: IF (g_asn_debug = 'Y') THEN
498: asn_debug.put_line('Record Count = ' || x_record_count);
499: END IF;
500:
501: LOOP --{ The loop will be removed since there is no cascading.

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

494: asn_debug.put_line('Before starting Cascade');
495: END IF;
496:
497: IF (g_asn_debug = 'Y') THEN
498: asn_debug.put_line('Record Count = ' || x_record_count);
499: END IF;
500:
501: LOOP --{ The loop will be removed since there is no cascading.
502: IF (g_asn_debug = 'Y') THEN

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

498: asn_debug.put_line('Record Count = ' || x_record_count);
499: END IF;
500:
501: LOOP --{ The loop will be removed since there is no cascading.
502: IF (g_asn_debug = 'Y') THEN
503: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
504: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
505: END IF;
506:

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

499: END IF;
500:
501: LOOP --{ The loop will be removed since there is no cascading.
502: IF (g_asn_debug = 'Y') THEN
503: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
504: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
505: END IF;
506:
507: /*

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

500:
501: LOOP --{ The loop will be removed since there is no cascading.
502: IF (g_asn_debug = 'Y') THEN
503: asn_debug.put_line('Backup Qty ' || TO_CHAR(x_bkp_qty));
504: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
505: END IF;
506:
507: /*
508: ** Fetch the appropriate record

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

506:
507: /*
508: ** Fetch the appropriate record
509: */
510: IF (g_asn_debug = 'Y') THEN
511: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
512: END IF;
513:
514: IF (derive_return%ISOPEN) THEN --{

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

507: /*
508: ** Fetch the appropriate record
509: */
510: IF (g_asn_debug = 'Y') THEN
511: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
512: END IF;
513:
514: IF (derive_return%ISOPEN) THEN --{
515: asn_debug.put_line('fetch derive_return');

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

511: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
512: END IF;
513:
514: IF (derive_return%ISOPEN) THEN --{
515: asn_debug.put_line('fetch derive_return');
516: FETCH derive_return INTO x_derive_returnrec;
517:
518: IF (derive_return%NOTFOUND) THEN
519: EXIT;

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

520: END IF;
521:
522: rows_fetched := derive_return%ROWCOUNT;
523: ELSIF(derive_return_rti%ISOPEN) THEN --}{
524: asn_debug.put_line('pjiang fetch derive_return_rti');
525: FETCH derive_return_rti INTO x_derive_returnrec;
526:
527: IF (derive_return_rti%NOTFOUND) THEN
528: EXIT;

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

530:
531: rows_fetched := derive_return_rti%ROWCOUNT;
532: ELSIF(temp_cascaded_table(current_n).derive = 'Y') THEN --}{
533: /* GET VALUES FROM THE PLSQL TABLE */
534: asn_debug.put_line('pjiang: fetch pl/sql table');
535: temp_index := temp_cascaded_table(current_n).derive_index;
536: x_derive_returnrec.po_line_location_id := x_cascaded_table(temp_index).po_line_location_id;
537: x_derive_returnrec.po_header_id := x_cascaded_table(temp_index).po_header_id;
538: x_derive_returnrec.po_line_id := x_cascaded_table(temp_index).po_line_id;

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

559: l_complex_flag);
560:
561: IF (l_return_status IS NOT NULL AND
562: l_return_status = FND_API.g_ret_sts_success) THEN
563: IF( g_asn_debug = 'Y' ) THEN
564: asn_debug.put_line('l_return_status ' || l_return_status);
565: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
566: END IF;
567: ELSE

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

560:
561: IF (l_return_status IS NOT NULL AND
562: l_return_status = FND_API.g_ret_sts_success) THEN
563: IF( g_asn_debug = 'Y' ) THEN
564: asn_debug.put_line('l_return_status ' || l_return_status);
565: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
566: END IF;
567: ELSE
568: IF( g_asn_debug = 'Y') THEN

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

561: IF (l_return_status IS NOT NULL AND
562: l_return_status = FND_API.g_ret_sts_success) THEN
563: IF( g_asn_debug = 'Y' ) THEN
564: asn_debug.put_line('l_return_status ' || l_return_status);
565: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
566: END IF;
567: ELSE
568: IF( g_asn_debug = 'Y') THEN
569: asn_debug.put_line('l_return_status ' || l_return_status);

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

564: asn_debug.put_line('l_return_status ' || l_return_status);
565: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
566: END IF;
567: ELSE
568: IF( g_asn_debug = 'Y') THEN
569: asn_debug.put_line('l_return_status ' || l_return_status);
570: END IF;
571: END IF;
572:

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

565: asn_debug.put_line('l_po_header_id ' || l_po_header_id);
566: END IF;
567: ELSE
568: IF( g_asn_debug = 'Y') THEN
569: asn_debug.put_line('l_return_status ' || l_return_status);
570: END IF;
571: END IF;
572:
573: IF (l_complex_flag = 'Y') THEN

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

570: END IF;
571: END IF;
572:
573: IF (l_complex_flag = 'Y') THEN
574: asn_debug.put_line('We do not support transaction type ' || x_cascaded_table(n).transaction_type || ' for complex work POs');
575: rcv_error_pkg.set_error_message('RCV_INVALID_TRANSACTION_TYPE');
576: rcv_error_pkg.log_interface_error('TRANSACTION_TYPE');
577: End if;
578:

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

578:
579: l_parent_transaction_type := x_derive_returnrec.transaction_type;
580: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
584: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
585: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
586: -- since there can only be one parent trx, there will be only one allocating

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

579: l_parent_transaction_type := x_derive_returnrec.transaction_type;
580: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
584: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
585: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
586: -- since there can only be one parent trx, there will be only one allocating
587: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);

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

580: l_grand_parent_trx_id := x_derive_returnrec.parent_transaction_id;
581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
584: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
585: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
586: -- since there can only be one parent trx, there will be only one allocating
587: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
588: END IF;

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

581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
584: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
585: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
586: -- since there can only be one parent trx, there will be only one allocating
587: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
588: END IF;
589:

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

583: asn_debug.put_line('Parent transaction rows fetched: (should always be 1 for return) ' || TO_CHAR(rows_fetched));
584: asn_debug.put_line('po_line_id ' || TO_CHAR(x_derive_returnrec.po_line_id));
585: asn_debug.put_line('po_line_location_id ' || TO_CHAR(x_derive_returnrec.po_line_location_id));
586: -- since there can only be one parent trx, there will be only one allocating
587: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
588: END IF;
589:
590: temp_cascaded_table(current_n).unit_of_measure := x_derive_returnrec.unit_of_measure;
591: asn_debug.put_line(' Entering qty calculation for return');

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

587: asn_debug.put_line('the quantity available for return in parent txn: ' || x_remaining_quantity);
588: END IF;
589:
590: temp_cascaded_table(current_n).unit_of_measure := x_derive_returnrec.unit_of_measure;
591: asn_debug.put_line(' Entering qty calculation for return');
592:
593: IF (x_first_trans)
594: AND temp_cascaded_table(current_n).item_id IS NULL THEN
595: temp_cascaded_table(current_n).item_id := x_derive_returnrec.item_id;

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

602: current_n,
603: x_converted_parent_trx_qty
604: );
605:
606: IF (g_asn_debug = 'Y') THEN
607: asn_debug.put_line('return interface qty ' || x_converted_parent_trx_qty);
608: END IF;
609:
610: IF (x_converted_parent_trx_qty = 0) THEN --{

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

603: x_converted_parent_trx_qty
604: );
605:
606: IF (g_asn_debug = 'Y') THEN
607: asn_debug.put_line('return interface qty ' || x_converted_parent_trx_qty);
608: END IF;
609:
610: IF (x_converted_parent_trx_qty = 0) THEN --{
611: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti

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

610: IF (x_converted_parent_trx_qty = 0) THEN --{
611: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti
612: THEN --{
613: x_converted_parent_trx_qty := x_derive_returnrec.quantity;
614: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
615: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
616: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_

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

611: IF (temp_cascaded_table(current_n).derive = 'Y') -- derive from plsql table or rti
612: THEN --{
613: x_converted_parent_trx_qty := x_derive_returnrec.quantity;
614: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
615: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
616: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);

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

614: asn_debug.put_line(' derive parent ' || temp_cascaded_table(current_n).parent_interface_txn_id);
615: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
616: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);

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

615: asn_debug.put_line(' from derive quantity ' || TO_CHAR(x_converted_parent_trx_qty));
616: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);

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

616: /* Get x_converted_parent_trx_qty from the pl/sql table or cascaded_table as needed.*/
617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);

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

617: ELSE --}{
618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');

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

618: IF (g_asn_debug = 'Y') THEN --{_
619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');

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

619: asn_debug.put_line('calling get_available_qty for return (Negative Correct)' || x_derive_returnrec.transaction_type);
620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));

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

620: asn_debug.put_line('parameters passed in ............');
621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));

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

621: asn_debug.put_line('1. transaction_type: ' || x_cascaded_table(n).transaction_type);
622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);

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

622: asn_debug.put_line('2. parent id: ' || x_derive_returnrec.transaction_id);
623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
630: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));

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

623: asn_debug.put_line('3. receipt source code: ' || x_cascaded_table(n).receipt_source_code);
624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
630: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
631: END IF; --}

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

624: asn_debug.put_line('4. parent transaction_type: ' || x_derive_returnrec.transaction_type);
625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
630: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
631: END IF; --}
632:

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

625: asn_debug.put_line('5. grand parent id: ' || 'NULL');
626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
630: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
631: END IF; --}
632:
633: /*begin fix of bug 13892629, we were not able perform return from different subinventory*/

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

626: asn_debug.put_line('6. correction type: ' || 'NEGATIVE');
627: asn_debug.put_line('7. available quantity: ' || TO_CHAR(x_converted_parent_trx_qty));
628: asn_debug.put_line('8. tolerable_quantity: ' || TO_CHAR(x_tolerable_qty));
629: asn_debug.put_line('9. unit of measure: ' || x_derive_returnrec.unit_of_measure);
630: asn_debug.put_line('10. 2nd available quantity : ' || TO_CHAR(x_secondary_available_qty));
631: END IF; --}
632:
633: /*begin fix of bug 13892629, we were not able perform return from different subinventory*/
634: IF x_derive_returnrec.transaction_type = 'DELIVER' THEN

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

657: END IF;
658: /*end fix of bug 13892629*/
659: --}
660:
661: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for return is ' || x_converted_parent_trx_qty);
662:
663: IF already_allocated_qty > 0 --?????what if <0 caused by positive return?
664: THEN --{
665: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;

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

664: THEN --{
665: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;
666: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
667:
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));

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

665: x_converted_parent_trx_qty := x_converted_parent_trx_qty - already_allocated_qty;
666: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
667:
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));

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

666: x_tolerable_qty := x_tolerable_qty - already_allocated_qty;
667:
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
674: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));

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

667:
668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
674: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
675: END IF;

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

668: IF (g_asn_debug = 'Y') THEN
669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
674: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
675: END IF;
676: END IF; /* if already_allocated_qty is >0 for return */ --}

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

669: asn_debug.put_line(' For return some allocated quantity. Will reduce qty');
670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
674: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
675: END IF;
676: END IF; /* if already_allocated_qty is >0 for return */ --}
677: END IF; /*derive_values_from_rti is false */--}

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

670: asn_debug.put_line('Allocated Qty ' || TO_CHAR(already_allocated_qty));
671: asn_debug.put_line('After reducing by allocated qty');
672: asn_debug.put_line('Available Quantity ' || TO_CHAR(x_converted_parent_trx_qty));
673: asn_debug.put_line('Tolerable Quantity ' || TO_CHAR(x_tolerable_qty));
674: asn_debug.put_line('Pointer to temp table ' || TO_CHAR(current_n));
675: END IF;
676: END IF; /* if already_allocated_qty is >0 for return */ --}
677: END IF; /*derive_values_from_rti is false */--}
678: END IF; --} interface_available_qty is 0.

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

684: );
685:
686: IF (x_remaining_qty_parent_uom <= 0) -- this is redundant with the qty check????
687: THEN
688: IF (g_asn_debug = 'Y') THEN
689: asn_debug.put_line(' Return Needs an error message in the interface tables');
690: RAISE quantity_not_postive_exception;
691: END IF;
692: ELSE

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

685:
686: IF (x_remaining_qty_parent_uom <= 0) -- this is redundant with the qty check????
687: THEN
688: IF (g_asn_debug = 'Y') THEN
689: asn_debug.put_line(' Return Needs an error message in the interface tables');
690: RAISE quantity_not_postive_exception;
691: END IF;
692: ELSE
693: /* Converted successfully and have some quantity on which we can act */

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

690: RAISE quantity_not_postive_exception;
691: END IF;
692: ELSE
693: /* Converted successfully and have some quantity on which we can act */
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
696: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
697: END IF;
698:

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

691: END IF;
692: ELSE
693: /* Converted successfully and have some quantity on which we can act */
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
696: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
697: END IF;
698:
699: IF (x_converted_parent_trx_qty > 0) THEN --{

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

692: ELSE
693: /* Converted successfully and have some quantity on which we can act */
694: IF (g_asn_debug = 'Y') THEN
695: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
696: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
697: END IF;
698:
699: IF (x_converted_parent_trx_qty > 0) THEN --{
700: IF (x_converted_parent_trx_qty < x_remaining_qty_parent_uom) THEN --{

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

716: END IF;
717:
718: insert_into_table := TRUE;
719: ELSE --}{
720: IF (g_asn_debug = 'Y') THEN
721: asn_debug.put_line('We are in >= Qty branch ');
722: END IF;
723:
724: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;

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

717:
718: insert_into_table := TRUE;
719: ELSE --}{
720: IF (g_asn_debug = 'Y') THEN
721: asn_debug.put_line('We are in >= Qty branch ');
722: END IF;
723:
724: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;
725: insert_into_table := TRUE;

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

729: ELSE /* x_converted_parent_trx_qty >0 */ --}{
730: IF rows_fetched = x_record_count THEN -- {
731: -- last row needs to be inserted anyway
732: -- so that the row can be used based on qty tolerance checks
733: IF (g_asn_debug = 'Y') THEN
734: asn_debug.put_line('Quantity is less then 0 but last record');
735: END IF;
736:
737: insert_into_table := TRUE;

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

730: IF rows_fetched = x_record_count THEN -- {
731: -- last row needs to be inserted anyway
732: -- so that the row can be used based on qty tolerance checks
733: IF (g_asn_debug = 'Y') THEN
734: asn_debug.put_line('Quantity is less then 0 but last record');
735: END IF;
736:
737: insert_into_table := TRUE;
738: x_converted_trx_qty := 0;

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

736:
737: insert_into_table := TRUE;
738: x_converted_trx_qty := 0;
739: ELSE --}{
740: IF (g_asn_debug = 'Y') THEN
741: asn_debug.put_line('<= 0 Quantity but more records in cursor');
742: END IF;
743:
744: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

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

737: insert_into_table := TRUE;
738: x_converted_trx_qty := 0;
739: ELSE --}{
740: IF (g_asn_debug = 'Y') THEN
741: asn_debug.put_line('<= 0 Quantity but more records in cursor');
742: END IF;
743:
744: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
745:

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

742: END IF;
743:
744: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
745:
746: IF (g_asn_debug = 'Y') THEN
747: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
748: END IF;
749:
750: insert_into_table := FALSE;

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

743:
744: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
745:
746: IF (g_asn_debug = 'Y') THEN
747: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
748: END IF;
749:
750: insert_into_table := FALSE;
751: END IF; --}

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

752: END IF; /*x_converted_parent_trx_qty >0 */ --}
753: END IF;
754:
755: /* Converted qty successfully and we have some quantity on which we can act */
756: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
757:
758: IF insert_into_table THEN --{ --start pjiang
759: IF (x_first_trans) THEN --{
760: IF (g_asn_debug = 'Y') THEN

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

756: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
757:
758: IF insert_into_table THEN --{ --start pjiang
759: IF (x_first_trans) THEN --{
760: IF (g_asn_debug = 'Y') THEN
761: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
762: END IF;
763:
764: x_first_trans := FALSE;

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

757:
758: IF insert_into_table THEN --{ --start pjiang
759: IF (x_first_trans) THEN --{
760: IF (g_asn_debug = 'Y') THEN
761: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
762: END IF;
763:
764: x_first_trans := FALSE;
765: ELSE --}{

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

762: END IF;
763:
764: x_first_trans := FALSE;
765: ELSE --}{
766: IF (g_asn_debug = 'Y') THEN
767: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
768: END IF;
769:
770: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

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

763:
764: x_first_trans := FALSE;
765: ELSE --}{
766: IF (g_asn_debug = 'Y') THEN
767: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
768: END IF;
769:
770: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
771: END IF; --}

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

785: ELSE
786: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
787: END IF;
788:
789: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
790: current_n := current_n + 1;
791: END IF; --}
792: /* Get the available qty in PRIMARY UOM */
793: /*

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

816:
817: RETURN;
818: END IF;
819:
820: IF (g_asn_debug = 'Y') THEN
821: asn_debug.put_line('Out of the loop');
822: END IF;
823:
824: IF NOT x_first_trans THEN

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

817: RETURN;
818: END IF;
819:
820: IF (g_asn_debug = 'Y') THEN
821: asn_debug.put_line('Out of the loop');
822: END IF;
823:
824: IF NOT x_first_trans THEN
825: -- x_first_trans has been reset which means some cascade has

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

823:
824: IF NOT x_first_trans THEN
825: -- x_first_trans has been reset which means some cascade has
826: -- happened. Otherwise current_n = 1
827: asn_debug.put_line('current_n before is ' || current_n);
828: current_n := current_n - 1;
829: END IF;
830:
831: -- do the tolerance act here

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

828: current_n := current_n - 1;
829: END IF;
830:
831: -- do the tolerance act here
832: IF (g_asn_debug = 'Y') THEN
833: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
834: asn_debug.put_line('Check which condition has occured');
835: END IF;
836:

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

829: END IF;
830:
831: -- do the tolerance act here
832: IF (g_asn_debug = 'Y') THEN
833: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
834: asn_debug.put_line('Check which condition has occured');
835: END IF;
836:
837:

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

830:
831: -- do the tolerance act here
832: IF (g_asn_debug = 'Y') THEN
833: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
834: asn_debug.put_line('Check which condition has occured');
835: END IF;
836:
837:
838: -- bug 8640033

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

847:
848: IF l_exist = 'record_exist' THEN
849: RAISE po_shipment_cancel_exception;
850:
851: IF (g_asn_debug = 'Y') THEN
852: asn_debug.put_line('The PO shipment has been cancelled or finally closed ');
853: asn_debug.put_line('Parent transaction id is ' || x_cascaded_table(n).parent_transaction_id );
854: END IF;
855:

Line 852: asn_debug.put_line('The PO shipment has been cancelled or finally closed ');

848: IF l_exist = 'record_exist' THEN
849: RAISE po_shipment_cancel_exception;
850:
851: IF (g_asn_debug = 'Y') THEN
852: asn_debug.put_line('The PO shipment has been cancelled or finally closed ');
853: asn_debug.put_line('Parent transaction id is ' || x_cascaded_table(n).parent_transaction_id );
854: END IF;
855:
856: ELSE

Line 853: asn_debug.put_line('Parent transaction id is ' || x_cascaded_table(n).parent_transaction_id );

849: RAISE po_shipment_cancel_exception;
850:
851: IF (g_asn_debug = 'Y') THEN
852: asn_debug.put_line('The PO shipment has been cancelled or finally closed ');
853: asn_debug.put_line('Parent transaction id is ' || x_cascaded_table(n).parent_transaction_id );
854: END IF;
855:
856: ELSE
857: -- end bug 8640033

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

862: IF x_remaining_quantity > 0 THEN --{
863: -- reject the transaction if this is the case. Can't return more than what we have.
864: RAISE reject_exception;
865:
866: IF (g_asn_debug = 'Y') THEN
867: asn_debug.put_line('There is quantity remaining ');
868: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
869: END IF;
870: ELSE -- }{

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

863: -- reject the transaction if this is the case. Can't return more than what we have.
864: RAISE reject_exception;
865:
866: IF (g_asn_debug = 'Y') THEN
867: asn_debug.put_line('There is quantity remaining ');
868: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
869: END IF;
870: ELSE -- }{
871: IF (g_asn_debug = 'Y') THEN

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

864: RAISE reject_exception;
865:
866: IF (g_asn_debug = 'Y') THEN
867: asn_debug.put_line('There is quantity remaining ');
868: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
869: END IF;
870: ELSE -- }{
871: IF (g_asn_debug = 'Y') THEN
872: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));

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

867: asn_debug.put_line('There is quantity remaining ');
868: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
869: END IF;
870: ELSE -- }{
871: IF (g_asn_debug = 'Y') THEN
872: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
873: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
874: END IF;
875: END IF; --} ends the check for whether last record has been reached

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

868: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
869: END IF;
870: ELSE -- }{
871: IF (g_asn_debug = 'Y') THEN
872: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
873: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
874: END IF;
875: END IF; --} ends the check for whether last record has been reached
876: END IF; -- end bug 8640033

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

869: END IF;
870: ELSE -- }{
871: IF (g_asn_debug = 'Y') THEN
872: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
873: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
874: END IF;
875: END IF; --} ends the check for whether last record has been reached
876: END IF; -- end bug 8640033
877:

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

874: END IF;
875: END IF; --} ends the check for whether last record has been reached
876: END IF; -- end bug 8640033
877:
878: asn_debug.put_line('before exit current_n is ' || current_n);
879: ELSE --} {
880: -- error_status and error_message are set after validate_quantity_shipped
881: IF (g_asn_debug = 'Y') THEN
882: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');

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

877:
878: asn_debug.put_line('before exit current_n is ' || current_n);
879: ELSE --} {
880: -- error_status and error_message are set after validate_quantity_shipped
881: IF (g_asn_debug = 'Y') THEN
882: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
883: END IF;
884:
885: IF (g_asn_debug = 'Y') THEN

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

878: asn_debug.put_line('before exit current_n is ' || current_n);
879: ELSE --} {
880: -- error_status and error_message are set after validate_quantity_shipped
881: IF (g_asn_debug = 'Y') THEN
882: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
883: END IF;
884:
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);

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

881: IF (g_asn_debug = 'Y') THEN
882: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
883: END IF;
884:
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
887: END IF;
888:
889: IF x_cascaded_table(n).error_status IN('S', 'W', 'F') THEN --{

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

882: asn_debug.put_line('No parent_transaction_id/parent_interface_trx_id ');
883: END IF;
884:
885: IF (g_asn_debug = 'Y') THEN
886: asn_debug.put_line('Status = ' || x_cascaded_table(n).error_status);
887: END IF;
888:
889: IF x_cascaded_table(n).error_status IN('S', 'W', 'F') THEN --{
890: RAISE no_parent_line_exception;

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

892:
893: RETURN;
894: END IF; -- } of (asn quantity_shipped was valid)
895:
896: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
897:
898: IF derive_return%ISOPEN THEN
899: CLOSE derive_return;
900: END IF;

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

902: IF derive_return_rti%ISOPEN THEN
903: CLOSE derive_return_rti;
904: END IF;
905:
906: IF (g_asn_debug = 'Y') THEN
907: asn_debug.put_line('Exit explode_line_quantity');
908: END IF;
909: -- handle errors and warnings in exception block
910: EXCEPTION

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

903: CLOSE derive_return_rti;
904: END IF;
905:
906: IF (g_asn_debug = 'Y') THEN
907: asn_debug.put_line('Exit explode_line_quantity');
908: END IF;
909: -- handle errors and warnings in exception block
910: EXCEPTION
911: WHEN quantity_not_postive_exception THEN

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

958: END IF;
959:
960: x_cascaded_table(n).error_status := 'F';
961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line(TO_CHAR(n));
964: asn_debug.put_line(SQLERRM);
965: asn_debug.put_line('error ' || x_progress);
966: END IF;

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

959:
960: x_cascaded_table(n).error_status := 'F';
961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line(TO_CHAR(n));
964: asn_debug.put_line(SQLERRM);
965: asn_debug.put_line('error ' || x_progress);
966: END IF;
967: END derive_return_line_qty;

Line 964: asn_debug.put_line(SQLERRM);

960: x_cascaded_table(n).error_status := 'F';
961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line(TO_CHAR(n));
964: asn_debug.put_line(SQLERRM);
965: asn_debug.put_line('error ' || x_progress);
966: END IF;
967: END derive_return_line_qty;
968:

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

961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line(TO_CHAR(n));
964: asn_debug.put_line(SQLERRM);
965: asn_debug.put_line('error ' || x_progress);
966: END IF;
967: END derive_return_line_qty;
968:
969: PROCEDURE default_common_lines(

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

991: n IN BINARY_INTEGER,
992: default_return_rec IN default_return%ROWTYPE
993: ) IS
994: BEGIN
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);

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

992: default_return_rec IN default_return%ROWTYPE
993: ) IS
994: BEGIN
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);

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

993: ) IS
994: BEGIN
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);

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

994: BEGIN
995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
1002: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);

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

995: IF (g_asn_debug = 'Y') THEN
996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
1002: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
1003: END IF;

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

996: asn_debug.put_line('Defaulting return po_revision_num ' || default_return_rec.po_revision_num);
997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
1002: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
1003: END IF;
1004:

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

997: asn_debug.put_line('Defaulting return po_header_id ' || default_return_rec.po_header_id);
998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
1002: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
1003: END IF;
1004:
1005: x_cascaded_table(n).po_revision_num := default_return_rec.po_revision_num;

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

998: asn_debug.put_line('Defaulting return po_release_id ' || default_return_rec.po_release_id);
999: asn_debug.put_line('Defaulting return po_unit_price ' || default_return_rec.po_unit_price);
1000: asn_debug.put_line('Defaulting return po_line_id ' || default_return_rec.po_line_id);
1001: asn_debug.put_line('Defaulting return po_line_location_id ' || default_return_rec.po_line_location_id);
1002: asn_debug.put_line('Defaulting return po_distribution_id ' || default_return_rec.po_distribution_id);
1003: END IF;
1004:
1005: x_cascaded_table(n).po_revision_num := default_return_rec.po_revision_num;
1006: x_cascaded_table(n).po_header_id := default_return_rec.po_header_id;

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

1021: WHERE pll.line_location_id = x_cascaded_table(n).po_line_location_id
1022: AND pl.po_line_id = x_cascaded_table(n).po_line_id
1023: AND pl.po_line_id = pll.po_line_id;
1024:
1025: IF (g_asn_debug = 'Y') THEN
1026: asn_debug.put_line('Defaulting Return po_unit_price' || x_cascaded_table(n).po_unit_price);
1027: END IF;
1028:
1029: x_cascaded_table(n).po_line_id := default_return_rec.po_line_id;

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

1022: AND pl.po_line_id = x_cascaded_table(n).po_line_id
1023: AND pl.po_line_id = pll.po_line_id;
1024:
1025: IF (g_asn_debug = 'Y') THEN
1026: asn_debug.put_line('Defaulting Return po_unit_price' || x_cascaded_table(n).po_unit_price);
1027: END IF;
1028:
1029: x_cascaded_table(n).po_line_id := default_return_rec.po_line_id;
1030: x_cascaded_table(n).po_line_location_id := default_return_rec.po_line_location_id;

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

1036: n IN BINARY_INTEGER,
1037: default_return_rec IN default_return%ROWTYPE
1038: ) IS
1039: BEGIN
1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
1042: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
1043: END IF;
1044:

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

1037: default_return_rec IN default_return%ROWTYPE
1038: ) IS
1039: BEGIN
1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
1042: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
1043: END IF;
1044:
1045: x_cascaded_table(n).shipment_header_id := default_return_rec.shipment_header_id;

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

1038: ) IS
1039: BEGIN
1040: IF (g_asn_debug = 'Y') THEN
1041: asn_debug.put_line('Defaulting Return shipment_header_id ' || default_return_rec.shipment_header_id);
1042: asn_debug.put_line('Defaulting Return shipment_line_id ' || default_return_rec.shipment_line_id);
1043: END IF;
1044:
1045: x_cascaded_table(n).shipment_header_id := default_return_rec.shipment_header_id;
1046: x_cascaded_table(n).shipment_line_id := default_return_rec.shipment_line_id;

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

1051: n IN BINARY_INTEGER,
1052: default_return_rec IN default_return%ROWTYPE
1053: ) IS
1054: BEGIN
1055: IF (g_asn_debug = 'Y') THEN
1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);

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

1052: default_return_rec IN default_return%ROWTYPE
1053: ) IS
1054: BEGIN
1055: IF (g_asn_debug = 'Y') THEN
1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1060: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);

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

1053: ) IS
1054: BEGIN
1055: IF (g_asn_debug = 'Y') THEN
1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1060: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1061: END IF;

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

1054: BEGIN
1055: IF (g_asn_debug = 'Y') THEN
1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1060: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1061: END IF;
1062:

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

1055: IF (g_asn_debug = 'Y') THEN
1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1060: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1061: END IF;
1062:
1063: x_cascaded_table(n).wip_entity_id := default_return_rec.wip_entity_id;

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

1056: asn_debug.put_line('Defaulting return wip_entity_id ' || default_return_rec.wip_entity_id);
1057: asn_debug.put_line('Defaulting return wip_line_id ' || default_return_rec.wip_line_id);
1058: asn_debug.put_line('Defaulting return wip_repetitive_schedule_id ' || default_return_rec.wip_repetitive_schedule_id);
1059: asn_debug.put_line('Defaulting return wip_operation_seq_num ' || default_return_rec.wip_operation_seq_num);
1060: asn_debug.put_line('Defaulting return wip_resource_seq_num ' || default_return_rec.wip_resource_seq_num);
1061: END IF;
1062:
1063: x_cascaded_table(n).wip_entity_id := default_return_rec.wip_entity_id;
1064: x_cascaded_table(n).wip_line_id := default_return_rec.wip_line_id;

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

1072: n IN BINARY_INTEGER,
1073: default_return_rec IN default_return%ROWTYPE
1074: ) IS
1075: BEGIN
1076: IF (g_asn_debug = 'Y') THEN
1077: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1078: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1079: END IF;
1080:

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

1073: default_return_rec IN default_return%ROWTYPE
1074: ) IS
1075: BEGIN
1076: IF (g_asn_debug = 'Y') THEN
1077: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1078: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1079: END IF;
1080:
1081: x_cascaded_table(n).oe_order_header_id := default_return_rec.oe_order_header_id;

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

1074: ) IS
1075: BEGIN
1076: IF (g_asn_debug = 'Y') THEN
1077: asn_debug.put_line('Defaulting return oe_order_header_id ' || default_return_rec.oe_order_header_id);
1078: asn_debug.put_line('Defaulting return oe_order_line_id ' || default_return_rec.oe_order_line_id);
1079: END IF;
1080:
1081: x_cascaded_table(n).oe_order_header_id := default_return_rec.oe_order_header_id;
1082: x_cascaded_table(n).oe_order_line_id := default_return_rec.oe_order_line_id;

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

1087: n IN BINARY_INTEGER,
1088: default_return_rec IN default_return%ROWTYPE
1089: ) IS
1090: BEGIN
1091: IF (g_asn_debug = 'Y') THEN
1092: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1093: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1094: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1095: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);

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

1088: default_return_rec IN default_return%ROWTYPE
1089: ) IS
1090: BEGIN
1091: IF (g_asn_debug = 'Y') THEN
1092: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1093: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1094: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1095: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1096: END IF;

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

1089: ) IS
1090: BEGIN
1091: IF (g_asn_debug = 'Y') THEN
1092: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1093: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1094: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1095: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1096: END IF;
1097:

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

1090: BEGIN
1091: IF (g_asn_debug = 'Y') THEN
1092: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1093: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1094: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1095: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1096: END IF;
1097:
1098: x_cascaded_table(n).currency_code := default_return_rec.currency_code;

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

1091: IF (g_asn_debug = 'Y') THEN
1092: asn_debug.put_line('Defaulting return currency_code ' || default_return_rec.currency_code);
1093: asn_debug.put_line('Defaulting return currency_conversion_type ' || default_return_rec.currency_conversion_type);
1094: asn_debug.put_line('Defaulting return currency_conversion_rate ' || default_return_rec.currency_conversion_rate);
1095: asn_debug.put_line('Defaulting return currency_conversion_date ' || default_return_rec.currency_conversion_date);
1096: END IF;
1097:
1098: x_cascaded_table(n).currency_code := default_return_rec.currency_code;
1099: x_cascaded_table(n).currency_conversion_type := default_return_rec.currency_conversion_type;

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

1106: n IN BINARY_INTEGER,
1107: default_return_rec IN default_return%ROWTYPE
1108: ) IS
1109: BEGIN
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1112: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1113: END IF;
1114:

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

1107: default_return_rec IN default_return%ROWTYPE
1108: ) IS
1109: BEGIN
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1112: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1113: END IF;
1114:
1115: x_cascaded_table(n).vendor_id := default_return_rec.vendor_id;

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

1108: ) IS
1109: BEGIN
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line('Defaulting Return vendor_id ' || default_return_rec.vendor_id);
1112: asn_debug.put_line('Defaulting Return vendor_site_id ' || default_return_rec.vendor_site_id);
1113: END IF;
1114:
1115: x_cascaded_table(n).vendor_id := default_return_rec.vendor_id;
1116: x_cascaded_table(n).vendor_site_id := default_return_rec.vendor_site_id;

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

1121: n IN BINARY_INTEGER,
1122: default_return_rec IN default_return%ROWTYPE
1123: ) IS
1124: BEGIN
1125: IF (g_asn_debug = 'Y') THEN
1126: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1127: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1128: END IF;
1129:

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

1122: default_return_rec IN default_return%ROWTYPE
1123: ) IS
1124: BEGIN
1125: IF (g_asn_debug = 'Y') THEN
1126: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1127: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1128: END IF;
1129:
1130: x_cascaded_table(n).customer_id := default_return_rec.customer_id;

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

1123: ) IS
1124: BEGIN
1125: IF (g_asn_debug = 'Y') THEN
1126: asn_debug.put_line('Defaulting Return customer_id ' || default_return_rec.customer_id);
1127: asn_debug.put_line('Defaulting Return customer_site_id ' || default_return_rec.customer_site_id);
1128: END IF;
1129:
1130: x_cascaded_table(n).customer_id := default_return_rec.customer_id;
1131: x_cascaded_table(n).customer_site_id := default_return_rec.customer_site_id;

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

1136: n IN BINARY_INTEGER,
1137: default_return_rec IN default_return%ROWTYPE
1138: ) IS
1139: BEGIN
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1142: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1143: END IF;
1144:

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

1137: default_return_rec IN default_return%ROWTYPE
1138: ) IS
1139: BEGIN
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1142: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1143: END IF;
1144:
1145: x_cascaded_table(n).deliver_to_person_id := default_return_rec.deliver_to_person_id;

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

1138: ) IS
1139: BEGIN
1140: IF (g_asn_debug = 'Y') THEN
1141: asn_debug.put_line('Defaulting Return deliver_to_person_id ' || default_return_rec.deliver_to_person_id);
1142: asn_debug.put_line('Defaulting Return deliver_to_location_id ' || default_return_rec.deliver_to_location_id);
1143: END IF;
1144:
1145: x_cascaded_table(n).deliver_to_person_id := default_return_rec.deliver_to_person_id;
1146: x_cascaded_table(n).deliver_to_location_id := default_return_rec.deliver_to_location_id;

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

1151: n IN BINARY_INTEGER,
1152: default_return_rec IN default_return%ROWTYPE
1153: ) IS
1154: BEGIN
1155: IF (g_asn_debug = 'Y') THEN
1156: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1157: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1158: END IF;
1159:

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

1152: default_return_rec IN default_return%ROWTYPE
1153: ) IS
1154: BEGIN
1155: IF (g_asn_debug = 'Y') THEN
1156: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1157: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1158: END IF;
1159:
1160: x_cascaded_table(n).receipt_source_code := default_return_rec.receipt_source_code;

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

1153: ) IS
1154: BEGIN
1155: IF (g_asn_debug = 'Y') THEN
1156: asn_debug.put_line('Defaulting return receipt_source_code ' || default_return_rec.receipt_source_code);
1157: asn_debug.put_line('Defaulting return source_document_code ' || default_return_rec.source_document_code);
1158: END IF;
1159:
1160: x_cascaded_table(n).receipt_source_code := default_return_rec.receipt_source_code;
1161: x_cascaded_table(n).source_document_code := default_return_rec.source_document_code;

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

1166: n IN BINARY_INTEGER,
1167: default_return_rec IN default_return%ROWTYPE
1168: ) IS
1169: BEGIN
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);

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

1167: default_return_rec IN default_return%ROWTYPE
1168: ) IS
1169: BEGIN
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);

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

1168: ) IS
1169: BEGIN
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1176: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);

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

1169: BEGIN
1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1176: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1177: END IF;

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

1170: IF (g_asn_debug = 'Y') THEN
1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1176: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1177: END IF;
1178:

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

1171: asn_debug.put_line('Defaulting return primary_unit_of_measure ' || default_return_rec.primary_unit_of_measure);
1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1176: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1177: END IF;
1178:
1179: x_cascaded_table(n).primary_unit_of_measure := default_return_rec.primary_unit_of_measure;

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

1172: asn_debug.put_line('Defaulting return item_description ' || default_return_rec.item_description);
1173: asn_debug.put_line('Defaulting return category_id ' || default_return_rec.category_id);
1174: asn_debug.put_line('Defaulting return department_code ' || default_return_rec.department_code);
1175: asn_debug.put_line('Defaulting return inspection_status_code ' || default_return_rec.inspection_status_code);
1176: asn_debug.put_line('Defaulting return subinventory ' || default_return_rec.subinventory);
1177: END IF;
1178:
1179: x_cascaded_table(n).primary_unit_of_measure := default_return_rec.primary_unit_of_measure;
1180: x_cascaded_table(n).item_description := default_return_rec.item_description;

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

1189: n IN BINARY_INTEGER,
1190: default_return_rec IN default_return%ROWTYPE
1191: ) IS
1192: BEGIN
1193: IF (g_asn_debug = 'Y') THEN
1194: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1195: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1196: END IF;
1197:

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

1190: default_return_rec IN default_return%ROWTYPE
1191: ) IS
1192: BEGIN
1193: IF (g_asn_debug = 'Y') THEN
1194: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1195: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1196: END IF;
1197:
1198: x_cascaded_table(n).destination_context := default_return_rec.destination_context;

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

1191: ) IS
1192: BEGIN
1193: IF (g_asn_debug = 'Y') THEN
1194: asn_debug.put_line('Defaulting return destination_context ' || default_return_rec.destination_context);
1195: asn_debug.put_line('Defaulting return to_organization_id ' || default_return_rec.OID);
1196: END IF;
1197:
1198: x_cascaded_table(n).destination_context := default_return_rec.destination_context;
1199: x_cascaded_table(n).to_organization_id := default_return_rec.OID;

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

1204: n IN BINARY_INTEGER,
1205: default_return_rec IN default_return%ROWTYPE
1206: ) IS
1207: BEGIN
1208: IF (g_asn_debug = 'Y') THEN
1209: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1210: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1211: END IF;
1212:

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

1205: default_return_rec IN default_return%ROWTYPE
1206: ) IS
1207: BEGIN
1208: IF (g_asn_debug = 'Y') THEN
1209: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1210: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1211: END IF;
1212:
1213: x_cascaded_table(n).location_id := default_return_rec.location_id;

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

1206: ) IS
1207: BEGIN
1208: IF (g_asn_debug = 'Y') THEN
1209: asn_debug.put_line('Defaulting return location_id ' || default_return_rec.location_id);
1210: asn_debug.put_line('Defaulting return locator_id ' || default_return_rec.locator_id);
1211: END IF;
1212:
1213: x_cascaded_table(n).location_id := default_return_rec.location_id;
1214: x_cascaded_table(n).locator_id := default_return_rec.locator_id;

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

1219: n IN BINARY_INTEGER,
1220: default_return_rec IN default_return%ROWTYPE
1221: ) IS
1222: BEGIN
1223: IF (g_asn_debug = 'Y') THEN
1224: asn_debug.put_line('Defaulting return movement_id ' || default_return_rec.movement_id);
1225: END IF;
1226:
1227: x_cascaded_table(n).movement_id := default_return_rec.movement_id;

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

1220: default_return_rec IN default_return%ROWTYPE
1221: ) IS
1222: BEGIN
1223: IF (g_asn_debug = 'Y') THEN
1224: asn_debug.put_line('Defaulting return movement_id ' || default_return_rec.movement_id);
1225: END IF;
1226:
1227: x_cascaded_table(n).movement_id := default_return_rec.movement_id;
1228: END default_movement_id;

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

1232: n IN BINARY_INTEGER,
1233: default_return_rec IN default_return%ROWTYPE
1234: ) IS
1235: BEGIN
1236: IF (g_asn_debug = 'Y') THEN
1237: asn_debug.put_line('Defaulting return bom_resource_id ' || default_return_rec.bom_resource_id);
1238: END IF;
1239:
1240: x_cascaded_table(n).bom_resource_id := default_return_rec.bom_resource_id;

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

1233: default_return_rec IN default_return%ROWTYPE
1234: ) IS
1235: BEGIN
1236: IF (g_asn_debug = 'Y') THEN
1237: asn_debug.put_line('Defaulting return bom_resource_id ' || default_return_rec.bom_resource_id);
1238: END IF;
1239:
1240: x_cascaded_table(n).bom_resource_id := default_return_rec.bom_resource_id;
1241: END default_bom_resource_id;

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

1418: IF (lot_rows%ISOPEN) THEN --{
1419: FETCH lot_rows INTO l_lot;
1420: EXIT WHEN lot_rows%NOTFOUND;
1421:
1422: IF (g_asn_debug = 'Y') THEN
1423: asn_debug.put_line('lot_number ' || l_lot.lot_number);
1424: END IF;
1425:
1426: l_lot_number := l_lot.lot_number;

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

1419: FETCH lot_rows INTO l_lot;
1420: EXIT WHEN lot_rows%NOTFOUND;
1421:
1422: IF (g_asn_debug = 'Y') THEN
1423: asn_debug.put_line('lot_number ' || l_lot.lot_number);
1424: END IF;
1425:
1426: l_lot_number := l_lot.lot_number;
1427: l_primary_qty := ABS(rcv_transactions_interface_sv.convert_into_correct_qty(l_lot.transaction_quantity,