DBA Data[Home] [Help]

APPS.RCV_ROI_HEADER dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_roi_header
2: /* $Header: RCVPREHB.pls 120.10.12020000.2 2012/11/15 08:39:53 honwei ship $*/
3: AS
4: g_asn_debug VARCHAR2(1) := asn_debug.is_debug_on; -- Bug 9152790: rcv debug enhancement
5: x_interface_type VARCHAR2(25) := 'RCV-856';
6: x_sysdate DATE := SYSDATE;
7: x_count NUMBER := 0;
8: x_in_this_op_unit NUMBER := 0; -- Bug 3359613

Line 21: asn_debug.put_line('new_roi: in process_cancellation');

17: PROCEDURE process_cancellation(
18: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
19: ) IS
20: BEGIN
21: asn_debug.put_line('new_roi: in process_cancellation');
22: derive_vendor_header(p_header_record);
23:
24: IF p_header_record.error_record.error_status IN('S', 'W') THEN
25: default_vendor_header(p_header_record);

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

35: END IF;
36: END IF;
37: EXCEPTION
38: WHEN OTHERS THEN
39: IF (g_asn_debug = 'Y') THEN
40: asn_debug.put_line('Exception in process_cancellation ');
41: END IF;
42:
43: p_header_record.error_record.error_status := 'U';

Line 40: asn_debug.put_line('Exception in process_cancellation ');

36: END IF;
37: EXCEPTION
38: WHEN OTHERS THEN
39: IF (g_asn_debug = 'Y') THEN
40: asn_debug.put_line('Exception in process_cancellation ');
41: END IF;
42:
43: p_header_record.error_record.error_status := 'U';
44: p_header_record.error_record.error_message := SQLERRM;

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

42:
43: p_header_record.error_record.error_status := 'U';
44: p_header_record.error_record.error_message := SQLERRM;
45:
46: IF (g_asn_debug = 'Y') THEN
47: asn_debug.put_line('Fatal Error');
48: END IF;
49: END process_cancellation;
50:

Line 47: asn_debug.put_line('Fatal Error');

43: p_header_record.error_record.error_status := 'U';
44: p_header_record.error_record.error_message := SQLERRM;
45:
46: IF (g_asn_debug = 'Y') THEN
47: asn_debug.put_line('Fatal Error');
48: END IF;
49: END process_cancellation;
50:
51: PROCEDURE process_vendor_header(

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

53: ) IS
54: l_shipment_header_id NUMBER;
55: l_receive_against_asn VARCHAR2(1) := 'N';
56: BEGIN
57: IF (g_asn_debug = 'Y') THEN
58: asn_debug.put_line('new_roi: in process_vendor_header');
59: END IF;
60:
61: /* check whether there is already a row in rsh for the given

Line 58: asn_debug.put_line('new_roi: in process_vendor_header');

54: l_shipment_header_id NUMBER;
55: l_receive_against_asn VARCHAR2(1) := 'N';
56: BEGIN
57: IF (g_asn_debug = 'Y') THEN
58: asn_debug.put_line('new_roi: in process_vendor_header');
59: END IF;
60:
61: /* check whether there is already a row in rsh for the given
62: * shipment_num . It will be there if this is a

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

61: /* check whether there is already a row in rsh for the given
62: * shipment_num . It will be there if this is a
63: * Receive against an ASN.
64: */
65: IF (g_asn_debug = 'Y') THEN
66: asn_debug.put_line('ASN_TYPE ' || NVL(p_header_record.header_record.asn_type, 'STD'));
67: END IF;
68:
69: /* We need to derive vendor header for ASN receive since we can have

Line 66: asn_debug.put_line('ASN_TYPE ' || NVL(p_header_record.header_record.asn_type, 'STD'));

62: * shipment_num . It will be there if this is a
63: * Receive against an ASN.
64: */
65: IF (g_asn_debug = 'Y') THEN
66: asn_debug.put_line('ASN_TYPE ' || NVL(p_header_record.header_record.asn_type, 'STD'));
67: END IF;
68:
69: /* We need to derive vendor header for ASN receive since we can have
70: * same shipment_num for different vendor/vendor_site combinations.

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

79: validate_vendor_header(p_header_record);
80: END IF;
81:
82: /* Bug#4523892 - START */
83: IF (g_asn_debug = 'Y') THEN
84: asn_debug.put_line('Transaction against ASN? ' || g_txn_against_asn);
85: END IF;
86: /* Bug#4523892 - END */
87:

Line 84: asn_debug.put_line('Transaction against ASN? ' || g_txn_against_asn);

80: END IF;
81:
82: /* Bug#4523892 - START */
83: IF (g_asn_debug = 'Y') THEN
84: asn_debug.put_line('Transaction against ASN? ' || g_txn_against_asn);
85: END IF;
86: /* Bug#4523892 - END */
87:
88: IF p_header_record.error_record.error_status IN('S', 'W') THEN --{

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

87:
88: IF p_header_record.error_record.error_status IN('S', 'W') THEN --{
89: IF ( NVL(p_header_record.header_record.test_flag, 'N') <> 'Y'
90: AND g_txn_against_asn <> 'Y') THEN --{
91: IF (g_asn_debug = 'Y') THEN
92: asn_debug.put_line('Call insert_shipment_header');
93: END IF;
94:
95: insert_shipment_header(p_header_record);

Line 92: asn_debug.put_line('Call insert_shipment_header');

88: IF p_header_record.error_record.error_status IN('S', 'W') THEN --{
89: IF ( NVL(p_header_record.header_record.test_flag, 'N') <> 'Y'
90: AND g_txn_against_asn <> 'Y') THEN --{
91: IF (g_asn_debug = 'Y') THEN
92: asn_debug.put_line('Call insert_shipment_header');
93: END IF;
94:
95: insert_shipment_header(p_header_record);
96:

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

93: END IF;
94:
95: insert_shipment_header(p_header_record);
96:
97: IF (g_asn_debug = 'Y') THEN
98: asn_debug.put_line('After insert_shipment_header');
99: END IF;
100: ELSIF(g_txn_against_asn = 'Y') THEN
101: /* Some fields can be changed at the time of

Line 98: asn_debug.put_line('After insert_shipment_header');

94:
95: insert_shipment_header(p_header_record);
96:
97: IF (g_asn_debug = 'Y') THEN
98: asn_debug.put_line('After insert_shipment_header');
99: END IF;
100: ELSIF(g_txn_against_asn = 'Y') THEN
101: /* Some fields can be changed at the time of
102: * receiving an ASN. We need to update these

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

101: /* Some fields can be changed at the time of
102: * receiving an ASN. We need to update these
103: * in rsh.
104: */
105: IF (g_asn_debug = 'Y') THEN
106: asn_debug.put_line('Before update_shipment_header');
107: END IF;
108:
109: update_shipment_header(p_header_record);

Line 106: asn_debug.put_line('Before update_shipment_header');

102: * receiving an ASN. We need to update these
103: * in rsh.
104: */
105: IF (g_asn_debug = 'Y') THEN
106: asn_debug.put_line('Before update_shipment_header');
107: END IF;
108:
109: update_shipment_header(p_header_record);
110:

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

107: END IF;
108:
109: update_shipment_header(p_header_record);
110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line('After update_shipment_header');
113: END IF;
114: END IF; --}
115: END IF; --}

Line 112: asn_debug.put_line('After update_shipment_header');

108:
109: update_shipment_header(p_header_record);
110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line('After update_shipment_header');
113: END IF;
114: END IF; --}
115: END IF; --}
116: EXCEPTION

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

114: END IF; --}
115: END IF; --}
116: EXCEPTION
117: WHEN OTHERS THEN
118: IF (g_asn_debug = 'Y') THEN
119: asn_debug.put_line('Exception in process_vendor_header ');
120: END IF;
121:
122: p_header_record.error_record.error_status := 'U';

Line 119: asn_debug.put_line('Exception in process_vendor_header ');

115: END IF; --}
116: EXCEPTION
117: WHEN OTHERS THEN
118: IF (g_asn_debug = 'Y') THEN
119: asn_debug.put_line('Exception in process_vendor_header ');
120: END IF;
121:
122: p_header_record.error_record.error_status := 'U';
123: p_header_record.error_record.error_message := SQLERRM;

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

121:
122: p_header_record.error_record.error_status := 'U';
123: p_header_record.error_record.error_message := SQLERRM;
124:
125: IF (g_asn_debug = 'Y') THEN
126: asn_debug.put_line('Fatal Error');
127: END IF;
128: END process_vendor_header;
129:

Line 126: asn_debug.put_line('Fatal Error');

122: p_header_record.error_record.error_status := 'U';
123: p_header_record.error_record.error_message := SQLERRM;
124:
125: IF (g_asn_debug = 'Y') THEN
126: asn_debug.put_line('Fatal Error');
127: END IF;
128: END process_vendor_header;
129:
130: PROCEDURE process_customer_header(

Line 134: asn_debug.put_line('new_roi: in process_customer_header');

130: PROCEDURE process_customer_header(
131: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
132: ) IS
133: BEGIN
134: asn_debug.put_line('new_roi: in process_customer_header');
135: rcv_rma_headers.derive_rma_header(p_header_record);
136:
137: IF p_header_record.error_record.error_status IN('S', 'W') THEN
138: rcv_rma_headers.default_rma_header(p_header_record);

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

148: END IF;
149: END IF;
150: EXCEPTION
151: WHEN OTHERS THEN
152: IF (g_asn_debug = 'Y') THEN
153: asn_debug.put_line('Exception in process_customer_header ');
154: END IF;
155:
156: p_header_record.error_record.error_status := 'U';

Line 153: asn_debug.put_line('Exception in process_customer_header ');

149: END IF;
150: EXCEPTION
151: WHEN OTHERS THEN
152: IF (g_asn_debug = 'Y') THEN
153: asn_debug.put_line('Exception in process_customer_header ');
154: END IF;
155:
156: p_header_record.error_record.error_status := 'U';
157: p_header_record.error_record.error_message := SQLERRM;

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

155:
156: p_header_record.error_record.error_status := 'U';
157: p_header_record.error_record.error_message := SQLERRM;
158:
159: IF (g_asn_debug = 'Y') THEN
160: asn_debug.put_line('Fatal Error');
161: END IF;
162: END process_customer_header;
163:

Line 160: asn_debug.put_line('Fatal Error');

156: p_header_record.error_record.error_status := 'U';
157: p_header_record.error_record.error_message := SQLERRM;
158:
159: IF (g_asn_debug = 'Y') THEN
160: asn_debug.put_line('Fatal Error');
161: END IF;
162: END process_customer_header;
163:
164: PROCEDURE process_internal_header(

Line 168: asn_debug.put_line('new_roi: in process_internal_header');

164: PROCEDURE process_internal_header(
165: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
166: ) IS
167: BEGIN
168: asn_debug.put_line('new_roi: in process_internal_header');
169: END process_internal_header;
170:
171: PROCEDURE process_internal_order_header(
172: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type

Line 175: asn_debug.put_line('new_roi: in process_internal_order_header');

171: PROCEDURE process_internal_order_header(
172: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
173: ) IS
174: BEGIN
175: asn_debug.put_line('new_roi: in process_internal_order_header');
176: derive_internal_order_header(p_header_record);
177:
178: IF p_header_record.error_record.error_status IN('S', 'W') THEN
179: default_internal_order_header(p_header_record);

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

187: rcv_int_order_pp_pvt.update_header(p_header_record);
188: END IF;
189: EXCEPTION
190: WHEN OTHERS THEN
191: IF (g_asn_debug = 'Y') THEN
192: asn_debug.put_line('Exception in process_internal_order_header ');
193: END IF;
194:
195: p_header_record.error_record.error_status := 'U';

Line 192: asn_debug.put_line('Exception in process_internal_order_header ');

188: END IF;
189: EXCEPTION
190: WHEN OTHERS THEN
191: IF (g_asn_debug = 'Y') THEN
192: asn_debug.put_line('Exception in process_internal_order_header ');
193: END IF;
194:
195: p_header_record.error_record.error_status := 'U';
196: p_header_record.error_record.error_message := SQLERRM;

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

194:
195: p_header_record.error_record.error_status := 'U';
196: p_header_record.error_record.error_message := SQLERRM;
197:
198: IF (g_asn_debug = 'Y') THEN
199: asn_debug.put_line('Fatal Error');
200: END IF;
201: END process_internal_order_header;
202:

Line 199: asn_debug.put_line('Fatal Error');

195: p_header_record.error_record.error_status := 'U';
196: p_header_record.error_record.error_message := SQLERRM;
197:
198: IF (g_asn_debug = 'Y') THEN
199: asn_debug.put_line('Fatal Error');
200: END IF;
201: END process_internal_order_header;
202:
203: PROCEDURE derive_vendor_header(

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

226: rcv_roi_header_common.default_asn_type(p_header_record);
227: rcv_roi_header_common.default_ship_from_loc_info(p_header_record);
228: default_shipment_num(p_header_record);
229:
230: IF (g_asn_debug = 'Y') THEN
231: asn_debug.put_line('asn_tyoe ' || NVL(p_header_record.header_record.asn_type, 'STD'));
232: asn_debug.put_line('shipment_num ' || NVL(p_header_record.header_record.shipment_num, -999));
233: asn_debug.put_line('receipt_header_id ' || NVL(p_header_record.header_record.receipt_header_id, -999));
234: END IF;

Line 231: asn_debug.put_line('asn_tyoe ' || NVL(p_header_record.header_record.asn_type, 'STD'));

227: rcv_roi_header_common.default_ship_from_loc_info(p_header_record);
228: default_shipment_num(p_header_record);
229:
230: IF (g_asn_debug = 'Y') THEN
231: asn_debug.put_line('asn_tyoe ' || NVL(p_header_record.header_record.asn_type, 'STD'));
232: asn_debug.put_line('shipment_num ' || NVL(p_header_record.header_record.shipment_num, -999));
233: asn_debug.put_line('receipt_header_id ' || NVL(p_header_record.header_record.receipt_header_id, -999));
234: END IF;
235:

Line 232: asn_debug.put_line('shipment_num ' || NVL(p_header_record.header_record.shipment_num, -999));

228: default_shipment_num(p_header_record);
229:
230: IF (g_asn_debug = 'Y') THEN
231: asn_debug.put_line('asn_tyoe ' || NVL(p_header_record.header_record.asn_type, 'STD'));
232: asn_debug.put_line('shipment_num ' || NVL(p_header_record.header_record.shipment_num, -999));
233: asn_debug.put_line('receipt_header_id ' || NVL(p_header_record.header_record.receipt_header_id, -999));
234: END IF;
235:
236: g_txn_against_asn := 'Y'; /* Bug#4523892 */

Line 233: asn_debug.put_line('receipt_header_id ' || NVL(p_header_record.header_record.receipt_header_id, -999));

229:
230: IF (g_asn_debug = 'Y') THEN
231: asn_debug.put_line('asn_tyoe ' || NVL(p_header_record.header_record.asn_type, 'STD'));
232: asn_debug.put_line('shipment_num ' || NVL(p_header_record.header_record.shipment_num, -999));
233: asn_debug.put_line('receipt_header_id ' || NVL(p_header_record.header_record.receipt_header_id, -999));
234: END IF;
235:
236: g_txn_against_asn := 'Y'; /* Bug#4523892 */
237: IF ( NVL(p_header_record.header_record.asn_type, 'STD') = 'STD'

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

236: g_txn_against_asn := 'Y'; /* Bug#4523892 */
237: IF ( NVL(p_header_record.header_record.asn_type, 'STD') = 'STD'
238: AND ( p_header_record.header_record.shipment_num IS NOT NULL
239: AND p_header_record.header_record.receipt_header_id IS NOT NULL)) THEN
240: IF (g_asn_debug = 'Y') THEN
241: asn_debug.put_line('Into default shipment info for an ASN receive');
242: END IF;
243:
244: default_shipment_info(p_header_record);

Line 241: asn_debug.put_line('Into default shipment info for an ASN receive');

237: IF ( NVL(p_header_record.header_record.asn_type, 'STD') = 'STD'
238: AND ( p_header_record.header_record.shipment_num IS NOT NULL
239: AND p_header_record.header_record.receipt_header_id IS NOT NULL)) THEN
240: IF (g_asn_debug = 'Y') THEN
241: asn_debug.put_line('Into default shipment info for an ASN receive');
242: END IF;
243:
244: default_shipment_info(p_header_record);
245: rcv_roi_header_common.default_receipt_info(p_header_record);

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

243:
244: default_shipment_info(p_header_record);
245: rcv_roi_header_common.default_receipt_info(p_header_record);
246: ELSE /* For all other txns except asn receive */
247: IF (g_asn_debug = 'Y') THEN
248: asn_debug.put_line('Into default shipment info for non ASN receive');
249: END IF;
250:
251: default_vendor_site_id(p_header_record);

Line 248: asn_debug.put_line('Into default shipment info for non ASN receive');

244: default_shipment_info(p_header_record);
245: rcv_roi_header_common.default_receipt_info(p_header_record);
246: ELSE /* For all other txns except asn receive */
247: IF (g_asn_debug = 'Y') THEN
248: asn_debug.put_line('Into default shipment info for non ASN receive');
249: END IF;
250:
251: default_vendor_site_id(p_header_record);
252: rcv_roi_header_common.default_shipment_header_id(p_header_record);

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

258: -- default any shipment info
259: IF (p_header_record.header_record.transaction_type = 'CANCEL')
260: AND ( p_header_record.header_record.receipt_header_id IS NULL
261: OR p_header_record.header_record.shipment_num IS NULL) THEN
262: IF (g_asn_debug = 'Y') THEN
263: asn_debug.put_line('Into default shipment info');
264: END IF;
265:
266: --rcv_core_s.default_shipment_info (p_header_record);

Line 263: asn_debug.put_line('Into default shipment info');

259: IF (p_header_record.header_record.transaction_type = 'CANCEL')
260: AND ( p_header_record.header_record.receipt_header_id IS NULL
261: OR p_header_record.header_record.shipment_num IS NULL) THEN
262: IF (g_asn_debug = 'Y') THEN
263: asn_debug.put_line('Into default shipment info');
264: END IF;
265:
266: --rcv_core_s.default_shipment_info (p_header_record);
267: default_shipment_info(p_header_record);

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

266: --rcv_core_s.default_shipment_info (p_header_record);
267: default_shipment_info(p_header_record);
268: END IF;
269:
270: IF (g_asn_debug = 'Y') THEN
271: asn_debug.put_line('g_txn_against_asn in default_vendor_header:' || g_txn_against_asn);
272: asn_debug.put_line('Out of default');
273: END IF;
274: END default_vendor_header;

Line 271: asn_debug.put_line('g_txn_against_asn in default_vendor_header:' || g_txn_against_asn);

267: default_shipment_info(p_header_record);
268: END IF;
269:
270: IF (g_asn_debug = 'Y') THEN
271: asn_debug.put_line('g_txn_against_asn in default_vendor_header:' || g_txn_against_asn);
272: asn_debug.put_line('Out of default');
273: END IF;
274: END default_vendor_header;
275:

Line 272: asn_debug.put_line('Out of default');

268: END IF;
269:
270: IF (g_asn_debug = 'Y') THEN
271: asn_debug.put_line('g_txn_against_asn in default_vendor_header:' || g_txn_against_asn);
272: asn_debug.put_line('Out of default');
273: END IF;
274: END default_vendor_header;
275:
276: PROCEDURE validate_vendor_header(

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

300:
301: /* Bug#4523892 */
302: IF (NVL(p_header_record.header_record.asn_type, 'STD') = 'STD'
303: AND g_txn_against_asn = 'Y') THEN
304: IF (g_asn_debug = 'Y') THEN
305: asn_debug.put_line('End of validations if this is an ASN receive');
306: END IF;
307:
308: RETURN;

Line 305: asn_debug.put_line('End of validations if this is an ASN receive');

301: /* Bug#4523892 */
302: IF (NVL(p_header_record.header_record.asn_type, 'STD') = 'STD'
303: AND g_txn_against_asn = 'Y') THEN
304: IF (g_asn_debug = 'Y') THEN
305: asn_debug.put_line('End of validations if this is an ASN receive');
306: END IF;
307:
308: RETURN;
309: END IF;

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

324: /* Validate Excess Transportation Reason */
325: /* Validate Excess Transportation Responsible */
326: /* Validate Invoice Status Code */
327: IF p_header_record.error_record.error_status IN('S', 'W') THEN
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('Other Validations');
330: END IF;
331: END IF;
332: END validate_vendor_header;

Line 329: asn_debug.put_line('Other Validations');

325: /* Validate Excess Transportation Responsible */
326: /* Validate Invoice Status Code */
327: IF p_header_record.error_record.error_status IN('S', 'W') THEN
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('Other Validations');
330: END IF;
331: END IF;
332: END validate_vendor_header;
333:

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

409: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
410: vendor_record.error_record.error_status := p_header_record.error_record.error_status;
411: vendor_record.error_record.error_message := p_header_record.error_record.error_message;
412:
413: IF (g_asn_debug = 'Y') THEN
414: asn_debug.put_line('In Vendor Procedure');
415: END IF;
416:
417: po_vendors_sv.derive_vendor_info(vendor_record);

Line 414: asn_debug.put_line('In Vendor Procedure');

410: vendor_record.error_record.error_status := p_header_record.error_record.error_status;
411: vendor_record.error_record.error_message := p_header_record.error_record.error_message;
412:
413: IF (g_asn_debug = 'Y') THEN
414: asn_debug.put_line('In Vendor Procedure');
415: END IF;
416:
417: po_vendors_sv.derive_vendor_info(vendor_record);
418:

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

415: END IF;
416:
417: po_vendors_sv.derive_vendor_info(vendor_record);
418:
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);

Line 420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));

416:
417: po_vendors_sv.derive_vendor_info(vendor_record);
418:
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);
424: asn_debug.put_line(vendor_record.error_record.error_message);

Line 421: asn_debug.put_line(vendor_record.vendor_name);

417: po_vendors_sv.derive_vendor_info(vendor_record);
418:
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);
424: asn_debug.put_line(vendor_record.error_record.error_message);
425: END IF;

Line 422: asn_debug.put_line(vendor_record.vendor_num);

418:
419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);
424: asn_debug.put_line(vendor_record.error_record.error_message);
425: END IF;
426:

Line 423: asn_debug.put_line(vendor_record.error_record.error_status);

419: IF (g_asn_debug = 'Y') THEN
420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);
424: asn_debug.put_line(vendor_record.error_record.error_message);
425: END IF;
426:
427: p_header_record.header_record.vendor_name := vendor_record.vendor_name;

Line 424: asn_debug.put_line(vendor_record.error_record.error_message);

420: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
421: asn_debug.put_line(vendor_record.vendor_name);
422: asn_debug.put_line(vendor_record.vendor_num);
423: asn_debug.put_line(vendor_record.error_record.error_status);
424: asn_debug.put_line(vendor_record.error_record.error_message);
425: END IF;
426:
427: p_header_record.header_record.vendor_name := vendor_record.vendor_name;
428: p_header_record.header_record.vendor_num := vendor_record.vendor_num;

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

450: vendor_site_record.organization_id := p_header_record.header_record.ship_to_organization_id;
451: vendor_site_record.error_record.error_status := p_header_record.error_record.error_status;
452: vendor_site_record.error_record.error_message := p_header_record.error_record.error_message;
453:
454: IF (g_asn_debug = 'Y') THEN
455: asn_debug.put_line('In Vendor Site Procedure');
456: END IF;
457:
458: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);

Line 455: asn_debug.put_line('In Vendor Site Procedure');

451: vendor_site_record.error_record.error_status := p_header_record.error_record.error_status;
452: vendor_site_record.error_record.error_message := p_header_record.error_record.error_message;
453:
454: IF (g_asn_debug = 'Y') THEN
455: asn_debug.put_line('In Vendor Site Procedure');
456: END IF;
457:
458: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
459:

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

456: END IF;
457:
458: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
459:
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line(vendor_site_record.vendor_site_code);
462: asn_debug.put_line(vendor_site_record.vendor_site_id);
463: END IF;
464:

Line 461: asn_debug.put_line(vendor_site_record.vendor_site_code);

457:
458: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
459:
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line(vendor_site_record.vendor_site_code);
462: asn_debug.put_line(vendor_site_record.vendor_site_id);
463: END IF;
464:
465: p_header_record.header_record.vendor_site_code := vendor_site_record.vendor_site_code;

Line 462: asn_debug.put_line(vendor_site_record.vendor_site_id);

458: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
459:
460: IF (g_asn_debug = 'Y') THEN
461: asn_debug.put_line(vendor_site_record.vendor_site_code);
462: asn_debug.put_line(vendor_site_record.vendor_site_id);
463: END IF;
464:
465: p_header_record.header_record.vendor_site_code := vendor_site_record.vendor_site_code;
466: p_header_record.header_record.vendor_id := vendor_site_record.vendor_id;

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

486: pay_record.payment_term_name := p_header_record.header_record.payment_terms_name;
487: pay_record.error_record.error_status := p_header_record.error_record.error_status;
488: pay_record.error_record.error_message := p_header_record.error_record.error_message;
489:
490: IF (g_asn_debug = 'Y') THEN
491: asn_debug.put_line('In Derive Payment Terms ');
492: END IF;
493:
494: po_terms_sv.derive_payment_terms_info(pay_record);

Line 491: asn_debug.put_line('In Derive Payment Terms ');

487: pay_record.error_record.error_status := p_header_record.error_record.error_status;
488: pay_record.error_record.error_message := p_header_record.error_record.error_message;
489:
490: IF (g_asn_debug = 'Y') THEN
491: asn_debug.put_line('In Derive Payment Terms ');
492: END IF;
493:
494: po_terms_sv.derive_payment_terms_info(pay_record);
495:

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

492: END IF;
493:
494: po_terms_sv.derive_payment_terms_info(pay_record);
495:
496: IF (g_asn_debug = 'Y') THEN
497: asn_debug.put_line(pay_record.payment_term_name);
498: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
499: asn_debug.put_line(pay_record.error_record.error_status);
500: END IF;

Line 497: asn_debug.put_line(pay_record.payment_term_name);

493:
494: po_terms_sv.derive_payment_terms_info(pay_record);
495:
496: IF (g_asn_debug = 'Y') THEN
497: asn_debug.put_line(pay_record.payment_term_name);
498: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
499: asn_debug.put_line(pay_record.error_record.error_status);
500: END IF;
501:

Line 498: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));

494: po_terms_sv.derive_payment_terms_info(pay_record);
495:
496: IF (g_asn_debug = 'Y') THEN
497: asn_debug.put_line(pay_record.payment_term_name);
498: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
499: asn_debug.put_line(pay_record.error_record.error_status);
500: END IF;
501:
502: p_header_record.header_record.payment_terms_id := pay_record.payment_term_id;

Line 499: asn_debug.put_line(pay_record.error_record.error_status);

495:
496: IF (g_asn_debug = 'Y') THEN
497: asn_debug.put_line(pay_record.payment_term_name);
498: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
499: asn_debug.put_line(pay_record.error_record.error_status);
500: END IF;
501:
502: p_header_record.header_record.payment_terms_id := pay_record.payment_term_id;
503: p_header_record.header_record.payment_terms_name := pay_record.payment_term_name;

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

515: IF p_header_record.error_record.error_status IN('S', 'W')
516: AND ( (p_header_record.header_record.transaction_type = 'CANCEL')
517: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
518: AND p_header_record.header_record.shipment_num IS NOT NULL THEN
519: IF (g_asn_debug = 'Y') THEN
520: asn_debug.put_line('Derive shipment info for CANCEL or Receive against an ASN');
521: END IF;
522:
523: --rcv_core_s.derive_shipment_info(p_header_record);

Line 520: asn_debug.put_line('Derive shipment info for CANCEL or Receive against an ASN');

516: AND ( (p_header_record.header_record.transaction_type = 'CANCEL')
517: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
518: AND p_header_record.header_record.shipment_num IS NOT NULL THEN
519: IF (g_asn_debug = 'Y') THEN
520: asn_debug.put_line('Derive shipment info for CANCEL or Receive against an ASN');
521: END IF;
522:
523: --rcv_core_s.derive_shipment_info(p_header_record);
524: derive_shipment_info(p_header_record);

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

529: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
530: ) IS
531: BEGIN
532: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('Need to put a cursor to retrieve other values');
535: asn_debug.put_line('Shipment header Id has been provided');
536: END IF;
537:

Line 534: asn_debug.put_line('Need to put a cursor to retrieve other values');

530: ) IS
531: BEGIN
532: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('Need to put a cursor to retrieve other values');
535: asn_debug.put_line('Shipment header Id has been provided');
536: END IF;
537:
538: RETURN;

Line 535: asn_debug.put_line('Shipment header Id has been provided');

531: BEGIN
532: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('Need to put a cursor to retrieve other values');
535: asn_debug.put_line('Shipment header Id has been provided');
536: END IF;
537:
538: RETURN;
539: END IF;

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

544: OR REPLACE(p_header_record.header_record.shipment_num,
545: ' ',
546: ''
547: ) IS NULL) THEN
548: IF (g_asn_debug = 'Y') THEN
549: asn_debug.put_line('Cannot derive the shipment_header_id at this point');
550: END IF;
551:
552: RETURN;

Line 549: asn_debug.put_line('Cannot derive the shipment_header_id at this point');

545: ' ',
546: ''
547: ) IS NULL) THEN
548: IF (g_asn_debug = 'Y') THEN
549: asn_debug.put_line('Cannot derive the shipment_header_id at this point');
550: END IF;
551:
552: RETURN;
553: END IF;

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

552: RETURN;
553: END IF;
554:
555: -- Derive the shipment_header_id only for transaction_type = CANCEL
556: IF (g_asn_debug = 'Y') THEN
557: asn_debug.put_line('Will derive shipment_header_id if shipment_num is given');
558: END IF;
559:
560: /*

Line 557: asn_debug.put_line('Will derive shipment_header_id if shipment_num is given');

553: END IF;
554:
555: -- Derive the shipment_header_id only for transaction_type = CANCEL
556: IF (g_asn_debug = 'Y') THEN
557: asn_debug.put_line('Will derive shipment_header_id if shipment_num is given');
558: END IF;
559:
560: /*
561: * BUGNO: 1708017

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

568: IF ( (p_header_record.header_record.transaction_type = 'CANCEL')
569: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
570: AND p_header_record.header_record.receipt_header_id IS NULL THEN
571: BEGIN
572: IF (g_asn_debug = 'Y') THEN
573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);

Line 573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);

569: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
570: AND p_header_record.header_record.receipt_header_id IS NULL THEN
571: BEGIN
572: IF (g_asn_debug = 'Y') THEN
573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);

Line 574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);

570: AND p_header_record.header_record.receipt_header_id IS NULL THEN
571: BEGIN
572: IF (g_asn_debug = 'Y') THEN
573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
578: END IF;

Line 575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);

571: BEGIN
572: IF (g_asn_debug = 'Y') THEN
573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
578: END IF;
579:

Line 576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);

572: IF (g_asn_debug = 'Y') THEN
573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
578: END IF;
579:
580: SELECT MAX(shipment_header_id) -- if we ever have 2 shipments with the same combo

Line 577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);

573: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
574: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
575: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
576: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
577: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
578: END IF;
579:
580: SELECT MAX(shipment_header_id) -- if we ever have 2 shipments with the same combo
581: INTO p_header_record.header_record.receipt_header_id

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

589: OR ( p_header_record.header_record.transaction_type <> 'CANCEL'
590: AND shipped_date >= NVL(ADD_MONTHS(p_header_record.header_record.shipped_date, -12), shipped_date))
591: );
592:
593: IF (g_asn_debug = 'Y') THEN
594: asn_debug.put_line('receipt_header_id ' || p_header_record.header_record.receipt_header_id);
595: END IF;
596: EXCEPTION
597: WHEN OTHERS THEN

Line 594: asn_debug.put_line('receipt_header_id ' || p_header_record.header_record.receipt_header_id);

590: AND shipped_date >= NVL(ADD_MONTHS(p_header_record.header_record.shipped_date, -12), shipped_date))
591: );
592:
593: IF (g_asn_debug = 'Y') THEN
594: asn_debug.put_line('receipt_header_id ' || p_header_record.header_record.receipt_header_id);
595: END IF;
596: EXCEPTION
597: WHEN OTHERS THEN
598: IF (g_asn_debug = 'Y') THEN

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

594: asn_debug.put_line('receipt_header_id ' || p_header_record.header_record.receipt_header_id);
595: END IF;
596: EXCEPTION
597: WHEN OTHERS THEN
598: IF (g_asn_debug = 'Y') THEN
599: asn_debug.put_line('Select stmt failed to get ship_header_id');
600: asn_debug.put_line(SQLERRM);
601: END IF;
602: END;

Line 599: asn_debug.put_line('Select stmt failed to get ship_header_id');

595: END IF;
596: EXCEPTION
597: WHEN OTHERS THEN
598: IF (g_asn_debug = 'Y') THEN
599: asn_debug.put_line('Select stmt failed to get ship_header_id');
600: asn_debug.put_line(SQLERRM);
601: END IF;
602: END;
603:

Line 600: asn_debug.put_line(SQLERRM);

596: EXCEPTION
597: WHEN OTHERS THEN
598: IF (g_asn_debug = 'Y') THEN
599: asn_debug.put_line('Select stmt failed to get ship_header_id');
600: asn_debug.put_line(SQLERRM);
601: END IF;
602: END;
603:
604: RETURN;

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

604: RETURN;
605: END IF;
606: EXCEPTION
607: WHEN OTHERS THEN
608: IF (g_asn_debug = 'Y') THEN
609: asn_debug.put_line('Exception in when others in derive_shipment_info ');
610: END IF;
611:
612: p_header_record.error_record.error_status := 'U';

Line 609: asn_debug.put_line('Exception in when others in derive_shipment_info ');

605: END IF;
606: EXCEPTION
607: WHEN OTHERS THEN
608: IF (g_asn_debug = 'Y') THEN
609: asn_debug.put_line('Exception in when others in derive_shipment_info ');
610: END IF;
611:
612: p_header_record.error_record.error_status := 'U';
613: p_header_record.error_record.error_message := SQLERRM;

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

622: IF p_header_record.header_record.asn_type = 'ASBN'
623: AND p_header_record.header_record.shipment_num IS NULL THEN
624: p_header_record.header_record.shipment_num := p_header_record.header_record.invoice_num;
625:
626: IF (g_asn_debug = 'Y') THEN
627: asn_debug.put_line('defaulted shipment number');
628: END IF;
629: END IF;
630:

Line 627: asn_debug.put_line('defaulted shipment number');

623: AND p_header_record.header_record.shipment_num IS NULL THEN
624: p_header_record.header_record.shipment_num := p_header_record.header_record.invoice_num;
625:
626: IF (g_asn_debug = 'Y') THEN
627: asn_debug.put_line('defaulted shipment number');
628: END IF;
629: END IF;
630:
631: /* SHIPMENT NUMBER FOR ASBN/ASN if shipment_num IS NULL */

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

635: IF NVL(p_header_record.header_record.asn_type, 'ASN') <> 'STD'
636: AND p_header_record.header_record.shipment_num IS NULL THEN
637: p_header_record.header_record.shipment_num := p_header_record.header_record.packing_slip;
638:
639: IF (g_asn_debug = 'Y') THEN
640: asn_debug.put_line('defaulted shipment number');
641: END IF;
642: END IF;
643: END default_shipment_num;

Line 640: asn_debug.put_line('defaulted shipment number');

636: AND p_header_record.header_record.shipment_num IS NULL THEN
637: p_header_record.header_record.shipment_num := p_header_record.header_record.packing_slip;
638:
639: IF (g_asn_debug = 'Y') THEN
640: asn_debug.put_line('defaulted shipment number');
641: END IF;
642: END IF;
643: END default_shipment_num;
644:

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

668:
669: IF p_header_record.header_record.vendor_site_id IS NULL
670: AND p_header_record.header_record.vendor_site_code IS NULL
671: AND p_header_record.header_record.vendor_id IS NOT NULL THEN -- added for support of cancel
672: IF (g_asn_debug = 'Y') THEN
673: asn_debug.put_line('Need to get default vendor site id');
674: END IF;
675:
676:

Line 673: asn_debug.put_line('Need to get default vendor site id');

669: IF p_header_record.header_record.vendor_site_id IS NULL
670: AND p_header_record.header_record.vendor_site_code IS NULL
671: AND p_header_record.header_record.vendor_id IS NOT NULL THEN -- added for support of cancel
672: IF (g_asn_debug = 'Y') THEN
673: asn_debug.put_line('Need to get default vendor site id');
674: END IF;
675:
676:
677: /*

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

706: END IF;
707:
708: /*End of added code block for 5953480 */
709:
710: IF (g_asn_debug = 'Y') THEN
711: asn_debug.put_line('Vendor Site Code is ='||p_header_record.header_record.vendor_site_code);
712: asn_debug.put_line('defaulted vendor_site info');
713: END IF;
714: END IF;

Line 711: asn_debug.put_line('Vendor Site Code is ='||p_header_record.header_record.vendor_site_code);

707:
708: /*End of added code block for 5953480 */
709:
710: IF (g_asn_debug = 'Y') THEN
711: asn_debug.put_line('Vendor Site Code is ='||p_header_record.header_record.vendor_site_code);
712: asn_debug.put_line('defaulted vendor_site info');
713: END IF;
714: END IF;
715: END default_vendor_site_id;

Line 712: asn_debug.put_line('defaulted vendor_site info');

708: /*End of added code block for 5953480 */
709:
710: IF (g_asn_debug = 'Y') THEN
711: asn_debug.put_line('Vendor Site Code is ='||p_header_record.header_record.vendor_site_code);
712: asn_debug.put_line('defaulted vendor_site info');
713: END IF;
714: END IF;
715: END default_vendor_site_id;
716:

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

720: x_count NUMBER;
721: BEGIN
722: -- no need to derive shipment_header_id if it is already provided
723: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
724: IF (g_asn_debug = 'Y') THEN
725: asn_debug.put_line('Shipment header Id has been provided');
726: END IF;
727:
728: RETURN;

Line 725: asn_debug.put_line('Shipment header Id has been provided');

721: BEGIN
722: -- no need to derive shipment_header_id if it is already provided
723: IF p_header_record.header_record.receipt_header_id IS NOT NULL THEN
724: IF (g_asn_debug = 'Y') THEN
725: asn_debug.put_line('Shipment header Id has been provided');
726: END IF;
727:
728: RETURN;
729: END IF;

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

735: OR REPLACE(p_header_record.header_record.shipment_num,
736: ' ',
737: ''
738: ) IS NULL) THEN
739: IF (g_asn_debug = 'Y') THEN
740: asn_debug.put_line('Shipment num is still null');
741: END IF;
742:
743: RETURN;

Line 740: asn_debug.put_line('Shipment num is still null');

736: ' ',
737: ''
738: ) IS NULL) THEN
739: IF (g_asn_debug = 'Y') THEN
740: asn_debug.put_line('Shipment num is still null');
741: END IF;
742:
743: RETURN;
744: END IF;

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

755: IF ( (p_header_record.header_record.transaction_type = 'CANCEL')
756: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
757: AND p_header_record.header_record.receipt_header_id IS NULL THEN
758: BEGIN
759: IF (g_asn_debug = 'Y') THEN
760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);

Line 760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);

756: OR NVL(p_header_record.header_record.asn_type, 'STD') = 'STD')
757: AND p_header_record.header_record.receipt_header_id IS NULL THEN
758: BEGIN
759: IF (g_asn_debug = 'Y') THEN
760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);

Line 761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);

757: AND p_header_record.header_record.receipt_header_id IS NULL THEN
758: BEGIN
759: IF (g_asn_debug = 'Y') THEN
760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
765: END IF;

Line 762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);

758: BEGIN
759: IF (g_asn_debug = 'Y') THEN
760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
765: END IF;
766:

Line 763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);

759: IF (g_asn_debug = 'Y') THEN
760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
765: END IF;
766:
767: SELECT MAX(shipment_header_id) -- if we ever have 2 shipments with the same combo

Line 764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);

760: asn_debug.put_line('vendor_site_id ' || p_header_record.header_record.vendor_site_id);
761: asn_debug.put_line('vendor_id ' || p_header_record.header_record.vendor_id);
762: asn_debug.put_line('ship_to_organization_id ' || p_header_record.header_record.ship_to_organization_id);
763: asn_debug.put_line('shipment_num ' || p_header_record.header_record.shipment_num);
764: asn_debug.put_line('shipped_date ' || p_header_record.header_record.shipped_date);
765: END IF;
766:
767: SELECT MAX(shipment_header_id) -- if we ever have 2 shipments with the same combo
768: INTO p_header_record.header_record.receipt_header_id

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

777: AND shipped_date >= NVL(ADD_MONTHS(p_header_record.header_record.shipped_date, -12), shipped_date))
778: );
779: EXCEPTION
780: WHEN OTHERS THEN
781: IF (g_asn_debug = 'Y') THEN
782: asn_debug.put_line('Exception in derive ship_header in default shipment_info');
783: asn_debug.put_line(SQLERRM);
784: END IF;
785: END;

Line 782: asn_debug.put_line('Exception in derive ship_header in default shipment_info');

778: );
779: EXCEPTION
780: WHEN OTHERS THEN
781: IF (g_asn_debug = 'Y') THEN
782: asn_debug.put_line('Exception in derive ship_header in default shipment_info');
783: asn_debug.put_line(SQLERRM);
784: END IF;
785: END;
786:

Line 783: asn_debug.put_line(SQLERRM);

779: EXCEPTION
780: WHEN OTHERS THEN
781: IF (g_asn_debug = 'Y') THEN
782: asn_debug.put_line('Exception in derive ship_header in default shipment_info');
783: asn_debug.put_line(SQLERRM);
784: END IF;
785: END;
786:
787: RETURN;

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

787: RETURN;
788: END IF;
789: EXCEPTION
790: WHEN OTHERS THEN
791: IF (g_asn_debug = 'Y') THEN
792: asn_debug.put_line('Exception in when others in default_shipment_info ');
793: END IF;
794:
795: p_header_record.error_record.error_status := 'U';

Line 792: asn_debug.put_line('Exception in when others in default_shipment_info ');

788: END IF;
789: EXCEPTION
790: WHEN OTHERS THEN
791: IF (g_asn_debug = 'Y') THEN
792: asn_debug.put_line('Exception in when others in default_shipment_info ');
793: END IF;
794:
795: p_header_record.error_record.error_status := 'U';
796: p_header_record.error_record.error_message := SQLERRM;

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

823:
824: p_header_record.error_record.error_status := lookup_record.error_record.error_status;
825: p_header_record.error_record.error_message := lookup_record.error_record.error_message;
826:
827: IF (g_asn_debug = 'Y') THEN
828: asn_debug.put_line('validated asn type');
829: END IF;
830: ELSE
831: p_header_record.header_record.asn_type := 'STD'; -- Not an ASN/ASBN

Line 828: asn_debug.put_line('validated asn type');

824: p_header_record.error_record.error_status := lookup_record.error_record.error_status;
825: p_header_record.error_record.error_message := lookup_record.error_record.error_message;
826:
827: IF (g_asn_debug = 'Y') THEN
828: asn_debug.put_line('validated asn type');
829: END IF;
830: ELSE
831: p_header_record.header_record.asn_type := 'STD'; -- Not an ASN/ASBN
832: END IF;

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

862:
863: p_header_record.error_record.error_status := currency_record.error_record.error_status;
864: p_header_record.error_record.error_message := currency_record.error_record.error_message;
865:
866: IF (g_asn_debug = 'Y') THEN
867: asn_debug.put_line('validated currency info');
868: END IF;
869: END IF;
870: END validate_currency_code;

Line 867: asn_debug.put_line('validated currency info');

863: p_header_record.error_record.error_status := currency_record.error_record.error_status;
864: p_header_record.error_record.error_message := currency_record.error_record.error_message;
865:
866: IF (g_asn_debug = 'Y') THEN
867: asn_debug.put_line('validated currency info');
868: END IF;
869: END IF;
870: END validate_currency_code;
871:

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

889: );
890: END IF;
891: END IF;
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line('validated for Receipt Date > Shipped Date if Receipt Date is specified');
895: END IF;
896: END IF;
897: END validate_receipt_date;

Line 894: asn_debug.put_line('validated for Receipt Date > Shipped Date if Receipt Date is specified');

890: END IF;
891: END IF;
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line('validated for Receipt Date > Shipped Date if Receipt Date is specified');
895: END IF;
896: END IF;
897: END validate_receipt_date;
898:

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

904: /* Validate Vendor Information */
905: IF p_header_record.header_record.vendor_id IS NULL
906: AND p_header_record.header_record.vendor_name IS NULL
907: AND p_header_record.header_record.vendor_num IS NULL THEN
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line('validated vendor info is all null');
910: END IF;
911:
912: p_header_record.error_record.error_status := 'E';

Line 909: asn_debug.put_line('validated vendor info is all null');

905: IF p_header_record.header_record.vendor_id IS NULL
906: AND p_header_record.header_record.vendor_name IS NULL
907: AND p_header_record.header_record.vendor_num IS NULL THEN
908: IF (g_asn_debug = 'Y') THEN
909: asn_debug.put_line('validated vendor info is all null');
910: END IF;
911:
912: p_header_record.error_record.error_status := 'E';
913: p_header_record.error_record.error_message := 'TBD';

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

919: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
920: vendor_record.error_record.error_status := p_header_record.error_record.error_status;
921: vendor_record.error_record.error_message := p_header_record.error_record.error_message;
922:
923: IF (g_asn_debug = 'Y') THEN
924: asn_debug.put_line('In Vendor Validation Procedure');
925: END IF;
926:
927: po_vendors_sv.validate_vendor_info(vendor_record);

Line 924: asn_debug.put_line('In Vendor Validation Procedure');

920: vendor_record.error_record.error_status := p_header_record.error_record.error_status;
921: vendor_record.error_record.error_message := p_header_record.error_record.error_message;
922:
923: IF (g_asn_debug = 'Y') THEN
924: asn_debug.put_line('In Vendor Validation Procedure');
925: END IF;
926:
927: po_vendors_sv.validate_vendor_info(vendor_record);
928:

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

967:
968: p_header_record.error_record.error_status := vendor_record.error_record.error_status;
969: p_header_record.error_record.error_message := vendor_record.error_record.error_message;
970:
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line(vendor_record.error_record.error_status);
973: asn_debug.put_line(vendor_record.error_record.error_message);
974: END IF;
975:

Line 972: asn_debug.put_line(vendor_record.error_record.error_status);

968: p_header_record.error_record.error_status := vendor_record.error_record.error_status;
969: p_header_record.error_record.error_message := vendor_record.error_record.error_message;
970:
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line(vendor_record.error_record.error_status);
973: asn_debug.put_line(vendor_record.error_record.error_message);
974: END IF;
975:
976: IF (g_asn_debug = 'Y') THEN

Line 973: asn_debug.put_line(vendor_record.error_record.error_message);

969: p_header_record.error_record.error_message := vendor_record.error_record.error_message;
970:
971: IF (g_asn_debug = 'Y') THEN
972: asn_debug.put_line(vendor_record.error_record.error_status);
973: asn_debug.put_line(vendor_record.error_record.error_message);
974: END IF;
975:
976: IF (g_asn_debug = 'Y') THEN
977: asn_debug.put_line('Validated vendor info');

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

972: asn_debug.put_line(vendor_record.error_record.error_status);
973: asn_debug.put_line(vendor_record.error_record.error_message);
974: END IF;
975:
976: IF (g_asn_debug = 'Y') THEN
977: asn_debug.put_line('Validated vendor info');
978: END IF;
979: END IF;
980: END validate_vendor_info;

Line 977: asn_debug.put_line('Validated vendor info');

973: asn_debug.put_line(vendor_record.error_record.error_message);
974: END IF;
975:
976: IF (g_asn_debug = 'Y') THEN
977: asn_debug.put_line('Validated vendor info');
978: END IF;
979: END IF;
980: END validate_vendor_info;
981:

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

995: vendor_site_record.organization_id := NULL;
996: vendor_site_record.error_record.error_status := p_header_record.error_record.error_status;
997: vendor_site_record.error_record.error_message := p_header_record.error_record.error_message;
998:
999: IF (g_asn_debug = 'Y') THEN
1000: asn_debug.put_line('In Validate Vendor Site Procedure');
1001: asn_debug.put_line('Remit_to_site_id ' || NVL(p_header_record.header_record.remit_to_site_id, -999));
1002: END IF;
1003:

Line 1000: asn_debug.put_line('In Validate Vendor Site Procedure');

996: vendor_site_record.error_record.error_status := p_header_record.error_record.error_status;
997: vendor_site_record.error_record.error_message := p_header_record.error_record.error_message;
998:
999: IF (g_asn_debug = 'Y') THEN
1000: asn_debug.put_line('In Validate Vendor Site Procedure');
1001: asn_debug.put_line('Remit_to_site_id ' || NVL(p_header_record.header_record.remit_to_site_id, -999));
1002: END IF;
1003:
1004: /* Bug 3590488.

Line 1001: asn_debug.put_line('Remit_to_site_id ' || NVL(p_header_record.header_record.remit_to_site_id, -999));

997: vendor_site_record.error_record.error_message := p_header_record.error_record.error_message;
998:
999: IF (g_asn_debug = 'Y') THEN
1000: asn_debug.put_line('In Validate Vendor Site Procedure');
1001: asn_debug.put_line('Remit_to_site_id ' || NVL(p_header_record.header_record.remit_to_site_id, -999));
1002: END IF;
1003:
1004: /* Bug 3590488.
1005: * We need to send remit_to_site_id since certain flags like

Line 1095: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));

1091: AND poh.segment1 = rti.document_num
1092: AND rti.header_interface_id = p_header_record.header_record.header_interface_id
1093: AND NVL(rti.source_document_code, 'PO') = 'PO';
1094:
1095: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1096: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1097:
1098: IF x_in_this_op_unit = 0 THEN --{
1099: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');

Line 1096: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));

1092: AND rti.header_interface_id = p_header_record.header_record.header_interface_id
1093: AND NVL(rti.source_document_code, 'PO') = 'PO';
1094:
1095: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1096: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1097:
1098: IF x_in_this_op_unit = 0 THEN --{
1099: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1100: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));

Line 1099: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');

1095: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1096: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1097:
1098: IF x_in_this_op_unit = 0 THEN --{
1099: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1100: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));
1101:
1102: UPDATE rcv_headers_interface
1103: SET processing_status_code = 'PENDING'

Line 1100: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));

1096: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1097:
1098: IF x_in_this_op_unit = 0 THEN --{
1099: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1100: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));
1101:
1102: UPDATE rcv_headers_interface
1103: SET processing_status_code = 'PENDING'
1104: WHERE header_interface_id = p_header_record.header_record.header_interface_id;

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

1112: p_header_record.error_record.error_status := 'P';
1113: p_header_record.header_record.processing_status_code := 'PENDING';
1114: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1115:
1116: IF (g_asn_debug = 'Y') THEN
1117: asn_debug.put_line(vendor_site_record.error_record.error_status);
1118: asn_debug.put_line(vendor_site_record.error_record.error_message);
1119: END IF;
1120:

Line 1117: asn_debug.put_line(vendor_site_record.error_record.error_status);

1113: p_header_record.header_record.processing_status_code := 'PENDING';
1114: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1115:
1116: IF (g_asn_debug = 'Y') THEN
1117: asn_debug.put_line(vendor_site_record.error_record.error_status);
1118: asn_debug.put_line(vendor_site_record.error_record.error_message);
1119: END IF;
1120:
1121: IF (g_asn_debug = 'Y') THEN

Line 1118: asn_debug.put_line(vendor_site_record.error_record.error_message);

1114: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1115:
1116: IF (g_asn_debug = 'Y') THEN
1117: asn_debug.put_line(vendor_site_record.error_record.error_status);
1118: asn_debug.put_line(vendor_site_record.error_record.error_message);
1119: END IF;
1120:
1121: IF (g_asn_debug = 'Y') THEN
1122: asn_debug.put_line('Validated vendor site info');

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

1117: asn_debug.put_line(vendor_site_record.error_record.error_status);
1118: asn_debug.put_line(vendor_site_record.error_record.error_message);
1119: END IF;
1120:
1121: IF (g_asn_debug = 'Y') THEN
1122: asn_debug.put_line('Validated vendor site info');
1123: END IF;
1124:
1125: RETURN;

Line 1122: asn_debug.put_line('Validated vendor site info');

1118: asn_debug.put_line(vendor_site_record.error_record.error_message);
1119: END IF;
1120:
1121: IF (g_asn_debug = 'Y') THEN
1122: asn_debug.put_line('Validated vendor site info');
1123: END IF;
1124:
1125: RETURN;
1126: else

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

1153:
1154: p_header_record.error_record.error_status := vendor_site_record.error_record.error_status;
1155: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1156:
1157: IF (g_asn_debug = 'Y') THEN
1158: asn_debug.put_line(vendor_site_record.error_record.error_status);
1159: asn_debug.put_line(vendor_site_record.error_record.error_message);
1160: END IF;
1161:

Line 1158: asn_debug.put_line(vendor_site_record.error_record.error_status);

1154: p_header_record.error_record.error_status := vendor_site_record.error_record.error_status;
1155: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1156:
1157: IF (g_asn_debug = 'Y') THEN
1158: asn_debug.put_line(vendor_site_record.error_record.error_status);
1159: asn_debug.put_line(vendor_site_record.error_record.error_message);
1160: END IF;
1161:
1162: IF (g_asn_debug = 'Y') THEN

Line 1159: asn_debug.put_line(vendor_site_record.error_record.error_message);

1155: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1156:
1157: IF (g_asn_debug = 'Y') THEN
1158: asn_debug.put_line(vendor_site_record.error_record.error_status);
1159: asn_debug.put_line(vendor_site_record.error_record.error_message);
1160: END IF;
1161:
1162: IF (g_asn_debug = 'Y') THEN
1163: asn_debug.put_line('Validated vendor site info');

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

1158: asn_debug.put_line(vendor_site_record.error_record.error_status);
1159: asn_debug.put_line(vendor_site_record.error_record.error_message);
1160: END IF;
1161:
1162: IF (g_asn_debug = 'Y') THEN
1163: asn_debug.put_line('Validated vendor site info');
1164: END IF;
1165: END IF;
1166: END validate_vendor_site_info;

Line 1163: asn_debug.put_line('Validated vendor site info');

1159: asn_debug.put_line(vendor_site_record.error_record.error_message);
1160: END IF;
1161:
1162: IF (g_asn_debug = 'Y') THEN
1163: asn_debug.put_line('Validated vendor site info');
1164: END IF;
1165: END IF;
1166: END validate_vendor_site_info;
1167:

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

1203:
1204: p_header_record.error_record.error_status := invoice_record.error_record.error_status;
1205: p_header_record.error_record.error_message := invoice_record.error_record.error_message;
1206:
1207: IF (g_asn_debug = 'Y') THEN
1208: asn_debug.put_line('Validated invoice amount');
1209: END IF;
1210: END IF;
1211:

Line 1208: asn_debug.put_line('Validated invoice amount');

1204: p_header_record.error_record.error_status := invoice_record.error_record.error_status;
1205: p_header_record.error_record.error_message := invoice_record.error_record.error_message;
1206:
1207: IF (g_asn_debug = 'Y') THEN
1208: asn_debug.put_line('Validated invoice amount');
1209: END IF;
1210: END IF;
1211:
1212: /* Validate that both Invoice number and shipment number are not missing */

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

1224: FALSE
1225: );
1226: END IF; --}
1227:
1228: IF (g_asn_debug = 'Y') THEN
1229: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1230: END IF;
1231: END IF; --}
1232:

Line 1229: asn_debug.put_line('Validated invoice number/shipment number are not missing');

1225: );
1226: END IF; --}
1227:
1228: IF (g_asn_debug = 'Y') THEN
1229: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1230: END IF;
1231: END IF; --}
1232:
1233: /* Validate invoice_date is not missing */

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

1244: FALSE
1245: );
1246: END IF; --}
1247:
1248: IF (g_asn_debug = 'Y') THEN
1249: asn_debug.put_line('Validated invoice date is not missing');
1250: END IF;
1251: END IF; --}
1252:

Line 1249: asn_debug.put_line('Validated invoice date is not missing');

1245: );
1246: END IF; --}
1247:
1248: IF (g_asn_debug = 'Y') THEN
1249: asn_debug.put_line('Validated invoice date is not missing');
1250: END IF;
1251: END IF; --}
1252:
1253: /* Validate Invoice Tax Code */

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

1276: p_header_record.error_record.error_status := tax_record.error_record.error_status;
1277: p_header_record.error_record.error_message := tax_record.error_record.error_message;
1278: END IF; --}
1279:
1280: IF (g_asn_debug = 'Y') THEN
1281: asn_debug.put_line('Validated tax info');
1282: END IF;
1283: END IF; --}
1284:

Line 1281: asn_debug.put_line('Validated tax info');

1277: p_header_record.error_record.error_message := tax_record.error_record.error_message;
1278: END IF; --}
1279:
1280: IF (g_asn_debug = 'Y') THEN
1281: asn_debug.put_line('Validated tax info');
1282: END IF;
1283: END IF; --}
1284:
1285: /* Validations on shipment number */

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

1322: rcv_error_pkg.log_interface_warning('RCV_HEADERS_INTERFACE', 'SHIPMENT_NUM');
1323: END IF; --}
1324: END IF;
1325:
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line(p_header_record.header_record.shipment_num);
1328: asn_debug.put_line('Validations for shipment_number');
1329: END IF;
1330: END IF; --}

Line 1327: asn_debug.put_line(p_header_record.header_record.shipment_num);

1323: END IF; --}
1324: END IF;
1325:
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line(p_header_record.header_record.shipment_num);
1328: asn_debug.put_line('Validations for shipment_number');
1329: END IF;
1330: END IF; --}
1331: END validate_asbn_specific_info;

Line 1328: asn_debug.put_line('Validations for shipment_number');

1324: END IF;
1325:
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line(p_header_record.header_record.shipment_num);
1328: asn_debug.put_line('Validations for shipment_number');
1329: END IF;
1330: END IF; --}
1331: END validate_asbn_specific_info;
1332:

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

1335: ) IS
1336: x_shipment_header_id NUMBER;
1337: BEGIN
1338: -- Check for shipment number which is null, blank , zero
1339: IF (g_asn_debug = 'Y') THEN
1340: asn_debug.put_line('Check for shipment number which is null, blank , zero ');
1341: END IF;
1342:
1343: /*dbms_output.put_line(nvl(p_header_record.header_record.shipment_num,'@@@'));*/

Line 1340: asn_debug.put_line('Check for shipment number which is null, blank , zero ');

1336: x_shipment_header_id NUMBER;
1337: BEGIN
1338: -- Check for shipment number which is null, blank , zero
1339: IF (g_asn_debug = 'Y') THEN
1340: asn_debug.put_line('Check for shipment number which is null, blank , zero ');
1341: END IF;
1342:
1343: /*dbms_output.put_line(nvl(p_header_record.header_record.shipment_num,'@@@'));*/
1344: /* R12 Complex Work.

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

1357: RETURN;
1358: END IF;
1359:
1360: -- Check for Receipts before ASN
1361: IF (g_asn_debug = 'Y') THEN
1362: asn_debug.put_line('Check for Receipts before ASN ');
1363: END IF;
1364:
1365: /*

Line 1362: asn_debug.put_line('Check for Receipts before ASN ');

1358: END IF;
1359:
1360: -- Check for Receipts before ASN
1361: IF (g_asn_debug = 'Y') THEN
1362: asn_debug.put_line('Check for Receipts before ASN ');
1363: END IF;
1364:
1365: /*
1366: * BUGNO: 1708017

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

1480: END IF;
1481: END IF;
1482:
1483: -- Check for matching ASN if ADD, CANCEL
1484: IF (g_asn_debug = 'Y') THEN
1485: asn_debug.put_line('Check for matching ASN if ADD, CANCEL');
1486: END IF;
1487:
1488: /*

Line 1485: asn_debug.put_line('Check for matching ASN if ADD, CANCEL');

1481: END IF;
1482:
1483: -- Check for matching ASN if ADD, CANCEL
1484: IF (g_asn_debug = 'Y') THEN
1485: asn_debug.put_line('Check for matching ASN if ADD, CANCEL');
1486: END IF;
1487:
1488: /*
1489: * BUGNO: 1708017

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

1512: END IF;
1513: END IF;
1514:
1515: -- Check that there are no receipts against the ASN for ADD, CANCEL
1516: IF (g_asn_debug = 'Y') THEN
1517: asn_debug.put_line('Check that there are no receipts against the ASN for ADD, CANCEL');
1518: END IF;
1519:
1520: IF p_header_record.header_record.transaction_type IN('ADD', 'CANCEL')

Line 1517: asn_debug.put_line('Check that there are no receipts against the ASN for ADD, CANCEL');

1513: END IF;
1514:
1515: -- Check that there are no receipts against the ASN for ADD, CANCEL
1516: IF (g_asn_debug = 'Y') THEN
1517: asn_debug.put_line('Check that there are no receipts against the ASN for ADD, CANCEL');
1518: END IF;
1519:
1520: IF p_header_record.header_record.transaction_type IN('ADD', 'CANCEL')
1521: AND p_header_record.header_record.asn_type IN('ASN', 'ASBN') THEN

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

1547: AND shipped_date >= ADD_MONTHS(x_sysdate, -12));
1548: END IF;
1549:
1550: IF NVL(x_count, 0) > 0 THEN -- Some quantity has been received
1551: IF (g_asn_debug = 'Y') THEN
1552: asn_debug.put_line('There are receipts against the ASN ' || p_header_record.header_record.shipment_num);
1553: END IF;
1554:
1555: p_header_record.error_record.error_status := 'E';

Line 1552: asn_debug.put_line('There are receipts against the ASN ' || p_header_record.header_record.shipment_num);

1548: END IF;
1549:
1550: IF NVL(x_count, 0) > 0 THEN -- Some quantity has been received
1551: IF (g_asn_debug = 'Y') THEN
1552: asn_debug.put_line('There are receipts against the ASN ' || p_header_record.header_record.shipment_num);
1553: END IF;
1554:
1555: p_header_record.error_record.error_status := 'E';
1556: p_header_record.error_record.error_message := 'RCV_ASN_QTY_RECEIVED';

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

1559: END IF;
1560:
1561: -- If we have reached this place that means the shipment exists
1562: -- Make sure we have a shipment header id
1563: IF (g_asn_debug = 'Y') THEN
1564: asn_debug.put_line('Make sure we have a shipment_header_id');
1565: END IF;
1566:
1567: /*

Line 1564: asn_debug.put_line('Make sure we have a shipment_header_id');

1560:
1561: -- If we have reached this place that means the shipment exists
1562: -- Make sure we have a shipment header id
1563: IF (g_asn_debug = 'Y') THEN
1564: asn_debug.put_line('Make sure we have a shipment_header_id');
1565: END IF;
1566:
1567: /*
1568: * BUGNO: 1708017

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

1585: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1586: END IF;
1587:
1588: -- Verify that the shipment_header_id matches the derived/defaulted shipment_header_id
1589: IF (g_asn_debug = 'Y') THEN
1590: asn_debug.put_line('Verify that the shipment_header_id matches the derived/defaulted shipment_header_id');
1591: END IF;
1592:
1593: /*

Line 1590: asn_debug.put_line('Verify that the shipment_header_id matches the derived/defaulted shipment_header_id');

1586: END IF;
1587:
1588: -- Verify that the shipment_header_id matches the derived/defaulted shipment_header_id
1589: IF (g_asn_debug = 'Y') THEN
1590: asn_debug.put_line('Verify that the shipment_header_id matches the derived/defaulted shipment_header_id');
1591: END IF;
1592:
1593: /*
1594: * BUGNO: 1708017

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

1610: AND TRUNC(shipped_date) = TRUNC(p_header_record.header_record.shipped_date)
1611: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1612:
1613: IF x_shipment_header_id <> p_header_record.header_record.receipt_header_id THEN
1614: IF (g_asn_debug = 'Y') THEN
1615: asn_debug.put_line('The shipment_header_id do not match ');
1616: END IF;
1617:
1618: p_header_record.error_record.error_status := 'E';

Line 1615: asn_debug.put_line('The shipment_header_id do not match ');

1611: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1612:
1613: IF x_shipment_header_id <> p_header_record.header_record.receipt_header_id THEN
1614: IF (g_asn_debug = 'Y') THEN
1615: asn_debug.put_line('The shipment_header_id do not match ');
1616: END IF;
1617:
1618: p_header_record.error_record.error_status := 'E';
1619: p_header_record.error_record.error_message := 'RCV_ASN_MISMATCH_SHIP_ID';

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

1620: END IF;
1621: END IF;
1622: EXCEPTION
1623: WHEN OTHERS THEN
1624: IF (g_asn_debug = 'Y') THEN
1625: asn_debug.put_line('Exception in validate_shipment_header ');
1626: END IF;
1627:
1628: p_header_record.error_record.error_status := 'U';

Line 1625: asn_debug.put_line('Exception in validate_shipment_header ');

1621: END IF;
1622: EXCEPTION
1623: WHEN OTHERS THEN
1624: IF (g_asn_debug = 'Y') THEN
1625: asn_debug.put_line('Exception in validate_shipment_header ');
1626: END IF;
1627:
1628: p_header_record.error_record.error_status := 'U';
1629: p_header_record.error_record.error_message := SQLERRM;

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

1640: END IF;
1641:
1642: /* Bug - 1086088 - Ship_to_org_id needs to get populated in the
1643: * RCV_SHIPMENT_HEADERS table */
1644: IF (g_asn_debug = 'Y') THEN
1645: asn_debug.put_line('Before insert into rsh ');
1646: END IF;
1647:
1648: INSERT INTO rcv_shipment_headers

Line 1645: asn_debug.put_line('Before insert into rsh ');

1641:
1642: /* Bug - 1086088 - Ship_to_org_id needs to get populated in the
1643: * RCV_SHIPMENT_HEADERS table */
1644: IF (g_asn_debug = 'Y') THEN
1645: asn_debug.put_line('Before insert into rsh ');
1646: END IF;
1647:
1648: INSERT INTO rcv_shipment_headers
1649: (shipment_header_id,

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

1815: p_header_record.header_record.performance_period_to,
1816: p_header_record.header_record.request_date
1817: );
1818:
1819: IF (g_asn_debug = 'Y') THEN
1820: asn_debug.put_line('After insert into rsh ');
1821: END IF;
1822:
1823: EXCEPTION

Line 1820: asn_debug.put_line('After insert into rsh ');

1816: p_header_record.header_record.request_date
1817: );
1818:
1819: IF (g_asn_debug = 'Y') THEN
1820: asn_debug.put_line('After insert into rsh ');
1821: END IF;
1822:
1823: EXCEPTION
1824: WHEN OTHERS THEN

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

1821: END IF;
1822:
1823: EXCEPTION
1824: WHEN OTHERS THEN
1825: IF (g_asn_debug = 'Y') THEN
1826: asn_debug.put_line('Exception in insert_shipment_header ');
1827: END IF;
1828:
1829: p_header_record.error_record.error_status := 'U';

Line 1826: asn_debug.put_line('Exception in insert_shipment_header ');

1822:
1823: EXCEPTION
1824: WHEN OTHERS THEN
1825: IF (g_asn_debug = 'Y') THEN
1826: asn_debug.put_line('Exception in insert_shipment_header ');
1827: END IF;
1828:
1829: p_header_record.error_record.error_status := 'U';
1830: p_header_record.error_record.error_message := SQLERRM;

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

1833: PROCEDURE update_shipment_header(
1834: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
1835: ) IS
1836: BEGIN
1837: IF (g_asn_debug = 'Y') THEN
1838: asn_debug.put_line('Enter in update_shipment_header ');
1839: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1840: END IF;
1841:

Line 1838: asn_debug.put_line('Enter in update_shipment_header ');

1834: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
1835: ) IS
1836: BEGIN
1837: IF (g_asn_debug = 'Y') THEN
1838: asn_debug.put_line('Enter in update_shipment_header ');
1839: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1840: END IF;
1841:
1842: UPDATE rcv_shipment_headers

Line 1839: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);

1835: ) IS
1836: BEGIN
1837: IF (g_asn_debug = 'Y') THEN
1838: asn_debug.put_line('Enter in update_shipment_header ');
1839: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1840: END IF;
1841:
1842: UPDATE rcv_shipment_headers
1843: SET receipt_num = NVL(receipt_num, p_header_record.header_record.receipt_num),

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

1865: attribute14 = p_header_record.header_record.attribute14,
1866: attribute15 = p_header_record.header_record.attribute15
1867: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id;
1868:
1869: IF (g_asn_debug = 'Y') THEN
1870: asn_debug.put_line('After updating rsh ');
1871: END IF;
1872: EXCEPTION
1873: WHEN OTHERS THEN

Line 1870: asn_debug.put_line('After updating rsh ');

1866: attribute15 = p_header_record.header_record.attribute15
1867: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id;
1868:
1869: IF (g_asn_debug = 'Y') THEN
1870: asn_debug.put_line('After updating rsh ');
1871: END IF;
1872: EXCEPTION
1873: WHEN OTHERS THEN
1874: IF (g_asn_debug = 'Y') THEN

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

1870: asn_debug.put_line('After updating rsh ');
1871: END IF;
1872: EXCEPTION
1873: WHEN OTHERS THEN
1874: IF (g_asn_debug = 'Y') THEN
1875: asn_debug.put_line('Exception in update_shipment_header ');
1876: END IF;
1877:
1878: p_header_record.error_record.error_status := 'U';

Line 1875: asn_debug.put_line('Exception in update_shipment_header ');

1871: END IF;
1872: EXCEPTION
1873: WHEN OTHERS THEN
1874: IF (g_asn_debug = 'Y') THEN
1875: asn_debug.put_line('Exception in update_shipment_header ');
1876: END IF;
1877:
1878: p_header_record.error_record.error_status := 'U';
1879: p_header_record.error_record.error_message := SQLERRM;

Line 1888: asn_debug.put_line('Delete any asn lines that have been sent');

1884: ) IS
1885: BEGIN
1886: -- delete any asn lines that have been sent
1887:
1888: asn_debug.put_line('Delete any asn lines that have been sent');
1889:
1890: DELETE FROM rcv_transactions_interface
1891: WHERE header_interface_id = p_header_record.header_record.header_interface_id;
1892: