DBA Data[Home] [Help]

APPS.RCV_INT_ORG_TRANSFER dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_int_org_transfer AS
2: /* $Header: RCVIOTFB.pls 120.15 2010/11/23 11:04:38 sadibhat ship $*/
3: g_asn_debug VARCHAR2(1) := asn_debug.is_debug_on; -- Bug 9152790
4: x_progress VARCHAR2(3);
5: e_validation_error EXCEPTION;
6: PROCEDURE derive_int_org_rcv_line(
7: x_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,

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

11: ) IS
12: BEGIN
13: x_progress := '000';
14:
15: IF (g_asn_debug = 'Y') THEN
16: asn_debug.put_line('enter int_org_rcv line');
17: END IF;
18:
19: -- 1) derive ship to org info

Line 16: asn_debug.put_line('enter int_org_rcv line');

12: BEGIN
13: x_progress := '000';
14:
15: IF (g_asn_debug = 'Y') THEN
16: asn_debug.put_line('enter int_org_rcv line');
17: END IF;
18:
19: -- 1) derive ship to org info
20: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,

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

22: x_header_record
23: );
24: x_progress := '002';
25:
26: IF (g_asn_debug = 'Y') THEN
27: asn_debug.put_line('x_progress ' || x_progress);
28: END IF;
29:
30: x_progress := '010';

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

23: );
24: x_progress := '002';
25:
26: IF (g_asn_debug = 'Y') THEN
27: asn_debug.put_line('x_progress ' || x_progress);
28: END IF;
29:
30: x_progress := '010';
31: -- 5) derive item info

Line 44: asn_debug.put_line('progress in IOrcv : x_progress = ' || x_progress);

40: x_progress := '035';
41: -- 12) derive routing header info
42: rcv_roi_transaction.derive_routing_header_info(x_cascaded_table, n);
43: x_progress := '070';
44: asn_debug.put_line('progress in IOrcv : x_progress = ' || x_progress);
45: -- derive auto transact code
46: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
47: asn_debug.put_line('progress in IOrcv : before derive qty');
48: -- quantity > 0

Line 47: asn_debug.put_line('progress in IOrcv : before derive qty');

43: x_progress := '070';
44: asn_debug.put_line('progress in IOrcv : x_progress = ' || x_progress);
45: -- derive auto transact code
46: rcv_roi_transaction.derive_auto_transact_code(x_cascaded_table, n);
47: asn_debug.put_line('progress in IOrcv : before derive qty');
48: -- quantity > 0
49: derive_int_org_rcv_line_qty(x_cascaded_table,
50: n,
51: temp_cascaded_table

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

164: BEGIN
165: --check line quanity > 0
166: x_progress := '097';
167:
168: IF (g_asn_debug = 'Y') THEN
169: asn_debug.put_line('inside line qty calculation of int org rcv');
170: asn_debug.put_line('x_progress ' || x_progress);
171: END IF;
172:

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

165: --check line quanity > 0
166: x_progress := '097';
167:
168: IF (g_asn_debug = 'Y') THEN
169: asn_debug.put_line('inside line qty calculation of int org rcv');
170: asn_debug.put_line('x_progress ' || x_progress);
171: END IF;
172:
173: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN

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

166: x_progress := '097';
167:
168: IF (g_asn_debug = 'Y') THEN
169: asn_debug.put_line('inside line qty calculation of int org rcv');
170: asn_debug.put_line('x_progress ' || x_progress);
171: END IF;
172:
173: IF x_cascaded_table(n).error_status NOT IN('S', 'W') THEN
174: RETURN;

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

174: RETURN;
175: END IF;
176:
177: IF x_cascaded_table(n).quantity <= 0 THEN --{
178: IF (g_asn_debug = 'Y') THEN
179: asn_debug.put_line('quantity is <= zero. cascade will fail');
180: END IF;
181:
182: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

175: END IF;
176:
177: IF x_cascaded_table(n).quantity <= 0 THEN --{
178: IF (g_asn_debug = 'Y') THEN
179: asn_debug.put_line('quantity is <= zero. cascade will fail');
180: END IF;
181:
182: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
183: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

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

186: END IF; --} end qty > 0 check
187:
188: x_progress := '098';
189:
190: IF (g_asn_debug = 'Y') THEN
191: asn_debug.put_line('x_progress ' || x_progress);
192: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
193: END IF;
194:

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

187:
188: x_progress := '098';
189:
190: IF (g_asn_debug = 'Y') THEN
191: asn_debug.put_line('x_progress ' || x_progress);
192: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
193: END IF;
194:
195: -- as long as shipment num or shipment header id is specified we can continue

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

188: x_progress := '098';
189:
190: IF (g_asn_debug = 'Y') THEN
191: asn_debug.put_line('x_progress ' || x_progress);
192: asn_debug.put_line('the shipment info is = ' || TO_CHAR(x_cascaded_table(n).shipment_header_id) || ' num = ' || x_cascaded_table(n).shipment_num);
193: END IF;
194:
195: -- as long as shipment num or shipment header id is specified we can continue
196: IF ( x_cascaded_table(n).shipment_header_id IS NULL

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

194:
195: -- as long as shipment num or shipment header id is specified we can continue
196: IF ( x_cascaded_table(n).shipment_header_id IS NULL
197: AND x_cascaded_table(n).shipment_num IS NULL) THEN --{
198: IF (g_asn_debug = 'Y') THEN
199: asn_debug.put_line('no shipment num/shipment header specified ');
200: END IF;
201:
202: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

195: -- as long as shipment num or shipment header id is specified we can continue
196: IF ( x_cascaded_table(n).shipment_header_id IS NULL
197: AND x_cascaded_table(n).shipment_num IS NULL) THEN --{
198: IF (g_asn_debug = 'Y') THEN
199: asn_debug.put_line('no shipment num/shipment header specified ');
200: END IF;
201:
202: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
203: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);

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

207:
208:
209: -- copy record from main table to temp table
210:
211: IF (g_asn_debug = 'Y') THEN
212: asn_debug.put_line('copy record from main table to temp table');
213: END IF;
214:
215: current_n := 1;

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

208:
209: -- copy record from main table to temp table
210:
211: IF (g_asn_debug = 'Y') THEN
212: asn_debug.put_line('copy record from main table to temp table');
213: END IF;
214:
215: current_n := 1;
216: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

217:
218: -- Bugfix 5201151
219: IF ( x_cascaded_table(n).shipment_header_id IS NULL
220: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
221: IF (g_asn_debug = 'Y') THEN
222: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
223: END IF;
224:
225: /* Bug:6313315

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

218: -- Bugfix 5201151
219: IF ( x_cascaded_table(n).shipment_header_id IS NULL
220: AND x_cascaded_table(n).shipment_num IS NOT NULL) THEN --{
221: IF (g_asn_debug = 'Y') THEN
222: asn_debug.put_line('Shipment header is not provided hence deriving shipment header id for shipment num ' || x_cascaded_table(n).shipment_num );
223: END IF;
224:
225: /* Bug:6313315
226: Added where clause condition rsh.receipt_source_code = 'INVENTORY'.

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

237: AND rsl.to_organization_id = NVL(temp_cascaded_table(current_n).to_organization_id, to_organization_id)
238: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
239: AND rsh.receipt_source_code = 'INVENTORY';--Bug: 6313315
240:
241: IF (g_asn_debug = 'Y') THEN
242: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
243: END IF;
244:
245: EXCEPTION

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

238: AND rsl.from_organization_id = NVL(temp_cascaded_table(current_n).from_organization_id, from_organization_id)
239: AND rsh.receipt_source_code = 'INVENTORY';--Bug: 6313315
240:
241: IF (g_asn_debug = 'Y') THEN
242: asn_debug.put_line('Shipment header = ' || l_shipment_header_id );
243: END IF;
244:
245: EXCEPTION
246: WHEN NO_DATA_FOUND

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

249: rcv_error_pkg.set_error_message('RCV_IOT_NO_SHIP_INFO', x_cascaded_table(n).error_message);
250: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
251: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
252:
253: IF (g_asn_debug = 'Y') THEN
254: asn_debug.put_line(TO_CHAR(n));
255: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
256: asn_debug.put_line('error ' || x_progress);
257: END IF;

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

250: rcv_error_pkg.set_token('SHIPMENT_NUM', temp_cascaded_table(current_n).shipment_num);
251: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
252:
253: IF (g_asn_debug = 'Y') THEN
254: asn_debug.put_line(TO_CHAR(n));
255: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
256: asn_debug.put_line('error ' || x_progress);
257: END IF;
258: WHEN OTHERS

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

251: rcv_error_pkg.log_interface_error('SHIPMENT_NUM');
252:
253: IF (g_asn_debug = 'Y') THEN
254: asn_debug.put_line(TO_CHAR(n));
255: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
256: asn_debug.put_line('error ' || x_progress);
257: END IF;
258: WHEN OTHERS
259: THEN

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

252:
253: IF (g_asn_debug = 'Y') THEN
254: asn_debug.put_line(TO_CHAR(n));
255: asn_debug.put_line('No shipment_header_id found for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
256: asn_debug.put_line('error ' || x_progress);
257: END IF;
258: WHEN OTHERS
259: THEN
260: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_unexp_error;

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

261: rcv_error_pkg.set_sql_error_message('derive_int_org_rcv_line_qty', x_progress);
262: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
263: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
264:
265: IF (g_asn_debug = 'Y') THEN
266: asn_debug.put_line(TO_CHAR(n));
267: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
268: asn_debug.put_line(sqlerrm);
269: asn_debug.put_line('error ' || x_progress);

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

262: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
263: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
264:
265: IF (g_asn_debug = 'Y') THEN
266: asn_debug.put_line(TO_CHAR(n));
267: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
268: asn_debug.put_line(sqlerrm);
269: asn_debug.put_line('error ' || x_progress);
270: END IF;

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

263: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
264:
265: IF (g_asn_debug = 'Y') THEN
266: asn_debug.put_line(TO_CHAR(n));
267: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
268: asn_debug.put_line(sqlerrm);
269: asn_debug.put_line('error ' || x_progress);
270: END IF;
271: END;

Line 268: asn_debug.put_line(sqlerrm);

264:
265: IF (g_asn_debug = 'Y') THEN
266: asn_debug.put_line(TO_CHAR(n));
267: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
268: asn_debug.put_line(sqlerrm);
269: asn_debug.put_line('error ' || x_progress);
270: END IF;
271: END;
272: ELSE

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

265: IF (g_asn_debug = 'Y') THEN
266: asn_debug.put_line(TO_CHAR(n));
267: asn_debug.put_line('Error while selecting shipment_header_id for shipment_num = ' || temp_cascaded_table(current_n).shipment_num );
268: asn_debug.put_line(sqlerrm);
269: asn_debug.put_line('error ' || x_progress);
270: END IF;
271: END;
272: ELSE
273: l_shipment_header_id := temp_cascaded_table(current_n).shipment_header_id;

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

274: END IF; -- } deriving shipment_header_id if it NULL from shipment_num
275: -- End of code for Bugfix 5201151
276:
277: -- get all rows which meet this condition
278: IF (g_asn_debug = 'Y') THEN
279: asn_debug.put_line('get all rows which meet this condition');
280: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
281: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
282: END IF;

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

275: -- End of code for Bugfix 5201151
276:
277: -- get all rows which meet this condition
278: IF (g_asn_debug = 'Y') THEN
279: asn_debug.put_line('get all rows which meet this condition');
280: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
281: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
282: END IF;
283:

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

276:
277: -- get all rows which meet this condition
278: IF (g_asn_debug = 'Y') THEN
279: asn_debug.put_line('get all rows which meet this condition');
280: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
281: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
282: END IF;
283:
284: --{ open the cursors

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

277: -- get all rows which meet this condition
278: IF (g_asn_debug = 'Y') THEN
279: asn_debug.put_line('get all rows which meet this condition');
280: asn_debug.put_line('transaction type = ' || x_cascaded_table(n).transaction_type);
281: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
282: END IF;
283:
284: --{ open the cursors
285: IF (g_asn_debug = 'Y') THEN

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

281: asn_debug.put_line('auto transact code = ' || x_cascaded_table(n).auto_transact_code);
282: END IF;
283:
284: --{ open the cursors
285: IF (g_asn_debug = 'Y') THEN
286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));

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

282: END IF;
283:
284: --{ open the cursors
285: IF (g_asn_debug = 'Y') THEN
286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));

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

283:
284: --{ open the cursors
285: IF (g_asn_debug = 'Y') THEN
286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));

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

284: --{ open the cursors
285: IF (g_asn_debug = 'Y') THEN
286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814

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

285: IF (g_asn_debug = 'Y') THEN
286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814
293: asn_debug.put_line('proceed to open cursor');

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

286: asn_debug.put_line('open shipment records');
287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814
293: asn_debug.put_line('proceed to open cursor');
294: END IF;

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

287: asn_debug.put_line('shipment header id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_header_id));
288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814
293: asn_debug.put_line('proceed to open cursor');
294: END IF;
295:

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

288: asn_debug.put_line('item id ' || TO_CHAR(temp_cascaded_table(current_n).item_id));
289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814
293: asn_debug.put_line('proceed to open cursor');
294: END IF;
295:
296: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201151

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

289: asn_debug.put_line('shipment line num ' || TO_CHAR(temp_cascaded_table(current_n).document_line_num));
290: asn_debug.put_line('ship to organization id ' || TO_CHAR(temp_cascaded_table(current_n).to_organization_id));
291: asn_debug.put_line('from org id ' || TO_CHAR(temp_cascaded_table(current_n).from_organization_id));
292: asn_debug.put_line('shipment line id ' || TO_CHAR(temp_cascaded_table(current_n).shipment_line_id)); -- Bug 10257814
293: asn_debug.put_line('proceed to open cursor');
294: END IF;
295:
296: OPEN shipments(-- temp_cascaded_table(current_n).shipment_header_id, -- Bugfix 5201151
297: -- temp_cascaded_table(current_n).shipment_num, -- Bugfix 5201151

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

316:
317: -- }
318:
319: -- assign shipped quantity to remaining quantity
320: IF (g_asn_debug = 'Y') THEN
321: asn_debug.put_line('assign shipped quantity to remaining quantity');
322: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
323: END IF;
324:

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

317: -- }
318:
319: -- assign shipped quantity to remaining quantity
320: IF (g_asn_debug = 'Y') THEN
321: asn_debug.put_line('assign shipped quantity to remaining quantity');
322: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
323: END IF;
324:
325: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

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

318:
319: -- assign shipped quantity to remaining quantity
320: IF (g_asn_debug = 'Y') THEN
321: asn_debug.put_line('assign shipped quantity to remaining quantity');
322: asn_debug.put_line('pointer in temp_cascade ' || TO_CHAR(current_n));
323: END IF;
324:
325: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
326: x_remaining_qty_po_uom := 0;

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

324:
325: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
326: x_remaining_qty_po_uom := 0;
327:
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('have assigned the quantity');
330: END IF;
331:
332: -- calculate tax_amount_factor for calculating tax_amount for

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

325: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
326: x_remaining_qty_po_uom := 0;
327:
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('have assigned the quantity');
330: END IF;
331:
332: -- calculate tax_amount_factor for calculating tax_amount for
333: -- each cascaded line

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

337: ELSE
338: tax_amount_factor := 0;
339: END IF;
340:
341: IF (g_asn_debug = 'Y') THEN
342: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
343: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
344: END IF;
345:

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

338: tax_amount_factor := 0;
339: END IF;
340:
341: IF (g_asn_debug = 'Y') THEN
342: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
343: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
344: END IF;
345:
346: x_first_trans := TRUE;

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

339: END IF;
340:
341: IF (g_asn_debug = 'Y') THEN
342: asn_debug.put_line('tax factor ' || TO_CHAR(tax_amount_factor));
343: asn_debug.put_line('shipped quantity : ' || TO_CHAR(x_remaining_quantity));
344: END IF;
345:
346: x_first_trans := TRUE;
347: transaction_ok := FALSE;

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

350: */
351: FETCH count_shipments INTO x_countshipmentrec;
352: x_record_count := x_countshipmentrec.line_count;
353:
354: IF (g_asn_debug = 'Y') THEN
355: asn_debug.put_line('before starting cascade');
356: END IF;
357:
358: IF (g_asn_debug = 'Y') THEN

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

351: FETCH count_shipments INTO x_countshipmentrec;
352: x_record_count := x_countshipmentrec.line_count;
353:
354: IF (g_asn_debug = 'Y') THEN
355: asn_debug.put_line('before starting cascade');
356: END IF;
357:
358: IF (g_asn_debug = 'Y') THEN
359: asn_debug.put_line('record count = ' || x_record_count);

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

354: IF (g_asn_debug = 'Y') THEN
355: asn_debug.put_line('before starting cascade');
356: END IF;
357:
358: IF (g_asn_debug = 'Y') THEN
359: asn_debug.put_line('record count = ' || x_record_count);
360: END IF;
361:
362: LOOP --{ over the count of shipment records obtained

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

355: asn_debug.put_line('before starting cascade');
356: END IF;
357:
358: IF (g_asn_debug = 'Y') THEN
359: asn_debug.put_line('record count = ' || x_record_count);
360: END IF;
361:
362: LOOP --{ over the count of shipment records obtained
363: IF (g_asn_debug = 'Y') THEN

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

359: asn_debug.put_line('record count = ' || x_record_count);
360: END IF;
361:
362: LOOP --{ over the count of shipment records obtained
363: IF (g_asn_debug = 'Y') THEN
364: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
365: END IF;
366:
367: IF (g_asn_debug = 'Y') THEN

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

360: END IF;
361:
362: LOOP --{ over the count of shipment records obtained
363: IF (g_asn_debug = 'Y') THEN
364: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
365: END IF;
366:
367: IF (g_asn_debug = 'Y') THEN
368: asn_debug.put_line('open shipments and fetch');

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

363: IF (g_asn_debug = 'Y') THEN
364: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
365: END IF;
366:
367: IF (g_asn_debug = 'Y') THEN
368: asn_debug.put_line('open shipments and fetch');
369: END IF;
370:
371: /*

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

364: asn_debug.put_line('remaining quantity asn uom ' || TO_CHAR(x_remaining_quantity));
365: END IF;
366:
367: IF (g_asn_debug = 'Y') THEN
368: asn_debug.put_line('open shipments and fetch');
369: END IF;
370:
371: /*
372: ** fetch the cursor

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

371: /*
372: ** fetch the cursor
373: */
374: --{
375: IF (g_asn_debug = 'Y') THEN
376: asn_debug.put_line('fetching shipments cursor');
377: END IF;
378:
379: FETCH shipments INTO x_shipmentrec;

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

372: ** fetch the cursor
373: */
374: --{
375: IF (g_asn_debug = 'Y') THEN
376: asn_debug.put_line('fetching shipments cursor');
377: END IF;
378:
379: FETCH shipments INTO x_shipmentrec;
380:

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

386: END IF;
387:
388: rows_fetched := shipments%ROWCOUNT;
389:
390: IF (g_asn_debug = 'Y') THEN
391: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
392: END IF;
393:
394: -- }

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

387:
388: rows_fetched := shipments%ROWCOUNT;
389:
390: IF (g_asn_debug = 'Y') THEN
391: asn_debug.put_line('shipment rows fetched ' || TO_CHAR(rows_fetched));
392: END IF;
393:
394: -- }
395:

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

395:
396:
397: IF ( lastrecord
398: OR x_remaining_quantity <= 0) THEN --{
399: IF (g_asn_debug = 'Y') THEN
400: asn_debug.put_line('hit exit condition');
401: END IF;
402:
403: IF NOT x_first_trans THEN

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

396:
397: IF ( lastrecord
398: OR x_remaining_quantity <= 0) THEN --{
399: IF (g_asn_debug = 'Y') THEN
400: asn_debug.put_line('hit exit condition');
401: END IF;
402:
403: IF NOT x_first_trans THEN
404: -- x_first_trans has been reset which means some cascade has

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

406: current_n := current_n - 1;
407: END IF;
408:
409: -- do the tolerance act here
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
412: asn_debug.put_line('check which condition has occured');
413: END IF;
414:

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

407: END IF;
408:
409: -- do the tolerance act here
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
412: asn_debug.put_line('check which condition has occured');
413: END IF;
414:
415: -- lastrecord...we have run out of rows and we still have quantity to allocate

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

408:
409: -- do the tolerance act here
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('temp table pointer ' || TO_CHAR(current_n));
412: asn_debug.put_line('check which condition has occured');
413: END IF;
414:
415: -- lastrecord...we have run out of rows and we still have quantity to allocate
416: IF x_remaining_quantity > 0 THEN --{

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

413: END IF;
414:
415: -- lastrecord...we have run out of rows and we still have quantity to allocate
416: IF x_remaining_quantity > 0 THEN --{
417: IF (g_asn_debug = 'Y') THEN
418: asn_debug.put_line('There is quantity remaining');
419: asn_debug.put_line('Need to check qty tolerances');
420: END IF;
421:

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

414:
415: -- lastrecord...we have run out of rows and we still have quantity to allocate
416: IF x_remaining_quantity > 0 THEN --{
417: IF (g_asn_debug = 'Y') THEN
418: asn_debug.put_line('There is quantity remaining');
419: asn_debug.put_line('Need to check qty tolerances');
420: END IF;
421:
422: IF rows_fetched > 0

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

415: -- lastrecord...we have run out of rows and we still have quantity to allocate
416: IF x_remaining_quantity > 0 THEN --{
417: IF (g_asn_debug = 'Y') THEN
418: asn_debug.put_line('There is quantity remaining');
419: asn_debug.put_line('Need to check qty tolerances');
420: END IF;
421:
422: IF rows_fetched > 0
423: AND NOT x_first_trans THEN --{

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

420: END IF;
421:
422: IF rows_fetched > 0
423: AND NOT x_first_trans THEN --{
424: IF (g_asn_debug = 'Y') THEN
425: asn_debug.put_line(' in inter org transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
426: END IF;
427:
428: IF (g_asn_debug = 'Y') THEN

Line 425: asn_debug.put_line(' in inter org transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));

421:
422: IF rows_fetched > 0
423: AND NOT x_first_trans THEN --{
424: IF (g_asn_debug = 'Y') THEN
425: asn_debug.put_line(' in inter org transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
426: END IF;
427:
428: IF (g_asn_debug = 'Y') THEN
429: asn_debug.put_line('delete the temp table ');

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

424: IF (g_asn_debug = 'Y') THEN
425: asn_debug.put_line(' in inter org transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
426: END IF;
427:
428: IF (g_asn_debug = 'Y') THEN
429: asn_debug.put_line('delete the temp table ');
430: END IF;
431:
432: IF temp_cascaded_table.COUNT > 0 THEN

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

425: asn_debug.put_line(' in inter org transfer rcv Extra Quantity ' || TO_CHAR(x_remaining_quantity));
426: END IF;
427:
428: IF (g_asn_debug = 'Y') THEN
429: asn_debug.put_line('delete the temp table ');
430: END IF;
431:
432: IF temp_cascaded_table.COUNT > 0 THEN
433: FOR i IN 1 .. temp_cascaded_table.COUNT LOOP

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

434: temp_cascaded_table.DELETE(i);
435: END LOOP;
436: END IF;
437:
438: IF (g_asn_debug = 'Y') THEN
439: asn_debug.put_line('mark the actual table with error status');
440: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;

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

435: END LOOP;
436: END IF;
437:
438: IF (g_asn_debug = 'Y') THEN
439: asn_debug.put_line('mark the actual table with error status');
440: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;
443:

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

436: END IF;
437:
438: IF (g_asn_debug = 'Y') THEN
439: asn_debug.put_line('mark the actual table with error status');
440: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;
443:
444: IF (g_asn_debug = 'Y') THEN

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

437:
438: IF (g_asn_debug = 'Y') THEN
439: asn_debug.put_line('mark the actual table with error status');
440: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;
443:
444: IF (g_asn_debug = 'Y') THEN
445: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');

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

440: asn_debug.put_line('Error Status ' || x_cascaded_table(n).error_status);
441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;
443:
444: IF (g_asn_debug = 'Y') THEN
445: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
446: END IF;
447:
448: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

441: asn_debug.put_line('Error message ' || x_cascaded_table(n).error_message);
442: END IF;
443:
444: IF (g_asn_debug = 'Y') THEN
445: asn_debug.put_line('Need to insert a row into po_interface_errors for transfer');
446: END IF;
447:
448: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
449: rcv_error_pkg.set_error_message('RCV_SHIP_QTY_OVER_TOLERANCE', x_cascaded_table(n).error_message);

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

451: rcv_error_pkg.set_token('QTY_B', x_cascaded_table(n).quantity - x_remaining_quantity);
452: rcv_error_pkg.log_interface_error('QUANTITY');
453: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
454: IF rows_fetched = 0 THEN
455: IF (g_asn_debug = 'Y') THEN
456: asn_debug.put_line('No rows were retrieved from cursor.');
457: END IF;
458: ELSIF x_first_trans THEN
459: IF (g_asn_debug = 'Y') THEN

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

452: rcv_error_pkg.log_interface_error('QUANTITY');
453: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
454: IF rows_fetched = 0 THEN
455: IF (g_asn_debug = 'Y') THEN
456: asn_debug.put_line('No rows were retrieved from cursor.');
457: END IF;
458: ELSIF x_first_trans THEN
459: IF (g_asn_debug = 'Y') THEN
460: asn_debug.put_line('No rows were cascaded');

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

455: IF (g_asn_debug = 'Y') THEN
456: asn_debug.put_line('No rows were retrieved from cursor.');
457: END IF;
458: ELSIF x_first_trans THEN
459: IF (g_asn_debug = 'Y') THEN
460: asn_debug.put_line('No rows were cascaded');
461: END IF;
462: END IF;
463:

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

456: asn_debug.put_line('No rows were retrieved from cursor.');
457: END IF;
458: ELSIF x_first_trans THEN
459: IF (g_asn_debug = 'Y') THEN
460: asn_debug.put_line('No rows were cascaded');
461: END IF;
462: END IF;
463:
464: -- 1) should we check to see why no rows were fetched ??

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

480: -- all the rows in the temp cascaded table
481: -- will be deleted
482: -- as we cannot over/under receive against a inter-org transfer receive
483: ELSE -- }{
484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
486: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
487: END IF;
488: END IF; --} ends the check for whether last record has been reached

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

481: -- will be deleted
482: -- as we cannot over/under receive against a inter-org transfer receive
483: ELSE -- }{
484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
486: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
487: END IF;
488: END IF; --} ends the check for whether last record has been reached
489:

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

482: -- as we cannot over/under receive against a inter-org transfer receive
483: ELSE -- }{
484: IF (g_asn_debug = 'Y') THEN
485: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
486: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
487: END IF;
488: END IF; --} ends the check for whether last record has been reached
489:
490: -- close cursors

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

488: END IF; --} ends the check for whether last record has been reached
489:
490: -- close cursors
491:
492: IF (g_asn_debug = 'Y') THEN
493: asn_debug.put_line('close cursors shipments, count_shipments');
494: END IF;
495:
496: IF shipments%ISOPEN THEN

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

489:
490: -- close cursors
491:
492: IF (g_asn_debug = 'Y') THEN
493: asn_debug.put_line('close cursors shipments, count_shipments');
494: END IF;
495:
496: IF shipments%ISOPEN THEN
497: CLOSE shipments;

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

505: END IF; --} matches lastrecord or x_remaining_quantity <= 0
506:
507: -- eliminate the row if it fails the date check
508:
509: IF (g_asn_debug = 'Y') THEN
510: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
511: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
512: asn_debug.put_line('int org rcv : calling get available qty');
513: END IF;

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

506:
507: -- eliminate the row if it fails the date check
508:
509: IF (g_asn_debug = 'Y') THEN
510: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
511: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
512: asn_debug.put_line('int org rcv : calling get available qty');
513: END IF;
514:

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

507: -- eliminate the row if it fails the date check
508:
509: IF (g_asn_debug = 'Y') THEN
510: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
511: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
512: asn_debug.put_line('int org rcv : calling get available qty');
513: END IF;
514:
515: -- removed rcv_transactions_interface_sv.check_date_tolerance;

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

508:
509: IF (g_asn_debug = 'Y') THEN
510: asn_debug.put_line('count in temp_cascade_table : ' || TO_CHAR(temp_cascaded_table.COUNT));
511: asn_debug.put_line('cursor record ' || TO_CHAR(rows_fetched));
512: asn_debug.put_line('int org rcv : calling get available qty');
513: END IF;
514:
515: -- removed rcv_transactions_interface_sv.check_date_tolerance;
516: -- removed check shipto_location enforcement

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

534: ** that is available for allocation by this interface transaction
535: ** the available qty can only be found from rsl
536: ** the else condition should never arise : confirm from priya ??
537: */
538: IF (g_asn_debug = 'Y') THEN
539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));

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

535: ** the available qty can only be found from rsl
536: ** the else condition should never arise : confirm from priya ??
537: */
538: IF (g_asn_debug = 'Y') THEN
539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
543: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);

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

536: ** the else condition should never arise : confirm from priya ??
537: */
538: IF (g_asn_debug = 'Y') THEN
539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
543: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
544: END IF;

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

537: */
538: IF (g_asn_debug = 'Y') THEN
539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
543: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
544: END IF;
545:

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

538: IF (g_asn_debug = 'Y') THEN
539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
543: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
544: END IF;
545:
546: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'

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

539: asn_debug.put_line('shipment line id : ' || TO_CHAR(x_shipmentrec.shipment_line_id));
540: asn_debug.put_line('uom ' || x_shipmentrec.unit_of_measure);
541: asn_debug.put_line('converted trx qty : ' || TO_CHAR(x_converted_trx_qty));
542: asn_debug.put_line('tolerable qty : ' || TO_CHAR(x_tolerable_qty));
543: asn_debug.put_line('receipt source code' || x_cascaded_table(n).receipt_source_code);
544: END IF;
545:
546: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'
547: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') IN('RECEIVE', 'DELIVER')) THEN --{

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

577: END LOOP;
578: END IF;
579: END IF; --}
580:
581: IF (g_asn_debug = 'Y') THEN
582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

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

578: END IF;
579: END IF; --}
580:
581: IF (g_asn_debug = 'Y') THEN
582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
586: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);

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

579: END IF; --}
580:
581: IF (g_asn_debug = 'Y') THEN
582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
586: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
587: END IF;

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

580:
581: IF (g_asn_debug = 'Y') THEN
582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
586: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
587: END IF;
588:

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

581: IF (g_asn_debug = 'Y') THEN
582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
586: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
587: END IF;
588:
589: -- if qty has already been allocated then reduce available and tolerable

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

582: asn_debug.put_line('after call to get_available quantity');
583: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
584: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
585: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
586: asn_debug.put_line(' Already allocated qty now in terms of shipment rec uom is ' || already_allocated_qty);
587: END IF;
588:
589: -- if qty has already been allocated then reduce available and tolerable
590: -- qty by the allocated amount

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

600: IF x_tolerable_qty < 0 THEN
601: x_tolerable_qty := 0;
602: END IF;
603:
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));

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

601: x_tolerable_qty := 0;
602: END IF;
603:
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));

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

602: END IF;
603:
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
610: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));

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

603:
604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
610: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
611: END IF;

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

604: IF (g_asn_debug = 'Y') THEN
605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
610: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
611: END IF;
612: END IF; --}

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

605: asn_debug.put_line('have some allocated quantity. will reduce qty');
606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
610: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
611: END IF;
612: END IF; --}
613:

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

606: asn_debug.put_line('allocated qty ' || TO_CHAR(already_allocated_qty));
607: asn_debug.put_line('after reducing by allocated qty');
608: asn_debug.put_line('available quantity ' || TO_CHAR(x_converted_trx_qty));
609: asn_debug.put_line('tolerable quantity ' || TO_CHAR(x_tolerable_qty));
610: asn_debug.put_line('pointer to temp table ' || TO_CHAR(current_n));
611: END IF;
612: END IF; --}
613:
614: -- we can use the first record since the item_id and uom are not going to change

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

624: x_shipmentrec.unit_of_measure
625: );
626:
627: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
628: IF (g_asn_debug = 'Y') THEN
629: asn_debug.put_line('need an error message in the interface tables');
630: asn_debug.put_line('cannot interconvert between diff uoms');
631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {

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

625: );
626:
627: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
628: IF (g_asn_debug = 'Y') THEN
629: asn_debug.put_line('need an error message in the interface tables');
630: asn_debug.put_line('cannot interconvert between diff uoms');
631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN

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

626:
627: IF x_remaining_qty_rsl_uom = 0 THEN --{ -- no point continuing
628: IF (g_asn_debug = 'Y') THEN
629: asn_debug.put_line('need an error message in the interface tables');
630: asn_debug.put_line('cannot interconvert between diff uoms');
631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));

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

629: asn_debug.put_line('need an error message in the interface tables');
630: asn_debug.put_line('cannot interconvert between diff uoms');
631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
635: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
636: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
637: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));

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

630: asn_debug.put_line('cannot interconvert between diff uoms');
631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
635: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
636: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
637: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
638: END IF;

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

631: END IF;
632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
635: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
636: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
637: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
638: END IF;
639:

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

632: ELSE -- we have converted the qty between uoms succesfully } {
633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
635: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
636: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
637: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
638: END IF;
639:
640: IF x_converted_trx_qty > 0 THEN --{

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

633: IF (g_asn_debug = 'Y') THEN
634: asn_debug.put_line('current item id ' || TO_CHAR(temp_cascaded_table(1).item_id));
635: asn_debug.put_line('current asn quantity ' || TO_CHAR(x_remaining_quantity));
636: asn_debug.put_line('current asn uom ' || temp_cascaded_table(1).unit_of_measure);
637: asn_debug.put_line('converted rsl uom quantity ' || TO_CHAR(x_remaining_qty_rsl_uom));
638: END IF;
639:
640: IF x_converted_trx_qty > 0 THEN --{
641: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {

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

638: END IF;
639:
640: IF x_converted_trx_qty > 0 THEN --{
641: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
642: IF (g_asn_debug = 'Y') THEN
643: asn_debug.put_line('total qty available to be received is less than remaining qty');
644: END IF;
645:
646: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;

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

639:
640: IF x_converted_trx_qty > 0 THEN --{
641: IF (x_converted_trx_qty < x_remaining_qty_rsl_uom) THEN -- compare like uoms {
642: IF (g_asn_debug = 'Y') THEN
643: asn_debug.put_line('total qty available to be received is less than remaining qty');
644: END IF;
645:
646: x_remaining_qty_rsl_uom := x_remaining_qty_rsl_uom - x_converted_trx_qty;
647: -- change rsl uom qty to uom of first line in cascaded table so both qtys are in sync

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

651: temp_cascaded_table(1).unit_of_measure
652: );
653: insert_into_table := TRUE;
654: ELSE --} {
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('total qty available to be received is > remaining qty ');
657: END IF;
658:
659: x_converted_trx_qty := x_remaining_qty_rsl_uom;

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

652: );
653: insert_into_table := TRUE;
654: ELSE --} {
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('total qty available to be received is > remaining qty ');
657: END IF;
658:
659: x_converted_trx_qty := x_remaining_qty_rsl_uom;
660: insert_into_table := TRUE;

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

663: END IF; --}
664: ELSE -- no qty for this record but if last row we need it } {
665: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
666: -- so that the row can be used based on qty tolerance checks
667: IF (g_asn_debug = 'Y') THEN
668: asn_debug.put_line('quantity is less then 0 but last record');
669: END IF;
670:
671: insert_into_table := TRUE;

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

664: ELSE -- no qty for this record but if last row we need it } {
665: IF rows_fetched = x_record_count THEN --{ last row needs to be inserted anyway
666: -- so that the row can be used based on qty tolerance checks
667: IF (g_asn_debug = 'Y') THEN
668: asn_debug.put_line('quantity is less then 0 but last record');
669: END IF;
670:
671: insert_into_table := TRUE;
672: x_converted_trx_qty := 0;

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

670:
671: insert_into_table := TRUE;
672: x_converted_trx_qty := 0;
673: ELSE --} {
674: IF (g_asn_debug = 'Y') THEN
675: asn_debug.put_line('<= 0 quantity but more records in cursor');
676: END IF;
677:
678: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

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

671: insert_into_table := TRUE;
672: x_converted_trx_qty := 0;
673: ELSE --} {
674: IF (g_asn_debug = 'Y') THEN
675: asn_debug.put_line('<= 0 quantity but more records in cursor');
676: END IF;
677:
678: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
679:

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

676: END IF;
677:
678: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
679:
680: IF (g_asn_debug = 'Y') THEN
681: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
682: END IF;
683:
684: insert_into_table := FALSE;

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

677:
678: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
679:
680: IF (g_asn_debug = 'Y') THEN
681: asn_debug.put_line('we have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
682: END IF;
683:
684: insert_into_table := FALSE;
685: END IF; --}

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

687: END IF; --} remaining_qty_po_uom <> 0
688:
689: IF insert_into_table THEN --{
690: IF (x_first_trans) THEN --{
691: IF (g_asn_debug = 'Y') THEN
692: asn_debug.put_line('first time ' || TO_CHAR(current_n));
693: END IF;
694:
695: x_first_trans := FALSE;

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

688:
689: IF insert_into_table THEN --{
690: IF (x_first_trans) THEN --{
691: IF (g_asn_debug = 'Y') THEN
692: asn_debug.put_line('first time ' || TO_CHAR(current_n));
693: END IF;
694:
695: x_first_trans := FALSE;
696: ELSE --} { not x_first_trans

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

693: END IF;
694:
695: x_first_trans := FALSE;
696: ELSE --} { not x_first_trans
697: IF (g_asn_debug = 'Y') THEN
698: asn_debug.put_line('next time ' || TO_CHAR(current_n));
699: END IF;
700:
701: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

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

694:
695: x_first_trans := FALSE;
696: ELSE --} { not x_first_trans
697: IF (g_asn_debug = 'Y') THEN
698: asn_debug.put_line('next time ' || TO_CHAR(current_n));
699: END IF;
700:
701: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
702: END IF; --} matches x_first_transfer

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

727: ELSE
728: temp_cascaded_table(current_n).quantity := x_converted_trx_qty;
729: END IF;
730:
731: IF (g_asn_debug = 'Y') THEN
732: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
733: END IF;
734:
735: -- primary qty in primary uom

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

728: temp_cascaded_table(current_n).quantity := x_converted_trx_qty;
729: END IF;
730:
731: IF (g_asn_debug = 'Y') THEN
732: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
733: END IF;
734:
735: -- primary qty in primary uom
736: IF (temp_cascaded_table(current_n).primary_unit_of_measure <> x_shipmentrec.unit_of_measure) THEN

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

751: );*/
752: ELSE
753: temp_cascaded_table(current_n).primary_quantity := x_converted_trx_qty;
754:
755: IF (g_asn_debug = 'Y') THEN
756: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
757: END IF;
758:
759: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';

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

752: ELSE
753: temp_cascaded_table(current_n).primary_quantity := x_converted_trx_qty;
754:
755: IF (g_asn_debug = 'Y') THEN
756: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
757: END IF;
758:
759: temp_cascaded_table(current_n).inspection_status_code := 'NOT INSPECTED';
760: temp_cascaded_table(current_n).interface_source_code := 'RCV';

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

760: temp_cascaded_table(current_n).interface_source_code := 'RCV';
761: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
762: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
763:
764: IF (g_asn_debug = 'Y') THEN
765: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
766: END IF;
767:
768: -- confirm the data in rsh and rsl for the provided info

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

761: -- temp_cascaded_table(current_n).currency_code := x_shipmentrec.currency_code;
762: temp_cascaded_table(current_n).tax_amount := ROUND(temp_cascaded_table(current_n).quantity * tax_amount_factor, 4);
763:
764: IF (g_asn_debug = 'Y') THEN
765: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
766: END IF;
767:
768: -- confirm the data in rsh and rsl for the provided info
769: IF (g_asn_debug = 'Y') THEN

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

765: asn_debug.put_line('current tax amount ' || TO_CHAR(temp_cascaded_table(current_n).tax_amount));
766: END IF;
767:
768: -- confirm the data in rsh and rsl for the provided info
769: IF (g_asn_debug = 'Y') THEN
770: asn_debug.put_line( 'rsl : cat '
771: || x_shipmentrec.category_id
772: || ' item desc '
773: || x_shipmentrec.item_description

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

766: END IF;
767:
768: -- confirm the data in rsh and rsl for the provided info
769: IF (g_asn_debug = 'Y') THEN
770: asn_debug.put_line( 'rsl : cat '
771: || x_shipmentrec.category_id
772: || ' item desc '
773: || x_shipmentrec.item_description
774: || ' header '

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

834: EXCEPTION
835: WHEN NO_DATA_FOUND THEN
836: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('the deliver to person entered in po is currently inactive');
840: asn_debug.put_line(' so it is cleared off');
841: END IF;
842: WHEN OTHERS THEN

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

835: WHEN NO_DATA_FOUND THEN
836: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('the deliver to person entered in po is currently inactive');
840: asn_debug.put_line(' so it is cleared off');
841: END IF;
842: WHEN OTHERS THEN
843: temp_cascaded_table(current_n).deliver_to_person_id := NULL;

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

836: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
837:
838: IF (g_asn_debug = 'Y') THEN
839: asn_debug.put_line('the deliver to person entered in po is currently inactive');
840: asn_debug.put_line(' so it is cleared off');
841: END IF;
842: WHEN OTHERS THEN
843: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
844:

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

841: END IF;
842: WHEN OTHERS THEN
843: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
844:
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('some exception has occured');
847: asn_debug.put_line('this exception is due to the po deliver to person');
848: asn_debug.put_line('the deliver to person is optional');
849: asn_debug.put_line('so cleared off the deliver to person');

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

842: WHEN OTHERS THEN
843: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
844:
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('some exception has occured');
847: asn_debug.put_line('this exception is due to the po deliver to person');
848: asn_debug.put_line('the deliver to person is optional');
849: asn_debug.put_line('so cleared off the deliver to person');
850: END IF;

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

843: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
844:
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('some exception has occured');
847: asn_debug.put_line('this exception is due to the po deliver to person');
848: asn_debug.put_line('the deliver to person is optional');
849: asn_debug.put_line('so cleared off the deliver to person');
850: END IF;
851: END;

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

844:
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('some exception has occured');
847: asn_debug.put_line('this exception is due to the po deliver to person');
848: asn_debug.put_line('the deliver to person is optional');
849: asn_debug.put_line('so cleared off the deliver to person');
850: END IF;
851: END;
852: END IF; --}

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

845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('some exception has occured');
847: asn_debug.put_line('this exception is due to the po deliver to person');
848: asn_debug.put_line('the deliver to person is optional');
849: asn_debug.put_line('so cleared off the deliver to person');
850: END IF;
851: END;
852: END IF; --}
853: END IF; --}

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

863: END IF; --} matches txn not deliver
864:
865: current_n := current_n + 1;
866:
867: IF (g_asn_debug = 'Y') THEN
868: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
869: END IF;
870: END IF; --} matches if insert into table
871: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none

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

864:
865: current_n := current_n + 1;
866:
867: IF (g_asn_debug = 'Y') THEN
868: asn_debug.put_line('increment pointer by 1 ' || TO_CHAR(current_n));
869: END IF;
870: END IF; --} matches if insert into table
871: END IF; --} matches shipmentdistributionrec.receipt_days_exception_code = none
872: END LOOP; --}

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

878: IF count_shipments%ISOPEN THEN
879: CLOSE count_shipments;
880: END IF;
881:
882: IF (g_asn_debug = 'Y') THEN
883: asn_debug.put_line('exit derive_int_org_rcv_line_qty');
884: END IF;
885: EXCEPTION
886: WHEN rcv_error_pkg.e_fatal_error THEN

Line 883: asn_debug.put_line('exit derive_int_org_rcv_line_qty');

879: CLOSE count_shipments;
880: END IF;
881:
882: IF (g_asn_debug = 'Y') THEN
883: asn_debug.put_line('exit derive_int_org_rcv_line_qty');
884: END IF;
885: EXCEPTION
886: WHEN rcv_error_pkg.e_fatal_error THEN
887: IF shipments%ISOPEN THEN

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

904: rcv_error_pkg.set_sql_error_message('derive_int_org_rcv_line_qty', x_progress);
905: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
906: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
907:
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line(TO_CHAR(n));
910: asn_debug.put_line(SQLERRM);
911: asn_debug.put_line('error ' || x_progress);
912: END IF;

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

905: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
906: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
907:
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line(TO_CHAR(n));
910: asn_debug.put_line(SQLERRM);
911: asn_debug.put_line('error ' || x_progress);
912: END IF;
913: END derive_int_org_rcv_line_qty;

Line 910: asn_debug.put_line(SQLERRM);

906: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
907:
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line(TO_CHAR(n));
910: asn_debug.put_line(SQLERRM);
911: asn_debug.put_line('error ' || x_progress);
912: END IF;
913: END derive_int_org_rcv_line_qty;
914:

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

907:
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line(TO_CHAR(n));
910: asn_debug.put_line(SQLERRM);
911: asn_debug.put_line('error ' || x_progress);
912: END IF;
913: END derive_int_org_rcv_line_qty;
914:
915: PROCEDURE default_int_org_rcv_line(

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

968: x_cascaded_table(n).auto_transact_code := p_trx_record.auto_transact_code;
969: x_cascaded_table(n).destination_context := x_cascaded_table(n).destination_type_code;
970:
971: --open the cursor
972: IF (g_asn_debug = 'Y') THEN
973: asn_debug.put_line('default_int_org_rcv : defaulting called with shipment_header = ' || x_cascaded_table(n).shipment_header_id || ' and shipment_line = ' || x_cascaded_table(n).shipment_line_id);
974: END IF;
975:
976: OPEN shipments(x_cascaded_table(n).shipment_header_id, x_cascaded_table(n).shipment_line_id);

Line 973: asn_debug.put_line('default_int_org_rcv : defaulting called with shipment_header = ' || x_cascaded_table(n).shipment_header_id || ' and shipment_line = ' || x_cascaded_table(n).shipment_line_id);

969: x_cascaded_table(n).destination_context := x_cascaded_table(n).destination_type_code;
970:
971: --open the cursor
972: IF (g_asn_debug = 'Y') THEN
973: asn_debug.put_line('default_int_org_rcv : defaulting called with shipment_header = ' || x_cascaded_table(n).shipment_header_id || ' and shipment_line = ' || x_cascaded_table(n).shipment_line_id);
974: END IF;
975:
976: OPEN shipments(x_cascaded_table(n).shipment_header_id, x_cascaded_table(n).shipment_line_id);
977:

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

1015: -- if receive transaction
1016: -- location has to be entered and the location_id is always = ship_to_location_id : cannot be defaulted
1017: -- deliver to location id and deliver to person id do not have to be defaulted
1018:
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('should have defaulted the location id to the ship to location id');
1021: asn_debug.put_line('ship_to_loc ' || x_cascaded_table(n).ship_to_location_id || ' loc ' || NVL(x_cascaded_table(n).location_id, -1) || ' txn ' || x_cascaded_table(n).transaction_type || ' txn code ' || x_cascaded_table(n).auto_transact_code);
1022: END IF;
1023:

Line 1020: asn_debug.put_line('should have defaulted the location id to the ship to location id');

1016: -- location has to be entered and the location_id is always = ship_to_location_id : cannot be defaulted
1017: -- deliver to location id and deliver to person id do not have to be defaulted
1018:
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('should have defaulted the location id to the ship to location id');
1021: asn_debug.put_line('ship_to_loc ' || x_cascaded_table(n).ship_to_location_id || ' loc ' || NVL(x_cascaded_table(n).location_id, -1) || ' txn ' || x_cascaded_table(n).transaction_type || ' txn code ' || x_cascaded_table(n).auto_transact_code);
1022: END IF;
1023:
1024: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'

Line 1021: asn_debug.put_line('ship_to_loc ' || x_cascaded_table(n).ship_to_location_id || ' loc ' || NVL(x_cascaded_table(n).location_id, -1) || ' txn ' || x_cascaded_table(n).transaction_type || ' txn code ' || x_cascaded_table(n).auto_transact_code);

1017: -- deliver to location id and deliver to person id do not have to be defaulted
1018:
1019: IF (g_asn_debug = 'Y') THEN
1020: asn_debug.put_line('should have defaulted the location id to the ship to location id');
1021: asn_debug.put_line('ship_to_loc ' || x_cascaded_table(n).ship_to_location_id || ' loc ' || NVL(x_cascaded_table(n).location_id, -1) || ' txn ' || x_cascaded_table(n).transaction_type || ' txn code ' || x_cascaded_table(n).auto_transact_code);
1022: END IF;
1023:
1024: IF ( x_cascaded_table(n).transaction_type = 'RECEIVE'
1025: AND x_cascaded_table(n).auto_transact_code = 'RECEIVE') THEN --{

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

1063: IF (x_cascaded_table(n).source_document_code IS NULL) THEN
1064: x_cascaded_table(n).source_document_code := 'INVENTORY';
1065: END IF;
1066:
1067: IF (g_asn_debug = 'Y') THEN
1068: asn_debug.put_line('Exit default_int_org_rcv_line');
1069: END IF;
1070:
1071: IF shipments%ISOPEN THEN

Line 1068: asn_debug.put_line('Exit default_int_org_rcv_line');

1064: x_cascaded_table(n).source_document_code := 'INVENTORY';
1065: END IF;
1066:
1067: IF (g_asn_debug = 'Y') THEN
1068: asn_debug.put_line('Exit default_int_org_rcv_line');
1069: END IF;
1070:
1071: IF shipments%ISOPEN THEN
1072: CLOSE shipments;

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

1081: n IN BINARY_INTEGER,
1082: x_header_record IN rcv_roi_preprocessor.header_rec_type
1083: ) IS
1084: BEGIN
1085: IF (g_asn_debug = 'Y') THEN
1086: asn_debug.put_line('Enter validate_int_org_rcv_line');
1087: END IF;
1088:
1089: x_progress := '000';

Line 1086: asn_debug.put_line('Enter validate_int_org_rcv_line');

1082: x_header_record IN rcv_roi_preprocessor.header_rec_type
1083: ) IS
1084: BEGIN
1085: IF (g_asn_debug = 'Y') THEN
1086: asn_debug.put_line('Enter validate_int_org_rcv_line');
1087: END IF;
1088:
1089: x_progress := '000';
1090: rcv_roi_transaction.validate_shipment_source(x_cascaded_table, n); /* bug9705269 */

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

1156: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
1157: x_header_record IN rcv_roi_preprocessor.header_rec_type
1158: ) IS
1159: BEGIN
1160: IF (g_asn_debug = 'Y') THEN
1161: asn_debug.put_line('enter derive_int_org_trans_del ');
1162: END IF;
1163:
1164: /* Derive the to_org_id */

Line 1161: asn_debug.put_line('enter derive_int_org_trans_del ');

1157: x_header_record IN rcv_roi_preprocessor.header_rec_type
1158: ) IS
1159: BEGIN
1160: IF (g_asn_debug = 'Y') THEN
1161: asn_debug.put_line('enter derive_int_org_trans_del ');
1162: END IF;
1163:
1164: /* Derive the to_org_id */
1165: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,

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

1167: x_header_record
1168: );
1169:
1170: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
1171: IF (g_asn_debug = 'Y') THEN
1172: asn_debug.put_line('X_progress ' || x_progress);
1173: END IF;
1174:
1175: SELECT muom.uom_code

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

1168: );
1169:
1170: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
1171: IF (g_asn_debug = 'Y') THEN
1172: asn_debug.put_line('X_progress ' || x_progress);
1173: END IF;
1174:
1175: SELECT muom.uom_code
1176: INTO x_cascaded_table(n).uom_code

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

1176: INTO x_cascaded_table(n).uom_code
1177: FROM mtl_units_of_measure muom
1178: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
1179: ELSE
1180: IF (g_asn_debug = 'Y') THEN
1181: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
1182: END IF;
1183: END IF;
1184:

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

1177: FROM mtl_units_of_measure muom
1178: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
1179: ELSE
1180: IF (g_asn_debug = 'Y') THEN
1181: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
1182: END IF;
1183: END IF;
1184:
1185: x_progress := '026';

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

1188: * project. Need to verify this with karun to see whether this is
1189: * needed for Transfer also.
1190: */
1191: IF (x_cascaded_table(n).transaction_type = 'TRANSFER') THEN
1192: asn_debug.put_line('doing ship to location /locator derivations ');
1193: rcv_roi_transaction.derive_location_info(x_cascaded_table, n);
1194: rcv_roi_transaction.derive_from_locator_id(x_cascaded_table, n); -- WMS Change
1195: rcv_roi_transaction.derive_to_locator_id(x_cascaded_table, n); -- WMS Change
1196: END IF;

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

1308: x_cascaded_table(n).processing_status_code := p_trx_record.processing_status_code;
1309: x_cascaded_table(n).transaction_status_code := p_trx_record.transaction_status_code;
1310: x_cascaded_table(n).auto_transact_code := p_trx_record.auto_transact_code;
1311:
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('Enter Default int org transfer');
1314: END IF;
1315:
1316: IF (x_cascaded_table(n).derive = 'Y') THEN --{

Line 1313: asn_debug.put_line('Enter Default int org transfer');

1309: x_cascaded_table(n).transaction_status_code := p_trx_record.transaction_status_code;
1310: x_cascaded_table(n).auto_transact_code := p_trx_record.auto_transact_code;
1311:
1312: IF (g_asn_debug = 'Y') THEN
1313: asn_debug.put_line('Enter Default int org transfer');
1314: END IF;
1315:
1316: IF (x_cascaded_table(n).derive = 'Y') THEN --{
1317: IF (x_cascaded_table(n).derive_index <> 0) THEN --{

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

1359: x_cascaded_table(n).subinventory := x_cascaded_table(temp_index).subinventory;
1360: END IF;
1361: END IF; --}
1362: ELSE --} {
1363: IF (g_asn_debug = 'Y') THEN
1364: asn_debug.put_line('open cursor Default');
1365: END IF;
1366:
1367: OPEN int_org_transfer_rti(x_cascaded_table(n).parent_interface_txn_id);

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

1360: END IF;
1361: END IF; --}
1362: ELSE --} {
1363: IF (g_asn_debug = 'Y') THEN
1364: asn_debug.put_line('open cursor Default');
1365: END IF;
1366:
1367: OPEN int_org_transfer_rti(x_cascaded_table(n).parent_interface_txn_id);
1368: END IF; --}

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

1370: OPEN int_org_transfer(x_cascaded_table(n).parent_transaction_id);
1371: END IF; --}
1372:
1373: IF (int_org_transfer%ISOPEN) THEN
1374: IF (g_asn_debug = 'Y') THEN
1375: asn_debug.put_line('fetch cursor Default');
1376: END IF;
1377:
1378: FETCH int_org_transfer INTO default_int_org_transfer_info;

Line 1375: asn_debug.put_line('fetch cursor Default');

1371: END IF; --}
1372:
1373: IF (int_org_transfer%ISOPEN) THEN
1374: IF (g_asn_debug = 'Y') THEN
1375: asn_debug.put_line('fetch cursor Default');
1376: END IF;
1377:
1378: FETCH int_org_transfer INTO default_int_org_transfer_info;
1379: ELSIF(int_org_transfer_rti%ISOPEN) THEN

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

1383: IF ( ( int_org_transfer%ISOPEN
1384: AND int_org_transfer%FOUND)
1385: OR ( int_org_transfer_rti%ISOPEN
1386: AND int_org_transfer_rti%FOUND)) THEN --{
1387: IF (g_asn_debug = 'Y') THEN --{
1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);

Line 1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);

1384: AND int_org_transfer%FOUND)
1385: OR ( int_org_transfer_rti%ISOPEN
1386: AND int_org_transfer_rti%FOUND)) THEN --{
1387: IF (g_asn_debug = 'Y') THEN --{
1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);

Line 1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);

1385: OR ( int_org_transfer_rti%ISOPEN
1386: AND int_org_transfer_rti%FOUND)) THEN --{
1387: IF (g_asn_debug = 'Y') THEN --{
1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);

Line 1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);

1386: AND int_org_transfer_rti%FOUND)) THEN --{
1387: IF (g_asn_debug = 'Y') THEN --{
1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);

Line 1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);

1387: IF (g_asn_debug = 'Y') THEN --{
1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);

Line 1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);

1388: asn_debug.put_line('Defaulting Transfer item_description' || default_int_org_transfer_info.item_description);
1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);

Line 1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);

1389: asn_debug.put_line('Defaulting Transfer organization_id' || default_int_org_transfer_info.organization_id);
1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);

Line 1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);

1390: asn_debug.put_line('Defaulting Transfer inspection_status_code' || default_int_org_transfer_info.inspection_status_code);
1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);

Line 1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);

1391: asn_debug.put_line('Defaulting Transfer routing_header_id' || default_int_org_transfer_info.routing_header_id);
1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);

Line 1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);

1392: asn_debug.put_line('Defaulting Transfer currency_code' || default_int_org_transfer_info.currency_code);
1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);

Line 1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);

1393: asn_debug.put_line('Defaulting Transfer currency_conversion_rate' || default_int_org_transfer_info.currency_conversion_rate);
1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);
1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);

Line 1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);

1394: asn_debug.put_line('Defaulting Transfer currency_conversion_type' || default_int_org_transfer_info.currency_conversion_type);
1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);
1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);
1402: END IF; --}

Line 1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);

1395: asn_debug.put_line('Defaulting Transfer currency_conversion_date' || default_int_org_transfer_info.currency_conversion_date);
1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);
1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);
1402: END IF; --}
1403:

Line 1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);

1396: asn_debug.put_line('Defaulting Transfer shipment_header_id' || default_int_org_transfer_info.shipment_header_id);
1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);
1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);
1402: END IF; --}
1403:
1404: --x_cascaded_table(n).po_revision_num := default_int_org_transfer_info.po_revision_num;

Line 1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);

1397: asn_debug.put_line('Defaulting Transfer shipment_line_id' || default_int_org_transfer_info.shipment_line_id);
1398: asn_debug.put_line('Defaulting Transfer category_id' || default_int_org_transfer_info.category_id);
1399: asn_debug.put_line('Defaulting Transfer DELIVER_TO_PERSON_ID' || default_int_org_transfer_info.deliver_to_person_id);
1400: asn_debug.put_line('Defaulting Transfer DELIVER_TO_LOCATION_ID' || default_int_org_transfer_info.deliver_to_location_id);
1401: asn_debug.put_line('Defaulting Transfer SUBINVENTORY' || default_int_org_transfer_info.subinventory);
1402: END IF; --}
1403:
1404: --x_cascaded_table(n).po_revision_num := default_int_org_transfer_info.po_revision_num;
1405:

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

1494: IF (x_cascaded_table(n).transaction_type = 'DELIVER') THEN
1495: x_cascaded_table(n).location_id := x_cascaded_table(n).deliver_to_location_id;
1496: END IF;
1497:
1498: IF (g_asn_debug = 'Y') THEN
1499: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
1500: END IF;
1501:
1502: IF (g_asn_debug = 'Y') THEN

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

1495: x_cascaded_table(n).location_id := x_cascaded_table(n).deliver_to_location_id;
1496: END IF;
1497:
1498: IF (g_asn_debug = 'Y') THEN
1499: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
1500: END IF;
1501:
1502: IF (g_asn_debug = 'Y') THEN
1503: asn_debug.put_line('Exit default_vendor_trans_del');

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

1498: IF (g_asn_debug = 'Y') THEN
1499: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
1500: END IF;
1501:
1502: IF (g_asn_debug = 'Y') THEN
1503: asn_debug.put_line('Exit default_vendor_trans_del');
1504: END IF;
1505:
1506: IF int_org_transfer%ISOPEN THEN

Line 1503: asn_debug.put_line('Exit default_vendor_trans_del');

1499: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
1500: END IF;
1501:
1502: IF (g_asn_debug = 'Y') THEN
1503: asn_debug.put_line('Exit default_vendor_trans_del');
1504: END IF;
1505:
1506: IF int_org_transfer%ISOPEN THEN
1507: CLOSE int_org_transfer;

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

1625: l_temp_qty NUMBER;
1626: l_pri_temp_qty NUMBER;
1627: --Bug 8631613
1628: BEGIN
1629: IF (g_asn_debug = 'Y') THEN
1630: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
1631: END IF;
1632:
1633: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{

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

1626: l_pri_temp_qty NUMBER;
1627: --Bug 8631613
1628: BEGIN
1629: IF (g_asn_debug = 'Y') THEN
1630: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
1631: END IF;
1632:
1633: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
1634: IF (g_asn_debug = 'Y') THEN

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

1630: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
1631: END IF;
1632:
1633: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('open int_org_transfer table ' || x_cascaded_table(n).parent_transaction_id);
1636: END IF;
1637:
1638: OPEN int_org_transfer(x_cascaded_table(n).parent_transaction_id, x_cascaded_table(n).to_organization_id);

Line 1635: asn_debug.put_line('open int_org_transfer table ' || x_cascaded_table(n).parent_transaction_id);

1631: END IF;
1632:
1633: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
1634: IF (g_asn_debug = 'Y') THEN
1635: asn_debug.put_line('open int_org_transfer table ' || x_cascaded_table(n).parent_transaction_id);
1636: END IF;
1637:
1638: OPEN int_org_transfer(x_cascaded_table(n).parent_transaction_id, x_cascaded_table(n).to_organization_id);
1639: already_derived := TRUE;

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

1651: /* if derive_values_from_table is true, then we derive the values from the pl/sql tables later
1652: * at the time when we try to see which cursor is open. We will have x_cascaded_table(n).
1653: * parent_interface_txn_id) populated with the correct value.
1654: */
1655: IF (g_asn_debug = 'Y') THEN
1656: asn_debug.put_line(' open pl/sql table');
1657: END IF;
1658:
1659: OPEN int_org_transfer_rti(x_cascaded_table(n).parent_interface_txn_id);

Line 1656: asn_debug.put_line(' open pl/sql table');

1652: * at the time when we try to see which cursor is open. We will have x_cascaded_table(n).
1653: * parent_interface_txn_id) populated with the correct value.
1654: */
1655: IF (g_asn_debug = 'Y') THEN
1656: asn_debug.put_line(' open pl/sql table');
1657: END IF;
1658:
1659: OPEN int_org_transfer_rti(x_cascaded_table(n).parent_interface_txn_id);
1660: END IF;

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

1663: /******************************************************************/
1664: --check line quantity > 0
1665: x_progress := '097';
1666:
1667: IF (g_asn_debug = 'Y') THEN
1668: asn_debug.put_line('X_progress ' || x_progress);
1669: END IF;
1670:
1671: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN

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

1664: --check line quantity > 0
1665: x_progress := '097';
1666:
1667: IF (g_asn_debug = 'Y') THEN
1668: asn_debug.put_line('X_progress ' || x_progress);
1669: END IF;
1670:
1671: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
1672: RETURN;

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

1672: RETURN;
1673: END IF;
1674:
1675: IF x_cascaded_table(n).quantity <= 0 THEN --{
1676: IF (g_asn_debug = 'Y') THEN
1677: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
1678: END IF;
1679:
1680: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

1673: END IF;
1674:
1675: IF x_cascaded_table(n).quantity <= 0 THEN --{
1676: IF (g_asn_debug = 'Y') THEN
1677: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
1678: END IF;
1679:
1680: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1681: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

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

1688: -- the asn is consumed. (Cascade)
1689:
1690: x_progress := '098';
1691:
1692: IF (g_asn_debug = 'Y') THEN
1693: asn_debug.put_line('X_progress ' || x_progress);
1694: END IF;
1695:
1696: IF ( x_cascaded_table(n).parent_transaction_id IS NULL

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

1689:
1690: x_progress := '098';
1691:
1692: IF (g_asn_debug = 'Y') THEN
1693: asn_debug.put_line('X_progress ' || x_progress);
1694: END IF;
1695:
1696: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
1697: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN

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

1694: END IF;
1695:
1696: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
1697: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN
1698: IF (g_asn_debug = 'Y') THEN
1699: asn_debug.put_line('No parent transaction found ');
1700: END IF;
1701:
1702: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 1699: asn_debug.put_line('No parent transaction found ');

1695:
1696: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
1697: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN
1698: IF (g_asn_debug = 'Y') THEN
1699: asn_debug.put_line('No parent transaction found ');
1700: END IF;
1701:
1702: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
1703: rcv_error_pkg.set_error_message('RCV_NO_PARENT_TRANSACTION', x_cascaded_table(n).error_message);

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

1704: rcv_error_pkg.log_interface_error('PARENT_TRANSACTION_ID');
1705: END IF;
1706:
1707: -- Copy record from main table to temp table
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line('Copy record from main table to temp table');
1710: END IF;
1711:
1712: current_n := 1;

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

1705: END IF;
1706:
1707: -- Copy record from main table to temp table
1708: IF (g_asn_debug = 'Y') THEN
1709: asn_debug.put_line('Copy record from main table to temp table');
1710: END IF;
1711:
1712: current_n := 1;
1713: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

1712: current_n := 1;
1713: temp_cascaded_table(current_n) := x_cascaded_table(n);
1714:
1715: -- Get all rows which meet this condition
1716: IF (g_asn_debug = 'Y') THEN
1717: asn_debug.put_line('Get all rows which meet this condition');
1718: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
1719: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
1720: END IF;

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

1713: temp_cascaded_table(current_n) := x_cascaded_table(n);
1714:
1715: -- Get all rows which meet this condition
1716: IF (g_asn_debug = 'Y') THEN
1717: asn_debug.put_line('Get all rows which meet this condition');
1718: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
1719: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
1720: END IF;
1721:

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

1714:
1715: -- Get all rows which meet this condition
1716: IF (g_asn_debug = 'Y') THEN
1717: asn_debug.put_line('Get all rows which meet this condition');
1718: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
1719: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
1720: END IF;
1721:
1722: -- Assign shipped quantity to remaining quantity

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

1715: -- Get all rows which meet this condition
1716: IF (g_asn_debug = 'Y') THEN
1717: asn_debug.put_line('Get all rows which meet this condition');
1718: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
1719: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
1720: END IF;
1721:
1722: -- Assign shipped quantity to remaining quantity
1723: IF (g_asn_debug = 'Y') THEN

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

1719: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
1720: END IF;
1721:
1722: -- Assign shipped quantity to remaining quantity
1723: IF (g_asn_debug = 'Y') THEN
1724: asn_debug.put_line('Assign populated quantity to remaining quantity');
1725: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
1726: END IF;
1727:

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

1720: END IF;
1721:
1722: -- Assign shipped quantity to remaining quantity
1723: IF (g_asn_debug = 'Y') THEN
1724: asn_debug.put_line('Assign populated quantity to remaining quantity');
1725: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
1726: END IF;
1727:
1728: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

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

1721:
1722: -- Assign shipped quantity to remaining quantity
1723: IF (g_asn_debug = 'Y') THEN
1724: asn_debug.put_line('Assign populated quantity to remaining quantity');
1725: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
1726: END IF;
1727:
1728: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1729: x_remaining_qty_po_uom := 0;

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

1727:
1728: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1729: x_remaining_qty_po_uom := 0;
1730:
1731: IF (g_asn_debug = 'Y') THEN
1732: asn_debug.put_line('Have assigned the quantity');
1733: END IF;
1734:
1735: -- Calculate tax_amount_factor for calculating tax_amount for

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

1728: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
1729: x_remaining_qty_po_uom := 0;
1730:
1731: IF (g_asn_debug = 'Y') THEN
1732: asn_debug.put_line('Have assigned the quantity');
1733: END IF;
1734:
1735: -- Calculate tax_amount_factor for calculating tax_amount for
1736: -- each cascaded line

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

1740: ELSE
1741: tax_amount_factor := 0;
1742: END IF;
1743:
1744: IF (g_asn_debug = 'Y') THEN
1745: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1746: asn_debug.put_line('Shipped Quantity : ' || TO_CHAR(x_remaining_quantity));
1747: END IF;
1748:

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

1741: tax_amount_factor := 0;
1742: END IF;
1743:
1744: IF (g_asn_debug = 'Y') THEN
1745: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1746: asn_debug.put_line('Shipped Quantity : ' || TO_CHAR(x_remaining_quantity));
1747: END IF;
1748:
1749: x_first_trans := TRUE;

Line 1746: asn_debug.put_line('Shipped Quantity : ' || TO_CHAR(x_remaining_quantity));

1742: END IF;
1743:
1744: IF (g_asn_debug = 'Y') THEN
1745: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
1746: asn_debug.put_line('Shipped Quantity : ' || TO_CHAR(x_remaining_quantity));
1747: END IF;
1748:
1749: x_first_trans := TRUE;
1750: transaction_ok := FALSE;

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

1748:
1749: x_first_trans := TRUE;
1750: transaction_ok := FALSE;
1751:
1752: IF (g_asn_debug = 'Y') THEN
1753: asn_debug.put_line('Before starting Cascade');
1754: END IF;
1755:
1756: IF (g_asn_debug = 'Y') THEN

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

1749: x_first_trans := TRUE;
1750: transaction_ok := FALSE;
1751:
1752: IF (g_asn_debug = 'Y') THEN
1753: asn_debug.put_line('Before starting Cascade');
1754: END IF;
1755:
1756: IF (g_asn_debug = 'Y') THEN
1757: asn_debug.put_line('Record Count = ' || x_record_count);

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

1752: IF (g_asn_debug = 'Y') THEN
1753: asn_debug.put_line('Before starting Cascade');
1754: END IF;
1755:
1756: IF (g_asn_debug = 'Y') THEN
1757: asn_debug.put_line('Record Count = ' || x_record_count);
1758: END IF;
1759:
1760: LOOP --{

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

1753: asn_debug.put_line('Before starting Cascade');
1754: END IF;
1755:
1756: IF (g_asn_debug = 'Y') THEN
1757: asn_debug.put_line('Record Count = ' || x_record_count);
1758: END IF;
1759:
1760: LOOP --{
1761: IF (g_asn_debug = 'Y') THEN

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

1757: asn_debug.put_line('Record Count = ' || x_record_count);
1758: END IF;
1759:
1760: LOOP --{
1761: IF (g_asn_debug = 'Y') THEN
1762: asn_debug.put_line('Remaining Quantity ASN UOM ' || TO_CHAR(x_remaining_quantity));
1763: END IF;
1764:
1765: /*

Line 1762: asn_debug.put_line('Remaining Quantity ASN UOM ' || TO_CHAR(x_remaining_quantity));

1758: END IF;
1759:
1760: LOOP --{
1761: IF (g_asn_debug = 'Y') THEN
1762: asn_debug.put_line('Remaining Quantity ASN UOM ' || TO_CHAR(x_remaining_quantity));
1763: END IF;
1764:
1765: /*
1766: ** Fetch the appropriate record

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

1764:
1765: /*
1766: ** Fetch the appropriate record
1767: */
1768: IF (g_asn_debug = 'Y') THEN
1769: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
1770: END IF;
1771:
1772: IF (int_org_transfer%ISOPEN) THEN --{

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

1765: /*
1766: ** Fetch the appropriate record
1767: */
1768: IF (g_asn_debug = 'Y') THEN
1769: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
1770: END IF;
1771:
1772: IF (int_org_transfer%ISOPEN) THEN --{
1773: IF (g_asn_debug = 'Y') THEN

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

1769: asn_debug.put_line('DEBUG: transaction_type = ' || x_cascaded_table(n).transaction_type);
1770: END IF;
1771:
1772: IF (int_org_transfer%ISOPEN) THEN --{
1773: IF (g_asn_debug = 'Y') THEN
1774: asn_debug.put_line(' fetch int_org_transfer');
1775: END IF;
1776:
1777: FETCH int_org_transfer INTO x_int_org_transferrec;

Line 1774: asn_debug.put_line(' fetch int_org_transfer');

1770: END IF;
1771:
1772: IF (int_org_transfer%ISOPEN) THEN --{
1773: IF (g_asn_debug = 'Y') THEN
1774: asn_debug.put_line(' fetch int_org_transfer');
1775: END IF;
1776:
1777: FETCH int_org_transfer INTO x_int_org_transferrec;
1778:

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

1781: END IF;
1782:
1783: rows_fetched := int_org_transfer%ROWCOUNT;
1784: ELSIF(int_org_transfer_rti%ISOPEN) THEN --}{
1785: IF (g_asn_debug = 'Y') THEN
1786: asn_debug.put_line(' fetch int_org_transfer_rti');
1787: END IF;
1788:
1789: FETCH int_org_transfer_rti INTO x_int_org_transferrec;

Line 1786: asn_debug.put_line(' fetch int_org_transfer_rti');

1782:
1783: rows_fetched := int_org_transfer%ROWCOUNT;
1784: ELSIF(int_org_transfer_rti%ISOPEN) THEN --}{
1785: IF (g_asn_debug = 'Y') THEN
1786: asn_debug.put_line(' fetch int_org_transfer_rti');
1787: END IF;
1788:
1789: FETCH int_org_transfer_rti INTO x_int_org_transferrec;
1790:

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

1788:
1789: FETCH int_org_transfer_rti INTO x_int_org_transferrec;
1790:
1791: IF (int_org_transfer_rti%NOTFOUND) THEN
1792: IF (g_asn_debug = 'Y') THEN
1793: asn_debug.put_line('transfer last row');
1794: END IF;
1795:
1796: lastrecord := TRUE;

Line 1793: asn_debug.put_line('transfer last row');

1789: FETCH int_org_transfer_rti INTO x_int_org_transferrec;
1790:
1791: IF (int_org_transfer_rti%NOTFOUND) THEN
1792: IF (g_asn_debug = 'Y') THEN
1793: asn_debug.put_line('transfer last row');
1794: END IF;
1795:
1796: lastrecord := TRUE;
1797: END IF;

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

1805: * parent_interface_txn_id) populated with
1806: * with the correct value. Also we have cascaded_table_index
1807: * with the correct pl/sql table index number;
1808: */
1809: IF (g_asn_debug = 'Y') THEN
1810: asn_debug.put_line(' fetch pl/sql table');
1811: END IF;
1812:
1813: temp_index := temp_cascaded_table(current_n).derive_index;

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

1806: * with the correct value. Also we have cascaded_table_index
1807: * with the correct pl/sql table index number;
1808: */
1809: IF (g_asn_debug = 'Y') THEN
1810: asn_debug.put_line(' fetch pl/sql table');
1811: END IF;
1812:
1813: temp_index := temp_cascaded_table(current_n).derive_index;
1814: x_int_org_transferrec.unit_of_meas := x_cascaded_table(temp_index).unit_of_measure;

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

1831: END IF; --}
1832:
1833: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));
1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));
1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));
1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);

Line 1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));

1832:
1833: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));
1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));
1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));
1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);
1840: END IF;

Line 1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));

1833: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));
1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));
1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));
1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);
1840: END IF;
1841:

Line 1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));

1834:
1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));
1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));
1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));
1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);
1840: END IF;
1841:
1842: IF ( lastrecord

Line 1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);

1835: IF (g_asn_debug = 'Y') THEN
1836: asn_debug.put_line('Transfer Rows fetched ' || TO_CHAR(rows_fetched));
1837: --asn_debug.put_line('po_line_id ' || to_char(x_int_org_transferrec.po_line_id));
1838: --asn_debug.put_line('po_dist ' || to_char(x_int_org_transferrec.po_distribution_id));
1839: asn_debug.put_line('Transfer remainaing qty ' || x_remaining_quantity);
1840: END IF;
1841:
1842: IF ( lastrecord
1843: OR x_remaining_quantity <= 0) THEN --{

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

1840: END IF;
1841:
1842: IF ( lastrecord
1843: OR x_remaining_quantity <= 0) THEN --{
1844: IF (g_asn_debug = 'Y') THEN
1845: asn_debug.put_line('Hit exit condition');
1846: END IF;
1847:
1848: IF NOT x_first_trans THEN

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

1841:
1842: IF ( lastrecord
1843: OR x_remaining_quantity <= 0) THEN --{
1844: IF (g_asn_debug = 'Y') THEN
1845: asn_debug.put_line('Hit exit condition');
1846: END IF;
1847:
1848: IF NOT x_first_trans THEN
1849: -- x_first_trans has been reset which means some cascade has

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

1847:
1848: IF NOT x_first_trans THEN
1849: -- x_first_trans has been reset which means some cascade has
1850: -- happened. Otherwise current_n = 1
1851: asn_debug.put_line('current_n before is ' || current_n);
1852: current_n := current_n - 1;
1853: END IF;
1854:
1855: -- do the tolerance act here

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

1852: current_n := current_n - 1;
1853: END IF;
1854:
1855: -- do the tolerance act here
1856: IF (g_asn_debug = 'Y') THEN
1857: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
1858: asn_debug.put_line('Check which condition has occured');
1859: END IF;
1860:

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

1853: END IF;
1854:
1855: -- do the tolerance act here
1856: IF (g_asn_debug = 'Y') THEN
1857: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
1858: asn_debug.put_line('Check which condition has occured');
1859: END IF;
1860:
1861: -- lastrecord...we have run out of rows and we still have quantity to allocate

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

1854:
1855: -- do the tolerance act here
1856: IF (g_asn_debug = 'Y') THEN
1857: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
1858: asn_debug.put_line('Check which condition has occured');
1859: END IF;
1860:
1861: -- lastrecord...we have run out of rows and we still have quantity to allocate
1862: IF x_remaining_quantity > 0 THEN --{

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

1859: END IF;
1860:
1861: -- lastrecord...we have run out of rows and we still have quantity to allocate
1862: IF x_remaining_quantity > 0 THEN --{
1863: IF (g_asn_debug = 'Y') THEN
1864: asn_debug.put_line('There is quantity remaining');
1865: asn_debug.put_line('Need to check qty tolerances');
1866: END IF;
1867:

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

1860:
1861: -- lastrecord...we have run out of rows and we still have quantity to allocate
1862: IF x_remaining_quantity > 0 THEN --{
1863: IF (g_asn_debug = 'Y') THEN
1864: asn_debug.put_line('There is quantity remaining');
1865: asn_debug.put_line('Need to check qty tolerances');
1866: END IF;
1867:
1868: IF rows_fetched > 0

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

1861: -- lastrecord...we have run out of rows and we still have quantity to allocate
1862: IF x_remaining_quantity > 0 THEN --{
1863: IF (g_asn_debug = 'Y') THEN
1864: asn_debug.put_line('There is quantity remaining');
1865: asn_debug.put_line('Need to check qty tolerances');
1866: END IF;
1867:
1868: IF rows_fetched > 0
1869: AND NOT x_first_trans THEN --{

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

1872: /* for transfer,accept an reject type we dont have the
1873: * tolerance check. Hence error out.
1874: * We cannot transfer quantities more than that was received.
1875: */
1876: IF (g_asn_debug = 'Y') THEN
1877: asn_debug.put_line(' in transfer Extra ASN UOM Quantity ' || TO_CHAR(x_remaining_quantity));
1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));
1879: END IF;
1880:

Line 1877: asn_debug.put_line(' in transfer Extra ASN UOM Quantity ' || TO_CHAR(x_remaining_quantity));

1873: * tolerance check. Hence error out.
1874: * We cannot transfer quantities more than that was received.
1875: */
1876: IF (g_asn_debug = 'Y') THEN
1877: asn_debug.put_line(' in transfer Extra ASN UOM Quantity ' || TO_CHAR(x_remaining_quantity));
1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));
1879: END IF;
1880:
1881: IF (g_asn_debug = 'Y') THEN

Line 1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));

1874: * We cannot transfer quantities more than that was received.
1875: */
1876: IF (g_asn_debug = 'Y') THEN
1877: asn_debug.put_line(' in transfer Extra ASN UOM Quantity ' || TO_CHAR(x_remaining_quantity));
1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));
1879: END IF;
1880:
1881: IF (g_asn_debug = 'Y') THEN
1882: asn_debug.put_line('delete the temp table ');

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

1877: asn_debug.put_line(' in transfer Extra ASN UOM Quantity ' || TO_CHAR(x_remaining_quantity));
1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));
1879: END IF;
1880:
1881: IF (g_asn_debug = 'Y') THEN
1882: asn_debug.put_line('delete the temp table ');
1883: END IF;
1884:
1885: IF temp_cascaded_table.COUNT > 0 THEN

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

1878: asn_debug.put_line('Extra PO UOM Quantity ' || TO_CHAR(x_remaining_qty_po_uom));
1879: END IF;
1880:
1881: IF (g_asn_debug = 'Y') THEN
1882: asn_debug.put_line('delete the temp table ');
1883: END IF;
1884:
1885: IF temp_cascaded_table.COUNT > 0 THEN
1886: FOR i IN 1 .. temp_cascaded_table.COUNT LOOP

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

1894: rcv_error_pkg.set_token('QTY_B', x_cascaded_table(n).quantity - x_remaining_quantity);
1895: rcv_error_pkg.log_interface_error('QUANTITY');
1896: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1897: IF rows_fetched = 0 THEN
1898: IF (g_asn_debug = 'Y') THEN
1899: asn_debug.put_line('No rows were retrieved from cursor.');
1900: END IF;
1901: ELSIF x_first_trans THEN
1902: IF (g_asn_debug = 'Y') THEN

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

1895: rcv_error_pkg.log_interface_error('QUANTITY');
1896: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
1897: IF rows_fetched = 0 THEN
1898: IF (g_asn_debug = 'Y') THEN
1899: asn_debug.put_line('No rows were retrieved from cursor.');
1900: END IF;
1901: ELSIF x_first_trans THEN
1902: IF (g_asn_debug = 'Y') THEN
1903: asn_debug.put_line('No rows were cascaded');

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

1898: IF (g_asn_debug = 'Y') THEN
1899: asn_debug.put_line('No rows were retrieved from cursor.');
1900: END IF;
1901: ELSIF x_first_trans THEN
1902: IF (g_asn_debug = 'Y') THEN
1903: asn_debug.put_line('No rows were cascaded');
1904: END IF;
1905: END IF;
1906:

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

1899: asn_debug.put_line('No rows were retrieved from cursor.');
1900: END IF;
1901: ELSIF x_first_trans THEN
1902: IF (g_asn_debug = 'Y') THEN
1903: asn_debug.put_line('No rows were cascaded');
1904: END IF;
1905: END IF;
1906:
1907: x_temp_count := 1;

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

1938: rcv_error_pkg.log_interface_error('PARENT_TRANSACTION_ID');
1939: END IF; --} end else for rows fetched = 0 OR x_first_trans = true
1940: -- end x_remaining_qty > 0 => this is the last record
1941: ELSE -- }{
1942: IF (g_asn_debug = 'Y') THEN
1943: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1944: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1945: END IF;
1946: END IF; --} ends the check for whether last record has been reached

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

1939: END IF; --} end else for rows fetched = 0 OR x_first_trans = true
1940: -- end x_remaining_qty > 0 => this is the last record
1941: ELSE -- }{
1942: IF (g_asn_debug = 'Y') THEN
1943: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1944: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1945: END IF;
1946: END IF; --} ends the check for whether last record has been reached
1947:

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

1940: -- end x_remaining_qty > 0 => this is the last record
1941: ELSE -- }{
1942: IF (g_asn_debug = 'Y') THEN
1943: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
1944: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
1945: END IF;
1946: END IF; --} ends the check for whether last record has been reached
1947:
1948: -- close cursors

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

1946: END IF; --} ends the check for whether last record has been reached
1947:
1948: -- close cursors
1949:
1950: IF (g_asn_debug = 'Y') THEN
1951: asn_debug.put_line('Close cursors shipments, count_shipments, distributions, count_disributions ' || current_n);
1952: END IF;
1953:
1954: IF int_org_transfer%ISOPEN THEN

Line 1951: asn_debug.put_line('Close cursors shipments, count_shipments, distributions, count_disributions ' || current_n);

1947:
1948: -- close cursors
1949:
1950: IF (g_asn_debug = 'Y') THEN
1951: asn_debug.put_line('Close cursors shipments, count_shipments, distributions, count_disributions ' || current_n);
1952: END IF;
1953:
1954: IF int_org_transfer%ISOPEN THEN
1955: CLOSE int_org_transfer;

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

1958: IF int_org_transfer_rti%ISOPEN THEN
1959: CLOSE int_org_transfer_rti;
1960: END IF;
1961:
1962: IF (g_asn_debug = 'Y') THEN
1963: asn_debug.put_line('before exit current_n is ' || current_n);
1964: END IF;
1965:
1966: EXIT;

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

1959: CLOSE int_org_transfer_rti;
1960: END IF;
1961:
1962: IF (g_asn_debug = 'Y') THEN
1963: asn_debug.put_line('before exit current_n is ' || current_n);
1964: END IF;
1965:
1966: EXIT;
1967: END IF; --} matches lastrecord or x_remaining_quantity <= 0

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

1967: END IF; --} matches lastrecord or x_remaining_quantity <= 0
1968:
1969: -- eliminate the row if it fails the date check
1970:
1971: IF (g_asn_debug = 'Y') THEN
1972: asn_debug.put_line(' Entering qty calculateion for transfer');
1973: END IF;
1974:
1975: IF (x_first_trans)

Line 1972: asn_debug.put_line(' Entering qty calculateion for transfer');

1968:
1969: -- eliminate the row if it fails the date check
1970:
1971: IF (g_asn_debug = 'Y') THEN
1972: asn_debug.put_line(' Entering qty calculateion for transfer');
1973: END IF;
1974:
1975: IF (x_first_trans)
1976: AND temp_cascaded_table(current_n).item_id IS NULL THEN

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

1986: x_converted_parent_trx_qty
1987: );
1988:
1989: IF (x_converted_parent_trx_qty = 0) THEN --{
1990: IF (g_asn_debug = 'Y') THEN
1991: asn_debug.put_line('calling transfer get_available_qty ');
1992: END IF;
1993:
1994: -- the call for transfer/deliver should be the same

Line 1991: asn_debug.put_line('calling transfer get_available_qty ');

1987: );
1988:
1989: IF (x_converted_parent_trx_qty = 0) THEN --{
1990: IF (g_asn_debug = 'Y') THEN
1991: asn_debug.put_line('calling transfer get_available_qty ');
1992: END IF;
1993:
1994: -- the call for transfer/deliver should be the same
1995: rcv_quantities_s.get_available_quantity('TRANSFER',

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

2005: x_secondary_available_qty
2006: );
2007: END IF; --}
2008:
2009: IF (g_asn_debug = 'Y') THEN
2010: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for transfer is ' || x_converted_parent_trx_qty);
2011: END IF;
2012:
2013: x_remaining_qty_parent_uom := rcv_roi_transaction.convert_into_correct_qty(x_remaining_quantity,

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

2006: );
2007: END IF; --}
2008:
2009: IF (g_asn_debug = 'Y') THEN
2010: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for transfer is ' || x_converted_parent_trx_qty);
2011: END IF;
2012:
2013: x_remaining_qty_parent_uom := rcv_roi_transaction.convert_into_correct_qty(x_remaining_quantity,
2014: temp_cascaded_table(1).unit_of_measure,

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

2016: x_int_org_transferrec.unit_of_meas
2017: );
2018:
2019: IF (x_remaining_qty_parent_uom = 0) THEN --{
2020: IF (g_asn_debug = 'Y') THEN
2021: asn_debug.put_line(' Transfer Need an error message in the interface tables');
2022: END IF;
2023: ELSE /* Converted qty successfully and we have some quantity on which we can act */
2024: IF (g_asn_debug = 'Y') THEN

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

2017: );
2018:
2019: IF (x_remaining_qty_parent_uom = 0) THEN --{
2020: IF (g_asn_debug = 'Y') THEN
2021: asn_debug.put_line(' Transfer Need an error message in the interface tables');
2022: END IF;
2023: ELSE /* Converted qty successfully and we have some quantity on which we can act */
2024: IF (g_asn_debug = 'Y') THEN
2025: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);

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

2020: IF (g_asn_debug = 'Y') THEN
2021: asn_debug.put_line(' Transfer Need an error message in the interface tables');
2022: END IF;
2023: ELSE /* Converted qty successfully and we have some quantity on which we can act */
2024: IF (g_asn_debug = 'Y') THEN
2025: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2026: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
2027: END IF;
2028:

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

2021: asn_debug.put_line(' Transfer Need an error message in the interface tables');
2022: END IF;
2023: ELSE /* Converted qty successfully and we have some quantity on which we can act */
2024: IF (g_asn_debug = 'Y') THEN
2025: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2026: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
2027: END IF;
2028:
2029: IF (x_converted_parent_trx_qty > 0) THEN --{

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

2022: END IF;
2023: ELSE /* Converted qty successfully and we have some quantity on which we can act */
2024: IF (g_asn_debug = 'Y') THEN
2025: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2026: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_qty_parent_uom);
2027: END IF;
2028:
2029: IF (x_converted_parent_trx_qty > 0) THEN --{
2030: IF (x_converted_parent_trx_qty < x_remaining_qty_parent_uom) THEN --{

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

2046: END IF;
2047:
2048: insert_into_table := TRUE;
2049: ELSE --}{
2050: IF (g_asn_debug = 'Y') THEN
2051: asn_debug.put_line('We are in >= Qty branch ');
2052: END IF;
2053:
2054: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;

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

2047:
2048: insert_into_table := TRUE;
2049: ELSE --}{
2050: IF (g_asn_debug = 'Y') THEN
2051: asn_debug.put_line('We are in >= Qty branch ');
2052: END IF;
2053:
2054: x_converted_parent_trx_qty := x_remaining_qty_parent_uom;
2055: insert_into_table := TRUE;

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

2058: END IF; --} /* if (x_converted_parent_trx_qty < x_remaining_qty_parent_uom) then */
2059: ELSE /* x_converted_parent_trx_qty >0 */ --}{
2060: IF rows_fetched = x_record_count THEN -- { last row needs to be inserted anyway
2061: -- so that the row can be used based on qty tolerance checks
2062: IF (g_asn_debug = 'Y') THEN
2063: asn_debug.put_line('Quantity is less then 0 but last record');
2064: END IF;
2065:
2066: insert_into_table := TRUE;

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

2059: ELSE /* x_converted_parent_trx_qty >0 */ --}{
2060: IF rows_fetched = x_record_count THEN -- { last row needs to be inserted anyway
2061: -- so that the row can be used based on qty tolerance checks
2062: IF (g_asn_debug = 'Y') THEN
2063: asn_debug.put_line('Quantity is less then 0 but last record');
2064: END IF;
2065:
2066: insert_into_table := TRUE;
2067: x_converted_trx_qty := 0;

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

2065:
2066: insert_into_table := TRUE;
2067: x_converted_trx_qty := 0;
2068: ELSE --}{
2069: IF (g_asn_debug = 'Y') THEN
2070: asn_debug.put_line('<= 0 Quantity but more records in cursor');
2071: END IF;
2072:
2073: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration

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

2066: insert_into_table := TRUE;
2067: x_converted_trx_qty := 0;
2068: ELSE --}{
2069: IF (g_asn_debug = 'Y') THEN
2070: asn_debug.put_line('<= 0 Quantity but more records in cursor');
2071: END IF;
2072:
2073: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
2074:

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

2071: END IF;
2072:
2073: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
2074:
2075: IF (g_asn_debug = 'Y') THEN
2076: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
2077: END IF;
2078:
2079: insert_into_table := FALSE;

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

2072:
2073: x_remaining_qty_po_uom := 0; -- we may have a diff uom on the next iteration
2074:
2075: IF (g_asn_debug = 'Y') THEN
2076: asn_debug.put_line('We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve');
2077: END IF;
2078:
2079: insert_into_table := FALSE;
2080: END IF; --}

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

2080: END IF; --}
2081: END IF; /*x_converted_parent_trx_qty >0 */ --}
2082: END IF; -- } Converted qty successfully and we have some quantity on which we can act
2083:
2084: IF (g_asn_debug = 'Y') THEN
2085: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
2086: END IF;
2087:
2088: IF insert_into_table THEN --{ --start

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

2081: END IF; /*x_converted_parent_trx_qty >0 */ --}
2082: END IF; -- } Converted qty successfully and we have some quantity on which we can act
2083:
2084: IF (g_asn_debug = 'Y') THEN
2085: asn_debug.put_line('Transaction qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
2086: END IF;
2087:
2088: IF insert_into_table THEN --{ --start
2089: IF (x_first_trans) THEN --{

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

2086: END IF;
2087:
2088: IF insert_into_table THEN --{ --start
2089: IF (x_first_trans) THEN --{
2090: IF (g_asn_debug = 'Y') THEN
2091: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
2092: END IF;
2093:
2094: x_first_trans := FALSE;

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

2087:
2088: IF insert_into_table THEN --{ --start
2089: IF (x_first_trans) THEN --{
2090: IF (g_asn_debug = 'Y') THEN
2091: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
2092: END IF;
2093:
2094: x_first_trans := FALSE;
2095: ELSE --}{

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

2092: END IF;
2093:
2094: x_first_trans := FALSE;
2095: ELSE --}{
2096: IF (g_asn_debug = 'Y') THEN
2097: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
2098: END IF;
2099:
2100: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

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

2093:
2094: x_first_trans := FALSE;
2095: ELSE --}{
2096: IF (g_asn_debug = 'Y') THEN
2097: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
2098: END IF;
2099:
2100: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
2101: END IF; --}

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

2118: temp_cascaded_table(current_n).unit_of_measure
2119: ); -- in asn uom*/
2120:
2121:
2122: IF (g_asn_debug = 'Y') THEN
2123: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
2124: END IF;
2125: ELSE
2126: temp_cascaded_table(current_n).quantity := x_converted_parent_trx_qty;

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

2119: ); -- in asn uom*/
2120:
2121:
2122: IF (g_asn_debug = 'Y') THEN
2123: asn_debug.put_line('Transaction qty in terms of the transaction uom is ' || temp_cascaded_table(current_n).quantity);
2124: END IF;
2125: ELSE
2126: temp_cascaded_table(current_n).quantity := x_converted_parent_trx_qty;
2127: END IF;

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

2146: ELSE
2147: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
2148: END IF;
2149:
2150: IF (g_asn_debug = 'Y') THEN
2151: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
2152: END IF;
2153:
2154: --sugatas put here

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

2147: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
2148: END IF;
2149:
2150: IF (g_asn_debug = 'Y') THEN
2151: asn_debug.put_line('Transaction qty in terms of the primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
2152: END IF;
2153:
2154: --sugatas put here
2155: --temp_cascaded_table(current_n).inspection_status_code := x_int_org_transferrec.inspection_status_code;

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

2197: EXCEPTION
2198: WHEN NO_DATA_FOUND THEN
2199: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2200:
2201: IF (g_asn_debug = 'Y') THEN
2202: asn_debug.put_line('The deliver to person entered in IOT is currently inactive');
2203: asn_debug.put_line(' So it is cleared off');
2204: END IF;
2205: WHEN OTHERS THEN

Line 2202: asn_debug.put_line('The deliver to person entered in IOT is currently inactive');

2198: WHEN NO_DATA_FOUND THEN
2199: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2200:
2201: IF (g_asn_debug = 'Y') THEN
2202: asn_debug.put_line('The deliver to person entered in IOT is currently inactive');
2203: asn_debug.put_line(' So it is cleared off');
2204: END IF;
2205: WHEN OTHERS THEN
2206: temp_cascaded_table(current_n).deliver_to_person_id := NULL;

Line 2203: asn_debug.put_line(' So it is cleared off');

2199: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2200:
2201: IF (g_asn_debug = 'Y') THEN
2202: asn_debug.put_line('The deliver to person entered in IOT is currently inactive');
2203: asn_debug.put_line(' So it is cleared off');
2204: END IF;
2205: WHEN OTHERS THEN
2206: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2207:

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

2204: END IF;
2205: WHEN OTHERS THEN
2206: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2207:
2208: IF (g_asn_debug = 'Y') THEN
2209: asn_debug.put_line('Some exception has occured');
2210: asn_debug.put_line('This exception is due to the IOT deliver to person');
2211: asn_debug.put_line('The deliver to person is optional');
2212: asn_debug.put_line('So cleared off the deliver to person');

Line 2209: asn_debug.put_line('Some exception has occured');

2205: WHEN OTHERS THEN
2206: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2207:
2208: IF (g_asn_debug = 'Y') THEN
2209: asn_debug.put_line('Some exception has occured');
2210: asn_debug.put_line('This exception is due to the IOT deliver to person');
2211: asn_debug.put_line('The deliver to person is optional');
2212: asn_debug.put_line('So cleared off the deliver to person');
2213: END IF;

Line 2210: asn_debug.put_line('This exception is due to the IOT deliver to person');

2206: temp_cascaded_table(current_n).deliver_to_person_id := NULL;
2207:
2208: IF (g_asn_debug = 'Y') THEN
2209: asn_debug.put_line('Some exception has occured');
2210: asn_debug.put_line('This exception is due to the IOT deliver to person');
2211: asn_debug.put_line('The deliver to person is optional');
2212: asn_debug.put_line('So cleared off the deliver to person');
2213: END IF;
2214: END;

Line 2211: asn_debug.put_line('The deliver to person is optional');

2207:
2208: IF (g_asn_debug = 'Y') THEN
2209: asn_debug.put_line('Some exception has occured');
2210: asn_debug.put_line('This exception is due to the IOT deliver to person');
2211: asn_debug.put_line('The deliver to person is optional');
2212: asn_debug.put_line('So cleared off the deliver to person');
2213: END IF;
2214: END;
2215: END IF; --}

Line 2212: asn_debug.put_line('So cleared off the deliver to person');

2208: IF (g_asn_debug = 'Y') THEN
2209: asn_debug.put_line('Some exception has occured');
2210: asn_debug.put_line('This exception is due to the IOT deliver to person');
2211: asn_debug.put_line('The deliver to person is optional');
2212: asn_debug.put_line('So cleared off the deliver to person');
2213: END IF;
2214: END;
2215: END IF; --}
2216: END IF; --}

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

2221: END IF; --}
2222:
2223: current_n := current_n + 1;
2224:
2225: IF (g_asn_debug = 'Y') THEN
2226: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
2227: END IF;
2228: END IF; --}
2229:

Line 2226: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));

2222:
2223: current_n := current_n + 1;
2224:
2225: IF (g_asn_debug = 'Y') THEN
2226: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
2227: END IF;
2228: END IF; --}
2229:
2230: asn_debug.put_line('finished processing one row in derive_qty for IOT transfers/delivers/accept/reject ');

Line 2230: asn_debug.put_line('finished processing one row in derive_qty for IOT transfers/delivers/accept/reject ');

2226: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
2227: END IF;
2228: END IF; --}
2229:
2230: asn_debug.put_line('finished processing one row in derive_qty for IOT transfers/delivers/accept/reject ');
2231: END LOOP; --}
2232:
2233: IF (g_asn_debug = 'Y') THEN
2234: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);

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

2229:
2230: asn_debug.put_line('finished processing one row in derive_qty for IOT transfers/delivers/accept/reject ');
2231: END LOOP; --}
2232:
2233: IF (g_asn_debug = 'Y') THEN
2234: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
2235: END IF;
2236:
2237: IF int_org_transfer%ISOPEN THEN

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

2230: asn_debug.put_line('finished processing one row in derive_qty for IOT transfers/delivers/accept/reject ');
2231: END LOOP; --}
2232:
2233: IF (g_asn_debug = 'Y') THEN
2234: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
2235: END IF;
2236:
2237: IF int_org_transfer%ISOPEN THEN
2238: CLOSE int_org_transfer;

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

2241: IF int_org_transfer_rti%ISOPEN THEN
2242: CLOSE int_org_transfer_rti;
2243: END IF;
2244:
2245: IF (g_asn_debug = 'Y') THEN
2246: asn_debug.put_line('Exit derive_trans_del_line_quantity');
2247: END IF;
2248: EXCEPTION
2249: WHEN rcv_error_pkg.e_fatal_error THEN

Line 2246: asn_debug.put_line('Exit derive_trans_del_line_quantity');

2242: CLOSE int_org_transfer_rti;
2243: END IF;
2244:
2245: IF (g_asn_debug = 'Y') THEN
2246: asn_debug.put_line('Exit derive_trans_del_line_quantity');
2247: END IF;
2248: EXCEPTION
2249: WHEN rcv_error_pkg.e_fatal_error THEN
2250: IF int_org_transfer%ISOPEN THEN

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

2267: rcv_error_pkg.set_sql_error_message('derive_trans_del_line_quantity', x_progress);
2268: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
2269: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
2270:
2271: IF (g_asn_debug = 'Y') THEN
2272: asn_debug.put_line(TO_CHAR(n));
2273: asn_debug.put_line(SQLERRM);
2274: asn_debug.put_line('error ' || x_progress);
2275: END IF;

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

2268: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
2269: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
2270:
2271: IF (g_asn_debug = 'Y') THEN
2272: asn_debug.put_line(TO_CHAR(n));
2273: asn_debug.put_line(SQLERRM);
2274: asn_debug.put_line('error ' || x_progress);
2275: END IF;
2276: END derive_trans_del_line_quantity;

Line 2273: asn_debug.put_line(SQLERRM);

2269: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
2270:
2271: IF (g_asn_debug = 'Y') THEN
2272: asn_debug.put_line(TO_CHAR(n));
2273: asn_debug.put_line(SQLERRM);
2274: asn_debug.put_line('error ' || x_progress);
2275: END IF;
2276: END derive_trans_del_line_quantity;
2277:

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

2270:
2271: IF (g_asn_debug = 'Y') THEN
2272: asn_debug.put_line(TO_CHAR(n));
2273: asn_debug.put_line(SQLERRM);
2274: asn_debug.put_line('error ' || x_progress);
2275: END IF;
2276: END derive_trans_del_line_quantity;
2277:
2278: /*-------- corrections --------------------------*/

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

2282: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
2283: x_header_record IN rcv_roi_preprocessor.header_rec_type
2284: ) IS
2285: BEGIN
2286: IF (g_asn_debug = 'Y') THEN
2287: asn_debug.put_line('enter derive_correction_line ');
2288: END IF;
2289:
2290: /* Derive the to_org_id */

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

2283: x_header_record IN rcv_roi_preprocessor.header_rec_type
2284: ) IS
2285: BEGIN
2286: IF (g_asn_debug = 'Y') THEN
2287: asn_debug.put_line('enter derive_correction_line ');
2288: END IF;
2289:
2290: /* Derive the to_org_id */
2291: rcv_roi_transaction.derive_ship_to_org_info(x_cascaded_table,

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

2293: x_header_record
2294: );
2295:
2296: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
2297: IF (g_asn_debug = 'Y') THEN
2298: asn_debug.put_line('X_progress ' || x_progress);
2299: END IF;
2300:
2301: SELECT muom.uom_code

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

2294: );
2295:
2296: IF (x_cascaded_table(n).unit_of_measure IS NOT NULL) THEN
2297: IF (g_asn_debug = 'Y') THEN
2298: asn_debug.put_line('X_progress ' || x_progress);
2299: END IF;
2300:
2301: SELECT muom.uom_code
2302: INTO x_cascaded_table(n).uom_code

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

2302: INTO x_cascaded_table(n).uom_code
2303: FROM mtl_units_of_measure muom
2304: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
2305: ELSE
2306: IF (g_asn_debug = 'Y') THEN
2307: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
2308: END IF;
2309: END IF;
2310:

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

2303: FROM mtl_units_of_measure muom
2304: WHERE muom.unit_of_measure = x_cascaded_table(n).unit_of_measure;
2305: ELSE
2306: IF (g_asn_debug = 'Y') THEN
2307: asn_debug.put_line('uom_code not dereived as unit_of_measure is null');
2308: END IF;
2309: END IF;
2310:
2311: x_progress := '091';

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

2423: l_item_id NUMBER;
2424: /* Bug#5369121 */
2425:
2426: BEGIN
2427: IF (g_asn_debug = 'Y') THEN
2428: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
2429: END IF;
2430:
2431: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{

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

2424: /* Bug#5369121 */
2425:
2426: BEGIN
2427: IF (g_asn_debug = 'Y') THEN
2428: asn_debug.put_line('enter derive_quantity ' || x_cascaded_table(n).parent_transaction_id);
2429: END IF;
2430:
2431: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{
2432: already_derived := TRUE;

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

2452: END;
2453: END IF; --}
2454:
2455: IF already_derived THEN --{
2456: IF (g_asn_debug = 'Y') THEN
2457: asn_debug.put_line(' open int_org_cor_rt table ' || x_cascaded_table(n).parent_transaction_id);
2458: END IF;
2459:
2460: OPEN int_org_cor_rt(x_cascaded_table(n).parent_transaction_id, x_cascaded_table(n).to_organization_id);

Line 2457: asn_debug.put_line(' open int_org_cor_rt table ' || x_cascaded_table(n).parent_transaction_id);

2453: END IF; --}
2454:
2455: IF already_derived THEN --{
2456: IF (g_asn_debug = 'Y') THEN
2457: asn_debug.put_line(' open int_org_cor_rt table ' || x_cascaded_table(n).parent_transaction_id);
2458: END IF;
2459:
2460: OPEN int_org_cor_rt(x_cascaded_table(n).parent_transaction_id, x_cascaded_table(n).to_organization_id);
2461: END IF; ---}

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

2477: * We will have x_cascaded_table(n).
2478: * parent_interface_txn_id) populated with teh
2479: * correct value.
2480: */
2481: IF (g_asn_debug = 'Y') THEN
2482: asn_debug.put_line(' open pl/sql table');
2483: END IF;
2484:
2485: OPEN int_org_cor_rti(x_cascaded_table(n).parent_interface_txn_id);

Line 2482: asn_debug.put_line(' open pl/sql table');

2478: * parent_interface_txn_id) populated with teh
2479: * correct value.
2480: */
2481: IF (g_asn_debug = 'Y') THEN
2482: asn_debug.put_line(' open pl/sql table');
2483: END IF;
2484:
2485: OPEN int_org_cor_rti(x_cascaded_table(n).parent_interface_txn_id);
2486: END IF;

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

2489: /******************************************************************/
2490: --check line quanity > 0
2491: x_progress := '097';
2492:
2493: IF (g_asn_debug = 'Y') THEN
2494: asn_debug.put_line('X_progress ' || x_progress);
2495: END IF;
2496:
2497: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN

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

2490: --check line quanity > 0
2491: x_progress := '097';
2492:
2493: IF (g_asn_debug = 'Y') THEN
2494: asn_debug.put_line('X_progress ' || x_progress);
2495: END IF;
2496:
2497: IF (x_cascaded_table(n).error_status NOT IN('S', 'W')) THEN
2498: RETURN;

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

2498: RETURN;
2499: END IF;
2500:
2501: IF (x_cascaded_table(n).quantity = 0) THEN --{
2502: IF (g_asn_debug = 'Y') THEN
2503: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
2504: END IF;
2505:
2506: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

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

2499: END IF;
2500:
2501: IF (x_cascaded_table(n).quantity = 0) THEN --{
2502: IF (g_asn_debug = 'Y') THEN
2503: asn_debug.put_line('Quantity is <= zero. Cascade will fail');
2504: END IF;
2505:
2506: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
2507: rcv_error_pkg.set_error_message('RCV_ITEM_NO_SHIP_QTY', x_cascaded_table(n).error_message);

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

2510: END IF; --} end qty > 0 check
2511:
2512: x_progress := '098';
2513:
2514: IF (g_asn_debug = 'Y') THEN
2515: asn_debug.put_line('X_progress ' || x_progress);
2516: END IF;
2517:
2518: IF ( x_cascaded_table(n).parent_transaction_id IS NULL

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

2511:
2512: x_progress := '098';
2513:
2514: IF (g_asn_debug = 'Y') THEN
2515: asn_debug.put_line('X_progress ' || x_progress);
2516: END IF;
2517:
2518: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
2519: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN

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

2516: END IF;
2517:
2518: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
2519: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN
2520: IF (g_asn_debug = 'Y') THEN
2521: asn_debug.put_line('No parent transaction found ');
2522: END IF;
2523:
2524: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;

Line 2521: asn_debug.put_line('No parent transaction found ');

2517:
2518: IF ( x_cascaded_table(n).parent_transaction_id IS NULL
2519: AND x_cascaded_table(n).parent_interface_txn_id IS NULL) THEN
2520: IF (g_asn_debug = 'Y') THEN
2521: asn_debug.put_line('No parent transaction found ');
2522: END IF;
2523:
2524: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
2525: rcv_error_pkg.set_error_message('RCV_NO_PARENT_TRANSACTION', x_cascaded_table(n).error_message);

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

2526: rcv_error_pkg.log_interface_error('PARENT_TRANSACTION_ID');
2527: END IF;
2528:
2529: -- Copy record from main table to temp table
2530: IF (g_asn_debug = 'Y') THEN
2531: asn_debug.put_line('Copy record from main table to temp table');
2532: END IF;
2533:
2534: current_n := 1;

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

2527: END IF;
2528:
2529: -- Copy record from main table to temp table
2530: IF (g_asn_debug = 'Y') THEN
2531: asn_debug.put_line('Copy record from main table to temp table');
2532: END IF;
2533:
2534: current_n := 1;
2535: temp_cascaded_table(current_n) := x_cascaded_table(n);

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

2534: current_n := 1;
2535: temp_cascaded_table(current_n) := x_cascaded_table(n);
2536:
2537: -- Get all rows which meet this condition
2538: IF (g_asn_debug = 'Y') THEN
2539: asn_debug.put_line('Get all rows which meet this condition');
2540: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
2541: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
2542: END IF;

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

2535: temp_cascaded_table(current_n) := x_cascaded_table(n);
2536:
2537: -- Get all rows which meet this condition
2538: IF (g_asn_debug = 'Y') THEN
2539: asn_debug.put_line('Get all rows which meet this condition');
2540: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
2541: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
2542: END IF;
2543:

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

2536:
2537: -- Get all rows which meet this condition
2538: IF (g_asn_debug = 'Y') THEN
2539: asn_debug.put_line('Get all rows which meet this condition');
2540: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
2541: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
2542: END IF;
2543:
2544: -- Assign shipped quantity to remaining quantity

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

2537: -- Get all rows which meet this condition
2538: IF (g_asn_debug = 'Y') THEN
2539: asn_debug.put_line('Get all rows which meet this condition');
2540: asn_debug.put_line('Transaction Type = ' || x_cascaded_table(n).transaction_type);
2541: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
2542: END IF;
2543:
2544: -- Assign shipped quantity to remaining quantity
2545: IF (g_asn_debug = 'Y') THEN

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

2541: asn_debug.put_line('Auto Transact Code = ' || x_cascaded_table(n).auto_transact_code);
2542: END IF;
2543:
2544: -- Assign shipped quantity to remaining quantity
2545: IF (g_asn_debug = 'Y') THEN
2546: asn_debug.put_line('Assign populated quantity to remaining quantity');
2547: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
2548: END IF;
2549:

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

2542: END IF;
2543:
2544: -- Assign shipped quantity to remaining quantity
2545: IF (g_asn_debug = 'Y') THEN
2546: asn_debug.put_line('Assign populated quantity to remaining quantity');
2547: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
2548: END IF;
2549:
2550: x_remaining_quantity := temp_cascaded_table(current_n).quantity;

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

2543:
2544: -- Assign shipped quantity to remaining quantity
2545: IF (g_asn_debug = 'Y') THEN
2546: asn_debug.put_line('Assign populated quantity to remaining quantity');
2547: asn_debug.put_line('Pointer in temp_cascade ' || TO_CHAR(current_n));
2548: END IF;
2549:
2550: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
2551:

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

2548: END IF;
2549:
2550: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
2551:
2552: IF (g_asn_debug = 'Y') THEN
2553: asn_debug.put_line('Have assigned the quantity');
2554: END IF;
2555:
2556: -- Calculate tax_amount_factor for calculating tax_amount for

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

2549:
2550: x_remaining_quantity := temp_cascaded_table(current_n).quantity;
2551:
2552: IF (g_asn_debug = 'Y') THEN
2553: asn_debug.put_line('Have assigned the quantity');
2554: END IF;
2555:
2556: -- Calculate tax_amount_factor for calculating tax_amount for
2557: -- each cascaded line

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

2561: ELSE
2562: tax_amount_factor := 0;
2563: END IF;
2564:
2565: IF (g_asn_debug = 'Y') THEN
2566: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
2567: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
2568: END IF;
2569:

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

2562: tax_amount_factor := 0;
2563: END IF;
2564:
2565: IF (g_asn_debug = 'Y') THEN
2566: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
2567: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
2568: END IF;
2569:
2570: x_first_trans := TRUE;

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

2563: END IF;
2564:
2565: IF (g_asn_debug = 'Y') THEN
2566: asn_debug.put_line('Tax Factor ' || TO_CHAR(tax_amount_factor));
2567: asn_debug.put_line('transaction Quantity : ' || TO_CHAR(x_remaining_quantity));
2568: END IF;
2569:
2570: x_first_trans := TRUE;
2571:

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

2568: END IF;
2569:
2570: x_first_trans := TRUE;
2571:
2572: IF (g_asn_debug = 'Y') THEN
2573: asn_debug.put_line('Before starting Cascade');
2574: END IF;
2575:
2576: IF (g_asn_debug = 'Y') THEN

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

2569:
2570: x_first_trans := TRUE;
2571:
2572: IF (g_asn_debug = 'Y') THEN
2573: asn_debug.put_line('Before starting Cascade');
2574: END IF;
2575:
2576: IF (g_asn_debug = 'Y') THEN
2577: asn_debug.put_line('Record Count = ' || x_record_count);

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

2572: IF (g_asn_debug = 'Y') THEN
2573: asn_debug.put_line('Before starting Cascade');
2574: END IF;
2575:
2576: IF (g_asn_debug = 'Y') THEN
2577: asn_debug.put_line('Record Count = ' || x_record_count);
2578: END IF;
2579:
2580: LOOP --{

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

2573: asn_debug.put_line('Before starting Cascade');
2574: END IF;
2575:
2576: IF (g_asn_debug = 'Y') THEN
2577: asn_debug.put_line('Record Count = ' || x_record_count);
2578: END IF;
2579:
2580: LOOP --{
2581: IF (g_asn_debug = 'Y') THEN

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

2577: asn_debug.put_line('Record Count = ' || x_record_count);
2578: END IF;
2579:
2580: LOOP --{
2581: IF (g_asn_debug = 'Y') THEN
2582: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
2583: END IF;
2584:
2585: /*

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

2578: END IF;
2579:
2580: LOOP --{
2581: IF (g_asn_debug = 'Y') THEN
2582: asn_debug.put_line('Remaining Quantity ' || TO_CHAR(x_remaining_quantity));
2583: END IF;
2584:
2585: /*
2586: ** Fetch the appropriate record

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

2585: /*
2586: ** Fetch the appropriate record
2587: */
2588: IF (int_org_cor_rt%ISOPEN) THEN --{
2589: IF (g_asn_debug = 'Y') THEN
2590: asn_debug.put_line(' fetch int_org_cor_rt');
2591: END IF;
2592:
2593: FETCH int_org_cor_rt INTO int_org_cor_rec;

Line 2590: asn_debug.put_line(' fetch int_org_cor_rt');

2586: ** Fetch the appropriate record
2587: */
2588: IF (int_org_cor_rt%ISOPEN) THEN --{
2589: IF (g_asn_debug = 'Y') THEN
2590: asn_debug.put_line(' fetch int_org_cor_rt');
2591: END IF;
2592:
2593: FETCH int_org_cor_rt INTO int_org_cor_rec;
2594:

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

2597: END IF;
2598:
2599: rows_fetched := int_org_cor_rt%ROWCOUNT;
2600: ELSIF(int_org_cor_rti%ISOPEN) THEN --}{
2601: IF (g_asn_debug = 'Y') THEN
2602: asn_debug.put_line(' fetch int_org_cor_rti');
2603: END IF;
2604:
2605: FETCH int_org_cor_rti INTO int_org_cor_rec;

Line 2602: asn_debug.put_line(' fetch int_org_cor_rti');

2598:
2599: rows_fetched := int_org_cor_rt%ROWCOUNT;
2600: ELSIF(int_org_cor_rti%ISOPEN) THEN --}{
2601: IF (g_asn_debug = 'Y') THEN
2602: asn_debug.put_line(' fetch int_org_cor_rti');
2603: END IF;
2604:
2605: FETCH int_org_cor_rti INTO int_org_cor_rec;
2606:

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

2604:
2605: FETCH int_org_cor_rti INTO int_org_cor_rec;
2606:
2607: IF (int_org_cor_rti%NOTFOUND) THEN
2608: IF (g_asn_debug = 'Y') THEN
2609: asn_debug.put_line('correct last row');
2610: END IF;
2611:
2612: lastrecord := TRUE;

Line 2609: asn_debug.put_line('correct last row');

2605: FETCH int_org_cor_rti INTO int_org_cor_rec;
2606:
2607: IF (int_org_cor_rti%NOTFOUND) THEN
2608: IF (g_asn_debug = 'Y') THEN
2609: asn_debug.put_line('correct last row');
2610: END IF;
2611:
2612: lastrecord := TRUE;
2613: END IF;

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

2614:
2615: rows_fetched := int_org_cor_rti%ROWCOUNT;
2616: ELSIF(temp_cascaded_table(current_n).derive = 'Y') THEN --}{
2617: /* GET VALUES FROM THE PLSQL TABLE */
2618: IF (g_asn_debug = 'Y') THEN
2619: asn_debug.put_line(' fetch pl/sql table');
2620: END IF;
2621:
2622: temp_index := temp_cascaded_table(current_n).derive_index;

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

2615: rows_fetched := int_org_cor_rti%ROWCOUNT;
2616: ELSIF(temp_cascaded_table(current_n).derive = 'Y') THEN --}{
2617: /* GET VALUES FROM THE PLSQL TABLE */
2618: IF (g_asn_debug = 'Y') THEN
2619: asn_debug.put_line(' fetch pl/sql table');
2620: END IF;
2621:
2622: temp_index := temp_cascaded_table(current_n).derive_index;
2623: int_org_cor_rec.unit_of_meas := x_cascaded_table(temp_index).unit_of_measure;

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

2645: lastrecord := TRUE;
2646: END IF; --}
2647: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
2648:
2649: IF (g_asn_debug = 'Y') THEN
2650: asn_debug.put_line('Correct Rows fetched ' || TO_CHAR(rows_fetched));
2651: asn_debug.put_line('correct remainaing qty ' || x_remaining_quantity);
2652: END IF;
2653:

Line 2650: asn_debug.put_line('Correct Rows fetched ' || TO_CHAR(rows_fetched));

2646: END IF; --}
2647: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
2648:
2649: IF (g_asn_debug = 'Y') THEN
2650: asn_debug.put_line('Correct Rows fetched ' || TO_CHAR(rows_fetched));
2651: asn_debug.put_line('correct remainaing qty ' || x_remaining_quantity);
2652: END IF;
2653:
2654: IF (lastrecord) THEN --{

Line 2651: asn_debug.put_line('correct remainaing qty ' || x_remaining_quantity);

2647: --x_remaining_quantity:= temp_cascaded_table(current_n).quantity;
2648:
2649: IF (g_asn_debug = 'Y') THEN
2650: asn_debug.put_line('Correct Rows fetched ' || TO_CHAR(rows_fetched));
2651: asn_debug.put_line('correct remainaing qty ' || x_remaining_quantity);
2652: END IF;
2653:
2654: IF (lastrecord) THEN --{
2655: IF (g_asn_debug = 'Y') THEN

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

2651: asn_debug.put_line('correct remainaing qty ' || x_remaining_quantity);
2652: END IF;
2653:
2654: IF (lastrecord) THEN --{
2655: IF (g_asn_debug = 'Y') THEN
2656: asn_debug.put_line('Hit exit condition');
2657: END IF;
2658:
2659: IF NOT x_first_trans THEN

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

2652: END IF;
2653:
2654: IF (lastrecord) THEN --{
2655: IF (g_asn_debug = 'Y') THEN
2656: asn_debug.put_line('Hit exit condition');
2657: END IF;
2658:
2659: IF NOT x_first_trans THEN
2660: -- x_first_trans has been reset which means some cascade has

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

2658:
2659: IF NOT x_first_trans THEN
2660: -- x_first_trans has been reset which means some cascade has
2661: -- happened. Otherwise current_n = 1
2662: IF (g_asn_debug = 'Y') THEN
2663: asn_debug.put_line('current_n before is ' || current_n);
2664: END IF;
2665:
2666: current_n := current_n - 1;

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

2659: IF NOT x_first_trans THEN
2660: -- x_first_trans has been reset which means some cascade has
2661: -- happened. Otherwise current_n = 1
2662: IF (g_asn_debug = 'Y') THEN
2663: asn_debug.put_line('current_n before is ' || current_n);
2664: END IF;
2665:
2666: current_n := current_n - 1;
2667: END IF;

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

2666: current_n := current_n - 1;
2667: END IF;
2668:
2669: -- do the tolerance act here
2670: IF (g_asn_debug = 'Y') THEN
2671: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
2672: asn_debug.put_line('Check which condition has occured');
2673: END IF;
2674:

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

2667: END IF;
2668:
2669: -- do the tolerance act here
2670: IF (g_asn_debug = 'Y') THEN
2671: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
2672: asn_debug.put_line('Check which condition has occured');
2673: END IF;
2674:
2675: -- lastrecord...we have run out of rows and we still have quantity to allocate

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

2668:
2669: -- do the tolerance act here
2670: IF (g_asn_debug = 'Y') THEN
2671: asn_debug.put_line('Temp table pointer ' || TO_CHAR(current_n));
2672: asn_debug.put_line('Check which condition has occured');
2673: END IF;
2674:
2675: -- lastrecord...we have run out of rows and we still have quantity to allocate
2676: /* Do abs(x_remaining_quantity) since it can be a negative

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

2676: /* Do abs(x_remaining_quantity) since it can be a negative
2677: * or positive correction.
2678: */
2679: IF ABS(x_remaining_quantity) > 0 THEN --{
2680: IF (g_asn_debug = 'Y') THEN
2681: asn_debug.put_line('There is quantity remaining ');
2682: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
2683: asn_debug.put_line('rows_fetched ' || rows_fetched);
2684: END IF;

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

2677: * or positive correction.
2678: */
2679: IF ABS(x_remaining_quantity) > 0 THEN --{
2680: IF (g_asn_debug = 'Y') THEN
2681: asn_debug.put_line('There is quantity remaining ');
2682: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
2683: asn_debug.put_line('rows_fetched ' || rows_fetched);
2684: END IF;
2685:

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

2678: */
2679: IF ABS(x_remaining_quantity) > 0 THEN --{
2680: IF (g_asn_debug = 'Y') THEN
2681: asn_debug.put_line('There is quantity remaining ');
2682: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
2683: asn_debug.put_line('rows_fetched ' || rows_fetched);
2684: END IF;
2685:
2686: IF NOT x_first_trans THEN

Line 2683: asn_debug.put_line('rows_fetched ' || rows_fetched);

2679: IF ABS(x_remaining_quantity) > 0 THEN --{
2680: IF (g_asn_debug = 'Y') THEN
2681: asn_debug.put_line('There is quantity remaining ');
2682: asn_debug.put_line('tolerable quantity now in plsql table ' || temp_cascaded_table(current_n).quantity);
2683: asn_debug.put_line('rows_fetched ' || rows_fetched);
2684: END IF;
2685:
2686: IF NOT x_first_trans THEN
2687: asn_debug.put_line('not first txn');

Line 2687: asn_debug.put_line('not first txn');

2683: asn_debug.put_line('rows_fetched ' || rows_fetched);
2684: END IF;
2685:
2686: IF NOT x_first_trans THEN
2687: asn_debug.put_line('not first txn');
2688: END IF;
2689:
2690: IF rows_fetched > 0
2691: AND NOT x_first_trans THEN --{

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

2688: END IF;
2689:
2690: IF rows_fetched > 0
2691: AND NOT x_first_trans THEN --{
2692: IF (g_asn_debug = 'Y') THEN
2693: asn_debug.put_line(' inside transaction_type ' || int_org_cor_rec.parent_transaction_type);
2694: END IF;
2695:
2696: IF (SIGN(temp_cascaded_table(current_n).quantity) IN(-1, -1)) THEN --{

Line 2693: asn_debug.put_line(' inside transaction_type ' || int_org_cor_rec.parent_transaction_type);

2689:
2690: IF rows_fetched > 0
2691: AND NOT x_first_trans THEN --{
2692: IF (g_asn_debug = 'Y') THEN
2693: asn_debug.put_line(' inside transaction_type ' || int_org_cor_rec.parent_transaction_type);
2694: END IF;
2695:
2696: IF (SIGN(temp_cascaded_table(current_n).quantity) IN(-1, -1)) THEN --{
2697: /* for correct,accept an reject type we dont have the

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

2697: /* for correct,accept an reject type we dont have the
2698: * tolerance check. Hence error out.
2699: * We cannot correct quantities more than that was received.
2700: */
2701: IF (g_asn_debug = 'Y') THEN
2702: asn_debug.put_line(' in correct extra Quantity ' || TO_CHAR(x_remaining_quantity));
2703: END IF;
2704:
2705: IF (g_asn_debug = 'Y') THEN

Line 2702: asn_debug.put_line(' in correct extra Quantity ' || TO_CHAR(x_remaining_quantity));

2698: * tolerance check. Hence error out.
2699: * We cannot correct quantities more than that was received.
2700: */
2701: IF (g_asn_debug = 'Y') THEN
2702: asn_debug.put_line(' in correct extra Quantity ' || TO_CHAR(x_remaining_quantity));
2703: END IF;
2704:
2705: IF (g_asn_debug = 'Y') THEN
2706: asn_debug.put_line('delete the temp table ');

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

2701: IF (g_asn_debug = 'Y') THEN
2702: asn_debug.put_line(' in correct extra Quantity ' || TO_CHAR(x_remaining_quantity));
2703: END IF;
2704:
2705: IF (g_asn_debug = 'Y') THEN
2706: asn_debug.put_line('delete the temp table ');
2707: END IF;
2708:
2709: IF temp_cascaded_table.COUNT > 0 THEN

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

2702: asn_debug.put_line(' in correct extra Quantity ' || TO_CHAR(x_remaining_quantity));
2703: END IF;
2704:
2705: IF (g_asn_debug = 'Y') THEN
2706: asn_debug.put_line('delete the temp table ');
2707: END IF;
2708:
2709: IF temp_cascaded_table.COUNT > 0 THEN
2710: FOR i IN 1 .. temp_cascaded_table.COUNT LOOP

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

2719: rcv_error_pkg.log_interface_error('QUANTITY');
2720: END IF; --}ends check for a -ve correction
2721: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
2722: IF rows_fetched = 0 THEN
2723: IF (g_asn_debug = 'Y') THEN
2724: asn_debug.put_line('No rows were retrieved from cursor.');
2725: END IF;
2726: ELSIF x_first_trans THEN
2727: IF (g_asn_debug = 'Y') THEN

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

2720: END IF; --}ends check for a -ve correction
2721: ELSE --}{ else for rows fetched = 0 OR x_first_trans = true
2722: IF rows_fetched = 0 THEN
2723: IF (g_asn_debug = 'Y') THEN
2724: asn_debug.put_line('No rows were retrieved from cursor.');
2725: END IF;
2726: ELSIF x_first_trans THEN
2727: IF (g_asn_debug = 'Y') THEN
2728: asn_debug.put_line('No rows were cascaded');

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

2723: IF (g_asn_debug = 'Y') THEN
2724: asn_debug.put_line('No rows were retrieved from cursor.');
2725: END IF;
2726: ELSIF x_first_trans THEN
2727: IF (g_asn_debug = 'Y') THEN
2728: asn_debug.put_line('No rows were cascaded');
2729: END IF;
2730: END IF;
2731:

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

2724: asn_debug.put_line('No rows were retrieved from cursor.');
2725: END IF;
2726: ELSIF x_first_trans THEN
2727: IF (g_asn_debug = 'Y') THEN
2728: asn_debug.put_line('No rows were cascaded');
2729: END IF;
2730: END IF;
2731:
2732: IF (x_cascaded_table(n).parent_transaction_id IS NOT NULL) THEN --{

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

2762: x_cascaded_table(n).error_status := rcv_error_pkg.g_ret_sts_error;
2763: rcv_error_pkg.log_interface_error('PARENT_TRANSACTION_ID');
2764: END IF; --} end else for rows fetched = 0 OR x_first_trans = true
2765: ELSE -- }{ this is the else for whether remaining qty is not 0
2766: IF (g_asn_debug = 'Y') THEN
2767: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
2768: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
2769: END IF;
2770: END IF; --} ends the check for whether last record has been reached

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

2763: rcv_error_pkg.log_interface_error('PARENT_TRANSACTION_ID');
2764: END IF; --} end else for rows fetched = 0 OR x_first_trans = true
2765: ELSE -- }{ this is the else for whether remaining qty is not 0
2766: IF (g_asn_debug = 'Y') THEN
2767: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
2768: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
2769: END IF;
2770: END IF; --} ends the check for whether last record has been reached
2771:

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

2764: END IF; --} end else for rows fetched = 0 OR x_first_trans = true
2765: ELSE -- }{ this is the else for whether remaining qty is not 0
2766: IF (g_asn_debug = 'Y') THEN
2767: asn_debug.put_line('Remaining UOM quantity is zero ' || TO_CHAR(x_remaining_quantity));
2768: asn_debug.put_line('Return the cascaded rows back to the calling procedure');
2769: END IF;
2770: END IF; --} ends the check for whether last record has been reached
2771:
2772: -- close cursors

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

2770: END IF; --} ends the check for whether last record has been reached
2771:
2772: -- close cursors
2773:
2774: IF (g_asn_debug = 'Y') THEN
2775: asn_debug.put_line('Close cursors ' || current_n);
2776: END IF;
2777:
2778: IF int_org_cor_rt%ISOPEN THEN

Line 2775: asn_debug.put_line('Close cursors ' || current_n);

2771:
2772: -- close cursors
2773:
2774: IF (g_asn_debug = 'Y') THEN
2775: asn_debug.put_line('Close cursors ' || current_n);
2776: END IF;
2777:
2778: IF int_org_cor_rt%ISOPEN THEN
2779: CLOSE int_org_cor_rt;

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

2782: IF int_org_cor_rti%ISOPEN THEN
2783: CLOSE int_org_cor_rti;
2784: END IF;
2785:
2786: IF (g_asn_debug = 'Y') THEN
2787: asn_debug.put_line('before exit current_n is ' || current_n);
2788: END IF;
2789:
2790: EXIT;

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

2783: CLOSE int_org_cor_rti;
2784: END IF;
2785:
2786: IF (g_asn_debug = 'Y') THEN
2787: asn_debug.put_line('before exit current_n is ' || current_n);
2788: END IF;
2789:
2790: EXIT;
2791: END IF; --} matches the condition of lastrecord has been reached

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

2789:
2790: EXIT;
2791: END IF; --} matches the condition of lastrecord has been reached
2792:
2793: IF (g_asn_debug = 'Y') THEN
2794: asn_debug.put_line(' the iot rec uom is ' || int_org_cor_rec.unit_of_meas);
2795: asn_debug.put_line(' the iot rec primary uom is ' || int_org_cor_rec.primary_unit_of_measure);
2796: asn_debug.put_line(' Entering qty calculateion for correct');
2797: END IF;

Line 2794: asn_debug.put_line(' the iot rec uom is ' || int_org_cor_rec.unit_of_meas);

2790: EXIT;
2791: END IF; --} matches the condition of lastrecord has been reached
2792:
2793: IF (g_asn_debug = 'Y') THEN
2794: asn_debug.put_line(' the iot rec uom is ' || int_org_cor_rec.unit_of_meas);
2795: asn_debug.put_line(' the iot rec primary uom is ' || int_org_cor_rec.primary_unit_of_measure);
2796: asn_debug.put_line(' Entering qty calculateion for correct');
2797: END IF;
2798:

Line 2795: asn_debug.put_line(' the iot rec primary uom is ' || int_org_cor_rec.primary_unit_of_measure);

2791: END IF; --} matches the condition of lastrecord has been reached
2792:
2793: IF (g_asn_debug = 'Y') THEN
2794: asn_debug.put_line(' the iot rec uom is ' || int_org_cor_rec.unit_of_meas);
2795: asn_debug.put_line(' the iot rec primary uom is ' || int_org_cor_rec.primary_unit_of_measure);
2796: asn_debug.put_line(' Entering qty calculateion for correct');
2797: END IF;
2798:
2799: -- bug fix 5269121 :it is wrong to

Line 2796: asn_debug.put_line(' Entering qty calculateion for correct');

2792:
2793: IF (g_asn_debug = 'Y') THEN
2794: asn_debug.put_line(' the iot rec uom is ' || int_org_cor_rec.unit_of_meas);
2795: asn_debug.put_line(' the iot rec primary uom is ' || int_org_cor_rec.primary_unit_of_measure);
2796: asn_debug.put_line(' Entering qty calculateion for correct');
2797: END IF;
2798:
2799: -- bug fix 5269121 :it is wrong to
2800: --copy the parents unit of measure into the childs unit of measure, as this will be the one

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

2815: x_converted_parent_trx_qty
2816: );
2817:
2818: IF (x_converted_parent_trx_qty = 0) THEN --{
2819: IF (g_asn_debug = 'Y') THEN
2820: asn_debug.put_line('calling Correct get_available_qty ' || int_org_cor_rec.parent_transaction_type);
2821: END IF;
2822:
2823: -- this is a negative correction

Line 2820: asn_debug.put_line('calling Correct get_available_qty ' || int_org_cor_rec.parent_transaction_type);

2816: );
2817:
2818: IF (x_converted_parent_trx_qty = 0) THEN --{
2819: IF (g_asn_debug = 'Y') THEN
2820: asn_debug.put_line('calling Correct get_available_qty ' || int_org_cor_rec.parent_transaction_type);
2821: END IF;
2822:
2823: -- this is a negative correction
2824: IF (SIGN(temp_cascaded_table(current_n).quantity) = -1) THEN --{

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

2834: x_secondary_available_qty
2835: );
2836:
2837: /* Bug#5369121 - START */
2838: IF (g_asn_debug = 'Y') THEN
2839: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);
2840: asn_debug.put_line('transaction_quantity:' || temp_cascaded_table(current_n).quantity);
2841: END IF;
2842:

Line 2839: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);

2835: );
2836:
2837: /* Bug#5369121 - START */
2838: IF (g_asn_debug = 'Y') THEN
2839: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);
2840: asn_debug.put_line('transaction_quantity:' || temp_cascaded_table(current_n).quantity);
2841: END IF;
2842:
2843: IF (x_converted_parent_trx_qty < ABS(temp_cascaded_table(current_n).quantity)) THEN

Line 2840: asn_debug.put_line('transaction_quantity:' || temp_cascaded_table(current_n).quantity);

2836:
2837: /* Bug#5369121 - START */
2838: IF (g_asn_debug = 'Y') THEN
2839: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);
2840: asn_debug.put_line('transaction_quantity:' || temp_cascaded_table(current_n).quantity);
2841: END IF;
2842:
2843: IF (x_converted_parent_trx_qty < ABS(temp_cascaded_table(current_n).quantity)) THEN
2844:

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

2880: ** There is unprocessed quantity. Convert it to the transaction uom
2881: ** so that the available quantity can be calculated in the trx uom
2882: */
2883:
2884: IF (g_asn_debug = 'Y') THEN
2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);

Line 2885: asn_debug.put_line('Before uom_convert:');

2881: ** so that the available quantity can be calculated in the trx uom
2882: */
2883:
2884: IF (g_asn_debug = 'Y') THEN
2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);
2889: asn_debug.put_line('l_item_id' || l_item_id);

Line 2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);

2882: */
2883:
2884: IF (g_asn_debug = 'Y') THEN
2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);
2889: asn_debug.put_line('l_item_id' || l_item_id);
2890: END IF;

Line 2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);

2883:
2884: IF (g_asn_debug = 'Y') THEN
2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);
2889: asn_debug.put_line('l_item_id' || l_item_id);
2890: END IF;
2891:

Line 2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);

2884: IF (g_asn_debug = 'Y') THEN
2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);
2889: asn_debug.put_line('l_item_id' || l_item_id);
2890: END IF;
2891:
2892: po_uom_s.uom_convert(l_interface_quantity, l_primary_uom, l_item_id,

Line 2889: asn_debug.put_line('l_item_id' || l_item_id);

2885: asn_debug.put_line('Before uom_convert:');
2886: asn_debug.put_line('l_interface_quantity' || l_interface_quantity);
2887: asn_debug.put_line('l_primary_uom' || l_primary_uom);
2888: asn_debug.put_line('l_transaction_uom' || l_transaction_uom);
2889: asn_debug.put_line('l_item_id' || l_item_id);
2890: END IF;
2891:
2892: po_uom_s.uom_convert(l_interface_quantity, l_primary_uom, l_item_id,
2893: l_transaction_uom, l_interface_qty_in_trx_uom);

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

2895: END IF;
2896:
2897: x_converted_parent_trx_qty := x_converted_parent_trx_qty - l_interface_qty_in_trx_uom;
2898:
2899: IF (g_asn_debug = 'Y') THEN
2900: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);
2901: END IF;
2902:
2903: END IF;

Line 2900: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);

2896:
2897: x_converted_parent_trx_qty := x_converted_parent_trx_qty - l_interface_qty_in_trx_uom;
2898:
2899: IF (g_asn_debug = 'Y') THEN
2900: asn_debug.put_line('x_converted_parent_trx_qty:' || x_converted_parent_trx_qty);
2901: END IF;
2902:
2903: END IF;
2904: /* Bug#5369121 - END */

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

2917: l_grand_parent_trx_id := int_org_cor_rec.shipment_line_id;
2918: END IF;
2919: END IF;
2920:
2921: IF (g_asn_debug = 'Y') THEN
2922: asn_debug.put_line('grand parent trx id' || l_grand_parent_trx_id);
2923: asn_debug.put_line('rcv_transaction id' || int_org_cor_rec.rcv_transaction_id);
2924: asn_debug.put_line('parent txn type' || int_org_cor_rec.parent_transaction_type);
2925: END IF;

Line 2922: asn_debug.put_line('grand parent trx id' || l_grand_parent_trx_id);

2918: END IF;
2919: END IF;
2920:
2921: IF (g_asn_debug = 'Y') THEN
2922: asn_debug.put_line('grand parent trx id' || l_grand_parent_trx_id);
2923: asn_debug.put_line('rcv_transaction id' || int_org_cor_rec.rcv_transaction_id);
2924: asn_debug.put_line('parent txn type' || int_org_cor_rec.parent_transaction_type);
2925: END IF;
2926:

Line 2923: asn_debug.put_line('rcv_transaction id' || int_org_cor_rec.rcv_transaction_id);

2919: END IF;
2920:
2921: IF (g_asn_debug = 'Y') THEN
2922: asn_debug.put_line('grand parent trx id' || l_grand_parent_trx_id);
2923: asn_debug.put_line('rcv_transaction id' || int_org_cor_rec.rcv_transaction_id);
2924: asn_debug.put_line('parent txn type' || int_org_cor_rec.parent_transaction_type);
2925: END IF;
2926:
2927: IF (l_grand_parent_trx_id IS NOT NULL) THEN

Line 2924: asn_debug.put_line('parent txn type' || int_org_cor_rec.parent_transaction_type);

2920:
2921: IF (g_asn_debug = 'Y') THEN
2922: asn_debug.put_line('grand parent trx id' || l_grand_parent_trx_id);
2923: asn_debug.put_line('rcv_transaction id' || int_org_cor_rec.rcv_transaction_id);
2924: asn_debug.put_line('parent txn type' || int_org_cor_rec.parent_transaction_type);
2925: END IF;
2926:
2927: IF (l_grand_parent_trx_id IS NOT NULL) THEN
2928: rcv_quantities_s.get_available_quantity('CORRECT',

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

2938: );
2939: END IF;
2940: END IF; --}
2941:
2942: IF (g_asn_debug = 'Y') THEN
2943: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for corrections is ' || x_converted_parent_trx_qty);
2944: END IF;
2945: END IF; --} matches the parent trx qty = 0
2946:

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

2939: END IF;
2940: END IF; --}
2941:
2942: IF (g_asn_debug = 'Y') THEN
2943: asn_debug.put_line('qty from GET_AVAILABLE_QUANTITY for corrections is ' || x_converted_parent_trx_qty);
2944: END IF;
2945: END IF; --} matches the parent trx qty = 0
2946:
2947: IF (x_remaining_quantity = 0) THEN

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

2944: END IF;
2945: END IF; --} matches the parent trx qty = 0
2946:
2947: IF (x_remaining_quantity = 0) THEN
2948: IF (g_asn_debug = 'Y') THEN
2949: asn_debug.put_line(' correct Need an error message in the interface tables');
2950: END IF;
2951: ELSE
2952: /* Converted successfully and have some quantity on which we can act */

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

2945: END IF; --} matches the parent trx qty = 0
2946:
2947: IF (x_remaining_quantity = 0) THEN
2948: IF (g_asn_debug = 'Y') THEN
2949: asn_debug.put_line(' correct Need an error message in the interface tables');
2950: END IF;
2951: ELSE
2952: /* Converted successfully and have some quantity on which we can act */
2953: IF (g_asn_debug = 'Y') THEN

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

2949: asn_debug.put_line(' correct Need an error message in the interface tables');
2950: END IF;
2951: ELSE
2952: /* Converted successfully and have some quantity on which we can act */
2953: IF (g_asn_debug = 'Y') THEN
2954: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2955: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_quantity);
2956: END IF;
2957:

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

2950: END IF;
2951: ELSE
2952: /* Converted successfully and have some quantity on which we can act */
2953: IF (g_asn_debug = 'Y') THEN
2954: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2955: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_quantity);
2956: END IF;
2957:
2958: IF ( (rows_fetched = x_record_count)

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

2951: ELSE
2952: /* Converted successfully and have some quantity on which we can act */
2953: IF (g_asn_debug = 'Y') THEN
2954: asn_debug.put_line('Converted trx qty that is available ' || x_converted_parent_trx_qty);
2955: asn_debug.put_line('Remaining qty in parents uom that is available ' || x_remaining_quantity);
2956: END IF;
2957:
2958: IF ( (rows_fetched = x_record_count)
2959: AND (SIGN(temp_cascaded_table(current_n).quantity) = 1)) THEN --{

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

2958: IF ( (rows_fetched = x_record_count)
2959: AND (SIGN(temp_cascaded_table(current_n).quantity) = 1)) THEN --{
2960: x_converted_trx_qty := x_tolerable_qty;
2961:
2962: IF (g_asn_debug = 'Y') THEN
2963: asn_debug.put_line('Last Row : ' || TO_CHAR(x_converted_trx_qty));
2964: END IF;
2965: END IF; --}
2966:

Line 2963: asn_debug.put_line('Last Row : ' || TO_CHAR(x_converted_trx_qty));

2959: AND (SIGN(temp_cascaded_table(current_n).quantity) = 1)) THEN --{
2960: x_converted_trx_qty := x_tolerable_qty;
2961:
2962: IF (g_asn_debug = 'Y') THEN
2963: asn_debug.put_line('Last Row : ' || TO_CHAR(x_converted_trx_qty));
2964: END IF;
2965: END IF; --}
2966:
2967: IF (x_converted_parent_trx_qty > 0) THEN --{

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

2978: */
2979: x_remaining_quantity := x_remaining_quantity - SIGN(temp_cascaded_table(current_n).quantity) * x_converted_parent_trx_qty;
2980: x_converted_parent_trx_qty := SIGN(temp_cascaded_table(current_n).quantity) * x_converted_parent_trx_qty;
2981:
2982: IF (g_asn_debug = 'Y') THEN
2983: asn_debug.put_line('remaning qty after allocation is : ' || TO_CHAR(x_remaining_quantity));
2984: END IF;
2985:
2986: insert_into_table := TRUE;

Line 2983: asn_debug.put_line('remaning qty after allocation is : ' || TO_CHAR(x_remaining_quantity));

2979: x_remaining_quantity := x_remaining_quantity - SIGN(temp_cascaded_table(current_n).quantity) * x_converted_parent_trx_qty;
2980: x_converted_parent_trx_qty := SIGN(temp_cascaded_table(current_n).quantity) * x_converted_parent_trx_qty;
2981:
2982: IF (g_asn_debug = 'Y') THEN
2983: asn_debug.put_line('remaning qty after allocation is : ' || TO_CHAR(x_remaining_quantity));
2984: END IF;
2985:
2986: insert_into_table := TRUE;
2987: ELSE --}{

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

2984: END IF;
2985:
2986: insert_into_table := TRUE;
2987: ELSE --}{
2988: IF (g_asn_debug = 'Y') THEN
2989: asn_debug.put_line('We are in >= Qty branch ');
2990: END IF;
2991:
2992: x_converted_parent_trx_qty := x_remaining_quantity;

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

2985:
2986: insert_into_table := TRUE;
2987: ELSE --}{
2988: IF (g_asn_debug = 'Y') THEN
2989: asn_debug.put_line('We are in >= Qty branch ');
2990: END IF;
2991:
2992: x_converted_parent_trx_qty := x_remaining_quantity;
2993: insert_into_table := TRUE;

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

2994: x_remaining_quantity := 0;
2995: END IF; --} /* if (x_converted_parent_trx_qty < x_remaining_quantity) then */
2996: ELSE /* x_converted_parent_trx_qty >0 */ --}{
2997: -- so that the row can be used based on qty tolerance checks
2998: IF (g_asn_debug = 'Y') THEN
2999: asn_debug.put_line('Quantity is less then 0 but last record');
3000: END IF;
3001:
3002: insert_into_table := TRUE;

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

2995: END IF; --} /* if (x_converted_parent_trx_qty < x_remaining_quantity) then */
2996: ELSE /* x_converted_parent_trx_qty >0 */ --}{
2997: -- so that the row can be used based on qty tolerance checks
2998: IF (g_asn_debug = 'Y') THEN
2999: asn_debug.put_line('Quantity is less then 0 but last record');
3000: END IF;
3001:
3002: insert_into_table := TRUE;
3003: x_converted_trx_qty := 0;

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

3004: END IF; /*x_converted_parent_trx_qty >0 */ --}
3005: END IF;
3006:
3007: /* Converted qty successfully and we have some quantity on which we can act */
3008: IF (g_asn_debug = 'Y') THEN
3009: asn_debug.put_line('Txn qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
3010: END IF;
3011:
3012: IF insert_into_table THEN --{ --start

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

3005: END IF;
3006:
3007: /* Converted qty successfully and we have some quantity on which we can act */
3008: IF (g_asn_debug = 'Y') THEN
3009: asn_debug.put_line('Txn qty in terms of the parents uom is ' || x_converted_parent_trx_qty);
3010: END IF;
3011:
3012: IF insert_into_table THEN --{ --start
3013: IF (x_first_trans) THEN --{

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

3010: END IF;
3011:
3012: IF insert_into_table THEN --{ --start
3013: IF (x_first_trans) THEN --{
3014: IF (g_asn_debug = 'Y') THEN
3015: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
3016: END IF;
3017:
3018: x_first_trans := FALSE;

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

3011:
3012: IF insert_into_table THEN --{ --start
3013: IF (x_first_trans) THEN --{
3014: IF (g_asn_debug = 'Y') THEN
3015: asn_debug.put_line('First Time ' || TO_CHAR(current_n));
3016: END IF;
3017:
3018: x_first_trans := FALSE;
3019: ELSE --}{

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

3016: END IF;
3017:
3018: x_first_trans := FALSE;
3019: ELSE --}{
3020: IF (g_asn_debug = 'Y') THEN
3021: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
3022: END IF;
3023:
3024: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);

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

3017:
3018: x_first_trans := FALSE;
3019: ELSE --}{
3020: IF (g_asn_debug = 'Y') THEN
3021: asn_debug.put_line('Next Time ' || TO_CHAR(current_n));
3022: END IF;
3023:
3024: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
3025: END IF; --}

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

3023:
3024: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
3025: END IF; --}
3026:
3027: IF (g_asn_debug = 'Y') THEN
3028: asn_debug.put_line('primary uom before ' || temp_cascaded_table(current_n).primary_unit_of_measure);
3029: asn_debug.put_line('normal uom is ' || int_org_cor_rec.unit_of_meas);
3030: END IF;
3031:

Line 3028: asn_debug.put_line('primary uom before ' || temp_cascaded_table(current_n).primary_unit_of_measure);

3024: temp_cascaded_table(current_n) := temp_cascaded_table(current_n - 1);
3025: END IF; --}
3026:
3027: IF (g_asn_debug = 'Y') THEN
3028: asn_debug.put_line('primary uom before ' || temp_cascaded_table(current_n).primary_unit_of_measure);
3029: asn_debug.put_line('normal uom is ' || int_org_cor_rec.unit_of_meas);
3030: END IF;
3031:
3032: temp_cascaded_table(current_n).primary_unit_of_measure := int_org_cor_rec.primary_unit_of_measure;

Line 3029: asn_debug.put_line('normal uom is ' || int_org_cor_rec.unit_of_meas);

3025: END IF; --}
3026:
3027: IF (g_asn_debug = 'Y') THEN
3028: asn_debug.put_line('primary uom before ' || temp_cascaded_table(current_n).primary_unit_of_measure);
3029: asn_debug.put_line('normal uom is ' || int_org_cor_rec.unit_of_meas);
3030: END IF;
3031:
3032: temp_cascaded_table(current_n).primary_unit_of_measure := int_org_cor_rec.primary_unit_of_measure;
3033: temp_cascaded_table(current_n).quantity := x_converted_parent_trx_qty;

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

3033: temp_cascaded_table(current_n).quantity := x_converted_parent_trx_qty;
3034: temp_cascaded_table(current_n).shipment_line_id := int_org_cor_rec.shipment_line_id;
3035:
3036: IF (temp_cascaded_table(current_n).primary_unit_of_measure <> int_org_cor_rec.unit_of_meas) THEN
3037: IF (g_asn_debug = 'Y') THEN
3038: asn_debug.put_line('primary uoms not the same and need to convert quantity');
3039: END IF;
3040:
3041: temp_cascaded_table(current_n).primary_quantity := rcv_roi_transaction.convert_into_correct_qty(x_converted_parent_trx_qty,

Line 3038: asn_debug.put_line('primary uoms not the same and need to convert quantity');

3034: temp_cascaded_table(current_n).shipment_line_id := int_org_cor_rec.shipment_line_id;
3035:
3036: IF (temp_cascaded_table(current_n).primary_unit_of_measure <> int_org_cor_rec.unit_of_meas) THEN
3037: IF (g_asn_debug = 'Y') THEN
3038: asn_debug.put_line('primary uoms not the same and need to convert quantity');
3039: END IF;
3040:
3041: temp_cascaded_table(current_n).primary_quantity := rcv_roi_transaction.convert_into_correct_qty(x_converted_parent_trx_qty,
3042: int_org_cor_rec.unit_of_meas,

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

3046: ELSE
3047: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
3048: END IF;
3049:
3050: IF (g_asn_debug = 'Y') THEN
3051: asn_debug.put_line('txn qty in primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
3052: END IF;
3053:
3054: current_n := current_n + 1;

Line 3051: asn_debug.put_line('txn qty in primary uom is ' || temp_cascaded_table(current_n).primary_quantity);

3047: temp_cascaded_table(current_n).primary_quantity := x_converted_parent_trx_qty;
3048: END IF;
3049:
3050: IF (g_asn_debug = 'Y') THEN
3051: asn_debug.put_line('txn qty in primary uom is ' || temp_cascaded_table(current_n).primary_quantity);
3052: END IF;
3053:
3054: current_n := current_n + 1;
3055:

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

3052: END IF;
3053:
3054: current_n := current_n + 1;
3055:
3056: IF (g_asn_debug = 'Y') THEN
3057: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
3058: END IF;
3059: END IF; --}
3060:

Line 3057: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));

3053:
3054: current_n := current_n + 1;
3055:
3056: IF (g_asn_debug = 'Y') THEN
3057: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
3058: END IF;
3059: END IF; --}
3060:
3061: IF (g_asn_debug = 'Y') THEN

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

3057: asn_debug.put_line('Increment pointer by 1 ' || TO_CHAR(current_n));
3058: END IF;
3059: END IF; --}
3060:
3061: IF (g_asn_debug = 'Y') THEN
3062: asn_debug.put_line('finished assigning line qty for one row in cursor for IOT corrections ');
3063: END IF;
3064: END LOOP; --}
3065:

Line 3062: asn_debug.put_line('finished assigning line qty for one row in cursor for IOT corrections ');

3058: END IF;
3059: END IF; --}
3060:
3061: IF (g_asn_debug = 'Y') THEN
3062: asn_debug.put_line('finished assigning line qty for one row in cursor for IOT corrections ');
3063: END IF;
3064: END LOOP; --}
3065:
3066: IF (g_asn_debug = 'Y') THEN

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

3062: asn_debug.put_line('finished assigning line qty for one row in cursor for IOT corrections ');
3063: END IF;
3064: END LOOP; --}
3065:
3066: IF (g_asn_debug = 'Y') THEN
3067: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
3068: END IF;
3069:
3070: IF int_org_cor_rt%ISOPEN THEN

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

3063: END IF;
3064: END LOOP; --}
3065:
3066: IF (g_asn_debug = 'Y') THEN
3067: asn_debug.put_line('before closing cursors current_n is ' || temp_cascaded_table.COUNT);
3068: END IF;
3069:
3070: IF int_org_cor_rt%ISOPEN THEN
3071: CLOSE int_org_cor_rt;

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

3074: IF int_org_cor_rti%ISOPEN THEN
3075: CLOSE int_org_cor_rti;
3076: END IF;
3077:
3078: IF (g_asn_debug = 'Y') THEN
3079: asn_debug.put_line('Exit explode_line_quantity');
3080: END IF;
3081: EXCEPTION
3082: WHEN rcv_error_pkg.e_fatal_error THEN

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

3075: CLOSE int_org_cor_rti;
3076: END IF;
3077:
3078: IF (g_asn_debug = 'Y') THEN
3079: asn_debug.put_line('Exit explode_line_quantity');
3080: END IF;
3081: EXCEPTION
3082: WHEN rcv_error_pkg.e_fatal_error THEN
3083: IF int_org_cor_rt%ISOPEN THEN

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

3100: rcv_error_pkg.set_sql_error_message('derive_int_org_cor_line_qty', x_progress);
3101: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
3102: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
3103:
3104: IF (g_asn_debug = 'Y') THEN
3105: asn_debug.put_line(TO_CHAR(n));
3106: asn_debug.put_line(SQLERRM);
3107: asn_debug.put_line('error ' || x_progress);
3108: END IF;

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

3101: x_cascaded_table(n).error_message := rcv_error_pkg.get_last_message;
3102: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
3103:
3104: IF (g_asn_debug = 'Y') THEN
3105: asn_debug.put_line(TO_CHAR(n));
3106: asn_debug.put_line(SQLERRM);
3107: asn_debug.put_line('error ' || x_progress);
3108: END IF;
3109: END derive_int_org_cor_line_qty;

Line 3106: asn_debug.put_line(SQLERRM);

3102: rcv_error_pkg.log_interface_error('INTERFACE_TRANSACTION_ID');
3103:
3104: IF (g_asn_debug = 'Y') THEN
3105: asn_debug.put_line(TO_CHAR(n));
3106: asn_debug.put_line(SQLERRM);
3107: asn_debug.put_line('error ' || x_progress);
3108: END IF;
3109: END derive_int_org_cor_line_qty;
3110:

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

3103:
3104: IF (g_asn_debug = 'Y') THEN
3105: asn_debug.put_line(TO_CHAR(n));
3106: asn_debug.put_line(SQLERRM);
3107: asn_debug.put_line('error ' || x_progress);
3108: END IF;
3109: END derive_int_org_cor_line_qty;
3110:
3111: PROCEDURE default_int_org_cor_line(

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

3201: x_cascaded_table(n).processing_status_code := p_trx_record.processing_status_code;
3202: x_cascaded_table(n).transaction_status_code := p_trx_record.transaction_status_code;
3203: x_cascaded_table(n).auto_transact_code := p_trx_record.auto_transact_code;
3204:
3205: IF (g_asn_debug = 'Y') THEN
3206: asn_debug.put_line('Enter Default for IOT Corrections');
3207: END IF;
3208:
3209: IF (x_cascaded_table(n).derive = 'Y') THEN --{

Line 3206: asn_debug.put_line('Enter Default for IOT Corrections');

3202: x_cascaded_table(n).transaction_status_code := p_trx_record.transaction_status_code;
3203: x_cascaded_table(n).auto_transact_code := p_trx_record.auto_transact_code;
3204:
3205: IF (g_asn_debug = 'Y') THEN
3206: asn_debug.put_line('Enter Default for IOT Corrections');
3207: END IF;
3208:
3209: IF (x_cascaded_table(n).derive = 'Y') THEN --{
3210: IF (x_cascaded_table(n).derive_index <> 0) THEN --{

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

3289: x_cascaded_table(n).deliver_to_person_id := x_cascaded_table(temp_index).deliver_to_person_id;
3290: x_cascaded_table(n).deliver_to_location_id := x_cascaded_table(temp_index).deliver_to_location_id;
3291: x_cascaded_table(n).subinventory := x_cascaded_table(temp_index).subinventory;
3292: ELSE --} {
3293: IF (g_asn_debug = 'Y') THEN
3294: asn_debug.put_line('open cursor Default');
3295: END IF;
3296:
3297: OPEN int_org_cor_rti(x_cascaded_table(n).parent_interface_txn_id);

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

3290: x_cascaded_table(n).deliver_to_location_id := x_cascaded_table(temp_index).deliver_to_location_id;
3291: x_cascaded_table(n).subinventory := x_cascaded_table(temp_index).subinventory;
3292: ELSE --} {
3293: IF (g_asn_debug = 'Y') THEN
3294: asn_debug.put_line('open cursor Default');
3295: END IF;
3296:
3297: OPEN int_org_cor_rti(x_cascaded_table(n).parent_interface_txn_id);
3298: END IF; --}

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

3300: OPEN int_org_cor_rt(x_cascaded_table(n).parent_transaction_id);
3301: END IF; --}
3302:
3303: IF (int_org_cor_rt%ISOPEN) THEN
3304: IF (g_asn_debug = 'Y') THEN
3305: asn_debug.put_line('fetch cursor Default ' || x_cascaded_table(n).parent_transaction_id);
3306: END IF;
3307:
3308: FETCH int_org_cor_rt INTO default_int_org_cor_rt_info;

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

3301: END IF; --}
3302:
3303: IF (int_org_cor_rt%ISOPEN) THEN
3304: IF (g_asn_debug = 'Y') THEN
3305: asn_debug.put_line('fetch cursor Default ' || x_cascaded_table(n).parent_transaction_id);
3306: END IF;
3307:
3308: FETCH int_org_cor_rt INTO default_int_org_cor_rt_info;
3309: ELSIF(int_org_cor_rti%ISOPEN) THEN

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

3322: x_from_organization_id;
3323: CLOSE int_org_cor_rsl;
3324: END IF;
3325:
3326: IF (g_asn_debug = 'Y') THEN --{
3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));

Line 3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);

3323: CLOSE int_org_cor_rsl;
3324: END IF;
3325:
3326: IF (g_asn_debug = 'Y') THEN --{
3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);

Line 3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);

3324: END IF;
3325:
3326: IF (g_asn_debug = 'Y') THEN --{
3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);

Line 3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));

3325:
3326: IF (g_asn_debug = 'Y') THEN --{
3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);

Line 3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));

3326: IF (g_asn_debug = 'Y') THEN --{
3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);

Line 3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);

3327: asn_debug.put_line('Defaulting Cor item_description' || default_int_org_cor_rt_info.item_description);
3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);

Line 3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);

3328: asn_debug.put_line('Defaulting Cor location_id' || default_int_org_cor_rt_info.loc_id);
3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);

Line 3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);

3329: asn_debug.put_line('Defaulting Cor to organization_id' || NVL(x_to_organization_id, default_int_org_cor_rt_info.organization_id));
3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);

Line 3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);

3330: asn_debug.put_line('Defaulting Cor from organization_id' || NVL(x_from_organization_id, default_int_org_cor_rt_info.organization_id));
3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);

Line 3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);

3331: asn_debug.put_line('Defaulting Cor routing_header_id' || default_int_org_cor_rt_info.routing_header_id);
3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);

Line 3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);

3332: asn_debug.put_line('Defaulting Cor currency_code' || default_int_org_cor_rt_info.currency_code);
3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);

Line 3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);

3333: asn_debug.put_line('Defaulting Cor currency_conversion_rate' || default_int_org_cor_rt_info.currency_conversion_rate);
3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);
3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);

Line 3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);

3334: asn_debug.put_line('Defaulting Cor currency_conversion_type' || default_int_org_cor_rt_info.currency_conversion_type);
3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);
3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);
3342: END IF; --}

Line 3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);

3335: asn_debug.put_line('Defaulting cor currency_conversion_date' || default_int_org_cor_rt_info.currency_conversion_date);
3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);
3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);
3342: END IF; --}
3343:

Line 3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);

3336: asn_debug.put_line('Defaulting cor shipment_header_id' || default_int_org_cor_rt_info.shipment_header_id);
3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);
3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);
3342: END IF; --}
3343:
3344: x_cascaded_table(n).item_description := default_int_org_cor_rt_info.item_description;

Line 3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);

3337: asn_debug.put_line('Defaulting cor shipment_line_id' || default_int_org_cor_rt_info.shipment_line_id);
3338: asn_debug.put_line('Defaulting cor category_id' || default_int_org_cor_rt_info.category_id);
3339: asn_debug.put_line('Defaulting cor DELIVER_TO_PERSON_ID' || default_int_org_cor_rt_info.deliver_to_person_id);
3340: asn_debug.put_line('Defaulting Corr DELIVER_TO_LOCATION_ID' || default_int_org_cor_rt_info.deliver_to_location_id);
3341: asn_debug.put_line('Defaulting Cor subinv' || default_int_org_cor_rt_info.subinventory);
3342: END IF; --}
3343:
3344: x_cascaded_table(n).item_description := default_int_org_cor_rt_info.item_description;
3345: x_cascaded_table(n).destination_type_code := default_int_org_cor_rt_info.destination_type_code;

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

3360: x_cascaded_table(n).deliver_to_location_id := default_int_org_cor_rt_info.deliver_to_location_id;
3361: x_cascaded_table(n).subinventory := default_int_org_cor_rt_info.subinventory;
3362:
3363: -- LPN defaulting
3364: IF (g_asn_debug = 'Y') THEN
3365: asn_debug.put_line(' defaulting lpn_id and transfer_lpn_id for int org cor');
3366: END IF;
3367:
3368: IF (x_cascaded_table(n).quantity > 0) THEN --{

Line 3365: asn_debug.put_line(' defaulting lpn_id and transfer_lpn_id for int org cor');

3361: x_cascaded_table(n).subinventory := default_int_org_cor_rt_info.subinventory;
3362:
3363: -- LPN defaulting
3364: IF (g_asn_debug = 'Y') THEN
3365: asn_debug.put_line(' defaulting lpn_id and transfer_lpn_id for int org cor');
3366: END IF;
3367:
3368: IF (x_cascaded_table(n).quantity > 0) THEN --{
3369: -- for +ve corrections :

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

3441: AND mtl_system_items.organization_id = x_cascaded_table(n).to_organization_id;
3442:
3443: END Comment: Bug: 4735484
3444: */
3445: IF (g_asn_debug = 'Y') THEN
3446: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
3447: END IF;
3448:
3449: IF (g_asn_debug = 'Y') THEN

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

3442:
3443: END Comment: Bug: 4735484
3444: */
3445: IF (g_asn_debug = 'Y') THEN
3446: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
3447: END IF;
3448:
3449: IF (g_asn_debug = 'Y') THEN
3450: asn_debug.put_line('Exit default_int_org_cor_line');

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

3445: IF (g_asn_debug = 'Y') THEN
3446: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
3447: END IF;
3448:
3449: IF (g_asn_debug = 'Y') THEN
3450: asn_debug.put_line('Exit default_int_org_cor_line');
3451: END IF;
3452:
3453: IF int_org_cor_rt%ISOPEN THEN

Line 3450: asn_debug.put_line('Exit default_int_org_cor_line');

3446: asn_debug.put_line('Set Location_id = ' || TO_CHAR(x_cascaded_table(n).location_id));
3447: END IF;
3448:
3449: IF (g_asn_debug = 'Y') THEN
3450: asn_debug.put_line('Exit default_int_org_cor_line');
3451: END IF;
3452:
3453: IF int_org_cor_rt%ISOPEN THEN
3454: CLOSE int_org_cor_rt;

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

3488: END IF;
3489:
3490: x_error_status := rcv_error_pkg.g_ret_sts_error;
3491:
3492: IF (g_asn_debug = 'Y') THEN
3493: asn_debug.put_line('Validating ref integrity');
3494: END IF;
3495:
3496: IF (g_asn_debug = 'Y') THEN

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

3489:
3490: x_error_status := rcv_error_pkg.g_ret_sts_error;
3491:
3492: IF (g_asn_debug = 'Y') THEN
3493: asn_debug.put_line('Validating ref integrity');
3494: END IF;
3495:
3496: IF (g_asn_debug = 'Y') THEN
3497: asn_debug.put_line('transaction_type '||(x_cascaded_table(n).transaction_type ));

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

3492: IF (g_asn_debug = 'Y') THEN
3493: asn_debug.put_line('Validating ref integrity');
3494: END IF;
3495:
3496: IF (g_asn_debug = 'Y') THEN
3497: asn_debug.put_line('transaction_type '||(x_cascaded_table(n).transaction_type ));
3498: asn_debug.put_line('shipment_header_id '||(x_header_record.header_record.receipt_header_id ));
3499: asn_debug.put_line('shipment_line_id '||(x_cascaded_table(n).shipment_line_id ));
3500: end if;

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

3493: asn_debug.put_line('Validating ref integrity');
3494: END IF;
3495:
3496: IF (g_asn_debug = 'Y') THEN
3497: asn_debug.put_line('transaction_type '||(x_cascaded_table(n).transaction_type ));
3498: asn_debug.put_line('shipment_header_id '||(x_header_record.header_record.receipt_header_id ));
3499: asn_debug.put_line('shipment_line_id '||(x_cascaded_table(n).shipment_line_id ));
3500: end if;
3501: /* Get the shipment_header_id for that shipment_line_id and the

Line 3498: asn_debug.put_line('shipment_header_id '||(x_header_record.header_record.receipt_header_id ));

3494: END IF;
3495:
3496: IF (g_asn_debug = 'Y') THEN
3497: asn_debug.put_line('transaction_type '||(x_cascaded_table(n).transaction_type ));
3498: asn_debug.put_line('shipment_header_id '||(x_header_record.header_record.receipt_header_id ));
3499: asn_debug.put_line('shipment_line_id '||(x_cascaded_table(n).shipment_line_id ));
3500: end if;
3501: /* Get the shipment_header_id for that shipment_line_id and the
3502: * shipment_header_id in the header record. If you dont get it then

Line 3499: asn_debug.put_line('shipment_line_id '||(x_cascaded_table(n).shipment_line_id ));

3495:
3496: IF (g_asn_debug = 'Y') THEN
3497: asn_debug.put_line('transaction_type '||(x_cascaded_table(n).transaction_type ));
3498: asn_debug.put_line('shipment_header_id '||(x_header_record.header_record.receipt_header_id ));
3499: asn_debug.put_line('shipment_line_id '||(x_cascaded_table(n).shipment_line_id ));
3500: end if;
3501: /* Get the shipment_header_id for that shipment_line_id and the
3502: * shipment_header_id in the header record. If you dont get it then
3503: * this means that you are trying to receive a shipment line that

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

3511: where shipment_header_id =
3512: x_header_record.header_record.receipt_header_id
3513: and shipment_line_id = x_cascaded_table(n).shipment_line_id;
3514:
3515: IF (g_asn_debug = 'Y') THEN
3516: asn_debug.put_line('max shipment_header_id '||x_header_id );
3517: end if;
3518:
3519: IF (x_header_id = 0) THEN

Line 3516: asn_debug.put_line('max shipment_header_id '||x_header_id );

3512: x_header_record.header_record.receipt_header_id
3513: and shipment_line_id = x_cascaded_table(n).shipment_line_id;
3514:
3515: IF (g_asn_debug = 'Y') THEN
3516: asn_debug.put_line('max shipment_header_id '||x_header_id );
3517: end if;
3518:
3519: IF (x_header_id = 0) THEN
3520: IF (g_asn_debug = 'Y') THEN

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

3516: asn_debug.put_line('max shipment_header_id '||x_header_id );
3517: end if;
3518:
3519: IF (x_header_id = 0) THEN
3520: IF (g_asn_debug = 'Y') THEN
3521: asn_debug.put_line('No header id found. This shipment line does not belong to the same shipment as that of the header' );
3522: end if;
3523: rcv_error_pkg.set_error_message('RCV_INTORD_MISMATCH_SHIPMENTS');
3524: RAISE e_validation_error;

Line 3521: asn_debug.put_line('No header id found. This shipment line does not belong to the same shipment as that of the header' );

3517: end if;
3518:
3519: IF (x_header_id = 0) THEN
3520: IF (g_asn_debug = 'Y') THEN
3521: asn_debug.put_line('No header id found. This shipment line does not belong to the same shipment as that of the header' );
3522: end if;
3523: rcv_error_pkg.set_error_message('RCV_INTORD_MISMATCH_SHIPMENTS');
3524: RAISE e_validation_error;
3525:

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

3523: rcv_error_pkg.set_error_message('RCV_INTORD_MISMATCH_SHIPMENTS');
3524: RAISE e_validation_error;
3525:
3526: else
3527: IF (g_asn_debug = 'Y') THEN
3528: asn_debug.put_line('Header id found' );
3529: end if;
3530: END IF;
3531:

Line 3528: asn_debug.put_line('Header id found' );

3524: RAISE e_validation_error;
3525:
3526: else
3527: IF (g_asn_debug = 'Y') THEN
3528: asn_debug.put_line('Header id found' );
3529: end if;
3530: END IF;
3531:
3532: end if;