46: select owner from sys.all_tables
47: where table_name = c_view_name;
48:
49: BEGIN
50: IF NVL(FND_PROFILE.VALUE('AMS_ENABLE_RECALC_AND_PREVIEW'), 'N') = 'Y'
51: THEN
52: l_request_id := FND_REQUEST.SUBMIT_REQUEST(
53: application => 'AMS',
54: program => 'AMSGMVTP',
571: fetch c_total_attributes into l_total_attributes;
572: close c_total_attributes;
573:
574: --Get values from profiles
575: l_sample_size := FND_PROFILE.VALUE('AMS_LIST_QT_SAMPLE_SIZE');
576: -- batoleti Bug# 4684584 the 'AMS_LIST_QT_SAMPLE_PCT' is considered only when taking the sample records.
577: -- in other cases, the sample_pct should be zero.
578: l_sample_pct := 0;
579:
580: Ams_Utility_Pvt.Write_Conc_log('Profile Value of AMS_LIST_QT_SAMPLE_SIZE : '|| to_char(l_sample_size));
581: Ams_Utility_Pvt.Write_Conc_log('Profile Value of AMS_LIST_QT_SAMPLE_PCT : '|| to_char(l_sample_pct));
582:
583: if l_master_total_records > l_sample_size then
584: l_sample_pct := FND_PROFILE.VALUE('AMS_LIST_QT_SAMPLE_PCT');
585: l_sample := 'Y';
586: l_sample_records := round((l_master_total_records * l_sample_pct)/100);
587: -- l_sample_pct := 30;
588: -- l_sample_pct := FND_PROFILE.VALUE('AMS_LIST_QT_SAMPLE_PCT');
584: l_sample_pct := FND_PROFILE.VALUE('AMS_LIST_QT_SAMPLE_PCT');
585: l_sample := 'Y';
586: l_sample_records := round((l_master_total_records * l_sample_pct)/100);
587: -- l_sample_pct := 30;
588: -- l_sample_pct := FND_PROFILE.VALUE('AMS_LIST_QT_SAMPLE_PCT');
589: -- Ams_Utility_Pvt.Write_Conc_log('Sampling percentage = '||l_sample_pct);
590: -- Ams_Utility_Pvt.Write_Conc_log('Sampling size = '||l_sample_size);
591: else
592: l_sample := 'N';
733: -- Construct The Where Clause
734: -- --------------------------
735: -- --------------------------------------------------------
736:
737: l_number_of_days := FND_PROFILE.VALUE('AMS_ORDER_LOOK_BACK_PRD_DAYS');
738: Ams_Utility_Pvt.Write_Conc_log('Profile value for Orders look back period: '||l_number_of_days);
739: Ams_Utility_Pvt.Write_Conc_log('Start: Construct The Where Clause ');
740: l_total_attributes := 0;
741: open c_tot_attributes_alias;