DBA Data[Home] [Help]

APPS.RCV_ROI_HEADER dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_roi_header
2: /* $Header: RCVPREHB.pls 120.5.12010000.2 2008/10/09 19:36:32 vthevark ship $*/
3: AS
4: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
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 193: IF (g_asn_debug = 'Y') THEN

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 602: asn_debug.put_line(SQLERRM);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 785: asn_debug.put_line(SQLERRM);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

963:
964: p_header_record.error_record.error_status := vendor_record.error_record.error_status;
965: p_header_record.error_record.error_message := vendor_record.error_record.error_message;
966:
967: IF (g_asn_debug = 'Y') THEN
968: asn_debug.put_line(vendor_record.error_record.error_status);
969: asn_debug.put_line(vendor_record.error_record.error_message);
970: END IF;
971:

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

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

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

965: p_header_record.error_record.error_message := vendor_record.error_record.error_message;
966:
967: IF (g_asn_debug = 'Y') THEN
968: asn_debug.put_line(vendor_record.error_record.error_status);
969: asn_debug.put_line(vendor_record.error_record.error_message);
970: END IF;
971:
972: IF (g_asn_debug = 'Y') THEN
973: asn_debug.put_line('Validated vendor info');

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

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

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

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

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

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

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

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

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

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

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

1078: AND poh.segment1 = rti.document_num
1079: AND rti.header_interface_id = p_header_record.header_record.header_interface_id
1080: AND NVL(rti.source_document_code, 'PO') = 'PO';
1081:
1082: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1083: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1084:
1085: IF x_in_this_op_unit = 0 THEN --{
1086: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');

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

1079: AND rti.header_interface_id = p_header_record.header_record.header_interface_id
1080: AND NVL(rti.source_document_code, 'PO') = 'PO';
1081:
1082: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1083: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1084:
1085: IF x_in_this_op_unit = 0 THEN --{
1086: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1087: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));

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

1082: asn_debug.put_line('The chance of this PO belonging to this operating unit is =' || TO_CHAR(x_in_this_op_unit));
1083: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1084:
1085: IF x_in_this_op_unit = 0 THEN --{
1086: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1087: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));
1088:
1089: UPDATE rcv_headers_interface
1090: SET processing_status_code = 'PENDING'

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

1083: asn_debug.put_line('Vendor Id is =' || TO_CHAR(p_header_record.header_record.vendor_id));
1084:
1085: IF x_in_this_op_unit = 0 THEN --{
1086: asn_debug.put_line('Setting the RHI and RTI to Pending as this PO belongs to other operating unit ');
1087: asn_debug.put_line('Updating for Header Interface Id = ' || TO_CHAR(p_header_record.header_record.header_interface_id));
1088:
1089: UPDATE rcv_headers_interface
1090: SET processing_status_code = 'PENDING'
1091: WHERE header_interface_id = p_header_record.header_record.header_interface_id;

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

1099: p_header_record.error_record.error_status := 'P';
1100: p_header_record.header_record.processing_status_code := 'PENDING';
1101: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1102:
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line(vendor_site_record.error_record.error_status);
1105: asn_debug.put_line(vendor_site_record.error_record.error_message);
1106: END IF;
1107:

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

1100: p_header_record.header_record.processing_status_code := 'PENDING';
1101: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1102:
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line(vendor_site_record.error_record.error_status);
1105: asn_debug.put_line(vendor_site_record.error_record.error_message);
1106: END IF;
1107:
1108: IF (g_asn_debug = 'Y') THEN

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

1101: p_header_record.error_record.error_message := 'DIFFERENT_OU';
1102:
1103: IF (g_asn_debug = 'Y') THEN
1104: asn_debug.put_line(vendor_site_record.error_record.error_status);
1105: asn_debug.put_line(vendor_site_record.error_record.error_message);
1106: END IF;
1107:
1108: IF (g_asn_debug = 'Y') THEN
1109: asn_debug.put_line('Validated vendor site info');

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

1104: asn_debug.put_line(vendor_site_record.error_record.error_status);
1105: asn_debug.put_line(vendor_site_record.error_record.error_message);
1106: END IF;
1107:
1108: IF (g_asn_debug = 'Y') THEN
1109: asn_debug.put_line('Validated vendor site info');
1110: END IF;
1111:
1112: RETURN;

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

1105: asn_debug.put_line(vendor_site_record.error_record.error_message);
1106: END IF;
1107:
1108: IF (g_asn_debug = 'Y') THEN
1109: asn_debug.put_line('Validated vendor site info');
1110: END IF;
1111:
1112: RETURN;
1113: END IF; -- x_in_this_op_unit = 0 --}

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

1127:
1128: p_header_record.error_record.error_status := vendor_site_record.error_record.error_status;
1129: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1130:
1131: IF (g_asn_debug = 'Y') THEN
1132: asn_debug.put_line(vendor_site_record.error_record.error_status);
1133: asn_debug.put_line(vendor_site_record.error_record.error_message);
1134: END IF;
1135:

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

1128: p_header_record.error_record.error_status := vendor_site_record.error_record.error_status;
1129: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1130:
1131: IF (g_asn_debug = 'Y') THEN
1132: asn_debug.put_line(vendor_site_record.error_record.error_status);
1133: asn_debug.put_line(vendor_site_record.error_record.error_message);
1134: END IF;
1135:
1136: IF (g_asn_debug = 'Y') THEN

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

1129: p_header_record.error_record.error_message := vendor_site_record.error_record.error_message;
1130:
1131: IF (g_asn_debug = 'Y') THEN
1132: asn_debug.put_line(vendor_site_record.error_record.error_status);
1133: asn_debug.put_line(vendor_site_record.error_record.error_message);
1134: END IF;
1135:
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Validated vendor site info');

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

1132: asn_debug.put_line(vendor_site_record.error_record.error_status);
1133: asn_debug.put_line(vendor_site_record.error_record.error_message);
1134: END IF;
1135:
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Validated vendor site info');
1138: END IF;
1139: END IF;
1140: END validate_vendor_site_info;

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

1133: asn_debug.put_line(vendor_site_record.error_record.error_message);
1134: END IF;
1135:
1136: IF (g_asn_debug = 'Y') THEN
1137: asn_debug.put_line('Validated vendor site info');
1138: END IF;
1139: END IF;
1140: END validate_vendor_site_info;
1141:

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

1177:
1178: p_header_record.error_record.error_status := invoice_record.error_record.error_status;
1179: p_header_record.error_record.error_message := invoice_record.error_record.error_message;
1180:
1181: IF (g_asn_debug = 'Y') THEN
1182: asn_debug.put_line('Validated invoice amount');
1183: END IF;
1184: END IF;
1185:

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

1178: p_header_record.error_record.error_status := invoice_record.error_record.error_status;
1179: p_header_record.error_record.error_message := invoice_record.error_record.error_message;
1180:
1181: IF (g_asn_debug = 'Y') THEN
1182: asn_debug.put_line('Validated invoice amount');
1183: END IF;
1184: END IF;
1185:
1186: /* Validate that both Invoice number and shipment number are not missing */

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

1198: FALSE
1199: );
1200: END IF; --}
1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1204: END IF;
1205: END IF; --}
1206:

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

1199: );
1200: END IF; --}
1201:
1202: IF (g_asn_debug = 'Y') THEN
1203: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1204: END IF;
1205: END IF; --}
1206:
1207: /* Validate invoice_date is not missing */

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

1218: FALSE
1219: );
1220: END IF; --}
1221:
1222: IF (g_asn_debug = 'Y') THEN
1223: asn_debug.put_line('Validated invoice date is not missing');
1224: END IF;
1225: END IF; --}
1226:

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

1219: );
1220: END IF; --}
1221:
1222: IF (g_asn_debug = 'Y') THEN
1223: asn_debug.put_line('Validated invoice date is not missing');
1224: END IF;
1225: END IF; --}
1226:
1227: /* Validate Invoice Tax Code */

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

1250: p_header_record.error_record.error_status := tax_record.error_record.error_status;
1251: p_header_record.error_record.error_message := tax_record.error_record.error_message;
1252: END IF; --}
1253:
1254: IF (g_asn_debug = 'Y') THEN
1255: asn_debug.put_line('Validated tax info');
1256: END IF;
1257: END IF; --}
1258:

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

1251: p_header_record.error_record.error_message := tax_record.error_record.error_message;
1252: END IF; --}
1253:
1254: IF (g_asn_debug = 'Y') THEN
1255: asn_debug.put_line('Validated tax info');
1256: END IF;
1257: END IF; --}
1258:
1259: /* Validations on shipment number */

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

1296: rcv_error_pkg.log_interface_warning('RCV_HEADERS_INTERFACE', 'SHIPMENT_NUM');
1297: END IF; --}
1298: END IF;
1299:
1300: IF (g_asn_debug = 'Y') THEN
1301: asn_debug.put_line(p_header_record.header_record.shipment_num);
1302: asn_debug.put_line('Validations for shipment_number');
1303: END IF;
1304: END IF; --}

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

1297: END IF; --}
1298: END IF;
1299:
1300: IF (g_asn_debug = 'Y') THEN
1301: asn_debug.put_line(p_header_record.header_record.shipment_num);
1302: asn_debug.put_line('Validations for shipment_number');
1303: END IF;
1304: END IF; --}
1305: END validate_asbn_specific_info;

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

1298: END IF;
1299:
1300: IF (g_asn_debug = 'Y') THEN
1301: asn_debug.put_line(p_header_record.header_record.shipment_num);
1302: asn_debug.put_line('Validations for shipment_number');
1303: END IF;
1304: END IF; --}
1305: END validate_asbn_specific_info;
1306:

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

1309: ) IS
1310: x_shipment_header_id NUMBER;
1311: BEGIN
1312: -- Check for shipment number which is null, blank , zero
1313: IF (g_asn_debug = 'Y') THEN
1314: asn_debug.put_line('Check for shipment number which is null, blank , zero ');
1315: END IF;
1316:
1317: /*dbms_output.put_line(nvl(p_header_record.header_record.shipment_num,'@@@'));*/

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

1310: x_shipment_header_id NUMBER;
1311: BEGIN
1312: -- Check for shipment number which is null, blank , zero
1313: IF (g_asn_debug = 'Y') THEN
1314: asn_debug.put_line('Check for shipment number which is null, blank , zero ');
1315: END IF;
1316:
1317: /*dbms_output.put_line(nvl(p_header_record.header_record.shipment_num,'@@@'));*/
1318: /* R12 Complex Work.

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

1331: RETURN;
1332: END IF;
1333:
1334: -- Check for Receipts before ASN
1335: IF (g_asn_debug = 'Y') THEN
1336: asn_debug.put_line('Check for Receipts before ASN ');
1337: END IF;
1338:
1339: /*

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

1332: END IF;
1333:
1334: -- Check for Receipts before ASN
1335: IF (g_asn_debug = 'Y') THEN
1336: asn_debug.put_line('Check for Receipts before ASN ');
1337: END IF;
1338:
1339: /*
1340: * BUGNO: 1708017

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

1454: END IF;
1455: END IF;
1456:
1457: -- Check for matching ASN if ADD, CANCEL
1458: IF (g_asn_debug = 'Y') THEN
1459: asn_debug.put_line('Check for matching ASN if ADD, CANCEL');
1460: END IF;
1461:
1462: /*

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

1455: END IF;
1456:
1457: -- Check for matching ASN if ADD, CANCEL
1458: IF (g_asn_debug = 'Y') THEN
1459: asn_debug.put_line('Check for matching ASN if ADD, CANCEL');
1460: END IF;
1461:
1462: /*
1463: * BUGNO: 1708017

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

1486: END IF;
1487: END IF;
1488:
1489: -- Check that there are no receipts against the ASN for ADD, CANCEL
1490: IF (g_asn_debug = 'Y') THEN
1491: asn_debug.put_line('Check that there are no receipts against the ASN for ADD, CANCEL');
1492: END IF;
1493:
1494: IF p_header_record.header_record.transaction_type IN('ADD', 'CANCEL')

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

1487: END IF;
1488:
1489: -- Check that there are no receipts against the ASN for ADD, CANCEL
1490: IF (g_asn_debug = 'Y') THEN
1491: asn_debug.put_line('Check that there are no receipts against the ASN for ADD, CANCEL');
1492: END IF;
1493:
1494: IF p_header_record.header_record.transaction_type IN('ADD', 'CANCEL')
1495: AND p_header_record.header_record.asn_type IN('ASN', 'ASBN') THEN

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

1521: AND shipped_date >= ADD_MONTHS(x_sysdate, -12));
1522: END IF;
1523:
1524: IF NVL(x_count, 0) > 0 THEN -- Some quantity has been received
1525: IF (g_asn_debug = 'Y') THEN
1526: asn_debug.put_line('There are receipts against the ASN ' || p_header_record.header_record.shipment_num);
1527: END IF;
1528:
1529: p_header_record.error_record.error_status := 'E';

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

1522: END IF;
1523:
1524: IF NVL(x_count, 0) > 0 THEN -- Some quantity has been received
1525: IF (g_asn_debug = 'Y') THEN
1526: asn_debug.put_line('There are receipts against the ASN ' || p_header_record.header_record.shipment_num);
1527: END IF;
1528:
1529: p_header_record.error_record.error_status := 'E';
1530: p_header_record.error_record.error_message := 'RCV_ASN_QTY_RECEIVED';

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

1533: END IF;
1534:
1535: -- If we have reached this place that means the shipment exists
1536: -- Make sure we have a shipment header id
1537: IF (g_asn_debug = 'Y') THEN
1538: asn_debug.put_line('Make sure we have a shipment_header_id');
1539: END IF;
1540:
1541: /*

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

1534:
1535: -- If we have reached this place that means the shipment exists
1536: -- Make sure we have a shipment header id
1537: IF (g_asn_debug = 'Y') THEN
1538: asn_debug.put_line('Make sure we have a shipment_header_id');
1539: END IF;
1540:
1541: /*
1542: * BUGNO: 1708017

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

1559: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1560: END IF;
1561:
1562: -- Verify that the shipment_header_id matches the derived/defaulted shipment_header_id
1563: IF (g_asn_debug = 'Y') THEN
1564: asn_debug.put_line('Verify that the shipment_header_id matches the derived/defaulted shipment_header_id');
1565: END IF;
1566:
1567: /*

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

1560: END IF;
1561:
1562: -- Verify that the shipment_header_id matches the derived/defaulted shipment_header_id
1563: IF (g_asn_debug = 'Y') THEN
1564: asn_debug.put_line('Verify that the shipment_header_id matches the derived/defaulted shipment_header_id');
1565: END IF;
1566:
1567: /*
1568: * BUGNO: 1708017

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

1584: AND TRUNC(shipped_date) = TRUNC(p_header_record.header_record.shipped_date)
1585: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1586:
1587: IF x_shipment_header_id <> p_header_record.header_record.receipt_header_id THEN
1588: IF (g_asn_debug = 'Y') THEN
1589: asn_debug.put_line('The shipment_header_id do not match ');
1590: END IF;
1591:
1592: p_header_record.error_record.error_status := 'E';

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

1585: AND shipped_date >= ADD_MONTHS(x_sysdate, -12);
1586:
1587: IF x_shipment_header_id <> p_header_record.header_record.receipt_header_id THEN
1588: IF (g_asn_debug = 'Y') THEN
1589: asn_debug.put_line('The shipment_header_id do not match ');
1590: END IF;
1591:
1592: p_header_record.error_record.error_status := 'E';
1593: p_header_record.error_record.error_message := 'RCV_ASN_MISMATCH_SHIP_ID';

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

1594: END IF;
1595: END IF;
1596: EXCEPTION
1597: WHEN OTHERS THEN
1598: IF (g_asn_debug = 'Y') THEN
1599: asn_debug.put_line('Exception in validate_shipment_header ');
1600: END IF;
1601:
1602: p_header_record.error_record.error_status := 'U';

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

1595: END IF;
1596: EXCEPTION
1597: WHEN OTHERS THEN
1598: IF (g_asn_debug = 'Y') THEN
1599: asn_debug.put_line('Exception in validate_shipment_header ');
1600: END IF;
1601:
1602: p_header_record.error_record.error_status := 'U';
1603: p_header_record.error_record.error_message := SQLERRM;

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

1614: END IF;
1615:
1616: /* Bug - 1086088 - Ship_to_org_id needs to get populated in the
1617: * RCV_SHIPMENT_HEADERS table */
1618: IF (g_asn_debug = 'Y') THEN
1619: asn_debug.put_line('Before insert into rsh ');
1620: END IF;
1621:
1622: INSERT INTO rcv_shipment_headers

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

1615:
1616: /* Bug - 1086088 - Ship_to_org_id needs to get populated in the
1617: * RCV_SHIPMENT_HEADERS table */
1618: IF (g_asn_debug = 'Y') THEN
1619: asn_debug.put_line('Before insert into rsh ');
1620: END IF;
1621:
1622: INSERT INTO rcv_shipment_headers
1623: (shipment_header_id,

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

1789: p_header_record.header_record.performance_period_to,
1790: p_header_record.header_record.request_date
1791: );
1792:
1793: IF (g_asn_debug = 'Y') THEN
1794: asn_debug.put_line('After insert into rsh ');
1795: END IF;
1796:
1797: EXCEPTION

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

1790: p_header_record.header_record.request_date
1791: );
1792:
1793: IF (g_asn_debug = 'Y') THEN
1794: asn_debug.put_line('After insert into rsh ');
1795: END IF;
1796:
1797: EXCEPTION
1798: WHEN OTHERS THEN

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

1795: END IF;
1796:
1797: EXCEPTION
1798: WHEN OTHERS THEN
1799: IF (g_asn_debug = 'Y') THEN
1800: asn_debug.put_line('Exception in insert_shipment_header ');
1801: END IF;
1802:
1803: p_header_record.error_record.error_status := 'U';

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

1796:
1797: EXCEPTION
1798: WHEN OTHERS THEN
1799: IF (g_asn_debug = 'Y') THEN
1800: asn_debug.put_line('Exception in insert_shipment_header ');
1801: END IF;
1802:
1803: p_header_record.error_record.error_status := 'U';
1804: p_header_record.error_record.error_message := SQLERRM;

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

1807: PROCEDURE update_shipment_header(
1808: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
1809: ) IS
1810: BEGIN
1811: IF (g_asn_debug = 'Y') THEN
1812: asn_debug.put_line('Enter in update_shipment_header ');
1813: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1814: END IF;
1815:

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

1808: p_header_record IN OUT NOCOPY rcv_roi_preprocessor.header_rec_type
1809: ) IS
1810: BEGIN
1811: IF (g_asn_debug = 'Y') THEN
1812: asn_debug.put_line('Enter in update_shipment_header ');
1813: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1814: END IF;
1815:
1816: UPDATE rcv_shipment_headers

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

1809: ) IS
1810: BEGIN
1811: IF (g_asn_debug = 'Y') THEN
1812: asn_debug.put_line('Enter in update_shipment_header ');
1813: asn_debug.put_line(' Shipment_header_id ' || p_header_record.header_record.receipt_header_id);
1814: END IF;
1815:
1816: UPDATE rcv_shipment_headers
1817: SET receipt_num = NVL(receipt_num, p_header_record.header_record.receipt_num),

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

1839: attribute14 = p_header_record.header_record.attribute14,
1840: attribute15 = p_header_record.header_record.attribute15
1841: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id;
1842:
1843: IF (g_asn_debug = 'Y') THEN
1844: asn_debug.put_line('After updating rsh ');
1845: END IF;
1846: EXCEPTION
1847: WHEN OTHERS THEN

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

1840: attribute15 = p_header_record.header_record.attribute15
1841: WHERE shipment_header_id = p_header_record.header_record.receipt_header_id;
1842:
1843: IF (g_asn_debug = 'Y') THEN
1844: asn_debug.put_line('After updating rsh ');
1845: END IF;
1846: EXCEPTION
1847: WHEN OTHERS THEN
1848: IF (g_asn_debug = 'Y') THEN

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

1844: asn_debug.put_line('After updating rsh ');
1845: END IF;
1846: EXCEPTION
1847: WHEN OTHERS THEN
1848: IF (g_asn_debug = 'Y') THEN
1849: asn_debug.put_line('Exception in update_shipment_header ');
1850: END IF;
1851:
1852: p_header_record.error_record.error_status := 'U';

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

1845: END IF;
1846: EXCEPTION
1847: WHEN OTHERS THEN
1848: IF (g_asn_debug = 'Y') THEN
1849: asn_debug.put_line('Exception in update_shipment_header ');
1850: END IF;
1851:
1852: p_header_record.error_record.error_status := 'U';
1853: p_header_record.error_record.error_message := SQLERRM;

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

1858: ) IS
1859: BEGIN
1860: -- delete any asn lines that have been sent
1861:
1862: asn_debug.put_line('Delete any asn lines that have been sent');
1863:
1864: DELETE FROM rcv_transactions_interface
1865: WHERE header_interface_id = p_header_record.header_record.header_interface_id;
1866: