DBA Data[Home] [Help]

APPS.RCV_HEADERS_INTERFACE_SV dependencies on ASN_DEBUG

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

1: PACKAGE BODY rcv_headers_interface_sv AS
2: /* $Header: RCVHISVB.pls 120.1.12010000.2 2008/08/04 08:41:44 rramasam ship $ */
3:
4: -- Read the profile option that enables/disables the debug log
5: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
6:
7: -- Bug 2506961
8: PROCEDURE genreceiptnum(
9: p_header_record IN OUT NOCOPY rcv_shipment_header_sv.headerrectype

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

40: vendor_record.vendor_num := p_header_record.header_record.vendor_num;
41: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
42: vendor_record.error_record := p_header_record.error_record;
43:
44: IF (g_asn_debug = 'Y') THEN
45: asn_debug.put_line('In Vendor Procedure');
46: END IF;
47:
48: po_vendors_sv.derive_vendor_info(vendor_record);

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

41: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
42: vendor_record.error_record := p_header_record.error_record;
43:
44: IF (g_asn_debug = 'Y') THEN
45: asn_debug.put_line('In Vendor Procedure');
46: END IF;
47:
48: po_vendors_sv.derive_vendor_info(vendor_record);
49:

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

46: END IF;
47:
48: po_vendors_sv.derive_vendor_info(vendor_record);
49:
50: IF (g_asn_debug = 'Y') THEN
51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);

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

47:
48: po_vendors_sv.derive_vendor_info(vendor_record);
49:
50: IF (g_asn_debug = 'Y') THEN
51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);
55: asn_debug.put_line(vendor_record.error_record.error_message);

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

48: po_vendors_sv.derive_vendor_info(vendor_record);
49:
50: IF (g_asn_debug = 'Y') THEN
51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);
55: asn_debug.put_line(vendor_record.error_record.error_message);
56: END IF;

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

49:
50: IF (g_asn_debug = 'Y') THEN
51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);
55: asn_debug.put_line(vendor_record.error_record.error_message);
56: END IF;
57:

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

50: IF (g_asn_debug = 'Y') THEN
51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);
55: asn_debug.put_line(vendor_record.error_record.error_message);
56: END IF;
57:
58: p_header_record.header_record.vendor_name := vendor_record.vendor_name;

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

51: asn_debug.put_line(TO_CHAR(vendor_record.vendor_id));
52: asn_debug.put_line(vendor_record.vendor_name);
53: asn_debug.put_line(vendor_record.vendor_num);
54: asn_debug.put_line(vendor_record.error_record.error_status);
55: asn_debug.put_line(vendor_record.error_record.error_message);
56: END IF;
57:
58: p_header_record.header_record.vendor_name := vendor_record.vendor_name;
59: p_header_record.header_record.vendor_num := vendor_record.vendor_num;

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

77: ship_to_org_record.organization_code := p_header_record.header_record.ship_to_organization_code;
78: ship_to_org_record.organization_id := p_header_record.header_record.ship_to_organization_id;
79: ship_to_org_record.error_record := p_header_record.error_record;
80:
81: IF (g_asn_debug = 'Y') THEN
82: asn_debug.put_line('In Ship to Organization Procedure');
83: END IF;
84:
85: po_orgs_sv.derive_org_info(ship_to_org_record);

Line 82: asn_debug.put_line('In Ship to Organization Procedure');

78: ship_to_org_record.organization_id := p_header_record.header_record.ship_to_organization_id;
79: ship_to_org_record.error_record := p_header_record.error_record;
80:
81: IF (g_asn_debug = 'Y') THEN
82: asn_debug.put_line('In Ship to Organization Procedure');
83: END IF;
84:
85: po_orgs_sv.derive_org_info(ship_to_org_record);
86:

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

83: END IF;
84:
85: po_orgs_sv.derive_org_info(ship_to_org_record);
86:
87: IF (g_asn_debug = 'Y') THEN
88: asn_debug.put_line(ship_to_org_record.organization_code);
89: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
90: asn_debug.put_line(ship_to_org_record.error_record.error_status);
91: END IF;

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

84:
85: po_orgs_sv.derive_org_info(ship_to_org_record);
86:
87: IF (g_asn_debug = 'Y') THEN
88: asn_debug.put_line(ship_to_org_record.organization_code);
89: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
90: asn_debug.put_line(ship_to_org_record.error_record.error_status);
91: END IF;
92:

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

85: po_orgs_sv.derive_org_info(ship_to_org_record);
86:
87: IF (g_asn_debug = 'Y') THEN
88: asn_debug.put_line(ship_to_org_record.organization_code);
89: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
90: asn_debug.put_line(ship_to_org_record.error_record.error_status);
91: END IF;
92:
93: p_header_record.header_record.ship_to_organization_code := ship_to_org_record.organization_code;

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

86:
87: IF (g_asn_debug = 'Y') THEN
88: asn_debug.put_line(ship_to_org_record.organization_code);
89: asn_debug.put_line(TO_CHAR(ship_to_org_record.organization_id));
90: asn_debug.put_line(ship_to_org_record.error_record.error_status);
91: END IF;
92:
93: p_header_record.header_record.ship_to_organization_code := ship_to_org_record.organization_code;
94: p_header_record.header_record.ship_to_organization_id := ship_to_org_record.organization_id;

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

101: from_org_record.organization_code := p_header_record.header_record.from_organization_code;
102: from_org_record.organization_id := p_header_record.header_record.from_organization_id;
103: from_org_record.error_record := p_header_record.error_record;
104:
105: IF (g_asn_debug = 'Y') THEN
106: asn_debug.put_line('In From Organization Procedure');
107: END IF;
108:
109: po_orgs_sv.derive_org_info(from_org_record);

Line 106: asn_debug.put_line('In From Organization Procedure');

102: from_org_record.organization_id := p_header_record.header_record.from_organization_id;
103: from_org_record.error_record := p_header_record.error_record;
104:
105: IF (g_asn_debug = 'Y') THEN
106: asn_debug.put_line('In From Organization Procedure');
107: END IF;
108:
109: po_orgs_sv.derive_org_info(from_org_record);
110:

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

107: END IF;
108:
109: po_orgs_sv.derive_org_info(from_org_record);
110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line(from_org_record.organization_code);
113: asn_debug.put_line(TO_CHAR(from_org_record.organization_id));
114: asn_debug.put_line(from_org_record.error_record.error_status);
115: END IF;

Line 112: asn_debug.put_line(from_org_record.organization_code);

108:
109: po_orgs_sv.derive_org_info(from_org_record);
110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line(from_org_record.organization_code);
113: asn_debug.put_line(TO_CHAR(from_org_record.organization_id));
114: asn_debug.put_line(from_org_record.error_record.error_status);
115: END IF;
116:

Line 113: asn_debug.put_line(TO_CHAR(from_org_record.organization_id));

109: po_orgs_sv.derive_org_info(from_org_record);
110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line(from_org_record.organization_code);
113: asn_debug.put_line(TO_CHAR(from_org_record.organization_id));
114: asn_debug.put_line(from_org_record.error_record.error_status);
115: END IF;
116:
117: p_header_record.header_record.from_organization_code := from_org_record.organization_code;

Line 114: asn_debug.put_line(from_org_record.error_record.error_status);

110:
111: IF (g_asn_debug = 'Y') THEN
112: asn_debug.put_line(from_org_record.organization_code);
113: asn_debug.put_line(TO_CHAR(from_org_record.organization_id));
114: asn_debug.put_line(from_org_record.error_record.error_status);
115: END IF;
116:
117: p_header_record.header_record.from_organization_code := from_org_record.organization_code;
118: p_header_record.header_record.from_organization_id := from_org_record.organization_id;

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

131: vendor_site_record.vendor_site_id := p_header_record.header_record.vendor_site_id;
132: vendor_site_record.organization_id := p_header_record.header_record.ship_to_organization_id;
133: vendor_site_record.error_record := p_header_record.error_record;
134:
135: IF (g_asn_debug = 'Y') THEN
136: asn_debug.put_line('In Vendor Site Procedure');
137: END IF;
138:
139: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);

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

132: vendor_site_record.organization_id := p_header_record.header_record.ship_to_organization_id;
133: vendor_site_record.error_record := p_header_record.error_record;
134:
135: IF (g_asn_debug = 'Y') THEN
136: asn_debug.put_line('In Vendor Site Procedure');
137: END IF;
138:
139: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
140:

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

137: END IF;
138:
139: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
140:
141: IF (g_asn_debug = 'Y') THEN
142: asn_debug.put_line(vendor_site_record.vendor_site_code);
143: asn_debug.put_line(vendor_site_record.vendor_site_id);
144: END IF;
145:

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

138:
139: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
140:
141: IF (g_asn_debug = 'Y') THEN
142: asn_debug.put_line(vendor_site_record.vendor_site_code);
143: asn_debug.put_line(vendor_site_record.vendor_site_id);
144: END IF;
145:
146: p_header_record.header_record.vendor_site_code := vendor_site_record.vendor_site_code;

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

139: po_vendor_sites_sv.derive_vendor_site_info(vendor_site_record);
140:
141: IF (g_asn_debug = 'Y') THEN
142: asn_debug.put_line(vendor_site_record.vendor_site_code);
143: asn_debug.put_line(vendor_site_record.vendor_site_id);
144: END IF;
145:
146: p_header_record.header_record.vendor_site_code := vendor_site_record.vendor_site_code;
147: p_header_record.header_record.vendor_id := vendor_site_record.vendor_id;

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

160: loc_record.location_code := p_header_record.header_record.location_code;
161: loc_record.location_id := p_header_record.header_record.location_id;
162: loc_record.error_record := p_header_record.error_record;
163:
164: IF (g_asn_debug = 'Y') THEN
165: asn_debug.put_line('In Location Code Procedure');
166: END IF;
167:
168: po_locations_s.derive_location_info(loc_record);

Line 165: asn_debug.put_line('In Location Code Procedure');

161: loc_record.location_id := p_header_record.header_record.location_id;
162: loc_record.error_record := p_header_record.error_record;
163:
164: IF (g_asn_debug = 'Y') THEN
165: asn_debug.put_line('In Location Code Procedure');
166: END IF;
167:
168: po_locations_s.derive_location_info(loc_record);
169:

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

166: END IF;
167:
168: po_locations_s.derive_location_info(loc_record);
169:
170: IF (g_asn_debug = 'Y') THEN
171: asn_debug.put_line(loc_record.location_code);
172: asn_debug.put_line(TO_CHAR(loc_record.location_id));
173: asn_debug.put_line(loc_record.error_record.error_status);
174: END IF;

Line 171: asn_debug.put_line(loc_record.location_code);

167:
168: po_locations_s.derive_location_info(loc_record);
169:
170: IF (g_asn_debug = 'Y') THEN
171: asn_debug.put_line(loc_record.location_code);
172: asn_debug.put_line(TO_CHAR(loc_record.location_id));
173: asn_debug.put_line(loc_record.error_record.error_status);
174: END IF;
175:

Line 172: asn_debug.put_line(TO_CHAR(loc_record.location_id));

168: po_locations_s.derive_location_info(loc_record);
169:
170: IF (g_asn_debug = 'Y') THEN
171: asn_debug.put_line(loc_record.location_code);
172: asn_debug.put_line(TO_CHAR(loc_record.location_id));
173: asn_debug.put_line(loc_record.error_record.error_status);
174: END IF;
175:
176: p_header_record.header_record.location_code := loc_record.location_code;

Line 173: asn_debug.put_line(loc_record.error_record.error_status);

169:
170: IF (g_asn_debug = 'Y') THEN
171: asn_debug.put_line(loc_record.location_code);
172: asn_debug.put_line(TO_CHAR(loc_record.location_id));
173: asn_debug.put_line(loc_record.error_record.error_status);
174: END IF;
175:
176: p_header_record.header_record.location_code := loc_record.location_code;
177: p_header_record.header_record.location_id := loc_record.location_id;

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

187: pay_record.payment_term_id := p_header_record.header_record.payment_terms_id;
188: pay_record.payment_term_name := p_header_record.header_record.payment_terms_name;
189: pay_record.error_record := p_header_record.error_record;
190:
191: IF (g_asn_debug = 'Y') THEN
192: asn_debug.put_line('In Derive Payment Terms ');
193: END IF;
194:
195: po_terms_sv.derive_payment_terms_info(pay_record);

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

188: pay_record.payment_term_name := p_header_record.header_record.payment_terms_name;
189: pay_record.error_record := p_header_record.error_record;
190:
191: IF (g_asn_debug = 'Y') THEN
192: asn_debug.put_line('In Derive Payment Terms ');
193: END IF;
194:
195: po_terms_sv.derive_payment_terms_info(pay_record);
196:

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

193: END IF;
194:
195: po_terms_sv.derive_payment_terms_info(pay_record);
196:
197: IF (g_asn_debug = 'Y') THEN
198: asn_debug.put_line(pay_record.payment_term_name);
199: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
200: asn_debug.put_line(pay_record.error_record.error_status);
201: END IF;

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

194:
195: po_terms_sv.derive_payment_terms_info(pay_record);
196:
197: IF (g_asn_debug = 'Y') THEN
198: asn_debug.put_line(pay_record.payment_term_name);
199: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
200: asn_debug.put_line(pay_record.error_record.error_status);
201: END IF;
202:

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

195: po_terms_sv.derive_payment_terms_info(pay_record);
196:
197: IF (g_asn_debug = 'Y') THEN
198: asn_debug.put_line(pay_record.payment_term_name);
199: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
200: asn_debug.put_line(pay_record.error_record.error_status);
201: END IF;
202:
203: p_header_record.header_record.payment_terms_id := pay_record.payment_term_id;

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

196:
197: IF (g_asn_debug = 'Y') THEN
198: asn_debug.put_line(pay_record.payment_term_name);
199: asn_debug.put_line(TO_CHAR(pay_record.payment_term_id));
200: asn_debug.put_line(pay_record.error_record.error_status);
201: END IF;
202:
203: p_header_record.header_record.payment_terms_id := pay_record.payment_term_id;
204: p_header_record.header_record.payment_terms_name := pay_record.payment_term_name;

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

214: emp_record.employee_name := p_header_record.header_record.employee_name;
215: emp_record.employee_id := p_header_record.header_record.employee_id;
216: emp_record.error_record := p_header_record.error_record;
217:
218: IF (g_asn_debug = 'Y') THEN
219: asn_debug.put_line('In Derive Receiver Information');
220: END IF;
221:
222: po_employees_sv.derive_employee_info(emp_record);

Line 219: asn_debug.put_line('In Derive Receiver Information');

215: emp_record.employee_id := p_header_record.header_record.employee_id;
216: emp_record.error_record := p_header_record.error_record;
217:
218: IF (g_asn_debug = 'Y') THEN
219: asn_debug.put_line('In Derive Receiver Information');
220: END IF;
221:
222: po_employees_sv.derive_employee_info(emp_record);
223:

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

220: END IF;
221:
222: po_employees_sv.derive_employee_info(emp_record);
223:
224: IF (g_asn_debug = 'Y') THEN
225: asn_debug.put_line(emp_record.employee_name);
226: asn_debug.put_line(TO_CHAR(emp_record.employee_id));
227: asn_debug.put_line(emp_record.error_record.error_status);
228: END IF;

Line 225: asn_debug.put_line(emp_record.employee_name);

221:
222: po_employees_sv.derive_employee_info(emp_record);
223:
224: IF (g_asn_debug = 'Y') THEN
225: asn_debug.put_line(emp_record.employee_name);
226: asn_debug.put_line(TO_CHAR(emp_record.employee_id));
227: asn_debug.put_line(emp_record.error_record.error_status);
228: END IF;
229:

Line 226: asn_debug.put_line(TO_CHAR(emp_record.employee_id));

222: po_employees_sv.derive_employee_info(emp_record);
223:
224: IF (g_asn_debug = 'Y') THEN
225: asn_debug.put_line(emp_record.employee_name);
226: asn_debug.put_line(TO_CHAR(emp_record.employee_id));
227: asn_debug.put_line(emp_record.error_record.error_status);
228: END IF;
229:
230: p_header_record.header_record.employee_name := emp_record.employee_name;

Line 227: asn_debug.put_line(emp_record.error_record.error_status);

223:
224: IF (g_asn_debug = 'Y') THEN
225: asn_debug.put_line(emp_record.employee_name);
226: asn_debug.put_line(TO_CHAR(emp_record.employee_id));
227: asn_debug.put_line(emp_record.error_record.error_status);
228: END IF;
229:
230: p_header_record.header_record.employee_name := emp_record.employee_name;
231: p_header_record.header_record.employee_id := emp_record.employee_id;

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

238:
239: IF p_header_record.error_record.error_status IN('S', 'W')
240: AND p_header_record.header_record.transaction_type = 'CANCEL'
241: AND p_header_record.header_record.shipment_num IS NOT NULL THEN
242: IF (g_asn_debug = 'Y') THEN
243: asn_debug.put_line('Derive shipment info');
244: END IF;
245:
246: rcv_core_s.derive_shipment_info(p_header_record);

Line 243: asn_debug.put_line('Derive shipment info');

239: IF p_header_record.error_record.error_status IN('S', 'W')
240: AND p_header_record.header_record.transaction_type = 'CANCEL'
241: AND p_header_record.header_record.shipment_num IS NOT NULL THEN
242: IF (g_asn_debug = 'Y') THEN
243: asn_debug.put_line('Derive shipment info');
244: END IF;
245:
246: rcv_core_s.derive_shipment_info(p_header_record);
247: END IF;

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

260: temp_count NUMBER;
261: x_po_header_id NUMBER;
262: x_document_num VARCHAR2(20);
263: BEGIN
264: IF (g_asn_debug = 'Y') THEN
265: asn_debug.put_line('In default');
266: END IF;
267:
268: /* last_update_date */

Line 265: asn_debug.put_line('In default');

261: x_po_header_id NUMBER;
262: x_document_num VARCHAR2(20);
263: BEGIN
264: IF (g_asn_debug = 'Y') THEN
265: asn_debug.put_line('In default');
266: END IF;
267:
268: /* last_update_date */
269: IF p_header_record.header_record.last_update_date IS NULL THEN

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

268: /* last_update_date */
269: IF p_header_record.header_record.last_update_date IS NULL THEN
270: p_header_record.header_record.last_update_date := x_sysdate;
271:
272: IF (g_asn_debug = 'Y') THEN
273: asn_debug.put_line('defaulting last update date');
274: END IF;
275: END IF;
276:

Line 273: asn_debug.put_line('defaulting last update date');

269: IF p_header_record.header_record.last_update_date IS NULL THEN
270: p_header_record.header_record.last_update_date := x_sysdate;
271:
272: IF (g_asn_debug = 'Y') THEN
273: asn_debug.put_line('defaulting last update date');
274: END IF;
275: END IF;
276:
277: /* last_updated_by */

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

277: /* last_updated_by */
278: IF p_header_record.header_record.last_updated_by IS NULL THEN
279: p_header_record.header_record.last_updated_by := fnd_global.user_id;
280:
281: IF (g_asn_debug = 'Y') THEN
282: asn_debug.put_line('defaulting last update by');
283: END IF;
284: END IF;
285:

Line 282: asn_debug.put_line('defaulting last update by');

278: IF p_header_record.header_record.last_updated_by IS NULL THEN
279: p_header_record.header_record.last_updated_by := fnd_global.user_id;
280:
281: IF (g_asn_debug = 'Y') THEN
282: asn_debug.put_line('defaulting last update by');
283: END IF;
284: END IF;
285:
286: /* creation_date */

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

286: /* creation_date */
287: IF p_header_record.header_record.creation_date IS NULL THEN
288: p_header_record.header_record.creation_date := x_sysdate;
289:
290: IF (g_asn_debug = 'Y') THEN
291: asn_debug.put_line('defaulting creation date');
292: END IF;
293: END IF;
294:

Line 291: asn_debug.put_line('defaulting creation date');

287: IF p_header_record.header_record.creation_date IS NULL THEN
288: p_header_record.header_record.creation_date := x_sysdate;
289:
290: IF (g_asn_debug = 'Y') THEN
291: asn_debug.put_line('defaulting creation date');
292: END IF;
293: END IF;
294:
295: /* created_by */

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

295: /* created_by */
296: IF p_header_record.header_record.created_by IS NULL THEN
297: p_header_record.header_record.created_by := fnd_global.user_id;
298:
299: IF (g_asn_debug = 'Y') THEN
300: asn_debug.put_line('defaulting created by ');
301: END IF;
302: END IF;
303:

Line 300: asn_debug.put_line('defaulting created by ');

296: IF p_header_record.header_record.created_by IS NULL THEN
297: p_header_record.header_record.created_by := fnd_global.user_id;
298:
299: IF (g_asn_debug = 'Y') THEN
300: asn_debug.put_line('defaulting created by ');
301: END IF;
302: END IF;
303:
304: /* last_update_login */

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

304: /* last_update_login */
305: IF p_header_record.header_record.last_update_login IS NULL THEN
306: p_header_record.header_record.last_update_login := fnd_global.login_id;
307:
308: IF (g_asn_debug = 'Y') THEN
309: asn_debug.put_line('defaulting last update login');
310: END IF;
311: END IF;
312:

Line 309: asn_debug.put_line('defaulting last update login');

305: IF p_header_record.header_record.last_update_login IS NULL THEN
306: p_header_record.header_record.last_update_login := fnd_global.login_id;
307:
308: IF (g_asn_debug = 'Y') THEN
309: asn_debug.put_line('defaulting last update login');
310: END IF;
311: END IF;
312:
313: /* Default STD into asn_type for null asn_type */

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

313: /* Default STD into asn_type for null asn_type */
314: IF p_header_record.header_record.asn_type IS NULL THEN
315: p_header_record.header_record.asn_type := 'STD';
316:
317: IF (g_asn_debug = 'Y') THEN
318: asn_debug.put_line('defaulting asn type to STD');
319: END IF;
320: END IF;
321:

Line 318: asn_debug.put_line('defaulting asn type to STD');

314: IF p_header_record.header_record.asn_type IS NULL THEN
315: p_header_record.header_record.asn_type := 'STD';
316:
317: IF (g_asn_debug = 'Y') THEN
318: asn_debug.put_line('defaulting asn type to STD');
319: END IF;
320: END IF;
321:
322: /* SHIPMENT NUMBER FOR ASBN if shipment_num IS NULL */

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

324: IF p_header_record.header_record.asn_type = 'ASBN'
325: AND p_header_record.header_record.shipment_num IS NULL THEN
326: p_header_record.header_record.shipment_num := p_header_record.header_record.invoice_num;
327:
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('defaulted shipment number');
330: END IF;
331: END IF;
332:

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

325: AND p_header_record.header_record.shipment_num IS NULL THEN
326: p_header_record.header_record.shipment_num := p_header_record.header_record.invoice_num;
327:
328: IF (g_asn_debug = 'Y') THEN
329: asn_debug.put_line('defaulted shipment number');
330: END IF;
331: END IF;
332:
333: /* SHIPMENT NUMBER FOR ASBN/ASN if shipment_num IS NULL */

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

334: /* First choice for ASN/ Second Choice for ASN */
335: IF p_header_record.header_record.shipment_num IS NULL THEN
336: p_header_record.header_record.shipment_num := p_header_record.header_record.packing_slip;
337:
338: IF (g_asn_debug = 'Y') THEN
339: asn_debug.put_line('defaulted shipment number');
340: END IF;
341: END IF;
342:

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

335: IF p_header_record.header_record.shipment_num IS NULL THEN
336: p_header_record.header_record.shipment_num := p_header_record.header_record.packing_slip;
337:
338: IF (g_asn_debug = 'Y') THEN
339: asn_debug.put_line('defaulted shipment number');
340: END IF;
341: END IF;
342:
343: /* generate the shipment_header_id */

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

347: SELECT rcv_shipment_headers_s.NEXTVAL
348: INTO p_header_record.header_record.receipt_header_id
349: FROM SYS.DUAL;
350:
351: IF (g_asn_debug = 'Y') THEN
352: asn_debug.put_line('defaulted receipt_id');
353: END IF;
354: END IF;
355:

Line 352: asn_debug.put_line('defaulted receipt_id');

348: INTO p_header_record.header_record.receipt_header_id
349: FROM SYS.DUAL;
350:
351: IF (g_asn_debug = 'Y') THEN
352: asn_debug.put_line('defaulted receipt_id');
353: END IF;
354: END IF;
355:
356: /* receipt_num */

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

388: WHERE organization_id = p_header_record.header_record.ship_to_organization_id;
389:
390: /* assuming that the ship_to_organization_id is populated at the header level of
391: rcv_headers_interface */
392: IF (g_asn_debug = 'Y') THEN
393: asn_debug.put_line(v_rcv_type || ' Generation ');
394: END IF;
395:
396: IF v_rcv_type = 'AUTOMATIC' THEN

Line 393: asn_debug.put_line(v_rcv_type || ' Generation ');

389:
390: /* assuming that the ship_to_organization_id is populated at the header level of
391: rcv_headers_interface */
392: IF (g_asn_debug = 'Y') THEN
393: asn_debug.put_line(v_rcv_type || ' Generation ');
394: END IF;
395:
396: IF v_rcv_type = 'AUTOMATIC' THEN
397: --bug 2506961

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

412: rcv_error_pkg.set_sql_error_message('default_shipment_header', '010');
413: p_header_record.error_record.error_message := rcv_error_pkg.get_last_message;
414: END;
415: ELSE -- of v_count
416: IF (g_asn_debug = 'Y') THEN
417: asn_debug.put_line('No need to generate a receipt_number');
418: END IF;
419: END IF; -- of v_count
420:

Line 417: asn_debug.put_line('No need to generate a receipt_number');

413: p_header_record.error_record.error_message := rcv_error_pkg.get_last_message;
414: END;
415: ELSE -- of v_count
416: IF (g_asn_debug = 'Y') THEN
417: asn_debug.put_line('No need to generate a receipt_number');
418: END IF;
419: END IF; -- of v_count
420:
421: IF (g_asn_debug = 'Y') THEN

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

417: asn_debug.put_line('No need to generate a receipt_number');
418: END IF;
419: END IF; -- of v_count
420:
421: IF (g_asn_debug = 'Y') THEN
422: asn_debug.put_line('defaulted receipt_num ' || p_header_record.header_record.receipt_num);
423: END IF;
424: END IF;
425:

Line 422: asn_debug.put_line('defaulted receipt_num ' || p_header_record.header_record.receipt_num);

418: END IF;
419: END IF; -- of v_count
420:
421: IF (g_asn_debug = 'Y') THEN
422: asn_debug.put_line('defaulted receipt_num ' || p_header_record.header_record.receipt_num);
423: END IF;
424: END IF;
425:
426: /* vendor_site_id po_vendor_sites_sv.default_purchasing_site */

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

431: the derive_shipment_info stage */
432: IF p_header_record.header_record.vendor_site_id IS NULL
433: AND p_header_record.header_record.vendor_site_code IS NULL
434: AND p_header_record.header_record.vendor_id IS NOT NULL THEN -- added for support of cancel
435: IF (g_asn_debug = 'Y') THEN
436: asn_debug.put_line('Need to get default vendor site id');
437: END IF;
438:
439: po_vendor_sites_sv.get_def_vendor_site(p_header_record.header_record.vendor_id,

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

432: IF p_header_record.header_record.vendor_site_id IS NULL
433: AND p_header_record.header_record.vendor_site_code IS NULL
434: AND p_header_record.header_record.vendor_id IS NOT NULL THEN -- added for support of cancel
435: IF (g_asn_debug = 'Y') THEN
436: asn_debug.put_line('Need to get default vendor site id');
437: END IF;
438:
439: po_vendor_sites_sv.get_def_vendor_site(p_header_record.header_record.vendor_id,
440: p_header_record.header_record.vendor_site_id,

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

441: p_header_record.header_record.vendor_site_code,
442: 'RCV'
443: );
444:
445: IF (g_asn_debug = 'Y') THEN
446: asn_debug.put_line('defaulted vendor_site info');
447: END IF;
448: END IF;
449:

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

442: 'RCV'
443: );
444:
445: IF (g_asn_debug = 'Y') THEN
446: asn_debug.put_line('defaulted vendor_site info');
447: END IF;
448: END IF;
449:
450: /* ship_to_location_id mtl_org_organizations.default */

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

465: WHERE hr_locations_all.inventory_organization_id = p_header_record.header_record.ship_to_organization_id
466: AND NVL(hr_locations_all.inactive_date, x_sysdate + 1) > x_sysdate
467: AND NVL(hr_locations_all.receiving_site_flag, 'N') = 'Y';
468:
469: IF (g_asn_debug = 'Y') THEN
470: asn_debug.put_line('count in hr_locations_all ' || x_count);
471: END IF;
472:
473: IF x_count = 1 THEN

Line 470: asn_debug.put_line('count in hr_locations_all ' || x_count);

466: AND NVL(hr_locations_all.inactive_date, x_sysdate + 1) > x_sysdate
467: AND NVL(hr_locations_all.receiving_site_flag, 'N') = 'Y';
468:
469: IF (g_asn_debug = 'Y') THEN
470: asn_debug.put_line('count in hr_locations_all ' || x_count);
471: END IF;
472:
473: IF x_count = 1 THEN
474: p_header_record.header_record.location_id := x_location_id;

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

500: FROM oe_drop_ship_sources
501: WHERE po_header_id = x_po_header_id;
502:
503: IF (temp_count <> 0) THEN -- this is a drop ship
504: IF (g_asn_debug = 'Y') THEN
505: asn_debug.put_line('drop ship PO');
506: END IF;
507:
508: p_header_record.header_record.location_id := NULL;

Line 505: asn_debug.put_line('drop ship PO');

501: WHERE po_header_id = x_po_header_id;
502:
503: IF (temp_count <> 0) THEN -- this is a drop ship
504: IF (g_asn_debug = 'Y') THEN
505: asn_debug.put_line('drop ship PO');
506: END IF;
507:
508: p_header_record.header_record.location_id := NULL;
509: END IF;

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

509: END IF;
510: END IF;
511: END IF;
512:
513: IF (g_asn_debug = 'Y') THEN
514: asn_debug.put_line('defaulted location info');
515: END IF;
516: END IF;
517:

Line 514: asn_debug.put_line('defaulted location info');

510: END IF;
511: END IF;
512:
513: IF (g_asn_debug = 'Y') THEN
514: asn_debug.put_line('defaulted location info');
515: END IF;
516: END IF;
517:
518: /* Currency Code if ASBN invoice_currency_code po_vendor_sites_sv.default */

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

520: /* RECEIPT SOURCE CODE */
521: IF p_header_record.header_record.receipt_source_code IS NULL THEN
522: p_header_record.header_record.receipt_source_code := 'VENDOR';
523:
524: IF (g_asn_debug = 'Y') THEN
525: asn_debug.put_line('defaulted receipt_source_code info');
526: END IF;
527: END IF;
528:

Line 525: asn_debug.put_line('defaulted receipt_source_code info');

521: IF p_header_record.header_record.receipt_source_code IS NULL THEN
522: p_header_record.header_record.receipt_source_code := 'VENDOR';
523:
524: IF (g_asn_debug = 'Y') THEN
525: asn_debug.put_line('defaulted receipt_source_code info');
526: END IF;
527: END IF;
528:
529: -- added for support of cancel

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

531:
532: IF p_header_record.header_record.transaction_type = 'CANCEL'
533: AND ( p_header_record.header_record.receipt_header_id IS NULL
534: OR p_header_record.header_record.shipment_num IS NULL) THEN
535: IF (g_asn_debug = 'Y') THEN
536: asn_debug.put_line('Into default shipment info');
537: END IF;
538:
539: rcv_core_s.default_shipment_info(p_header_record);

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

532: IF p_header_record.header_record.transaction_type = 'CANCEL'
533: AND ( p_header_record.header_record.receipt_header_id IS NULL
534: OR p_header_record.header_record.shipment_num IS NULL) THEN
535: IF (g_asn_debug = 'Y') THEN
536: asn_debug.put_line('Into default shipment info');
537: END IF;
538:
539: rcv_core_s.default_shipment_info(p_header_record);
540: END IF;

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

538:
539: rcv_core_s.default_shipment_info(p_header_record);
540: END IF;
541:
542: IF (g_asn_debug = 'Y') THEN
543: asn_debug.put_line('Out of default');
544: END IF;
545: END default_shipment_header;
546:

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

539: rcv_core_s.default_shipment_info(p_header_record);
540: END IF;
541:
542: IF (g_asn_debug = 'Y') THEN
543: asn_debug.put_line('Out of default');
544: END IF;
545: END default_shipment_header;
546:
547: /*===========================================================================+

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

553: p_header_record IN OUT NOCOPY rcv_shipment_header_sv.headerrectype
554: ) IS
555: BEGIN
556: /* Validate Transaction Type */
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('In validate routine');
559: END IF;
560:
561: IF p_header_record.error_record.error_status NOT IN('S', 'W') THEN

Line 558: asn_debug.put_line('In validate routine');

554: ) IS
555: BEGIN
556: /* Validate Transaction Type */
557: IF (g_asn_debug = 'Y') THEN
558: asn_debug.put_line('In validate routine');
559: END IF;
560:
561: IF p_header_record.error_record.error_status NOT IN('S', 'W') THEN
562: RETURN;

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

578: 'RCV_HEADERS_INTERFACE',
579: 'TRANSACTION_TYPE'
580: );
581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('validated transaction type');
584: END IF;
585:
586: /* Validate Document type */

Line 583: asn_debug.put_line('validated transaction type');

579: 'TRANSACTION_TYPE'
580: );
581:
582: IF (g_asn_debug = 'Y') THEN
583: asn_debug.put_line('validated transaction type');
584: END IF;
585:
586: /* Validate Document type */
587: IF p_header_record.header_record.asn_type IS NOT NULL

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

602: 'RCV_HEADERS_INTERFACE',
603: 'ASN_TYPE'
604: );
605:
606: IF (g_asn_debug = 'Y') THEN
607: asn_debug.put_line('validated asn type');
608: END IF;
609: ELSE
610: p_header_record.header_record.asn_type := 'STD'; -- Not an ASN/ASBN

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

603: 'ASN_TYPE'
604: );
605:
606: IF (g_asn_debug = 'Y') THEN
607: asn_debug.put_line('validated asn type');
608: END IF;
609: ELSE
610: p_header_record.header_record.asn_type := 'STD'; -- Not an ASN/ASBN
611: END IF;

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

631: 'RCV_HEADERS_INTERFACE',
632: 'CURRENCY_CODE'
633: );
634:
635: IF (g_asn_debug = 'Y') THEN
636: asn_debug.put_line('validated currency info');
637: END IF;
638: END IF;
639:

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

632: 'CURRENCY_CODE'
633: );
634:
635: IF (g_asn_debug = 'Y') THEN
636: asn_debug.put_line('validated currency info');
637: END IF;
638: END IF;
639:
640: /* Validation for Shipment Date > System Date and not NULL,blank,zero */

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

640: /* Validation for Shipment Date > System Date and not NULL,blank,zero */
641: IF NVL(p_header_record.header_record.shipped_date, x_sysdate + 1) > x_sysdate THEN
642: IF p_header_record.header_record.shipped_date IS NULL
643: AND p_header_record.header_record.asn_type = 'STD' THEN
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line('Shipped date can be blank for STD');
646: END IF;
647: ELSE
648: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;

Line 645: asn_debug.put_line('Shipped date can be blank for STD');

641: IF NVL(p_header_record.header_record.shipped_date, x_sysdate + 1) > x_sysdate THEN
642: IF p_header_record.header_record.shipped_date IS NULL
643: AND p_header_record.header_record.asn_type = 'STD' THEN
644: IF (g_asn_debug = 'Y') THEN
645: asn_debug.put_line('Shipped date can be blank for STD');
646: END IF;
647: ELSE
648: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;
649: rcv_error_pkg.set_error_message('RCV_SHIP_DATE_INVALID', p_header_record.error_record.error_message);

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

651: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'SHIPPED_DATE');
652: END IF;
653: END IF;
654:
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('validated for shipment_date > system date');
657: END IF;
658:
659: /* Validation for Receipt Date > Shipped Date if Receipt Date is specified */

Line 656: asn_debug.put_line('validated for shipment_date > system date');

652: END IF;
653: END IF;
654:
655: IF (g_asn_debug = 'Y') THEN
656: asn_debug.put_line('validated for shipment_date > system date');
657: END IF;
658:
659: /* Validation for Receipt Date > Shipped Date if Receipt Date is specified */
660: IF p_header_record.header_record.transaction_type <> 'CANCEL' THEN

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

667: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'EXPECTED_RECEIPT_DATE');
668: END IF;
669: END IF;
670:
671: IF (g_asn_debug = 'Y') THEN
672: asn_debug.put_line('validated for Receipt Date > Shipped Date if Receipt Date is specified');
673: END IF;
674: END IF;
675:

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

668: END IF;
669: END IF;
670:
671: IF (g_asn_debug = 'Y') THEN
672: asn_debug.put_line('validated for Receipt Date > Shipped Date if Receipt Date is specified');
673: END IF;
674: END IF;
675:
676: /* Validation expected_receipt_date is not missing BUG 628316 */

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

680: rcv_error_pkg.set_error_message('RCV_ASN_EXPECTED_RECEIPT_DATE', p_header_record.error_record.error_message);
681: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'EXPECTED_RECEIPT_DATE');
682: END IF;
683:
684: IF (g_asn_debug = 'Y') THEN
685: asn_debug.put_line('validated expected_receipt_date is not missing');
686: END IF;
687: END IF;
688:

Line 685: asn_debug.put_line('validated expected_receipt_date is not missing');

681: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'EXPECTED_RECEIPT_DATE');
682: END IF;
683:
684: IF (g_asn_debug = 'Y') THEN
685: asn_debug.put_line('validated expected_receipt_date is not missing');
686: END IF;
687: END IF;
688:
689: /* Validate Receipt Number */

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

689: /* Validate Receipt Number */
690: IF p_header_record.header_record.receipt_num IS NULL
691: AND p_header_record.header_record.asn_type = 'STD'
692: AND p_header_record.header_record.transaction_type <> 'CANCEL' THEN -- added for support of cancel
693: IF (g_asn_debug = 'Y') THEN
694: asn_debug.put_line('Receipt Number is mandatory for STD');
695: END IF;
696:
697: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;

Line 694: asn_debug.put_line('Receipt Number is mandatory for STD');

690: IF p_header_record.header_record.receipt_num IS NULL
691: AND p_header_record.header_record.asn_type = 'STD'
692: AND p_header_record.header_record.transaction_type <> 'CANCEL' THEN -- added for support of cancel
693: IF (g_asn_debug = 'Y') THEN
694: asn_debug.put_line('Receipt Number is mandatory for STD');
695: END IF;
696:
697: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;
698: rcv_error_pkg.set_error_message('RCV_RECEIPT_NUM_REQ', p_header_record.error_record.error_message);

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

713: rcv_error_pkg.set_token('VALUE', p_header_record.header_record.receipt_num);
714: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'RECEIPT_NUM');
715: END IF;
716:
717: IF (g_asn_debug = 'Y') THEN
718: asn_debug.put_line('validated receipt number');
719: END IF;
720: END IF;
721:

Line 718: asn_debug.put_line('validated receipt number');

714: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'RECEIPT_NUM');
715: END IF;
716:
717: IF (g_asn_debug = 'Y') THEN
718: asn_debug.put_line('validated receipt number');
719: END IF;
720: END IF;
721:
722: /* Validate Vendor Information */

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

722: /* Validate Vendor Information */
723: IF p_header_record.header_record.vendor_id IS NULL
724: AND p_header_record.header_record.vendor_name IS NULL
725: AND p_header_record.header_record.vendor_num IS NULL THEN
726: IF (g_asn_debug = 'Y') THEN
727: asn_debug.put_line('validated vendor info is all null');
728: END IF;
729:
730: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;

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

723: IF p_header_record.header_record.vendor_id IS NULL
724: AND p_header_record.header_record.vendor_name IS NULL
725: AND p_header_record.header_record.vendor_num IS NULL THEN
726: IF (g_asn_debug = 'Y') THEN
727: asn_debug.put_line('validated vendor info is all null');
728: END IF;
729:
730: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;
731: rcv_error_pkg.set_error_message('PO_PDOI_COLUMN_NOT_NULL', p_header_record.error_record.error_message);

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

737: vendor_record.vendor_num := p_header_record.header_record.vendor_num;
738: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
739: vendor_record.error_record := p_header_record.error_record;
740:
741: IF (g_asn_debug = 'Y') THEN
742: asn_debug.put_line('In Vendor Validation Procedure');
743: END IF;
744:
745: po_vendors_sv.validate_vendor_info(vendor_record);

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

738: vendor_record.vendor_id := p_header_record.header_record.vendor_id;
739: vendor_record.error_record := p_header_record.error_record;
740:
741: IF (g_asn_debug = 'Y') THEN
742: asn_debug.put_line('In Vendor Validation Procedure');
743: END IF;
744:
745: po_vendors_sv.validate_vendor_info(vendor_record);
746: p_header_record.error_record.error_status := vendor_record.error_record.error_status;

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

770: 'RCV_HEADERS_INTERFACE',
771: 'VENDOR_ID'
772: );
773:
774: IF (g_asn_debug = 'Y') THEN
775: asn_debug.put_line('Validated vendor info');
776: END IF;
777:
778: /* Validate Ship To Organization Information */

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

771: 'VENDOR_ID'
772: );
773:
774: IF (g_asn_debug = 'Y') THEN
775: asn_debug.put_line('Validated vendor info');
776: END IF;
777:
778: /* Validate Ship To Organization Information */
779: IF p_header_record.header_record.asn_type IN('ASN', 'ASBN', 'STD') THEN

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

780: ship_to_org_record.organization_code := p_header_record.header_record.ship_to_organization_code;
781: ship_to_org_record.organization_id := p_header_record.header_record.ship_to_organization_id;
782: ship_to_org_record.error_record := p_header_record.error_record;
783:
784: IF (g_asn_debug = 'Y') THEN
785: asn_debug.put_line('In Validate Ship to Organization Procedure');
786: END IF;
787:
788: po_orgs_sv.validate_org_info(ship_to_org_record);

Line 785: asn_debug.put_line('In Validate Ship to Organization Procedure');

781: ship_to_org_record.organization_id := p_header_record.header_record.ship_to_organization_id;
782: ship_to_org_record.error_record := p_header_record.error_record;
783:
784: IF (g_asn_debug = 'Y') THEN
785: asn_debug.put_line('In Validate Ship to Organization Procedure');
786: END IF;
787:
788: po_orgs_sv.validate_org_info(ship_to_org_record);
789: p_header_record.error_record.error_status := ship_to_org_record.error_record.error_status;

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

805: 'RCV_HEADERS_INTERFACE',
806: 'SHIP_TO_ORGANIZATION_ID'
807: );
808:
809: IF (g_asn_debug = 'Y') THEN
810: asn_debug.put_line('validated ship to organization info');
811: END IF;
812: END IF;
813:

Line 810: asn_debug.put_line('validated ship to organization info');

806: 'SHIP_TO_ORGANIZATION_ID'
807: );
808:
809: IF (g_asn_debug = 'Y') THEN
810: asn_debug.put_line('validated ship to organization info');
811: END IF;
812: END IF;
813:
814: /* Bug# 3662698.

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

824: to_organization_code and to_organization_id as null.
825: This logic is followed keeping in view of the performance problems.
826: */
827: IF (p_header_record.header_record.ship_to_organization_code IS NOT NULL) THEN
828: IF (g_asn_debug = 'Y') THEN
829: asn_debug.put_line('Checking if any RTI has different destn org than that of the header');
830: END IF;
831:
832: SELECT COUNT(*)

Line 829: asn_debug.put_line('Checking if any RTI has different destn org than that of the header');

825: This logic is followed keeping in view of the performance problems.
826: */
827: IF (p_header_record.header_record.ship_to_organization_code IS NOT NULL) THEN
828: IF (g_asn_debug = 'Y') THEN
829: asn_debug.put_line('Checking if any RTI has different destn org than that of the header');
830: END IF;
831:
832: SELECT COUNT(*)
833: INTO x_count

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

841: AND rti.to_organization_id <> p_header_record.header_record.ship_to_organization_id)
842: );
843:
844: IF x_count >= 1 THEN
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('Atleast one of the RTIs has a different org id/code than that of the header');
847: END IF;
848:
849: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;

Line 846: asn_debug.put_line('Atleast one of the RTIs has a different org id/code than that of the header');

842: );
843:
844: IF x_count >= 1 THEN
845: IF (g_asn_debug = 'Y') THEN
846: asn_debug.put_line('Atleast one of the RTIs has a different org id/code than that of the header');
847: END IF;
848:
849: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;
850: rcv_error_pkg.set_error_message('RCV_MUL_DESTN_ORGS_FOR_LINES', p_header_record.error_record.error_message);

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

850: rcv_error_pkg.set_error_message('RCV_MUL_DESTN_ORGS_FOR_LINES', p_header_record.error_record.error_message);
851: rcv_error_pkg.set_token('VALUE', p_header_record.header_record.ship_to_organization_id);
852: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'SHIP_TO_ORGANIZATION_ID');
853: ELSE
854: IF (g_asn_debug = 'Y') THEN
855: asn_debug.put_line('In the ELSE part');
856: END IF;
857:
858: /* Check if there is atleast one RTI record in this header with a different

Line 855: asn_debug.put_line('In the ELSE part');

851: rcv_error_pkg.set_token('VALUE', p_header_record.header_record.ship_to_organization_id);
852: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'SHIP_TO_ORGANIZATION_ID');
853: ELSE
854: IF (g_asn_debug = 'Y') THEN
855: asn_debug.put_line('In the ELSE part');
856: END IF;
857:
858: /* Check if there is atleast one RTI record in this header with a different
859: ship to org than the header's org. Here we consider those RTI records

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

874: AND rti.ship_to_location_id = hl.location_id
875: AND hl.inventory_organization_id = org.organization_id
876: AND org.organization_code <> p_header_record.header_record.ship_to_organization_code;
877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Count is ' || TO_CHAR(x_count));
880: END IF;
881:
882: /* Check if there is atleast one RTI record in this header with a different

Line 879: asn_debug.put_line('Count is ' || TO_CHAR(x_count));

875: AND hl.inventory_organization_id = org.organization_id
876: AND org.organization_code <> p_header_record.header_record.ship_to_organization_code;
877:
878: IF (g_asn_debug = 'Y') THEN
879: asn_debug.put_line('Count is ' || TO_CHAR(x_count));
880: END IF;
881:
882: /* Check if there is atleast one RTI record in this header with a different
883: ship to org than the header's org. Here we consider those RTI records

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

901: AND org.organization_code <> p_header_record.header_record.ship_to_organization_code;
902: END IF;
903:
904: IF x_count >= 1 THEN
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line('For one of the RTI records a different org id/code is derived');
907: END IF;
908:
909: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;

Line 906: asn_debug.put_line('For one of the RTI records a different org id/code is derived');

902: END IF;
903:
904: IF x_count >= 1 THEN
905: IF (g_asn_debug = 'Y') THEN
906: asn_debug.put_line('For one of the RTI records a different org id/code is derived');
907: END IF;
908:
909: p_header_record.error_record.error_status := rcv_error_pkg.g_ret_sts_error;
910: rcv_error_pkg.set_error_message('RCV_MUL_DESTN_ORGS_FOR_LINES', p_header_record.error_record.error_message);

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

912: rcv_error_pkg.log_interface_error('RCV_HEADERS_INTERFACE', 'SHIP_TO_ORGANIZATION_ID');
913: END IF;
914: END IF;
915:
916: IF (g_asn_debug = 'Y') THEN
917: asn_debug.put_line('Validated ship to org of all the RTIs tied to the header');
918: END IF;
919: END IF;
920: END IF; --End of bug# 3662698.

Line 917: asn_debug.put_line('Validated ship to org of all the RTIs tied to the header');

913: END IF;
914: END IF;
915:
916: IF (g_asn_debug = 'Y') THEN
917: asn_debug.put_line('Validated ship to org of all the RTIs tied to the header');
918: END IF;
919: END IF;
920: END IF; --End of bug# 3662698.
921:

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

926: from_org_record.organization_code := p_header_record.header_record.from_organization_code;
927: from_org_record.organization_id := p_header_record.header_record.from_organization_id;
928: from_org_record.error_record := p_header_record.error_record;
929:
930: IF (g_asn_debug = 'Y') THEN
931: asn_debug.put_line('In Validate From Organization Procedure');
932: END IF;
933:
934: po_orgs_sv.validate_org_info(from_org_record);

Line 931: asn_debug.put_line('In Validate From Organization Procedure');

927: from_org_record.organization_id := p_header_record.header_record.from_organization_id;
928: from_org_record.error_record := p_header_record.error_record;
929:
930: IF (g_asn_debug = 'Y') THEN
931: asn_debug.put_line('In Validate From Organization Procedure');
932: END IF;
933:
934: po_orgs_sv.validate_org_info(from_org_record);
935: p_header_record.error_record.error_status := from_org_record.error_record.error_status;

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

963: vendor_site_record.vendor_site_id := p_header_record.header_record.vendor_site_id;
964: vendor_site_record.organization_id := NULL;
965: vendor_site_record.error_record := p_header_record.error_record;
966:
967: IF (g_asn_debug = 'Y') THEN
968: asn_debug.put_line('In Validate Vendor Site Procedure');
969: END IF;
970:
971: po_vendor_sites_sv.validate_vendor_site_info(vendor_site_record);

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

964: vendor_site_record.organization_id := NULL;
965: vendor_site_record.error_record := p_header_record.error_record;
966:
967: IF (g_asn_debug = 'Y') THEN
968: asn_debug.put_line('In Validate Vendor Site Procedure');
969: END IF;
970:
971: po_vendor_sites_sv.validate_vendor_site_info(vendor_site_record);
972:

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

1023: 'RCV_HEADERS_INTERFACE',
1024: 'VENDOR_ID'
1025: );
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('Validated vendor site info');
1029: END IF;
1030: END IF;
1031:

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

1024: 'VENDOR_ID'
1025: );
1026:
1027: IF (g_asn_debug = 'Y') THEN
1028: asn_debug.put_line('Validated vendor site info');
1029: END IF;
1030: END IF;
1031:
1032: /* Validate Location Information */

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

1038: loc_record.location_id := p_header_record.header_record.location_id;
1039: loc_record.organization_id := p_header_record.header_record.ship_to_organization_id;
1040: loc_record.error_record := p_header_record.error_record;
1041:
1042: IF (g_asn_debug = 'Y') THEN
1043: asn_debug.put_line('In Validate Location Code Procedure');
1044: END IF;
1045:
1046: po_locations_s.validate_location_info(loc_record);

Line 1043: asn_debug.put_line('In Validate Location Code Procedure');

1039: loc_record.organization_id := p_header_record.header_record.ship_to_organization_id;
1040: loc_record.error_record := p_header_record.error_record;
1041:
1042: IF (g_asn_debug = 'Y') THEN
1043: asn_debug.put_line('In Validate Location Code Procedure');
1044: END IF;
1045:
1046: po_locations_s.validate_location_info(loc_record);
1047:

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

1064: 'RCV_HEADERS_INTERFACE',
1065: 'LOCATION_ID'
1066: );
1067:
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line(loc_record.error_record.error_status);
1070: asn_debug.put_line(loc_record.error_record.error_message);
1071: asn_debug.put_line('Validated location info');
1072: END IF;

Line 1069: asn_debug.put_line(loc_record.error_record.error_status);

1065: 'LOCATION_ID'
1066: );
1067:
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line(loc_record.error_record.error_status);
1070: asn_debug.put_line(loc_record.error_record.error_message);
1071: asn_debug.put_line('Validated location info');
1072: END IF;
1073: END IF;

Line 1070: asn_debug.put_line(loc_record.error_record.error_message);

1066: );
1067:
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line(loc_record.error_record.error_status);
1070: asn_debug.put_line(loc_record.error_record.error_message);
1071: asn_debug.put_line('Validated location info');
1072: END IF;
1073: END IF;
1074:

Line 1071: asn_debug.put_line('Validated location info');

1067:
1068: IF (g_asn_debug = 'Y') THEN
1069: asn_debug.put_line(loc_record.error_record.error_status);
1070: asn_debug.put_line(loc_record.error_record.error_message);
1071: asn_debug.put_line('Validated location info');
1072: END IF;
1073: END IF;
1074:
1075: /* Validate Payment Terms Information */

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

1079: pay_record.payment_term_id := p_header_record.header_record.payment_terms_id;
1080: pay_record.payment_term_name := p_header_record.header_record.payment_terms_name;
1081: pay_record.error_record := p_header_record.error_record;
1082:
1083: IF (g_asn_debug = 'Y') THEN
1084: asn_debug.put_line('In Validate Payment Terms ');
1085: END IF;
1086:
1087: po_terms_sv.validate_payment_terms_info(pay_record);

Line 1084: asn_debug.put_line('In Validate Payment Terms ');

1080: pay_record.payment_term_name := p_header_record.header_record.payment_terms_name;
1081: pay_record.error_record := p_header_record.error_record;
1082:
1083: IF (g_asn_debug = 'Y') THEN
1084: asn_debug.put_line('In Validate Payment Terms ');
1085: END IF;
1086:
1087: po_terms_sv.validate_payment_terms_info(pay_record);
1088:

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

1106: 'RCV_HEADERS_INTERFACE',
1107: 'PAYMENT_TERM_ID'
1108: );
1109:
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line('Validated payment info');
1112: END IF;
1113: END IF;
1114:

Line 1111: asn_debug.put_line('Validated payment info');

1107: 'PAYMENT_TERM_ID'
1108: );
1109:
1110: IF (g_asn_debug = 'Y') THEN
1111: asn_debug.put_line('Validated payment info');
1112: END IF;
1113: END IF;
1114:
1115: /* validate receiver information */

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

1120: emp_record.employee_name := p_header_record.header_record.employee_name;
1121: emp_record.employee_id := p_header_record.header_record.employee_id;
1122: emp_record.error_record := p_header_record.error_record;
1123:
1124: IF (g_asn_debug = 'Y') THEN
1125: asn_debug.put_line('In Validate Receiver Information');
1126: END IF;
1127:
1128: po_employees_sv.validate_employee_info(emp_record);

Line 1125: asn_debug.put_line('In Validate Receiver Information');

1121: emp_record.employee_id := p_header_record.header_record.employee_id;
1122: emp_record.error_record := p_header_record.error_record;
1123:
1124: IF (g_asn_debug = 'Y') THEN
1125: asn_debug.put_line('In Validate Receiver Information');
1126: END IF;
1127:
1128: po_employees_sv.validate_employee_info(emp_record);
1129:

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

1126: END IF;
1127:
1128: po_employees_sv.validate_employee_info(emp_record);
1129:
1130: IF (g_asn_debug = 'Y') THEN
1131: asn_debug.put_line(emp_record.error_record.error_status);
1132: END IF;
1133:
1134: IF emp_record.error_record.error_message = 'RECEIVER_ID' THEN

Line 1131: asn_debug.put_line(emp_record.error_record.error_status);

1127:
1128: po_employees_sv.validate_employee_info(emp_record);
1129:
1130: IF (g_asn_debug = 'Y') THEN
1131: asn_debug.put_line(emp_record.error_record.error_status);
1132: END IF;
1133:
1134: IF emp_record.error_record.error_message = 'RECEIVER_ID' THEN
1135: rcv_error_pkg.set_error_message('RCV_RECEIVER_ID', emp_record.error_record.error_message);

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

1143: 'RCV_HEADERS_INTERFACE',
1144: 'EMPLOYEE_ID'
1145: );
1146:
1147: IF (g_asn_debug = 'Y') THEN
1148: asn_debug.put_line('Validated receiver info');
1149: END IF;
1150: END IF;
1151:

Line 1148: asn_debug.put_line('Validated receiver info');

1144: 'EMPLOYEE_ID'
1145: );
1146:
1147: IF (g_asn_debug = 'Y') THEN
1148: asn_debug.put_line('Validated receiver info');
1149: END IF;
1150: END IF;
1151:
1152: /* validate freight carrier information */

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

1157: freight_record.freight_carrier_code := p_header_record.header_record.freight_carrier_code;
1158: freight_record.organization_id := p_header_record.header_record.ship_to_organization_id;
1159: freight_record.error_record := p_header_record.error_record;
1160:
1161: IF (g_asn_debug = 'Y') THEN
1162: asn_debug.put_line('In Validate Freight Carrier Information');
1163: END IF;
1164:
1165: po_terms_sv.validate_freight_carrier_info(freight_record);

Line 1162: asn_debug.put_line('In Validate Freight Carrier Information');

1158: freight_record.organization_id := p_header_record.header_record.ship_to_organization_id;
1159: freight_record.error_record := p_header_record.error_record;
1160:
1161: IF (g_asn_debug = 'Y') THEN
1162: asn_debug.put_line('In Validate Freight Carrier Information');
1163: END IF;
1164:
1165: po_terms_sv.validate_freight_carrier_info(freight_record);
1166:

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

1176: 'RCV_HEADERS_INTERFACE',
1177: 'FREIGHT_CARRIER_CODE'
1178: );
1179:
1180: IF (g_asn_debug = 'Y') THEN
1181: asn_debug.put_line('Validated freight carrier info');
1182: END IF;
1183: END IF;
1184:

Line 1181: asn_debug.put_line('Validated freight carrier info');

1177: 'FREIGHT_CARRIER_CODE'
1178: );
1179:
1180: IF (g_asn_debug = 'Y') THEN
1181: asn_debug.put_line('Validated freight carrier info');
1182: END IF;
1183: END IF;
1184:
1185: /* Validate Invoice Amount > 0 */

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

1196: 'RCV_HEADERS_INTERFACE',
1197: 'TOTAL_INVOICE_AMOUNT'
1198: );
1199:
1200: IF (g_asn_debug = 'Y') THEN
1201: asn_debug.put_line('Validated invoice amount');
1202: END IF;
1203: END IF;
1204:

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

1197: 'TOTAL_INVOICE_AMOUNT'
1198: );
1199:
1200: IF (g_asn_debug = 'Y') THEN
1201: asn_debug.put_line('Validated invoice amount');
1202: END IF;
1203: END IF;
1204:
1205: /* Validate that both Invoice number and shipment number are not

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

1217: 'RCV_HEADERS_INTERFACE',
1218: 'SHIPMENT_NUM'
1219: );
1220:
1221: IF (g_asn_debug = 'Y') THEN
1222: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1223: END IF;
1224: END IF;
1225:

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

1218: 'SHIPMENT_NUM'
1219: );
1220:
1221: IF (g_asn_debug = 'Y') THEN
1222: asn_debug.put_line('Validated invoice number/shipment number are not missing');
1223: END IF;
1224: END IF;
1225:
1226: /* Validate invoice_date is not missing */

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

1237: 'RCV_HEADERS_INTERFACE',
1238: 'INVOICE_DATE'
1239: );
1240:
1241: IF (g_asn_debug = 'Y') THEN
1242: asn_debug.put_line('Validated invoice date is not missing');
1243: END IF;
1244: END IF;
1245:

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

1238: 'INVOICE_DATE'
1239: );
1240:
1241: IF (g_asn_debug = 'Y') THEN
1242: asn_debug.put_line('Validated invoice date is not missing');
1243: END IF;
1244: END IF;
1245:
1246: /* Validate Invoice Tax Code */

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

1265: 'TAX_NAME'
1266: );
1267: END IF;
1268:
1269: IF (g_asn_debug = 'Y') THEN
1270: asn_debug.put_line('Validated tax info');
1271: END IF;
1272: END IF;
1273:

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

1266: );
1267: END IF;
1268:
1269: IF (g_asn_debug = 'Y') THEN
1270: asn_debug.put_line('Validated tax info');
1271: END IF;
1272: END IF;
1273:
1274: /* Validations on shipment number */

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

1277: 'RCV_HEADERS_INTERFACE',
1278: 'SHIPMENT_NUM'
1279: );
1280:
1281: IF (g_asn_debug = 'Y') THEN
1282: asn_debug.put_line('Validations for shipment_number ' || p_header_record.header_record.shipment_num);
1283: END IF;
1284:
1285: /* Validate gross_weight_uom_code */

Line 1282: asn_debug.put_line('Validations for shipment_number ' || p_header_record.header_record.shipment_num);

1278: 'SHIPMENT_NUM'
1279: );
1280:
1281: IF (g_asn_debug = 'Y') THEN
1282: asn_debug.put_line('Validations for shipment_number ' || p_header_record.header_record.shipment_num);
1283: END IF;
1284:
1285: /* Validate gross_weight_uom_code */
1286:

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

1302:
1303: /* Validate Excess Transportation Responsible */
1304:
1305: /* Validate Invoice Status Code */
1306: IF (g_asn_debug = 'Y') THEN
1307: asn_debug.put_line('Other Validations');
1308: END IF;
1309: EXCEPTION
1310: WHEN rcv_error_pkg.e_fatal_error THEN

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

1303: /* Validate Excess Transportation Responsible */
1304:
1305: /* Validate Invoice Status Code */
1306: IF (g_asn_debug = 'Y') THEN
1307: asn_debug.put_line('Other Validations');
1308: END IF;
1309: EXCEPTION
1310: WHEN rcv_error_pkg.e_fatal_error THEN
1311: NULL;

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

1536: x_to_organization_code VARCHAR2(3);
1537: BEGIN
1538: x_header_interface_id := p_header_record.header_record.header_interface_id;
1539:
1540: IF (g_asn_debug = 'Y') THEN
1541: asn_debug.put_line('No ship to org specified at the header');
1542: asn_debug.put_line('Trying to retrieve from lines');
1543: END IF;
1544:

Line 1541: asn_debug.put_line('No ship to org specified at the header');

1537: BEGIN
1538: x_header_interface_id := p_header_record.header_record.header_interface_id;
1539:
1540: IF (g_asn_debug = 'Y') THEN
1541: asn_debug.put_line('No ship to org specified at the header');
1542: asn_debug.put_line('Trying to retrieve from lines');
1543: END IF;
1544:
1545: SELECT MAX(rti.to_organization_code)

Line 1542: asn_debug.put_line('Trying to retrieve from lines');

1538: x_header_interface_id := p_header_record.header_record.header_interface_id;
1539:
1540: IF (g_asn_debug = 'Y') THEN
1541: asn_debug.put_line('No ship to org specified at the header');
1542: asn_debug.put_line('Trying to retrieve from lines');
1543: END IF;
1544:
1545: SELECT MAX(rti.to_organization_code)
1546: INTO x_to_organization_code

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

1551: * then derive it from the To Organization Id and if this is also not
1552: * specified then derive it from Ship To Location Code/Id which ever is
1553: * specified. */
1554: IF (x_to_organization_code IS NULL) THEN
1555: IF (g_asn_debug = 'Y') THEN
1556: asn_debug.put_line('No ship to org specified at the lines either');
1557: asn_debug.put_line('Trying to retrieve from to_organization_id');
1558: END IF;
1559:

Line 1556: asn_debug.put_line('No ship to org specified at the lines either');

1552: * specified then derive it from Ship To Location Code/Id which ever is
1553: * specified. */
1554: IF (x_to_organization_code IS NULL) THEN
1555: IF (g_asn_debug = 'Y') THEN
1556: asn_debug.put_line('No ship to org specified at the lines either');
1557: asn_debug.put_line('Trying to retrieve from to_organization_id');
1558: END IF;
1559:
1560: /* ksareddy RVCTP performance fix 2481798 - select from mtl_parameters instead

Line 1557: asn_debug.put_line('Trying to retrieve from to_organization_id');

1553: * specified. */
1554: IF (x_to_organization_code IS NULL) THEN
1555: IF (g_asn_debug = 'Y') THEN
1556: asn_debug.put_line('No ship to org specified at the lines either');
1557: asn_debug.put_line('Trying to retrieve from to_organization_id');
1558: END IF;
1559:
1560: /* ksareddy RVCTP performance fix 2481798 - select from mtl_parameters instead
1561: SELECT MAX(ORG.ORGANIZATION_CODE)

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

1573: AND mtl.organization_id = rti.to_organization_id;
1574: END IF;
1575:
1576: IF (x_to_organization_code IS NULL) THEN
1577: IF (g_asn_debug = 'Y') THEN
1578: asn_debug.put_line('Trying to retrieve from ship to location');
1579: END IF;
1580:
1581: /* Bug# 3924530 FP from 11i9 fix. Replaced the sql statement below with a

Line 1578: asn_debug.put_line('Trying to retrieve from ship to location');

1574: END IF;
1575:
1576: IF (x_to_organization_code IS NULL) THEN
1577: IF (g_asn_debug = 'Y') THEN
1578: asn_debug.put_line('Trying to retrieve from ship to location');
1579: END IF;
1580:
1581: /* Bug# 3924530 FP from 11i9 fix. Replaced the sql statement below with a
1582: * new one where we select the organization_code from table MTL_PARAMETERS

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

1605:
1606: IF ( p_header_record.header_record.ship_to_organization_code IS NULL
1607: AND p_header_record.header_record.ship_to_organization_id IS NULL) THEN
1608: IF (x_to_organization_code IS NOT NULL) THEN
1609: IF (g_asn_debug = 'Y') THEN
1610: asn_debug.put_line('A ship to location relating to an org was found');
1611: END IF;
1612:
1613: p_header_record.header_record.ship_to_organization_code := x_to_organization_code;

Line 1610: asn_debug.put_line('A ship to location relating to an org was found');

1606: IF ( p_header_record.header_record.ship_to_organization_code IS NULL
1607: AND p_header_record.header_record.ship_to_organization_id IS NULL) THEN
1608: IF (x_to_organization_code IS NOT NULL) THEN
1609: IF (g_asn_debug = 'Y') THEN
1610: asn_debug.put_line('A ship to location relating to an org was found');
1611: END IF;
1612:
1613: p_header_record.header_record.ship_to_organization_code := x_to_organization_code;
1614: ELSE

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

1611: END IF;
1612:
1613: p_header_record.header_record.ship_to_organization_code := x_to_organization_code;
1614: ELSE
1615: IF (g_asn_debug = 'Y') THEN
1616: asn_debug.put_line('A ship to location relating to an org was NOT found');
1617: asn_debug.put_line('This will cause an ERROR later');
1618: END IF;
1619: END IF;

Line 1616: asn_debug.put_line('A ship to location relating to an org was NOT found');

1612:
1613: p_header_record.header_record.ship_to_organization_code := x_to_organization_code;
1614: ELSE
1615: IF (g_asn_debug = 'Y') THEN
1616: asn_debug.put_line('A ship to location relating to an org was NOT found');
1617: asn_debug.put_line('This will cause an ERROR later');
1618: END IF;
1619: END IF;
1620: END IF;

Line 1617: asn_debug.put_line('This will cause an ERROR later');

1613: p_header_record.header_record.ship_to_organization_code := x_to_organization_code;
1614: ELSE
1615: IF (g_asn_debug = 'Y') THEN
1616: asn_debug.put_line('A ship to location relating to an org was NOT found');
1617: asn_debug.put_line('This will cause an ERROR later');
1618: END IF;
1619: END IF;
1620: END IF;
1621: EXCEPTION