39: p_line_count IN NUMBER DEFAULT NULL,
40: p_line_list IN VARCHAR2 DEFAULT NULL
41: )
42: IS
43: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
44:
45: l_lines_count NUMBER := 0;
46: l_lines_list VARCHAR2(4000);
47: l_submit_request BOOLEAN := FALSE;
160: FND_PROFILE.Get('CONC_REQUEST_ID', l_request_id);
161: l_req_data := fnd_conc_global.request_data;
162:
163: IF l_debug_level > 0 THEN
164: oe_debug_pub.add('REQUEST ID : '|| l_request_id, 1);
165: oe_debug_pub.add('Request Data : ' || nvl(l_req_data, -99), 1);
166: END IF;
167:
168: /* l_req_data is NULL means this is the Parent Request, being executed for first time.
161: l_req_data := fnd_conc_global.request_data;
162:
163: IF l_debug_level > 0 THEN
164: oe_debug_pub.add('REQUEST ID : '|| l_request_id, 1);
165: oe_debug_pub.add('Request Data : ' || nvl(l_req_data, -99), 1);
166: END IF;
167:
168: /* l_req_data is NULL means this is the Parent Request, being executed for first time.
169:
189:
190: fnd_file.put_line(FND_FILE.OUTPUT, 'Request Id: '|| to_char(l_request_id));
191:
192: IF l_debug_level > 0 THEN
193: oe_debug_pub.add('Entering OE_BATCH_PRICING.PRICE', 1);
194: END IF;
195:
196: ERRBUF := 'Batch Pricing Request completed successfully';
197: RETCODE := 0;
196: ERRBUF := 'Batch Pricing Request completed successfully';
197: RETCODE := 0;
198:
199: IF l_debug_level > 0 THEN
200: oe_debug_pub.add('Parameters are : ', 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
197: RETCODE := 0;
198:
199: IF l_debug_level > 0 THEN
200: oe_debug_pub.add('Parameters are : ', 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
198:
199: IF l_debug_level > 0 THEN
200: oe_debug_pub.add('Parameters are : ', 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
199: IF l_debug_level > 0 THEN
200: oe_debug_pub.add('Parameters are : ', 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
200: oe_debug_pub.add('Parameters are : ', 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
201: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
202: oe_debug_pub.add('...Preview Mode : ' || p_preview_mode, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
203: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
204: oe_debug_pub.add('...Order Number (Low) : ' || p_order_number_low, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
205: oe_debug_pub.add('...Order Number (High) : ' || p_order_number_high, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
206: oe_debug_pub.add('...Order Type : ' || p_order_type_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
207: oe_debug_pub.add('...Line Type : ' || p_line_type_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
208: oe_debug_pub.add('...Customer : ' || p_customer_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
209: oe_debug_pub.add('...Ship To Location : ' || p_ship_to_org_id, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
210: oe_debug_pub.add('...Bill To Location : ' || p_invoice_to_org_id, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
211: oe_debug_pub.add('...Customer Class : ' || p_customer_class_code, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
212: oe_debug_pub.add('...Salesrep : ' || p_salesrep_id, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
213: oe_debug_pub.add('...Pricelist : ' || p_price_list_id, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
214: oe_debug_pub.add('...Inventory Item : ' || p_inventory_item_id, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
215: oe_debug_pub.add('...Item Category : ' || p_item_category_id, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
216: oe_debug_pub.add('...Warehouse : ' || p_ship_from_org_id, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
217: oe_debug_pub.add('...Order Date (Low) : ' || p_order_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
218: oe_debug_pub.add('...Order Date (High) : ' || p_order_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
219: oe_debug_pub.add('...Order Creation Date (Low) : ' || p_order_creation_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
220: oe_debug_pub.add('...Order Creation Date (High) : ' || p_order_creation_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
221: oe_debug_pub.add('...Line Creation Date (Low) : ' || p_line_creation_date_low, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
229: oe_debug_pub.add('...Booked Orders : ' || p_booked_orders, 5);
222: oe_debug_pub.add('...Line Creation Date (High) : ' || p_line_creation_date_high, 5);
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
229: oe_debug_pub.add('...Booked Orders : ' || p_booked_orders, 5);
230: END IF;
223: oe_debug_pub.add('...Booked Date (Low) : ' || p_booked_date_low, 5);
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
229: oe_debug_pub.add('...Booked Orders : ' || p_booked_orders, 5);
230: END IF;
231:
224: oe_debug_pub.add('...Booked Date (High) : ' || p_booked_date_high, 5);
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
229: oe_debug_pub.add('...Booked Orders : ' || p_booked_orders, 5);
230: END IF;
231:
232: fnd_file.put_line(FND_FILE.OUTPUT, 'Parameters are : ');
225: oe_debug_pub.add('...Pricing Date (Low) : ' || p_pricing_date_low, 5);
226: oe_debug_pub.add('...Pricing Date (High) : ' || p_pricing_date_high, 5);
227: oe_debug_pub.add('...Schedule Ship Date (Low) : ' || p_schedule_ship_date_low, 5);
228: oe_debug_pub.add('...Schedule Ship Date (High) : ' || p_schedule_ship_date_high, 5);
229: oe_debug_pub.add('...Booked Orders : ' || p_booked_orders, 5);
230: END IF;
231:
232: fnd_file.put_line(FND_FILE.OUTPUT, 'Parameters are : ');
233: fnd_file.put_line(FND_FILE.OUTPUT, '...Pricing Level : ' || p_pricing_level);
260: fnd_file.put_line(FND_FILE.OUTPUT, '...Schedule Ship Date (High) : ' || p_schedule_ship_date_high);
261: fnd_file.put_line(FND_FILE.OUTPUT, '...Booked Orders : ' || p_booked_orders);
262:
263: IF l_debug_level > 0 THEN
264: oe_debug_pub.add('Before converting Canonical to Date', 5);
265: END IF;
266:
267: /* Convert Strings to Dates */
268: select FND_DATE.Canonical_To_Date(p_order_date_low),
291: l_schedule_ship_date_high
292: from dual;
293:
294: IF l_debug_level > 0 THEN
295: oe_debug_pub.add('After converting Canonical to Date', 5);
296: END IF;
297:
298: IF l_debug_level > 0 THEN
299: oe_debug_pub.add('Fetching data from cursor', 5);
295: oe_debug_pub.add('After converting Canonical to Date', 5);
296: END IF;
297:
298: IF l_debug_level > 0 THEN
299: oe_debug_pub.add('Fetching data from cursor', 5);
300: END IF;
301:
302: IF p_pricing_level = 'ORDER' THEN
303: /* Fetch the orders matching criteria */
311: CLOSE C_LINES;
312: END IF;
313:
314: IF l_debug_level > 0 THEN
315: oe_debug_pub.add('No of records fetched : ' || l_hdr_lines_tbl.count, 1);
316: END IF;
317:
318: fnd_file.put_line(FND_FILE.OUTPUT, 'No of Order(s) / Line(s) effected : ' || l_hdr_lines_tbl.count);
319:
470: l_lines_list -- p_line_list
471: );
472:
473: if l_debug_level > 0 then
474: oe_debug_pub.add('Submitted Child Request Id : ' || l_child_request || ', for Order : ' || l_hdr_lines_tbl(i).order_number, 1);
475: end if;
476:
477: fnd_file.put_line(FND_FILE.OUTPUT, 'Submitted Child Request Id : ' || l_child_request || ', for Order : ' || l_hdr_lines_tbl(i).order_number);
478:
495: errbuf := 'Sub-Request ' || to_char(l_req_data_counter) || 'submitted!';
496: retcode := 0;
497:
498: if l_debug_level > 0 then
499: oe_debug_pub.add('No of child requests submitted : ' || l_req_data_counter, 1);
500: end if;
501:
502: fnd_file.put_line(FND_FILE.OUTPUT, '');
503: fnd_file.put_line(FND_FILE.OUTPUT, 'No of child requests submitted : ' || l_req_data_counter);
506:
507: commit;
508:
509: IF l_debug_level > 0 THEN
510: oe_debug_pub.add('Exiting OE_BATCH_PRICING.PRICE', 1);
511: END IF;
512: ELSIF p_header_id is not null THEN
513: /* p_header_id is not null means, this is the child request */
514:
512: ELSIF p_header_id is not null THEN
513: /* p_header_id is not null means, this is the child request */
514:
515: IF l_debug_level > 0 THEN
516: oe_debug_pub.add('Entering OE_BATCH_PRICING.PRICE FOR CHILD_REQUEST', 1);
517: END IF;
518:
519: ERRBUF := 'Batch Pricing Child Request completed successfully';
520: RETCODE := 0;
519: ERRBUF := 'Batch Pricing Child Request completed successfully';
520: RETCODE := 0;
521:
522: IF l_debug_level > 0 THEN
523: oe_debug_pub.add('Fetching current user/resp context', 5);
524: END IF;
525:
526: FND_PROFILE.Get('USER_ID', l_user_id);
527: FND_PROFILE.Get('RESP_ID', l_resp_id);
527: FND_PROFILE.Get('RESP_ID', l_resp_id);
528: FND_PROFILE.Get('RESP_APPL_ID', l_resp_appl_id);
529:
530: IF l_debug_level > 0 THEN
531: oe_debug_pub.add('... Request ID : ' || l_request_id || '; USER_ID : ' || l_user_id || '; RESP_ID : ' || l_resp_id || '; APPL_ID : ' || l_resp_appl_id, 5);
532: END IF;
533:
534: fnd_global.apps_initialize(FND_GLOBAL.USER_ID, FND_GLOBAL.RESP_ID, FND_GLOBAL.RESP_APPL_ID);
535:
537: MO_GLOBAL.set_policy_context(p_access_mode => 'S', p_org_id => p_org_id);
538: END IF;
539:
540: IF l_debug_level > 0 THEN
541: oe_debug_pub.add('Before calling OE_ORDER_ADJ_PVT.Price_Action', 1);
542: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
543: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
544: oe_debug_pub.add('...Header Id : ' || p_header_id, 5);
545: oe_debug_pub.add('...Lines Count :' || p_line_count || '; List : ' || p_line_list, 5);
538: END IF;
539:
540: IF l_debug_level > 0 THEN
541: oe_debug_pub.add('Before calling OE_ORDER_ADJ_PVT.Price_Action', 1);
542: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
543: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
544: oe_debug_pub.add('...Header Id : ' || p_header_id, 5);
545: oe_debug_pub.add('...Lines Count :' || p_line_count || '; List : ' || p_line_list, 5);
546: END IF;
539:
540: IF l_debug_level > 0 THEN
541: oe_debug_pub.add('Before calling OE_ORDER_ADJ_PVT.Price_Action', 1);
542: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
543: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
544: oe_debug_pub.add('...Header Id : ' || p_header_id, 5);
545: oe_debug_pub.add('...Lines Count :' || p_line_count || '; List : ' || p_line_list, 5);
546: END IF;
547:
540: IF l_debug_level > 0 THEN
541: oe_debug_pub.add('Before calling OE_ORDER_ADJ_PVT.Price_Action', 1);
542: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
543: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
544: oe_debug_pub.add('...Header Id : ' || p_header_id, 5);
545: oe_debug_pub.add('...Lines Count :' || p_line_count || '; List : ' || p_line_list, 5);
546: END IF;
547:
548: IF p_pricing_level = 'ORDER' THEN
541: oe_debug_pub.add('Before calling OE_ORDER_ADJ_PVT.Price_Action', 1);
542: oe_debug_pub.add('...Pricing Level : ' || p_pricing_level, 5);
543: oe_debug_pub.add('...Operating Unit : ' || p_org_id, 5);
544: oe_debug_pub.add('...Header Id : ' || p_header_id, 5);
545: oe_debug_pub.add('...Lines Count :' || p_line_count || '; List : ' || p_line_list, 5);
546: END IF;
547:
548: IF p_pricing_level = 'ORDER' THEN
549: OE_ORDER_ADJ_PVT.price_action
571: );
572: END IF; -- p_pricing_level
573:
574: IF l_debug_level > 0 THEN
575: oe_debug_pub.add('After calling OE_ORDER_ADJ_PVT.Price_Action; Status : ' || l_return_status, 1);
576: END IF;
577:
578: IF l_return_status = 'S' THEN
579: commit;
581: rollback;
582: END IF;
583:
584: IF l_debug_level > 0 THEN
585: oe_debug_pub.add('Exiting OE_BATCH_PRICING.PRICE FOR CHILD_REQUEST', 1);
586: END IF;
587:
588: END IF; -- Child Request
589: Exception
587:
588: END IF; -- Child Request
589: Exception
590: When OTHERS Then
591: oe_debug_pub.add('Others error in OE_BATCH_PRICING.PRICE : ' || SQLERRM, 1);
592: rollback;
593:
594: END PRICE;
595: