152:
153: IF nvl(l_process_enabled_flag,'N') = 'Y' THEN
154: FND_MESSAGE.set_name('GMF','GMF_PROCESS_ORG_ERROR');
155: FND_MESSAGE.set_token('ORGCODE', l_organization_code);
156: FND_FILE.put_line(fnd_file.log,fnd_message.get);
157: Conc_request := FND_CONCURRENT.set_completion_status('ERROR',fnd_message.get);
158: RETURN;
159: END IF;
160:
178: else
179: l_ad_qp_mult := 'No';
180: End If;
181:
182: FND_FILE.put_line(fnd_file.log, 'Organization id : ' || to_char(p_organization_id)) ;
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
179: l_ad_qp_mult := 'No';
180: End If;
181:
182: FND_FILE.put_line(fnd_file.log, 'Organization id : ' || to_char(p_organization_id)) ;
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
180: End If;
181:
182: FND_FILE.put_line(fnd_file.log, 'Organization id : ' || to_char(p_organization_id)) ;
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
181:
182: FND_FILE.put_line(fnd_file.log, 'Organization id : ' || to_char(p_organization_id)) ;
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
182: FND_FILE.put_line(fnd_file.log, 'Organization id : ' || to_char(p_organization_id)) ;
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
183: FND_FILE.put_line(fnd_file.log, 'Price list name : ' || l_price_list_name ) ;
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
184: FND_FILE.put_line(fnd_file.log, 'Price list id : ' || to_char(p_pl_hdr_id) ) ;
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
192:
185: FND_FILE.put_line(fnd_file.log, 'Range : ' || to_char(p_range) ) ;
186: FND_FILE.put_line(fnd_file.log, 'Specific item : ' || to_char(p_specific_item_id) ) ;
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
192:
193: FND_FILE.put_line(fnd_file.log, 'QP:Multi Currency Installed : ' || l_ad_qp_mult);
187: FND_FILE.put_line(fnd_file.log, 'Category set : ' || to_char(p_category_set) ) ;
188: FND_FILE.put_line(fnd_file.log, 'Category id : ' || to_char(p_specific_category_id) ) ;
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
192:
193: FND_FILE.put_line(fnd_file.log, 'QP:Multi Currency Installed : ' || l_ad_qp_mult);
194:
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
189: FND_FILE.put_line(fnd_file.log, 'Item price eff date : ' ||
190: to_char(to_date(p_item_price_eff_date , 'RR/MM/DD HH24:MI:SS'),'DD-MON-RR') );
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
192:
193: FND_FILE.put_line(fnd_file.log, 'QP:Multi Currency Installed : ' || l_ad_qp_mult);
194:
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
191: FND_FILE.put_line(fnd_file.log, 'Based on rollup : ' || to_char(p_based_on_rollup));
192:
193: FND_FILE.put_line(fnd_file.log, 'QP:Multi Currency Installed : ' || l_ad_qp_mult);
194:
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
198: FND_FILE.put_line(fnd_file.log, 'Deflt matl subelement: ' || to_char(p_def_mtl_subelement) ) ;
199: FND_FILE.put_line(fnd_file.log, 'Group id : ' || to_char(p_group_id) ) ;
193: FND_FILE.put_line(fnd_file.log, 'QP:Multi Currency Installed : ' || l_ad_qp_mult);
194:
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
198: FND_FILE.put_line(fnd_file.log, 'Deflt matl subelement: ' || to_char(p_def_mtl_subelement) ) ;
199: FND_FILE.put_line(fnd_file.log, 'Group id : ' || to_char(p_group_id) ) ;
200: FND_FILE.put_line(fnd_file.log, '') ;
201:
194:
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
198: FND_FILE.put_line(fnd_file.log, 'Deflt matl subelement: ' || to_char(p_def_mtl_subelement) ) ;
199: FND_FILE.put_line(fnd_file.log, 'Group id : ' || to_char(p_group_id) ) ;
200: FND_FILE.put_line(fnd_file.log, '') ;
201:
202: /* First check for multiple simultaneously running requests with the same group ID parameter*/
195: FND_FILE.put_line(fnd_file.log, 'Conversion Type : ' || p_conv_type);
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
198: FND_FILE.put_line(fnd_file.log, 'Deflt matl subelement: ' || to_char(p_def_mtl_subelement) ) ;
199: FND_FILE.put_line(fnd_file.log, 'Group id : ' || to_char(p_group_id) ) ;
200: FND_FILE.put_line(fnd_file.log, '') ;
201:
202: /* First check for multiple simultaneously running requests with the same group ID parameter*/
203:
196:
197: FND_FILE.put_line(fnd_file.log, 'Conversion Date : ' || to_char(to_date(p_conv_date,'RR/MM/DD HH24:MI:SS'),'DD-MON-RR'));
198: FND_FILE.put_line(fnd_file.log, 'Deflt matl subelement: ' || to_char(p_def_mtl_subelement) ) ;
199: FND_FILE.put_line(fnd_file.log, 'Group id : ' || to_char(p_group_id) ) ;
200: FND_FILE.put_line(fnd_file.log, '') ;
201:
202: /* First check for multiple simultaneously running requests with the same group ID parameter*/
203:
204: l_stmt_num := 15;
221: from CST_ITEM_CST_DTLS_INTERFACE CICDI
222: where CICDI.group_id = l_req_groupid;
223:
224: If ((NVL(l_min_reqid,FND_GLOBAL.CONC_REQUEST_ID) <> FND_GLOBAL.CONC_REQUEST_ID)OR (l_base_count <> 0)) then
225: fnd_file.put_line(fnd_file.log,fnd_message.get_string('BOM','CST_REQ_ERROR'));
226: Conc_request := fnd_concurrent.set_completion_status('ERROR',fnd_message.get_string('BOM','CST_REQ_ERROR'));
227: return;
228: end If;
229:
231: /* check for NULL conversion date passed in */
232:
233: If (p_ad_qp_mult IS NOT NULL) AND (p_conv_date is NULL) then
234:
235: fnd_file.put_line(fnd_file.log,substrb(fnd_message.get_string('BOM','CST_NULL_CONV_DATE'),1,240));
236: Conc_request := fnd_concurrent.set_completion_status('ERROR',fnd_message.get_string('BOM','CST_NULL_CONV_DATE'));
237: return;
238:
239: End If;
246: where MP.organization_id = p_organization_id;
247:
248: If p_organization_id <> l_cost_organization_id
249: Then
250: FND_FILE.put_line(fnd_file.log,(fnd_message.get_string('BOM','CST_NOT_COSTINGORG')));
251: RETURN ;
252: End if ;
253:
254: l_stmt_num := 30 ;
285:
286: If ((UPPER(l_org_currency_code) <> UPPER(l_list_currency_code)) AND
287: (p_ad_qp_mult IS NOT NULL )) then
288:
289: -- fnd_file.put_line(fnd_file.log,'list code : ' || l_list_currency_code);
290: -- fnd_file.put_line(fnd_file.log,'org code :' || l_org_currency_code);
291:
292: /* Bail out the Exception */
293:
286: If ((UPPER(l_org_currency_code) <> UPPER(l_list_currency_code)) AND
287: (p_ad_qp_mult IS NOT NULL )) then
288:
289: -- fnd_file.put_line(fnd_file.log,'list code : ' || l_list_currency_code);
290: -- fnd_file.put_line(fnd_file.log,'org code :' || l_org_currency_code);
291:
292: /* Bail out the Exception */
293:
294: Begin
301: p_conv_type);
302:
303: EXCEPTION
304: WHEN OTHERS THEN
305: fnd_file.put_line(fnd_file.log,substrb(fnd_message.get_string('BOM','CST_NO_VALID_CURRATE'),1,240));
306:
307: Conc_request := fnd_concurrent.set_completion_status('ERROR',substrb(fnd_message.get_string('BOM','CST_NO_VALID_CURRATE'),1,240));
308: RETURN;
309:
316: l_conversion_rate := 1;
317: END IF ;
318: end if;
319:
320: FND_FILE.PUT_LINE(fnd_file.log,'Conversion rate is : ' || to_char(l_conversion_rate) );
321: FND_FILE.put_line(fnd_file.log, '') ;
322:
323: p_control_rec.pricing_event := 'PRICE'; -- discounts considered only with 'LINE'
324: p_control_rec.calculate_flag := 'Y';
317: END IF ;
318: end if;
319:
320: FND_FILE.PUT_LINE(fnd_file.log,'Conversion rate is : ' || to_char(l_conversion_rate) );
321: FND_FILE.put_line(fnd_file.log, '') ;
322:
323: p_control_rec.pricing_event := 'PRICE'; -- discounts considered only with 'LINE'
324: p_control_rec.calculate_flag := 'Y';
325: p_control_rec.simulation_flag := 'N';
388: END LOOP ; -- get_pl_items
389: Close get_pl_items ;
390:
391: IF l_item_count = 0 Then
392: FND_FILE.put_line(fnd_file.log,'No matching items found for specified parameters') ;
393: RETURN;
394: End if ;
395:
396: l_version := QP_PREQ_GRP.GET_VERSION;
393: RETURN;
394: End if ;
395:
396: l_version := QP_PREQ_GRP.GET_VERSION;
397: FND_FILE.put_line( fnd_file.log , 'Testing version '|| l_version);
398:
399: l_stmt_num := 60 ;
400: QP_PREQ_GRP.PRICE_REQUEST
401: (p_line_tbl,
415: x_related_lines_tbl,
416: x_return_status,
417: x_return_status_text);
418:
419: FND_FILE.put_line(fnd_file.log, 'Return status from pricing API ' || x_return_status) ;
420: FND_FILE.put_line(fnd_file.log, 'Return text from pricing API ' || x_return_status_text) ;
421:
422: IF x_return_status <> 'S' Then
423: RETURN ;
416: x_return_status,
417: x_return_status_text);
418:
419: FND_FILE.put_line(fnd_file.log, 'Return status from pricing API ' || x_return_status) ;
420: FND_FILE.put_line(fnd_file.log, 'Return text from pricing API ' || x_return_status_text) ;
421:
422: IF x_return_status <> 'S' Then
423: RETURN ;
424: End if ;
488: 1
489: ) ;
490:
491: If SQL%NOTFOUND then
492: FND_FILE.put_line(fnd_file.log,'Insert into interface failed for Item '
493: || l_item ) ;
494: End if ;
495:
496: END LOOP;
503: select count(*) into l_num_rows
504: from CST_ITEM_CST_DTLS_INTERFACE
505: where group_id = p_group_id ;
506:
507: FND_FILE.put_line(fnd_file.log,
508: 'Sucessfully inserted ' || to_char(l_num_rows)|| ' rows into CST_ITEM_CST_DTLS_INTERFACE table');
509:
510: EXCEPTION
511: When Others then
509:
510: EXCEPTION
511: When Others then
512: rollback ;
513: fnd_file.put_line(fnd_file.log,'CSTPLIMB:'|| to_char(l_stmt_num) || ' '||
514: substr(SQLERRM,1,180));
515: -- CONC_REQUEST := fnd_concurrent.set_completion_status
516: -- ('ERROR',(fnd_message.get_string('BOM','CST_EXCEPTION_OCCURED')) );
517: